├── README.md ├── ReactiveSwift ├── .Package.test.swift ├── .gitignore ├── .gitmodules ├── .jazzy.yaml ├── .swift-version ├── .travis.yml ├── CONTRIBUTING.md ├── Cartfile ├── Cartfile.private ├── Cartfile.resolved ├── Carthage │ └── Checkouts │ │ ├── Nimble │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ └── PULL_REQUEST_TEMPLATE │ │ ├── .gitignore │ │ ├── .hound.yml │ │ ├── .swift-version │ │ ├── .swiftlint.yml │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── Dockerfile.test │ │ ├── Gemfile │ │ ├── Gemfile.lock │ │ ├── LICENSE │ │ ├── Nimble.podspec │ │ ├── Nimble.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── Nimble-iOS.xcscheme │ │ │ │ ├── Nimble-macOS.xcscheme │ │ │ │ └── Nimble-tvOS.xcscheme │ │ ├── Package.swift │ │ ├── README.md │ │ ├── Sources │ │ │ ├── Lib │ │ │ │ └── CwlPreconditionTesting │ │ │ │ │ ├── CwlCatchException │ │ │ │ │ └── CwlCatchException.swift │ │ │ │ │ ├── CwlCatchExceptionSupport │ │ │ │ │ ├── CwlCatchException.m │ │ │ │ │ └── include │ │ │ │ │ │ └── CwlCatchException.h │ │ │ │ │ ├── CwlMachBadInstructionHandler │ │ │ │ │ ├── CwlMachBadInstructionHandler.m │ │ │ │ │ ├── include │ │ │ │ │ │ └── CwlMachBadInstructionHandler.h │ │ │ │ │ ├── mach_excServer.c │ │ │ │ │ └── mach_excServer.h │ │ │ │ │ ├── CwlPreconditionTesting │ │ │ │ │ ├── CwlBadInstructionException.swift │ │ │ │ │ ├── CwlCatchBadInstruction.swift │ │ │ │ │ ├── CwlCatchBadInstructionPOSIX.swift │ │ │ │ │ ├── CwlDarwinDefinitions.swift │ │ │ │ │ ├── Mach │ │ │ │ │ │ └── CwlPreconditionTesting.h │ │ │ │ │ └── Posix │ │ │ │ │ │ └── CwlPreconditionTesting.h │ │ │ │ │ └── README.md │ │ │ ├── Nimble │ │ │ │ ├── Adapters │ │ │ │ │ ├── AdapterProtocols.swift │ │ │ │ │ ├── AssertionDispatcher.swift │ │ │ │ │ ├── AssertionRecorder.swift │ │ │ │ │ ├── NMBExpectation.swift │ │ │ │ │ ├── NMBObjCMatcher.swift │ │ │ │ │ ├── NimbleEnvironment.swift │ │ │ │ │ ├── NimbleXCTestHandler.swift │ │ │ │ │ └── NonObjectiveC │ │ │ │ │ │ └── ExceptionCapture.swift │ │ │ │ ├── DSL+Wait.swift │ │ │ │ ├── DSL.swift │ │ │ │ ├── Expectation.swift │ │ │ │ ├── Expression.swift │ │ │ │ ├── FailureMessage.swift │ │ │ │ ├── Info.plist │ │ │ │ ├── Matchers │ │ │ │ │ ├── AllPass.swift │ │ │ │ │ ├── AsyncMatcherWrapper.swift │ │ │ │ │ ├── BeAKindOf.swift │ │ │ │ │ ├── BeAnInstanceOf.swift │ │ │ │ │ ├── BeCloseTo.swift │ │ │ │ │ ├── BeEmpty.swift │ │ │ │ │ ├── BeGreaterThan.swift │ │ │ │ │ ├── BeGreaterThanOrEqualTo.swift │ │ │ │ │ ├── BeIdenticalTo.swift │ │ │ │ │ ├── BeLessThan.swift │ │ │ │ │ ├── BeLessThanOrEqual.swift │ │ │ │ │ ├── BeLogical.swift │ │ │ │ │ ├── BeNil.swift │ │ │ │ │ ├── BeVoid.swift │ │ │ │ │ ├── BeginWith.swift │ │ │ │ │ ├── Contain.swift │ │ │ │ │ ├── ContainElementSatisfying.swift │ │ │ │ │ ├── EndWith.swift │ │ │ │ │ ├── Equal.swift │ │ │ │ │ ├── HaveCount.swift │ │ │ │ │ ├── Match.swift │ │ │ │ │ ├── MatchError.swift │ │ │ │ │ ├── MatcherFunc.swift │ │ │ │ │ ├── MatcherProtocols.swift │ │ │ │ │ ├── PostNotification.swift │ │ │ │ │ ├── RaisesException.swift │ │ │ │ │ ├── SatisfyAnyOf.swift │ │ │ │ │ ├── ThrowAssertion.swift │ │ │ │ │ └── ThrowError.swift │ │ │ │ ├── Nimble.h │ │ │ │ └── Utils │ │ │ │ │ ├── Async.swift │ │ │ │ │ ├── Errors.swift │ │ │ │ │ ├── Functional.swift │ │ │ │ │ ├── SourceLocation.swift │ │ │ │ │ └── Stringers.swift │ │ │ └── NimbleObjectiveC │ │ │ │ ├── CurrentTestCaseTracker.h │ │ │ │ ├── DSL.h │ │ │ │ ├── DSL.m │ │ │ │ ├── NMBExceptionCapture.h │ │ │ │ ├── NMBExceptionCapture.m │ │ │ │ ├── NMBStringify.h │ │ │ │ ├── NMBStringify.m │ │ │ │ └── XCTestObservationCenter+Register.m │ │ ├── Tests │ │ │ ├── LinuxMain.swift │ │ │ └── NimbleTests │ │ │ │ ├── AsynchronousTest.swift │ │ │ │ ├── Helpers │ │ │ │ ├── ObjectWithLazyProperty.swift │ │ │ │ ├── XCTestCaseProvider.swift │ │ │ │ └── utils.swift │ │ │ │ ├── Info.plist │ │ │ │ ├── LinuxSupport.swift │ │ │ │ ├── Matchers │ │ │ │ ├── AllPassTest.swift │ │ │ │ ├── BeAKindOfTest.swift │ │ │ │ ├── BeAnInstanceOfTest.swift │ │ │ │ ├── BeCloseToTest.swift │ │ │ │ ├── BeEmptyTest.swift │ │ │ │ ├── BeGreaterThanOrEqualToTest.swift │ │ │ │ ├── BeGreaterThanTest.swift │ │ │ │ ├── BeIdenticalToObjectTest.swift │ │ │ │ ├── BeIdenticalToTest.swift │ │ │ │ ├── BeLessThanOrEqualToTest.swift │ │ │ │ ├── BeLessThanTest.swift │ │ │ │ ├── BeLogicalTest.swift │ │ │ │ ├── BeNilTest.swift │ │ │ │ ├── BeVoidTest.swift │ │ │ │ ├── BeginWithTest.swift │ │ │ │ ├── ContainElementSatisfyingTest.swift │ │ │ │ ├── ContainTest.swift │ │ │ │ ├── EndWithTest.swift │ │ │ │ ├── EqualTest.swift │ │ │ │ ├── HaveCountTest.swift │ │ │ │ ├── MatchErrorTest.swift │ │ │ │ ├── MatchTest.swift │ │ │ │ ├── PostNotificationTest.swift │ │ │ │ ├── RaisesExceptionTest.swift │ │ │ │ ├── SatisfyAnyOfTest.swift │ │ │ │ ├── ThrowAssertionTest.swift │ │ │ │ └── ThrowErrorTest.swift │ │ │ │ ├── SynchronousTests.swift │ │ │ │ ├── UserDescriptionTest.swift │ │ │ │ └── objc │ │ │ │ ├── NimbleSpecHelper.h │ │ │ │ ├── ObjCAllPassTest.m │ │ │ │ ├── ObjCAsyncTest.m │ │ │ │ ├── ObjCBeAnInstanceOfTest.m │ │ │ │ ├── ObjCBeCloseToTest.m │ │ │ │ ├── ObjCBeEmptyTest.m │ │ │ │ ├── ObjCBeFalseTest.m │ │ │ │ ├── ObjCBeFalsyTest.m │ │ │ │ ├── ObjCBeGreaterThanOrEqualToTest.m │ │ │ │ ├── ObjCBeGreaterThanTest.m │ │ │ │ ├── ObjCBeIdenticalToTest.m │ │ │ │ ├── ObjCBeKindOfTest.m │ │ │ │ ├── ObjCBeLessThanOrEqualToTest.m │ │ │ │ ├── ObjCBeLessThanTest.m │ │ │ │ ├── ObjCBeNilTest.m │ │ │ │ ├── ObjCBeTrueTest.m │ │ │ │ ├── ObjCBeTruthyTest.m │ │ │ │ ├── ObjCBeginWithTest.m │ │ │ │ ├── ObjCContainElementSatisfying.m │ │ │ │ ├── ObjCContainTest.m │ │ │ │ ├── ObjCEndWithTest.m │ │ │ │ ├── ObjCEqualTest.m │ │ │ │ ├── ObjCHaveCount.m │ │ │ │ ├── ObjCMatchTest.m │ │ │ │ ├── ObjCRaiseExceptionTest.m │ │ │ │ ├── ObjCSatisfyAnyOfTest.m │ │ │ │ ├── ObjCSyncTest.m │ │ │ │ ├── ObjCUserDescriptionTest.m │ │ │ │ └── ObjcStringersTest.m │ │ ├── script │ │ │ └── release │ │ └── test │ │ ├── Quick │ │ ├── .Package.test.swift │ │ ├── .github │ │ │ ├── ISSUE_TEMPLATE │ │ │ └── PULL_REQUEST_TEMPLATE │ │ ├── .gitignore │ │ ├── .gitmodules │ │ ├── .hound.yml │ │ ├── .swift-version │ │ ├── .swiftlint.yml │ │ ├── .travis.yml │ │ ├── CODE_OF_CONDUCT.md │ │ ├── CONTRIBUTING.md │ │ ├── Dangerfile │ │ ├── Documentation │ │ │ ├── README.md │ │ │ ├── en-us │ │ │ │ ├── ArrangeActAssert.md │ │ │ │ ├── BehavioralTesting.md │ │ │ │ ├── ConfiguringQuick.md │ │ │ │ ├── InstallingFileTemplates.md │ │ │ │ ├── InstallingQuick.md │ │ │ │ ├── MoreResources.md │ │ │ │ ├── NimbleAssertions.md │ │ │ │ ├── QuickExamplesAndGroups.md │ │ │ │ ├── QuickInObjectiveC.md │ │ │ │ ├── README.md │ │ │ │ ├── SettingUpYourXcodeProject.md │ │ │ │ ├── SharedExamples.md │ │ │ │ ├── TestUsingTestDoubles.md │ │ │ │ ├── TestingApps.md │ │ │ │ └── Troubleshooting.md │ │ │ ├── ja │ │ │ │ ├── ArrangeActAssert.md │ │ │ │ ├── BehavioralTesting.md │ │ │ │ ├── ConfiguringQuick.md │ │ │ │ ├── InstallingFileTemplates.md │ │ │ │ ├── InstallingQuick.md │ │ │ │ ├── MoreResources.md │ │ │ │ ├── NimbleAssertions.md │ │ │ │ ├── QuickExamplesAndGroups.md │ │ │ │ ├── QuickInObjectiveC.md │ │ │ │ ├── README.md │ │ │ │ ├── SettingUpYourXcodeProject.md │ │ │ │ ├── SharedExamples.md │ │ │ │ ├── TestUsingTestDoubles.md │ │ │ │ ├── TestingApps.md │ │ │ │ └── Troubleshooting.md │ │ │ ├── pt-br │ │ │ │ ├── BehavioralTesting.md │ │ │ │ ├── README.md │ │ │ │ └── SharedExamples.md │ │ │ └── zh-cn │ │ │ │ ├── ArrangeActAssert.md │ │ │ │ ├── BehavioralTesting.md │ │ │ │ ├── ConfiguringQuick.md │ │ │ │ ├── InstallingFileTemplates.md │ │ │ │ ├── InstallingQuick.md │ │ │ │ ├── MoreResources.md │ │ │ │ ├── NimbleAssertions.md │ │ │ │ ├── QuickExamplesAndGroups.md │ │ │ │ ├── QuickInObjectiveC.md │ │ │ │ ├── README.md │ │ │ │ ├── SettingUpYourXcodeProject.md │ │ │ │ ├── SharedExamples.md │ │ │ │ ├── TestUsingTestDoubles.md │ │ │ │ ├── TestingApps.md │ │ │ │ └── Troubleshooting.md │ │ ├── Externals │ │ │ └── Nimble │ │ │ │ ├── .github │ │ │ │ ├── ISSUE_TEMPLATE │ │ │ │ └── PULL_REQUEST_TEMPLATE │ │ │ │ ├── .gitignore │ │ │ │ ├── .hound.yml │ │ │ │ ├── .swift-version │ │ │ │ ├── .swiftlint.yml │ │ │ │ ├── .travis.yml │ │ │ │ ├── CONTRIBUTING.md │ │ │ │ ├── Gemfile │ │ │ │ ├── Gemfile.lock │ │ │ │ ├── LICENSE │ │ │ │ ├── Nimble.podspec │ │ │ │ ├── Nimble.xcodeproj │ │ │ │ ├── project.pbxproj │ │ │ │ ├── project.xcworkspace │ │ │ │ │ └── contents.xcworkspacedata │ │ │ │ └── xcshareddata │ │ │ │ │ └── xcschemes │ │ │ │ │ ├── Nimble-iOS.xcscheme │ │ │ │ │ ├── Nimble-macOS.xcscheme │ │ │ │ │ └── Nimble-tvOS.xcscheme │ │ │ │ ├── Package.swift │ │ │ │ ├── README.md │ │ │ │ ├── Sources │ │ │ │ ├── Lib │ │ │ │ │ └── CwlPreconditionTesting │ │ │ │ │ │ ├── CwlCatchException │ │ │ │ │ │ ├── .gitignore │ │ │ │ │ │ └── CwlCatchException │ │ │ │ │ │ │ ├── CwlCatchException.h │ │ │ │ │ │ │ ├── CwlCatchException.m │ │ │ │ │ │ │ ├── CwlCatchException.swift │ │ │ │ │ │ │ └── Info.plist │ │ │ │ │ │ ├── CwlPreconditionTesting │ │ │ │ │ │ ├── CwlBadInstructionException.swift │ │ │ │ │ │ ├── CwlCatchBadInstruction.h │ │ │ │ │ │ ├── CwlCatchBadInstruction.m │ │ │ │ │ │ ├── CwlCatchBadInstruction.swift │ │ │ │ │ │ ├── CwlCatchBadInstructionPOSIX.swift │ │ │ │ │ │ ├── CwlDarwinDefinitions.swift │ │ │ │ │ │ ├── Info.plist │ │ │ │ │ │ ├── mach_excServer.c │ │ │ │ │ │ └── mach_excServer.h │ │ │ │ │ │ └── README.md │ │ │ │ ├── Nimble │ │ │ │ │ ├── Adapters │ │ │ │ │ │ ├── AdapterProtocols.swift │ │ │ │ │ │ ├── AssertionDispatcher.swift │ │ │ │ │ │ ├── AssertionRecorder.swift │ │ │ │ │ │ ├── NMBExpectation.swift │ │ │ │ │ │ ├── NMBObjCMatcher.swift │ │ │ │ │ │ ├── NimbleEnvironment.swift │ │ │ │ │ │ ├── NimbleXCTestHandler.swift │ │ │ │ │ │ └── NonObjectiveC │ │ │ │ │ │ │ └── ExceptionCapture.swift │ │ │ │ │ ├── DSL+Wait.swift │ │ │ │ │ ├── DSL.swift │ │ │ │ │ ├── Expectation.swift │ │ │ │ │ ├── Expression.swift │ │ │ │ │ ├── FailureMessage.swift │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── Matchers │ │ │ │ │ │ ├── AllPass.swift │ │ │ │ │ │ ├── AsyncMatcherWrapper.swift │ │ │ │ │ │ ├── BeAKindOf.swift │ │ │ │ │ │ ├── BeAnInstanceOf.swift │ │ │ │ │ │ ├── BeCloseTo.swift │ │ │ │ │ │ ├── BeEmpty.swift │ │ │ │ │ │ ├── BeGreaterThan.swift │ │ │ │ │ │ ├── BeGreaterThanOrEqualTo.swift │ │ │ │ │ │ ├── BeIdenticalTo.swift │ │ │ │ │ │ ├── BeLessThan.swift │ │ │ │ │ │ ├── BeLessThanOrEqual.swift │ │ │ │ │ │ ├── BeLogical.swift │ │ │ │ │ │ ├── BeNil.swift │ │ │ │ │ │ ├── BeVoid.swift │ │ │ │ │ │ ├── BeginWith.swift │ │ │ │ │ │ ├── Contain.swift │ │ │ │ │ │ ├── ContainElementSatisfying.swift │ │ │ │ │ │ ├── EndWith.swift │ │ │ │ │ │ ├── Equal.swift │ │ │ │ │ │ ├── HaveCount.swift │ │ │ │ │ │ ├── Match.swift │ │ │ │ │ │ ├── MatchError.swift │ │ │ │ │ │ ├── MatcherFunc.swift │ │ │ │ │ │ ├── MatcherProtocols.swift │ │ │ │ │ │ ├── PostNotification.swift │ │ │ │ │ │ ├── RaisesException.swift │ │ │ │ │ │ ├── SatisfyAnyOf.swift │ │ │ │ │ │ ├── ThrowAssertion.swift │ │ │ │ │ │ └── ThrowError.swift │ │ │ │ │ ├── Nimble.h │ │ │ │ │ └── Utils │ │ │ │ │ │ ├── Async.swift │ │ │ │ │ │ ├── Errors.swift │ │ │ │ │ │ ├── Functional.swift │ │ │ │ │ │ ├── SourceLocation.swift │ │ │ │ │ │ └── Stringers.swift │ │ │ │ └── NimbleObjectiveC │ │ │ │ │ ├── CurrentTestCaseTracker.h │ │ │ │ │ ├── DSL.h │ │ │ │ │ ├── DSL.m │ │ │ │ │ ├── NMBExceptionCapture.h │ │ │ │ │ ├── NMBExceptionCapture.m │ │ │ │ │ ├── NMBStringify.h │ │ │ │ │ ├── NMBStringify.m │ │ │ │ │ └── XCTestObservationCenter+Register.m │ │ │ │ ├── Tests │ │ │ │ ├── LinuxMain.swift │ │ │ │ └── NimbleTests │ │ │ │ │ ├── AsynchronousTest.swift │ │ │ │ │ ├── Helpers │ │ │ │ │ ├── ObjectWithLazyProperty.swift │ │ │ │ │ ├── XCTestCaseProvider.swift │ │ │ │ │ └── utils.swift │ │ │ │ │ ├── Info.plist │ │ │ │ │ ├── LinuxSupport.swift │ │ │ │ │ ├── Matchers │ │ │ │ │ ├── AllPassTest.swift │ │ │ │ │ ├── BeAKindOfTest.swift │ │ │ │ │ ├── BeAnInstanceOfTest.swift │ │ │ │ │ ├── BeCloseToTest.swift │ │ │ │ │ ├── BeEmptyTest.swift │ │ │ │ │ ├── BeGreaterThanOrEqualToTest.swift │ │ │ │ │ ├── BeGreaterThanTest.swift │ │ │ │ │ ├── BeIdenticalToObjectTest.swift │ │ │ │ │ ├── BeIdenticalToTest.swift │ │ │ │ │ ├── BeLessThanOrEqualToTest.swift │ │ │ │ │ ├── BeLessThanTest.swift │ │ │ │ │ ├── BeLogicalTest.swift │ │ │ │ │ ├── BeNilTest.swift │ │ │ │ │ ├── BeVoidTest.swift │ │ │ │ │ ├── BeginWithTest.swift │ │ │ │ │ ├── ContainElementSatisfyingTest.swift │ │ │ │ │ ├── ContainTest.swift │ │ │ │ │ ├── EndWithTest.swift │ │ │ │ │ ├── EqualTest.swift │ │ │ │ │ ├── HaveCountTest.swift │ │ │ │ │ ├── MatchErrorTest.swift │ │ │ │ │ ├── MatchTest.swift │ │ │ │ │ ├── PostNotificationTest.swift │ │ │ │ │ ├── RaisesExceptionTest.swift │ │ │ │ │ ├── SatisfyAnyOfTest.swift │ │ │ │ │ ├── ThrowAssertionTest.swift │ │ │ │ │ └── ThrowErrorTest.swift │ │ │ │ │ ├── SynchronousTests.swift │ │ │ │ │ ├── UserDescriptionTest.swift │ │ │ │ │ └── objc │ │ │ │ │ ├── NimbleSpecHelper.h │ │ │ │ │ ├── ObjCAllPassTest.m │ │ │ │ │ ├── ObjCAsyncTest.m │ │ │ │ │ ├── ObjCBeAnInstanceOfTest.m │ │ │ │ │ ├── ObjCBeCloseToTest.m │ │ │ │ │ ├── ObjCBeEmptyTest.m │ │ │ │ │ ├── ObjCBeFalseTest.m │ │ │ │ │ ├── ObjCBeFalsyTest.m │ │ │ │ │ ├── ObjCBeGreaterThanOrEqualToTest.m │ │ │ │ │ ├── ObjCBeGreaterThanTest.m │ │ │ │ │ ├── ObjCBeIdenticalToTest.m │ │ │ │ │ ├── ObjCBeKindOfTest.m │ │ │ │ │ ├── ObjCBeLessThanOrEqualToTest.m │ │ │ │ │ ├── ObjCBeLessThanTest.m │ │ │ │ │ ├── ObjCBeNilTest.m │ │ │ │ │ ├── ObjCBeTrueTest.m │ │ │ │ │ ├── ObjCBeTruthyTest.m │ │ │ │ │ ├── ObjCBeginWithTest.m │ │ │ │ │ ├── ObjCContainElementSatisfying.m │ │ │ │ │ ├── ObjCContainTest.m │ │ │ │ │ ├── ObjCEndWithTest.m │ │ │ │ │ ├── ObjCEqualTest.m │ │ │ │ │ ├── ObjCHaveCount.m │ │ │ │ │ ├── ObjCMatchTest.m │ │ │ │ │ ├── ObjCRaiseExceptionTest.m │ │ │ │ │ ├── ObjCSatisfyAnyOfTest.m │ │ │ │ │ ├── ObjCSyncTest.m │ │ │ │ │ ├── ObjCUserDescriptionTest.m │ │ │ │ │ └── ObjcStringersTest.m │ │ │ │ ├── script │ │ │ │ └── release │ │ │ │ └── test │ │ ├── Gemfile │ │ ├── Gemfile.lock │ │ ├── LICENSE │ │ ├── Package.swift │ │ ├── Quick Templates │ │ │ ├── Quick Configuration Class.xctemplate │ │ │ │ ├── Objective-C │ │ │ │ │ ├── ___FILEBASENAME___.h │ │ │ │ │ └── ___FILEBASENAME___.m │ │ │ │ ├── Swift │ │ │ │ │ └── ___FILEBASENAME___.swift │ │ │ │ ├── TemplateIcon.icns │ │ │ │ └── TemplateInfo.plist │ │ │ └── Quick Spec Class.xctemplate │ │ │ │ ├── Objective-C │ │ │ │ └── ___FILEBASENAME___.m │ │ │ │ ├── Swift │ │ │ │ └── ___FILEBASENAME___.swift │ │ │ │ ├── TemplateIcon.icns │ │ │ │ └── TemplateInfo.plist │ │ ├── Quick.podspec │ │ ├── Quick.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── Quick-iOS.xcscheme │ │ │ │ ├── Quick-macOS.xcscheme │ │ │ │ └── Quick-tvOS.xcscheme │ │ ├── Quick.xcworkspace │ │ │ └── contents.xcworkspacedata │ │ ├── README.md │ │ ├── Rakefile │ │ ├── Sources │ │ │ ├── Quick │ │ │ │ ├── Callsite.swift │ │ │ │ ├── Configuration │ │ │ │ │ ├── Configuration.swift │ │ │ │ │ └── QuickConfiguration.swift │ │ │ │ ├── DSL │ │ │ │ │ ├── DSL.swift │ │ │ │ │ └── World+DSL.swift │ │ │ │ ├── ErrorUtility.swift │ │ │ │ ├── Example.swift │ │ │ │ ├── ExampleGroup.swift │ │ │ │ ├── ExampleMetadata.swift │ │ │ │ ├── Filter.swift │ │ │ │ ├── Hooks │ │ │ │ │ ├── Closures.swift │ │ │ │ │ ├── ExampleHooks.swift │ │ │ │ │ ├── HooksPhase.swift │ │ │ │ │ └── SuiteHooks.swift │ │ │ │ ├── Info.plist │ │ │ │ ├── NSBundle+CurrentTestBundle.swift │ │ │ │ ├── NSString+C99ExtendedIdentifier.swift │ │ │ │ ├── QuickMain.swift │ │ │ │ ├── QuickSelectedTestSuiteBuilder.swift │ │ │ │ ├── QuickSpec.swift │ │ │ │ ├── QuickTestSuite.swift │ │ │ │ ├── URL+FileName.swift │ │ │ │ └── World.swift │ │ │ ├── QuickObjectiveC │ │ │ │ ├── Configuration │ │ │ │ │ ├── QuickConfiguration.h │ │ │ │ │ └── QuickConfiguration.m │ │ │ │ ├── DSL │ │ │ │ │ ├── QCKDSL.h │ │ │ │ │ ├── QCKDSL.m │ │ │ │ │ └── World+DSL.h │ │ │ │ ├── Quick.h │ │ │ │ ├── QuickSpec.h │ │ │ │ ├── QuickSpec.m │ │ │ │ ├── World.h │ │ │ │ └── XCTestSuite+QuickTestSuiteBuilder.m │ │ │ └── QuickSpecBase │ │ │ │ ├── QuickSpecBase.m │ │ │ │ └── include │ │ │ │ └── QuickSpecBase.h │ │ ├── Tests │ │ │ ├── LinuxMain.swift │ │ │ └── QuickTests │ │ │ │ ├── QuickAfterSuiteTests │ │ │ │ ├── AfterSuiteTests+ObjC.m │ │ │ │ ├── AfterSuiteTests.swift │ │ │ │ └── Info.plist │ │ │ │ ├── QuickFocusedTests │ │ │ │ ├── FocusedTests+ObjC.m │ │ │ │ ├── FocusedTests.swift │ │ │ │ └── Info.plist │ │ │ │ ├── QuickTestHelpers │ │ │ │ ├── SpecRunner.swift │ │ │ │ ├── TestRun.swift │ │ │ │ └── XCTestCaseProvider.swift │ │ │ │ └── QuickTests │ │ │ │ ├── Fixtures │ │ │ │ └── FunctionalTests_SharedExamplesTests_SharedExamples.swift │ │ │ │ ├── FunctionalTests │ │ │ │ ├── AfterEachTests.swift │ │ │ │ ├── BeforeEachTests.swift │ │ │ │ ├── BeforeSuiteTests.swift │ │ │ │ ├── BundleModuleNameTests.swift │ │ │ │ ├── Configuration │ │ │ │ │ ├── AfterEach │ │ │ │ │ │ ├── Configuration+AfterEach.swift │ │ │ │ │ │ └── Configuration+AfterEachTests.swift │ │ │ │ │ └── BeforeEach │ │ │ │ │ │ ├── Configuration+BeforeEach.swift │ │ │ │ │ │ └── Configuration+BeforeEachTests.swift │ │ │ │ ├── ContextTests.swift │ │ │ │ ├── CrossReferencingSpecs.swift │ │ │ │ ├── DescribeTests.swift │ │ │ │ ├── ItTests.swift │ │ │ │ ├── ObjC │ │ │ │ │ ├── AfterEachTests+ObjC.m │ │ │ │ │ ├── BeforeEachTests+ObjC.m │ │ │ │ │ ├── BeforeSuiteTests+ObjC.m │ │ │ │ │ ├── FailureTests+ObjC.m │ │ │ │ │ ├── FailureUsingXCTAssertTests+ObjC.m │ │ │ │ │ ├── ItTests+ObjC.m │ │ │ │ │ ├── PendingTests+ObjC.m │ │ │ │ │ ├── SharedExamples+BeforeEachTests+ObjC.m │ │ │ │ │ └── SharedExamplesTests+ObjC.m │ │ │ │ ├── PendingTests.swift │ │ │ │ ├── SharedExamples+BeforeEachTests.swift │ │ │ │ └── SharedExamplesTests.swift │ │ │ │ ├── Helpers │ │ │ │ ├── QCKSpecRunner.h │ │ │ │ ├── QCKSpecRunner.m │ │ │ │ ├── QuickSpec+QuickSpec_MethodList.h │ │ │ │ ├── QuickSpec+QuickSpec_MethodList.m │ │ │ │ ├── QuickTestsBridgingHeader.h │ │ │ │ ├── XCTestObservationCenter+QCKSuspendObservation.h │ │ │ │ └── XCTestObservationCenter+QCKSuspendObservation.m │ │ │ │ ├── Info.plist │ │ │ │ └── QuickConfigurationTests.m │ │ └── script │ │ │ ├── release │ │ │ ├── travis-install-linux │ │ │ ├── travis-install-macos │ │ │ ├── travis-script-linux │ │ │ └── travis-script-macos │ │ ├── Result │ │ ├── .gitignore │ │ ├── .swift-version │ │ ├── .travis.yml │ │ ├── CONTRIBUTING.md │ │ ├── LICENSE │ │ ├── Package.swift │ │ ├── README.md │ │ ├── Result.podspec │ │ ├── Result.xcodeproj │ │ │ ├── project.pbxproj │ │ │ ├── project.xcworkspace │ │ │ │ └── contents.xcworkspacedata │ │ │ └── xcshareddata │ │ │ │ └── xcschemes │ │ │ │ ├── Result-Mac.xcscheme │ │ │ │ ├── Result-iOS.xcscheme │ │ │ │ ├── Result-tvOS.xcscheme │ │ │ │ └── Result-watchOS.xcscheme │ │ ├── Result │ │ │ ├── Info.plist │ │ │ ├── Result.h │ │ │ ├── Result.swift │ │ │ └── ResultProtocol.swift │ │ └── Tests │ │ │ ├── LinuxMain.swift │ │ │ └── ResultTests │ │ │ ├── Info.plist │ │ │ └── ResultTests.swift │ │ └── xcconfigs │ │ ├── .gitignore │ │ ├── Base │ │ ├── Common.xcconfig │ │ ├── Configurations │ │ │ ├── Debug.xcconfig │ │ │ ├── Profile.xcconfig │ │ │ ├── Release.xcconfig │ │ │ └── Test.xcconfig │ │ └── Targets │ │ │ ├── Application.xcconfig │ │ │ ├── Framework.xcconfig │ │ │ └── StaticLibrary.xcconfig │ │ ├── Mac OS X │ │ ├── Mac-Application.xcconfig │ │ ├── Mac-Base.xcconfig │ │ ├── Mac-DynamicLibrary.xcconfig │ │ ├── Mac-Framework.xcconfig │ │ └── Mac-StaticLibrary.xcconfig │ │ ├── README.md │ │ ├── iOS │ │ ├── iOS-Application.xcconfig │ │ ├── iOS-Base.xcconfig │ │ ├── iOS-Framework.xcconfig │ │ └── iOS-StaticLibrary.xcconfig │ │ ├── tvOS │ │ ├── tvOS-Application.xcconfig │ │ ├── tvOS-Base.xcconfig │ │ ├── tvOS-Framework.xcconfig │ │ └── tvOS-StaticLibrary.xcconfig │ │ └── watchOS │ │ ├── watchOS-Application.xcconfig │ │ ├── watchOS-Base.xcconfig │ │ ├── watchOS-Framework.xcconfig │ │ └── watchOS-StaticLibrary.xcconfig ├── CodeOfConduct.md ├── Documentation │ ├── BasicOperators.md │ ├── DebuggingTechniques.md │ ├── DesignGuidelines.md │ └── FrameworkOverview.md ├── LICENSE.md ├── Logo │ ├── AF │ │ ├── Docs.afdesign │ │ ├── JoinSlack.afdesign │ │ └── ReactiveSwift.afdesign │ ├── Icons │ │ └── Swift.png │ ├── PNG │ │ ├── Docs.png │ │ ├── JoinSlack.png │ │ ├── logo-Swift-unpadded.png │ │ └── logo-Swift.png │ ├── Palette.png │ ├── README.md │ ├── SVG │ │ └── logo-Swift.svg │ └── header.png ├── Package.swift ├── README.md ├── ReactiveSwift-UIExamples.playground │ ├── Pages │ │ └── ValidatingProperty.xcplaygroundpage │ │ │ ├── Contents.swift │ │ │ └── Sources │ │ │ ├── FormView.swift │ │ │ ├── StdlibExtensions.swift │ │ │ └── UIKitExtensions.swift │ ├── Sources │ │ └── PlaygroundUtility.swift │ └── contents.xcplayground ├── ReactiveSwift.playground │ ├── Pages │ │ ├── Property.xcplaygroundpage │ │ │ └── Contents.swift │ │ ├── Sandbox.xcplaygroundpage │ │ │ └── Contents.swift │ │ ├── Signal.xcplaygroundpage │ │ │ └── Contents.swift │ │ └── SignalProducer.xcplaygroundpage │ │ │ └── Contents.swift │ ├── Sources │ │ └── PlaygroundUtility.swift │ └── contents.xcplayground ├── ReactiveSwift.podspec ├── ReactiveSwift.xcodeproj │ ├── project.pbxproj │ └── xcshareddata │ │ └── xcschemes │ │ ├── ReactiveSwift-iOS.xcscheme │ │ ├── ReactiveSwift-macOS.xcscheme │ │ ├── ReactiveSwift-tvOS.xcscheme │ │ └── ReactiveSwift-watchOS.xcscheme ├── ReactiveSwift.xcworkspace │ └── contents.xcworkspacedata ├── Sources │ ├── Action.swift │ ├── Atomic.swift │ ├── Bag.swift │ ├── Deprecations+Removals.swift │ ├── Disposable.swift │ ├── Event.swift │ ├── EventLogger.swift │ ├── Flatten.swift │ ├── FoundationExtensions.swift │ ├── Info.plist │ ├── Lifetime.swift │ ├── Observer.swift │ ├── Optional.swift │ ├── Property.swift │ ├── Reactive.swift │ ├── ReactiveSwift.h │ ├── ResultExtensions.swift │ ├── Scheduler.swift │ ├── Signal.swift │ ├── SignalProducer.swift │ ├── TupleExtensions.swift │ ├── UnidirectionalBinding.swift │ └── ValidatingProperty.swift ├── Tests │ ├── LinuxMain.swift │ └── ReactiveSwiftTests │ │ ├── ActionSpec.swift │ │ ├── AtomicSpec.swift │ │ ├── BagSpec.swift │ │ ├── DeprecationSpec.swift │ │ ├── DisposableSpec.swift │ │ ├── FlattenSpec.swift │ │ ├── FoundationExtensionsSpec.swift │ │ ├── Info.plist │ │ ├── LifetimeSpec.swift │ │ ├── PropertySpec.swift │ │ ├── ReactiveExtensionsSpec.swift │ │ ├── SchedulerSpec.swift │ │ ├── SignalLifetimeSpec.swift │ │ ├── SignalProducerLiftingSpec.swift │ │ ├── SignalProducerNimbleMatchers.swift │ │ ├── SignalProducerSpec.swift │ │ ├── SignalSpec.swift │ │ ├── TestError.swift │ │ ├── TestLogger.swift │ │ ├── UnidirectionalBindingSpec.swift │ │ └── ValidatingPropertySpec.swift └── script │ ├── build │ ├── gen-docs │ └── validate-playground.sh ├── SwiftTalk.playground ├── Contents.swift ├── Sources │ ├── IsValidHelpers.swift │ └── TestObserver.swift ├── contents.xcplayground ├── playground.xcworkspace │ └── contents.xcworkspacedata └── timeline.xctimeline ├── SwiftTalk.xcodeproj ├── project.pbxproj └── project.xcworkspace │ ├── contents.xcworkspacedata │ └── xcshareddata │ └── SwiftTalk.xcscmblueprint └── SwiftTalk ├── AppDelegate.swift ├── Assets.xcassets └── AppIcon.appiconset │ └── Contents.json ├── Base.lproj ├── LaunchScreen.storyboard └── Main.storyboard ├── Info.plist └── ViewController.swift /README.md: -------------------------------------------------------------------------------- 1 | # Swift Talk 2 | ## Test-Driven Reactive Programming at Kickstarter 3 | 4 | This is the code that accompanies Swift Talk Episode 53: [Test-Driven Reactive Programming at Kickstarter](https://talk.objc.io/episodes/S01E53-test-driven-reactive-programming-at-kickstarer) 5 | -------------------------------------------------------------------------------- /ReactiveSwift/.Package.test.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "ReactiveSwift", 5 | dependencies: [ 6 | .Package(url: "https://github.com/antitypical/Result.git", versions: Version(3, 2, 1).. 3.2.1 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Cartfile.private: -------------------------------------------------------------------------------- 1 | github "jspahrsummers/xcconfigs" "3d9d996" 2 | github "Quick/Quick" ~> 1.1 3 | github "Quick/Nimble" ~> 6.1 4 | -------------------------------------------------------------------------------- /ReactiveSwift/Cartfile.resolved: -------------------------------------------------------------------------------- 1 | github "Quick/Nimble" "v6.1.0" 2 | github "Quick/Quick" "v1.1.0" 3 | github "antitypical/Result" "3.2.1" 4 | github "jspahrsummers/xcconfigs" "3d9d99634cae6d586e272543d527681283b33eb0" 5 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | - [ ] I have read [CONTRIBUTING](https://github.com/Quick/Nimble/blob/master/CONTRIBUTING.md) and have done my best to follow them. 2 | 3 | ### What did you do? 4 | 5 | Please replace this with what you did. 6 | 7 | ### What did you expect to happen? 8 | 9 | Please replace this with what you expected to happen. 10 | 11 | ### What actually happened instead? 12 | 13 | Please replace this with what happened instead. 14 | 15 | ### Environment 16 | 17 | List the software versions you're using: 18 | 19 | - Quick: *?.?.?* 20 | - Nimble: *?.?.?* 21 | - Xcode Version: *?.? (????)* (Open Xcode; In menubar: Xcode > About Xcode) 22 | - Swift Version: *?.?* (Open Xcode Preferences; Components > Toolchains. If none, use `Xcode Default`.) 23 | 24 | Please also mention which package manager you used and its version. Delete the 25 | other package managers in this list: 26 | 27 | - Cocoapods: *?.?.?* (Use `pod --version` in Terminal) 28 | - Carthage: *?.?* (Use `carthage version` in Terminal) 29 | - Swift Package Manager *?.?.? (swiftpm-???)* (Use `swift build --version` in Terminal) 30 | 31 | ### Project that demonstrates the issue 32 | 33 | Please link to a project we can download that reproduces the issue. Feel free 34 | to delete this section if it's not relevant to the issue (eg - feature request). 35 | 36 | The project should be [short, self-contained, and correct example](http://sscce.org/). 37 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | The PR should summarize what was changed and why. Here are some questions to 2 | help you if you're not sure: 3 | 4 | - What behavior was changed? 5 | - What code was refactored / updated to support this change? 6 | - What issues are related to this PR? Or why was this change introduced? 7 | 8 | Checklist - While not every PR needs it, new features should consider this list: 9 | 10 | - [ ] Does this have tests? 11 | - [ ] Does this have documentation? 12 | - [ ] Does this break the public API (Requires major version bump)? 13 | - [ ] Is this a new feature (Requires minor version bump)? 14 | 15 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | **/xcuserdata/* 3 | **/*.xccheckout 4 | **/*.xcscmblueprint 5 | build/ 6 | .idea 7 | DerivedData/ 8 | Nimble.framework.zip 9 | 10 | # Carthage 11 | # 12 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 13 | # Carthage/Checkouts 14 | 15 | Carthage/Build 16 | 17 | # Swift Package Manager 18 | # 19 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 20 | # Packages/ 21 | .build/ 22 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.hound.yml: -------------------------------------------------------------------------------- 1 | swift: 2 | config_file: .swiftlint.yml 3 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - line_length 3 | - todo 4 | - variable_name 5 | - force_try 6 | - function_parameter_count 7 | - force_cast 8 | - type_name 9 | - large_tuple 10 | 11 | included: 12 | - Sources 13 | - Tests 14 | 15 | excluded: 16 | - Sources/Lib 17 | 18 | trailing_comma: 19 | mandatory_comma: true 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8 2 | language: generic 3 | matrix: 4 | include: 5 | - os: osx 6 | sudo: required 7 | env: TYPE=podspec 8 | - os: osx 9 | env: TYPE=ios NIMBLE_RUNTIME_IOS_SDK_VERSION=10.0 10 | - os: osx 11 | env: TYPE=tvos NIMBLE_RUNTIME_TVOS_SDK_VERSION=10.0 12 | - os: osx 13 | env: TYPE=macos 14 | - os: osx 15 | env: TYPE=swiftpm 16 | - os: linux 17 | dist: trusty 18 | sudo: required 19 | env: TYPE=swiftpm 20 | install: 21 | - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" 22 | install: 23 | - if [[ "$TYPE" == "podspec" ]]; then sudo gem install bundler; bundle install; fi 24 | script: 25 | - ./test $TYPE 26 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Dockerfile.test: -------------------------------------------------------------------------------- 1 | FROM swift:latest 2 | COPY . . 3 | CMD ./test swiftpm 4 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Gemfile: -------------------------------------------------------------------------------- 1 | # A sample Gemfile 2 | source "https://rubygems.org" 3 | 4 | gem 'cocoapods', '1.2.0' 5 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Nimble.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "Nimble", 5 | exclude: [ 6 | "Sources/Lib", 7 | "Sources/NimbleObjectiveC", 8 | "Tests/NimbleTests/objc", 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlPreconditionTesting.h 3 | // CwlPreconditionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlUtils. 24 | FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; 25 | 26 | //! Project version string for CwlUtils. 27 | FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; 28 | 29 | #include "CwlMachBadInstructionHandler.h" 30 | #include "CwlCatchException.h" 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/Posix/CwlPreconditionTesting.h: -------------------------------------------------------------------------------- 1 | // 2 | // CwlPreconditionTesting.h 3 | // CwlPreconditionTesting 4 | // 5 | // Created by Matt Gallagher on 2016/01/10. 6 | // Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. 7 | // 8 | // Permission to use, copy, modify, and/or distribute this software for any 9 | // purpose with or without fee is hereby granted, provided that the above 10 | // copyright notice and this permission notice appear in all copies. 11 | // 12 | // THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES 13 | // WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF 14 | // MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY 15 | // SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES 16 | // WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN 17 | // ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR 18 | // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. 19 | // 20 | 21 | #import 22 | 23 | //! Project version number for CwlUtils. 24 | FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; 25 | 26 | //! Project version string for CwlUtils. 27 | FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[]; 28 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 2 | /// assertion messages. 3 | /// 4 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 5 | /// This is possible with XCTest-based assertion handlers. 6 | /// 7 | public class AssertionDispatcher: AssertionHandler { 8 | let handlers: [AssertionHandler] 9 | 10 | public init(handlers: [AssertionHandler]) { 11 | self.handlers = handlers 12 | } 13 | 14 | public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { 15 | for handler in handlers { 16 | handler.assert(assertion, message: message, location: location) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if !_runtime(_ObjC) 4 | // swift-corelibs-foundation doesn't provide NSException at all, so provide a dummy 5 | class NSException {} 6 | #endif 7 | 8 | // NOTE: This file is not intended to be included in the Xcode project. It 9 | // is picked up by the Swift Package Manager during its build process. 10 | 11 | /// A dummy reimplementation of the `NMBExceptionCapture` class to serve 12 | /// as a stand-in for build and runtime environments that don't support 13 | /// Objective C. 14 | internal class ExceptionCapture { 15 | let finally: (() -> Void)? 16 | 17 | init(handler: ((NSException) -> Void)?, finally: (() -> Void)?) { 18 | self.finally = finally 19 | } 20 | 21 | func tryBlock(_ unsafeBlock: (() -> Void)) { 22 | // We have no way of handling Objective C exceptions in Swift, 23 | // so we just go ahead and run the unsafeBlock as-is 24 | unsafeBlock() 25 | 26 | finally?() 27 | } 28 | } 29 | 30 | /// Compatibility with the actual Objective-C implementation 31 | typealias NMBExceptionCapture = ExceptionCapture 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 Jeff Hui. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> MatcherFunc { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be nil" 7 | let actualValue = try actualExpression.evaluate() 8 | return actualValue == nil 9 | } 10 | } 11 | 12 | #if _runtime(_ObjC) 13 | extension NMBObjCMatcher { 14 | public class func beNilMatcher() -> NMBObjCMatcher { 15 | return NMBObjCMatcher { actualExpression, failureMessage in 16 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Matchers/BeVoid.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is Void. 4 | public func beVoid() -> MatcherFunc<()> { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be void" 7 | let actualValue: ()? = try actualExpression.evaluate() 8 | return actualValue != nil 9 | } 10 | } 11 | 12 | public func == (lhs: Expectation<()>, rhs: ()) { 13 | lhs.to(beVoid()) 14 | } 15 | 16 | public func != (lhs: Expectation<()>, rhs: ()) { 17 | lhs.toNot(beVoid()) 18 | } 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(_ expectedValue: String?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 8 | 9 | if let actual = try actualExpression.evaluate() { 10 | if let regexp = expectedValue { 11 | return actual.range(of: regexp, options: .regularExpression) != nil 12 | } 13 | } 14 | 15 | return false 16 | } 17 | } 18 | 19 | #if _runtime(_ObjC) 20 | 21 | extension NMBObjCMatcher { 22 | public class func matchMatcher(_ expected: NSString) -> NMBMatcher { 23 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 24 | let actual = actualExpression.cast { $0 as? String } 25 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Matchers/MatchError.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual expression evaluates to an 4 | /// error from the specified case. 5 | /// 6 | /// Errors are tried to be compared by their implementation of Equatable, 7 | /// otherwise they fallback to comparision by _domain and _code. 8 | public func matchError(_ error: T) -> NonNilMatcherFunc { 9 | return NonNilMatcherFunc { actualExpression, failureMessage in 10 | let actualError: Error? = try actualExpression.evaluate() 11 | 12 | setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) 13 | return errorMatchesNonNilFieldsOrClosure(actualError, error: error) 14 | } 15 | } 16 | 17 | /// A Nimble matcher that succeeds when the actual expression evaluates to an 18 | /// error of the specified type 19 | public func matchError(_ errorType: T.Type) -> NonNilMatcherFunc { 20 | return NonNilMatcherFunc { actualExpression, failureMessage in 21 | let actualError: Error? = try actualExpression.evaluate() 22 | 23 | setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) 24 | return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "NMBStringify.h" 4 | #import "DSL.h" 5 | 6 | #import "CwlPreconditionTesting.h" 7 | 8 | FOUNDATION_EXPORT double NimbleVersionNumber; 9 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Sequence { 4 | internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { 5 | for item in self { 6 | if !fn(item) { 7 | return false 8 | } 9 | } 10 | return true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Ideally we would always use `StaticString` as the type for tracking the file name 4 | // that expectations originate from, for consistency with `assert` etc. from the 5 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 6 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we 7 | // have to use `String` instead because StaticString can't be generated from Objective-C 8 | #if SWIFT_PACKAGE 9 | public typealias FileString = StaticString 10 | #else 11 | public typealias FileString = String 12 | #endif 13 | 14 | public final class SourceLocation: NSObject { 15 | public let file: FileString 16 | public let line: UInt 17 | 18 | override init() { 19 | file = "Unknown File" 20 | line = 0 21 | } 22 | 23 | init(file: FileString, line: UInt) { 24 | self.file = file 25 | self.line = line 26 | } 27 | 28 | override public var description: String { 29 | return "\(file):\(line)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") 5 | @interface CurrentTestCaseTracker : NSObject 6 | + (CurrentTestCaseTracker *)sharedInstance; 7 | @end 8 | 9 | @interface CurrentTestCaseTracker (Register) @end 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface NMBExceptionCapture : NSObject 5 | 6 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; 7 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); 8 | 9 | @end 10 | 11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful); 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); 5 | @property (nonatomic, copy) void(^ _Nullable finally)(); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.h: -------------------------------------------------------------------------------- 1 | @class NSString; 2 | 3 | /** 4 | * Returns a string appropriate for displaying in test output 5 | * from the provided value. 6 | * 7 | * @param value A value that will show up in a test's output. 8 | * 9 | * @return The string that is returned can be 10 | * customized per type by conforming a type to the `TestOutputStringConvertible` 11 | * protocol. When stringifying a non-`TestOutputStringConvertible` type, this 12 | * function will return the value's debug description and then its 13 | * normal description if available and in that order. Otherwise it 14 | * will return the result of constructing a string from the value. 15 | * 16 | * @see `TestOutputStringConvertible` 17 | */ 18 | extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Sources/NimbleObjectiveC/NMBStringify.m: -------------------------------------------------------------------------------- 1 | #import "NMBStringify.h" 2 | #import 3 | 4 | NSString *_Nonnull NMBStringify(id _Nullable anyObject) { 5 | return [NMBStringer stringify:anyObject]; 6 | } 7 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import NimbleTests 3 | 4 | // This is the entry point for NimbleTests on Linux 5 | 6 | XCTMain([ 7 | testCase(AsyncTest.allTests), 8 | testCase(SynchronousTest.allTests), 9 | testCase(UserDescriptionTest.allTests), 10 | 11 | // Matchers 12 | testCase(AllPassTest.allTests), 13 | testCase(BeAKindOfSwiftTest.allTests), 14 | testCase(BeAnInstanceOfTest.allTests), 15 | testCase(BeCloseToTest.allTests), 16 | testCase(BeginWithTest.allTests), 17 | testCase(BeGreaterThanOrEqualToTest.allTests), 18 | testCase(BeGreaterThanTest.allTests), 19 | testCase(BeIdenticalToObjectTest.allTests), 20 | testCase(BeIdenticalToTest.allTests), 21 | testCase(BeLessThanOrEqualToTest.allTests), 22 | testCase(BeLessThanTest.allTests), 23 | testCase(BeTruthyTest.allTests), 24 | testCase(BeTrueTest.allTests), 25 | testCase(BeFalsyTest.allTests), 26 | testCase(BeFalseTest.allTests), 27 | testCase(BeNilTest.allTests), 28 | testCase(ContainTest.allTests), 29 | testCase(EndWithTest.allTests), 30 | testCase(EqualTest.allTests), 31 | testCase(HaveCountTest.allTests), 32 | testCase(MatchTest.allTests), 33 | // testCase(RaisesExceptionTest.allTests), 34 | testCase(ThrowErrorTest.allTests), 35 | testCase(SatisfyAnyOfTest.allTests), 36 | testCase(PostNotificationTest.allTests), 37 | ]) 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/Helpers/ObjectWithLazyProperty.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class ObjectWithLazyProperty { 4 | init() {} 5 | lazy var value: String = "hello" 6 | lazy var anotherValue: String = { return "world" }() 7 | } 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/LinuxSupport.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if os(Linux) 4 | extension NSNotification.Name { 5 | init(_ rawValue: String) { 6 | self.init(rawValue: rawValue) 7 | } 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/Matchers/BeNilTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | final class BeNilTest: XCTestCase, XCTestCaseProvider { 5 | static var allTests: [(String, (BeNilTest) -> () throws -> Void)] { 6 | return [ 7 | ("testBeNil", testBeNil), 8 | ] 9 | } 10 | 11 | func producesNil() -> [Int]? { 12 | return nil 13 | } 14 | 15 | func testBeNil() { 16 | expect(nil as Int?).to(beNil()) 17 | expect(1 as Int?).toNot(beNil()) 18 | expect(self.producesNil()).to(beNil()) 19 | 20 | failsWithErrorMessage("expected to not be nil, got ") { 21 | expect(nil as Int?).toNot(beNil()) 22 | } 23 | 24 | failsWithErrorMessage("expected to be nil, got <1>") { 25 | expect(1 as Int?).to(beNil()) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/Matchers/BeVoidTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | final class BeVoidTest: XCTestCase, XCTestCaseProvider { 5 | static var allTests: [(String, (BeVoidTest) -> () throws -> Void)] { 6 | return [ 7 | ("testBeVoid", testBeVoid), 8 | ] 9 | } 10 | 11 | func testBeVoid() { 12 | expect(()).to(beVoid()) 13 | expect(() as ()?).to(beVoid()) 14 | expect(nil as ()?).toNot(beVoid()) 15 | 16 | expect(()) == () 17 | expect(() as ()?) == () 18 | expect(nil as ()?) != () 19 | 20 | failsWithErrorMessage("expected to not be void, got <()>") { 21 | expect(()).toNot(beVoid()) 22 | } 23 | 24 | failsWithErrorMessage("expected to not be void, got <()>") { 25 | expect(() as ()?).toNot(beVoid()) 26 | } 27 | 28 | failsWithErrorMessage("expected to be void, got ") { 29 | expect(nil as ()?).to(beVoid()) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/NimbleSpecHelper.h: -------------------------------------------------------------------------------- 1 | @import Nimble; 2 | #import "NimbleTests-Swift.h" 3 | 4 | // Use this when you want to verify the failure message for when an expectation fails 5 | #define expectFailureMessage(MSG, BLOCK) \ 6 | [NimbleHelper expectFailureMessage:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 7 | 8 | #define expectFailureMessages(MSGS, BLOCK) \ 9 | [NimbleHelper expectFailureMessages:(MSGS) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 10 | 11 | 12 | // Use this when you want to verify the failure message with the nil message postfixed 13 | // to it: " (use beNil() to match nils)" 14 | #define expectNilFailureMessage(MSG, BLOCK) \ 15 | [NimbleHelper expectFailureMessageForNil:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeAnInstanceOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeAnInstanceOfTest : XCTestCase 5 | @end 6 | 7 | @implementation ObjCBeAnInstanceOfTest 8 | 9 | - (void)testPositiveMatches { 10 | NSNull *obj = [NSNull null]; 11 | expect(obj).to(beAnInstanceOf([NSNull class])); 12 | expect(@1).toNot(beAnInstanceOf([NSNull class])); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be an instance of NSNull, got <__NSCFNumber instance>", ^{ 17 | expect(@1).to(beAnInstanceOf([NSNull class])); 18 | }); 19 | expectFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 20 | expect([NSNull null]).toNot(beAnInstanceOf([NSNull class])); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be an instance of NSNull, got ", ^{ 26 | expect(nil).to(beAnInstanceOf([NSNull class])); 27 | }); 28 | 29 | expectNilFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 30 | expect(nil).toNot(beAnInstanceOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeFalseTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalseTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalseTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalse()); 12 | expect(@YES).toNot(beFalse()); 13 | 14 | expect(false).to(beFalse()); 15 | expect(true).toNot(beFalse()); 16 | 17 | expect(NO).to(beFalse()); 18 | expect(YES).toNot(beFalse()); 19 | 20 | expect(10).toNot(beFalse()); 21 | } 22 | 23 | - (void)testNegativeMatches { 24 | expectNilFailureMessage(@"expected to be false, got ", ^{ 25 | expect(nil).to(beFalse()); 26 | }); 27 | expectNilFailureMessage(@"expected to not be false, got ", ^{ 28 | expect(nil).toNot(beFalse()); 29 | }); 30 | 31 | expectFailureMessage(@"expected to be false, got <1>", ^{ 32 | expect(true).to(beFalse()); 33 | }); 34 | expectFailureMessage(@"expected to not be false, got <0>", ^{ 35 | expect(false).toNot(beFalse()); 36 | }); 37 | 38 | expectFailureMessage(@"expected to be false, got <1>", ^{ 39 | expect(YES).to(beFalse()); 40 | }); 41 | expectFailureMessage(@"expected to not be false, got <0>", ^{ 42 | expect(NO).toNot(beFalse()); 43 | }); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeGreaterThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThan(@1)); 12 | expect(@2).toNot(beGreaterThan(@2)); 13 | expect(@2).to(beGreaterThan(0)); 14 | expect(@2).toNot(beGreaterThan(2)); 15 | expect(2.5).to(beGreaterThan(1.5)); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to be greater than <0>, got <-1>", ^{ 20 | expect(@(-1)).to(beGreaterThan(@(0))); 21 | }); 22 | expectFailureMessage(@"expected to not be greater than <1>, got <0>", ^{ 23 | expect(@0).toNot(beGreaterThan(@(1))); 24 | }); 25 | expectFailureMessage(@"expected to be greater than <0>, got <-1>", ^{ 26 | expect(-1).to(beGreaterThan(0)); 27 | }); 28 | expectFailureMessage(@"expected to not be greater than <1>, got <0>", ^{ 29 | expect(0).toNot(beGreaterThan(1)); 30 | }); 31 | } 32 | 33 | - (void)testNilMatches { 34 | expectNilFailureMessage(@"expected to be greater than <-1>, got ", ^{ 35 | expect(nil).to(beGreaterThan(@(-1))); 36 | }); 37 | expectNilFailureMessage(@"expected to not be greater than <1>, got ", ^{ 38 | expect(nil).toNot(beGreaterThan(@(1))); 39 | }); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeKindOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeKindOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeKindOfTest 9 | 10 | - (void)testPositiveMatches { 11 | NSMutableArray *array = [NSMutableArray array]; 12 | expect(array).to(beAKindOf([NSArray class])); 13 | expect(@1).toNot(beAKindOf([NSNull class])); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be a kind of NSNull, got <__NSCFNumber instance>", ^{ 18 | expect(@1).to(beAKindOf([NSNull class])); 19 | }); 20 | expectFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 21 | expect([NSNull null]).toNot(beAKindOf([NSNull class])); 22 | }); 23 | } 24 | 25 | - (void)testNilMatches { 26 | expectNilFailureMessage(@"expected to be a kind of NSNull, got ", ^{ 27 | expect(nil).to(beAKindOf([NSNull class])); 28 | }); 29 | expectNilFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 30 | expect(nil).toNot(beAKindOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeLessThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThan(@3)); 12 | expect(@2).toNot(beLessThan(@2)); 13 | expect(2).to(beLessThan(3)); 14 | expect(2).toNot(beLessThan(2)); 15 | expect(2).toNot(beLessThan(0)); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to be less than <0>, got <-1>", ^{ 20 | expect(@(-1)).to(beLessThan(@0)); 21 | }); 22 | expectFailureMessage(@"expected to not be less than <1>, got <0>", ^{ 23 | expect(@0).toNot(beLessThan(@1)); 24 | }); 25 | expectFailureMessage(@"expected to be less than <0>, got <-1>", ^{ 26 | expect(-1).to(beLessThan(0)); 27 | }); 28 | expectFailureMessage(@"expected to not be less than <1>, got <0>", ^{ 29 | expect(0).toNot(beLessThan(1)); 30 | }); 31 | } 32 | 33 | - (void)testNilMatches { 34 | expectNilFailureMessage(@"expected to be less than <-1>, got ", ^{ 35 | expect(nil).to(beLessThan(@(-1))); 36 | }); 37 | expectNilFailureMessage(@"expected to not be less than <1>, got ", ^{ 38 | expect(nil).toNot(beLessThan(@1)); 39 | }); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeNilTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeNilTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeNilTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(nil).to(beNil()); 12 | expect(@NO).toNot(beNil()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be nil, got <1>", ^{ 17 | expect(@1).to(beNil()); 18 | }); 19 | expectFailureMessage(@"expected to not be nil, got ", ^{ 20 | expect(nil).toNot(beNil()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeTrueTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTrueTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTrueTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTrue()); 12 | expect(@NO).toNot(beTrue()); 13 | expect(nil).toNot(beTrue()); 14 | 15 | expect(true).to(beTrue()); 16 | expect(false).toNot(beTrue()); 17 | 18 | expect(YES).to(beTrue()); 19 | expect(NO).toNot(beTrue()); 20 | } 21 | 22 | - (void)testNegativeMatches { 23 | expectFailureMessage(@"expected to be true, got <0>", ^{ 24 | expect(@NO).to(beTrue()); 25 | }); 26 | expectFailureMessage(@"expected to be true, got ", ^{ 27 | expect(nil).to(beTrue()); 28 | }); 29 | 30 | expectFailureMessage(@"expected to be true, got <0>", ^{ 31 | expect(false).to(beTrue()); 32 | }); 33 | 34 | expectFailureMessage(@"expected to not be true, got <1>", ^{ 35 | expect(true).toNot(beTrue()); 36 | }); 37 | 38 | expectFailureMessage(@"expected to be true, got <0>", ^{ 39 | expect(NO).to(beTrue()); 40 | }); 41 | 42 | expectFailureMessage(@"expected to not be true, got <1>", ^{ 43 | expect(YES).toNot(beTrue()); 44 | }); 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCBeginWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeginWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeginWithTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"hello world!").to(beginWith(@"hello")); 12 | expect(@"hello world!").toNot(beginWith(@"world")); 13 | 14 | NSArray *array = @[@1, @2]; 15 | expect(array).to(beginWith(@1)); 16 | expect(array).toNot(beginWith(@2)); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to begin with , got ", ^{ 21 | expect(@"foo").to(beginWith(@"bar")); 22 | }); 23 | expectFailureMessage(@"expected to not begin with , got ", ^{ 24 | expect(@"foo").toNot(beginWith(@"foo")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to begin with <1>, got ", ^{ 30 | expect(nil).to(beginWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not begin with <1>, got ", ^{ 33 | expect(nil).toNot(beginWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCEndWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEndWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEndWithTest 9 | 10 | - (void)testPositiveMatches { 11 | NSArray *array = @[@1, @2]; 12 | expect(@"hello world!").to(endWith(@"world!")); 13 | expect(@"hello world!").toNot(endWith(@"hello")); 14 | expect(array).to(endWith(@2)); 15 | expect(array).toNot(endWith(@1)); 16 | expect(@1).toNot(contain(@"foo")); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to end with , got ", ^{ 21 | expect(@"hello world!").to(endWith(@"?")); 22 | }); 23 | expectFailureMessage(@"expected to not end with , got ", ^{ 24 | expect(@"hello world!").toNot(endWith(@"!")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to end with <1>, got ", ^{ 30 | expect(nil).to(endWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not end with <1>, got ", ^{ 33 | expect(nil).toNot(endWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCMatchTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCMatchTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCMatchTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"11:14").to(match(@"\\d{2}:\\d{2}")); 12 | expect(@"hello").toNot(match(@"\\d{2}:\\d{2}")); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 17 | expect(@"hello").to(match(@"\\d{2}:\\d{2}")); 18 | }); 19 | expectFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got <11:22>", ^{ 20 | expect(@"11:22").toNot(match(@"\\d{2}:\\d{2}")); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 26 | expect(nil).to(match(@"\\d{2}:\\d{2}")); 27 | }); 28 | expectNilFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got ", ^{ 29 | expect(nil).toNot(match(@"\\d{2}:\\d{2}")); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCSatisfyAnyOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCSatisfyAnyOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCSatisfyAnyOfTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(satisfyAnyOf(equal(@2), equal(@3))); 12 | expect(@2).toNot(satisfyAnyOf(equal(@3), equal(@16))); 13 | expect(@[@1, @2, @3]).to(satisfyAnyOf(equal(@[@1, @2, @3]), allPass(beLessThan(@4)))); 14 | expect(@NO).to(satisfyAnyOf(beTrue(), beFalse())); 15 | expect(@YES).to(satisfyAnyOf(beTrue(), beFalse())); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to match one of: {equal <3>}, or {equal <4>}, or {equal <5>}, got 2", ^{ 20 | expect(@2).to(satisfyAnyOf(equal(@3), equal(@4), equal(@5))); 21 | }); 22 | 23 | expectFailureMessage(@"expected to match one of: {all be less than <4>, but failed first at element" 24 | " <5> in <[5, 6, 7]>}, or {equal <(1, 2, 3, 4)>}, got (5,6,7)", ^{ 25 | expect(@[@5, @6, @7]).to(satisfyAnyOf(allPass(beLessThan(@4)), equal(@[@1, @2, @3, @4]))); 26 | }); 27 | 28 | expectFailureMessage(@"satisfyAnyOf must be called with at least one matcher", ^{ 29 | expect(@"turtles").to(satisfyAnyOf()); 30 | }); 31 | } 32 | @end 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjCSyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCSyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCSyncTest 10 | 11 | - (void)testFailureExpectation { 12 | expectFailureMessage(@"fail() always fails", ^{ 13 | fail(); 14 | }); 15 | 16 | expectFailureMessage(@"This always fails", ^{ 17 | failWithMessage(@"This always fails"); 18 | }); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Nimble/Tests/NimbleTests/objc/ObjcStringersTest.m: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | @import Nimble; 3 | 4 | @interface ObjcStringersTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjcStringersTest 9 | 10 | - (void)testItCanStringifyArrays { 11 | NSArray *array = @[@1, @2, @3]; 12 | NSString *result = NMBStringify(array); 13 | 14 | expect(result).to(equal(@"(1, 2, 3)")); 15 | } 16 | 17 | - (void)testItCanStringifyIndexSets { 18 | NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(1, 3)]; 19 | NSString *result = NMBStringify(indexSet); 20 | 21 | expect(result).to(equal(@"(1, 2, 3)")); 22 | } 23 | 24 | - (void)testItRoundsLongDecimals { 25 | NSNumber *num = @291.123782163; 26 | NSString *result = NMBStringify(num); 27 | 28 | expect(result).to(equal(@"291.1238")); 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | - [ ] I have read [CONTRIBUTING](https://github.com/Quick/Quick/blob/master/CONTRIBUTING.md) and have done my best to follow them. 2 | 3 | ### What did you do? 4 | 5 | Please replace this with what you did. 6 | 7 | ### What did you expect to happen? 8 | 9 | Please replace this with what you expected to happen. 10 | 11 | ### What actually happened instead? 12 | 13 | Please replace this with what happened instead. 14 | 15 | ### Environment 16 | 17 | List the software versions you're using: 18 | 19 | - Quick: *?.?.?* 20 | - Nimble: *?.?.?* 21 | - Xcode Version: *?.? (????)* (Open Xcode; In menubar: Xcode > About Xcode) 22 | - Swift Version: *?.?* (Open Xcode Preferences; Components > Toolchains. If none, use `Xcode Default`.) 23 | 24 | Please also mention which package manager you used and its version. Delete the 25 | other package managers in this list: 26 | 27 | - Cocoapods: *?.?.?* (Use `pod --version` in Terminal) 28 | - Carthage: *?.?* (Use `carthage version` in Terminal) 29 | - Swift Package Manager *?.?.? (swiftpm-???)* (Use `swift build --version` in Terminal) 30 | 31 | ### Project that demonstrates the issue 32 | 33 | Please link to a project we can download that reproduces the issue. Feel free 34 | to delete this section if it's not relevant to the issue (eg - feature request). 35 | 36 | The project should be [short, self-contained, and correct example](http://sscce.org/). 37 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | The PR should summarize what was changed and why. Here are some questions to 2 | help you if you're not sure: 3 | 4 | - What behavior was changed? 5 | - What code was refactored / updated to support this change? 6 | - What issues are related to this PR? Or why was this change introduced? 7 | 8 | Checklist - While not every PR needs it, new features should consider this list: 9 | 10 | - [ ] Does this have tests? 11 | - [ ] Does this have documentation? 12 | - [ ] Does this break the public API (Requires major version bump)? 13 | - [ ] Is this a new feature (Requires minor version bump)? 14 | 15 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.gitmodules: -------------------------------------------------------------------------------- 1 | [submodule "Externals/Nimble"] 2 | path = Externals/Nimble 3 | url = https://github.com/Quick/Nimble.git 4 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.hound.yml: -------------------------------------------------------------------------------- 1 | swift: 2 | config_file: .swiftlint.yml 3 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - line_length 3 | - type_name 4 | - valid_docs 5 | - function_body_length 6 | - variable_name 7 | included: 8 | - Sources 9 | - Tests 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8 2 | language: generic 3 | matrix: 4 | include: 5 | - os: osx 6 | env: 7 | - PLATFORM=macos 8 | - XCODE_ACTION="build-for-testing test-without-building" 9 | - os: osx 10 | env: 11 | - PLATFORM=ios 12 | - XCODE_ACTION="build-for-testing test-without-building" 13 | - os: osx 14 | env: 15 | - PLATFORM=tvos 16 | - XCODE_ACTION="build-for-testing test-without-building" 17 | - os: osx 18 | env: 19 | - PLATFORM=swiftpm 20 | - os: osx 21 | sudo: required 22 | env: 23 | - PODSPEC=1 24 | - os: linux 25 | sudo: required 26 | dist: trusty 27 | install: 28 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./script/travis-install-macos; fi 29 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./script/travis-install-linux; fi 30 | - if [[ "$PODSPEC" ]]; then rvm system; sudo gem install bundler; bundle install; fi 31 | script: 32 | - if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then ./script/travis-script-macos; fi 33 | - if [[ "$TRAVIS_OS_NAME" == "linux" ]]; then ./script/travis-script-linux; fi 34 | - if [[ "$PODSPEC" ]]; then danger; fi 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/README.md: -------------------------------------------------------------------------------- 1 | # Documentation 2 | 3 | - [English](en-us/README.md) 4 | - [日本語](ja/README.md) 5 | - [中文](zh-cn/README.md) 6 | - [pt-br](pt-br/README.md) 7 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/en-us/InstallingFileTemplates.md: -------------------------------------------------------------------------------- 1 | # Installing Quick File Templates 2 | 3 | The Quick repository includes file templates for both Swift and 4 | Objective-C specs. 5 | 6 | ## Alcatraz 7 | 8 | Quick templates can be installed via [Alcatraz](https://github.com/supermarin/Alcatraz), 9 | a package manager for Xcode. Just search for the templates from the 10 | Package Manager window. 11 | 12 | ![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png) 13 | 14 | ## Manually via the Rakefile 15 | 16 | To manually install the templates, just clone the repository and 17 | run the `templates:install` rake task: 18 | 19 | ```sh 20 | $ git clone git@github.com:Quick/Quick.git 21 | $ rake templates:install 22 | ``` 23 | 24 | Uninstalling is easy, too: 25 | 26 | ```sh 27 | $ rake templates:uninstall 28 | ``` 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/en-us/MoreResources.md: -------------------------------------------------------------------------------- 1 | # More Resources 2 | 3 | ## Examples of Quick Specs 4 | 5 | Quick is used by many companies, open-source projects, and individuals, 6 | including [GitHub](https://github.com/github) and 7 | [ReactiveCocoa](https://github.com/ReactiveCocoa). For examples, check out: 8 | 9 | - https://github.com/ReactiveCocoa/ReactiveCocoa 10 | - https://github.com/github/Archimedes 11 | - https://github.com/libgit2/objective-git 12 | - https://github.com/jspahrsummers/RXSwift 13 | - https://github.com/artsy/eidolon 14 | - https://github.com/AshFurrow/Moya 15 | - https://github.com/nerdyc/Squeal 16 | - https://github.com/pepibumur/SugarRecord 17 | 18 | ## More on Unit Testing for OS X and iOS Apps 19 | 20 | - **[Quality Coding](http://qualitycoding.org/)**: 21 | A blog on iOS development that focuses on unit testing. 22 | - **[OCMock Tutorials](http://ocmock.org/support/)**: 23 | Use OCMock when you need "fake objects" in your tests. 24 | - **[Nocilla: Stunning HTTP stubbing for iOS and Mac OS X](https://github.com/luisobo/Nocilla)**: 25 | Use this library to test code that sends requests to, and receives responses from, the Internet. 26 | - **[Pivotal Labs: Writing Beautiful Specs with Jasmine Custom Matchers](http://pivotallabs.com/writing-beautiful-specs-jasmine-custom-matchers/)**: 27 | See [the Nimble documentation](https://github.com/Quick/Nimble) for instructions on how to write 28 | custom matchers in Nimble. 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/en-us/Troubleshooting.md: -------------------------------------------------------------------------------- 1 | # Common Installation Issues 2 | 3 | Here are solutions to common issues that come up when using the framework. 4 | 5 | ## No such module 'Quick' 6 | 7 | - If you have already run `pod install`, close and reopen the Xcode workspace. If this does not fix the issue, continue below. 8 | - Delete the _entire_ `~/Library/Developer/Xcode/DerivedData` direction, which includes `ModuleCache`. 9 | - Explicitly build (`Cmd+B`) the `Quick`, `Nimble`, and `Pods-ProjectNameTests` targets after enabled their schemes from the Manage Schemes dialog. -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/ja/InstallingFileTemplates.md: -------------------------------------------------------------------------------- 1 | # Quickファイル・テンプレートのインストール方法 2 | 3 | Quick のリポジトリには Swift, Objective-C の両方で使用できるテンプレートが含まれています。 4 | 5 | ## Alcatraz 6 | 7 | Quick のテンプレートは Xcode のパッケージマネージャーの [Alcatraz](https://github.com/supermarin/Alcatraz) 経由でインストールできます。 8 | パッケージマネージャーから検索してみてください。 9 | 10 | ![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png) 11 | 12 | ## Rakefile から手動でインストールする 13 | 14 | 手動でインストールすることもできます。 15 | リポジトリを clone して rake task の `templates:install` を実行してください。 16 | 17 | ```sh 18 | $ git clone git@github.com:Quick/Quick.git 19 | $ rake templates:install 20 | ``` 21 | 22 | アンインストールも簡単です、下記コマンドを実行してください。 23 | 24 | ```sh 25 | $ rake templates:uninstall 26 | ``` 27 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/ja/MoreResources.md: -------------------------------------------------------------------------------- 1 | # その他の参考資料 2 | 3 | ## Quick のテストのサンプル 4 | 5 | Quick は[GitHub](https://github.com/github)や[ReactiveCocoa](https://github.com/ReactiveCocoa)を含む多くの企業、OSS プロジェクト、個人で利用されています。 6 | 7 | 下記リポジトリを参考にしてみてください。 8 | 9 | - https://github.com/ReactiveCocoa/ReactiveCocoa 10 | - https://github.com/github/Archimedes 11 | - https://github.com/libgit2/objective-git 12 | - https://github.com/jspahrsummers/RXSwift 13 | - https://github.com/artsy/eidolon 14 | - https://github.com/Moya/Moya 15 | - https://github.com/nerdyc/Squeal 16 | - https://github.com/pepibumur/SugarRecord 17 | 18 | ## OS X と iOS Apps のテストに関する参考資料 19 | 20 | - **[Quality Coding](http://qualitycoding.org/)**: 21 | ユニットテストにフォーカスした iOS 開発に関するブログ。 22 | - **[OCMock Tutorials](http://ocmock.org/support/)**: 23 | テストでモックが必要な時に使用する OCMock のチュートリアル。 24 | - **[Nocilla: Stunning HTTP stubbing for iOS and Mac OS X](https://github.com/luisobo/Nocilla)**: 25 | 通信を行うコードをテストする時はこのライブラリを使用して下さい。 26 | - **[Pivotal Labs: Writing Beautiful Specs with Jasmine Custom Matchers](http://pivotallabs.com/writing-beautiful-specs-jasmine-custom-matchers/)**: 27 | Nimble の matcher の書き方に関するドキュメントはこちら([the Nimble documentation](https://github.com/Quick/Nimble)) 28 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/ja/QuickInObjectiveC.md: -------------------------------------------------------------------------------- 1 | # Objective-C で Quick を使う 2 | 3 | Quick は Swift でも Objective-C でも問題なく動作します。 4 | 5 | ですが、Objective-C で Quick を使う場合、2点気を付けておきべきことがあります。 6 | 7 | ## 簡略記法 8 | 9 | Objective-C で Quick を import すると `it` と `itShouldBehaveLike` というマクロが定義されます。 10 | また、`context()` and `describe()`といった関数も同様に定義されます。 11 | 12 | もしプロジェクトですでに同じ名前のシンボルを定義していた場合、重複のためビルドエラーになります。 13 | その場合は下記のように`QUICK_DISABLE_SHORT_SYNTAX`を定義してこの機能を無効にしてください。 14 | 15 | ```objc 16 | #define QUICK_DISABLE_SHORT_SYNTAX 1 17 | 18 | @import Quick; 19 | 20 | QuickSpecBegin(DolphinSpec) 21 | // ... 22 | QuickSpecEnd 23 | ``` 24 | 25 | `QUICK_DISABLE_SHORT_SYNTAX`マクロは Quick ヘッダを import する前に定義する必要があります。 26 | 27 | 28 | ## Swift のファイルを テストターゲットに含める 29 | 30 | テストターゲットの中に Swift のファイルが含まれていないと Swift stlib が リンクされないため Quick が正しく実行されません。 31 | 32 | Swift のファイルが含まれていないと下記のようなエラーが発生します。 33 | 34 | ``` 35 | *** Test session exited(82) without checking in. Executable cannot be 36 | loaded for some other reason, such as a problem with a library it 37 | depends on or a code signature/entitlements mismatch. 38 | ``` 39 | 40 | 修正するためには `SwiftSpec.swift` という名前の空のファイルをテストターゲットに追加してください。 41 | 42 | ```swift 43 | // SwiftSpec.swift 44 | 45 | import Quick 46 | ``` 47 | 48 | > この問題に関する詳細情報はこちら https://github.com/Quick/Quick/issues/164. 49 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/ja/Troubleshooting.md: -------------------------------------------------------------------------------- 1 | # トラブルシューティング 2 | 3 | Quick を使用するときによくぶつかる問題の解決策を紹介します。 4 | 5 | ## Cocoapods でインストールした時に「No such module 'Quick'」エラーが出る 6 | 7 | - すでに `pod install` を実行していた場合、一度 Xcode workspace を閉じて再度開いてみてください。それでも解決しない場合は次の手順を試してみてください。 8 | - `ModuleCache` を含む `~/Library/Developer/Xcode/DerivedData` をすべて削除してください。 9 | - `Manage Schemes`ダイアログから`Quick`、`Nimble`、`Pods-ProjectNameTests` ターゲットの Scheme が有効なことを確認して、明示的にビルド(`Cmd+B`)をやり直してみてください。 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/zh-cn/InstallingFileTemplates.md: -------------------------------------------------------------------------------- 1 | # 安装 Quick 文件模板 2 | 3 | Quick 仓库包含了 Swift 和 Objective-C 规范的文件模板。 4 | 5 | ## Alcatraz 6 | 7 | Quick 模板可以通过 [Alcatraz](https://github.com/supermarin/Alcatraz) 安装,这是一个 Xcode 的包管理器。只需在包管理器里搜索 Quick : 8 | 9 | ![](http://f.cl.ly/items/3T3q0G1j0b2t1V0M0T04/Screen%20Shot%202014-06-27%20at%202.01.10%20PM.png) 10 | 11 | ## 使用 Rakefile 手动安装 12 | 13 | 如果想手动安装模板,那么只需克隆仓库并运行 rake 命令 `templates:install` : 14 | 15 | ```sh 16 | $ git clone git@github.com:Quick/Quick.git 17 | $ rake templates:install 18 | ``` 19 | 20 | 若要卸载模板,可以运行命令: 21 | 22 | ```sh 23 | $ rake templates:uninstall 24 | ``` 25 | 26 | 27 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/zh-cn/MoreResources.md: -------------------------------------------------------------------------------- 1 | # 更多资源 2 | 3 | ## Quick Specs 的例子 4 | 5 | 很多公司、开源项目和独立开发者都使用了 Quick ,包括 [GitHub](https://github.com/github) 和 [ReactiveCocoa](https://github.com/ReactiveCocoa)。具体例子请参考以下链接: 6 | 7 | - https://github.com/ReactiveCocoa/ReactiveCocoa 8 | - https://github.com/github/Archimedes 9 | - https://github.com/libgit2/objective-git 10 | - https://github.com/jspahrsummers/RXSwift 11 | - https://github.com/artsy/eidolon 12 | - https://github.com/AshFurrow/Moya 13 | - https://github.com/nerdyc/Squeal 14 | - https://github.com/pepibumur/SugarRecord 15 | 16 | ## 关于 OS X 和 iOS 应用单元测试的更多信息 17 | 18 | - **[Quality Coding](http://qualitycoding.org/)**:一个关注单元测试的 iOS 开发博客。 19 | - **[OCMock Tutorials](http://ocmock.org/support/)**:当你需要在测试中使用伪对象时,使用 OCMock 。 20 | - **[Nocilla: Stunning HTTP stubbing for iOS and Mac OS X](https://github.com/luisobo/Nocilla)**:使用这个库来测试那些与互联网进行数据交换的代码。 21 | - **[Pivotal Labs: Writing Beautiful Specs with Jasmine Custom Matchers](http://pivotallabs.com/writing-beautiful-specs-jasmine-custom-matchers/)**:参考 [the Nimble documentation](https://github.com/Quick/Nimble) ,了解如何用 Nimble 编写自定义的匹配器。 22 | 23 | 24 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/zh-cn/QuickInObjectiveC.md: -------------------------------------------------------------------------------- 1 | # 在 Objective-C 中使用 Quick 2 | 3 | Quick 既支持 Swift ,也支持 Objective-C 。 4 | 5 | 但是,在 Objective-C 下使用 Quick 时,有以下两点需要注意。 6 | 7 | ## 可选的速记语法 8 | 9 | 在 Objective-C 文件中导入的 Quick 框架,包含了名为 `it` 和 10 | `itShouldBehaveLike` 的宏,还包含了名为 `context()` 和 `describe()` 的函数。 11 | 12 | 如果你在测试项目的时候,也定义了同名的量或者函数,那么就会出现错误。因此,这种情况下,你可以通过禁用 Quick 的可选速记语法来避免命名冲突: 13 | 14 | ```objc 15 | #define QUICK_DISABLE_SHORT_SYNTAX 1 16 | 17 | @import Quick; 18 | 19 | QuickSpecBegin(DolphinSpec) 20 | // ... 21 | QuickSpecEnd 22 | ``` 23 | 24 | 注意,必须在 `@import Quick;` 之前,定义宏:`QUICK_DISABLE_SHORT_SYNTAX` 。 25 | 26 | 当然,你也可以选择在测试目标(target)的设置里面定义宏: 27 | 28 | ![](http://d.twobitlabs.com/VFEamhvixX.png) 29 | 30 | ## 你的测试目标必需至少包含一个 Swift 文件 31 | 32 | 如果你的测试目标没有*至少包含一个 Swift 文件*,那么 Swift 标准库就不会链接到你的测试目标,因而会导致 Quick 无法正常编译。 33 | 34 | 当没有至少包含一个 Swift 文件时,测试运行后就会终止并且返回以下错误: 35 | 36 | ``` 37 | *** Test session exited(82) without checking in. Executable cannot be 38 | loaded for some other reason, such as a problem with a library it 39 | depends on or a code signature/entitlements mismatch. 40 | ``` 41 | 42 | 只需要在测试目标下添加一个空的 Swift 文件,如 `SwiftSpec.swift` 就可以解决这个问题: 43 | 44 | ```swift 45 | // SwiftSpec.swift 46 | 47 | import Quick 48 | ``` 49 | 50 | > 更多关于这个问题的细节,请参考 https://github.com/Quick/Quick/issues/164 。 51 | 52 | 53 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/zh-cn/README.md: -------------------------------------------------------------------------------- 1 | # 文档 2 | 3 | Quick 能够帮助你验证你的 Swift 和 Objective-C 程序的行为。然而,能提高你的测试技巧的不仅仅是了解如何使用 Quick。下面这些指南能够帮助你更有效地写测试 —— 不仅是和 Quick 相关的,更包括 XCTest 还有其他的测试框架。 4 | 5 | 每份指南都有一个主题。如果你对单元测试完全陌生,建议你按照从上往下的顺序阅读。 6 | 7 | - **[在项目中添加测试](SettingUpYourXcodeProject.md)**:如果你遇到在项目中构建测试的问题,请阅读这份指南。 8 | - **[编写高效的 XCTest 测试: Arrange,Act 和 Assert](ArrangeActAssert.md)**:阅读这份指南来了解如何更高效快速地编写 `XCTestCase` 测试。 9 | - **[不要测试代码,而应该测试行为](BehavioralTesting.md)**:通过这份指南你能学习到哪些是好的测试,哪些是不好的测试。 10 | - **[测试 OS X 和 iOS 应用](TestingApps.md)**:了解如何为使用 AppKit 和 UIKit 框架的代码编写测试。 11 | - **[使用测试替身进行测试](TestUsingTestDoubles.md)**:阅读这份指南来了解什么是测试替身,以及如何使用它们。 12 | - **[使用 Shared Assertion 来复用测试模板代码](SharedExamples.md)**:学习如何在测试中共享测试代码。 13 | - **[配置 Quick 的行为](ConfiguringQuick.md)**:阅读这份指南来了解如何在运行测试代码时改变 Quick 的行为。 14 | - **[在 Objective-C 中使用 Quick](QuickInObjectiveC.md)**:如果你在 Objective-C 项目使用 Quick 的过程中遇到了困难,请阅读这份指南。 15 | - **[安装 Quick](InstallingQuick.md)**:通过这份指南了解在项目中添加 Quick 的方法:Git submodules,CocoaPods,Carthage 和 Swift Package Manager 。 16 | - **[安装 Quick 文件模板](InstallingFileTemplates.md)**:阅读这份指南来了解如何安装文件模板以提高编写 Quick specs 的效率。 17 | - **[更多资料](MoreResources.md)**:更多关于 OS X 和 iOS 测试的资源。 18 | - **[常见的问题](Troubleshooting.md)**:当你遇到问题的时候,请阅读这份指南。 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Documentation/zh-cn/Troubleshooting.md: -------------------------------------------------------------------------------- 1 | # 常见的安装问题 2 | 3 | 这里有一些解决方案,用来处理使用框架时遇到的一些问题。 4 | 5 | ## No such module 'Quick' 6 | 7 | - 如果你已经运行了 `pod install` ,那么关闭并重新打开 Xcode workspace 。如果这样做还没解决问题,那么请接着进行下面的步骤。 8 | - 删除 `~/Library/Developer/Xcode/DerivedData` **整个**目录,这里面包含了 `ModuleCache` 。 9 | - 在 Manage Schemes 对话框中,勾选 `Quick` 、`Nimble` 、`Pods-ProjectnameTests` ,然后重新编译它们(`Cmd+B`)。 10 | 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.github/ISSUE_TEMPLATE: -------------------------------------------------------------------------------- 1 | - [ ] I have read [CONTRIBUTING](https://github.com/Quick/Nimble/blob/master/CONTRIBUTING.md) and have done my best to follow them. 2 | 3 | ### What did you do? 4 | 5 | Please replace this with what you did. 6 | 7 | ### What did you expect to happen? 8 | 9 | Please replace this with what you expected to happen. 10 | 11 | ### What actually happened instead? 12 | 13 | Please replace this with what happened instead. 14 | 15 | ### Environment 16 | 17 | List the software versions you're using: 18 | 19 | - Quick: *?.?.?* 20 | - Nimble: *?.?.?* 21 | - Xcode Version: *?.? (????)* (Open Xcode; In menubar: Xcode > About Xcode) 22 | - Swift Version: *?.?* (Open Xcode Preferences; Components > Toolchains. If none, use `Xcode Default`.) 23 | 24 | Please also mention which package manager you used and its version. Delete the 25 | other package managers in this list: 26 | 27 | - Cocoapods: *?.?.?* (Use `pod --version` in Terminal) 28 | - Carthage: *?.?* (Use `carthage version` in Terminal) 29 | - Swift Package Manager *?.?.? (swiftpm-???)* (Use `swift build --version` in Terminal) 30 | 31 | ### Project that demonstrates the issue 32 | 33 | Please link to a project we can download that reproduces the issue. Feel free 34 | to delete this section if it's not relevant to the issue (eg - feature request). 35 | 36 | The project should be [short, self-contained, and correct example](http://sscce.org/). 37 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.github/PULL_REQUEST_TEMPLATE: -------------------------------------------------------------------------------- 1 | The PR should summarize what was changed and why. Here are some questions to 2 | help you if you're not sure: 3 | 4 | - What behavior was changed? 5 | - What code was refactored / updated to support this change? 6 | - What issues are related to this PR? Or why was this change introduced? 7 | 8 | Checklist - While not every PR needs it, new features should consider this list: 9 | 10 | - [ ] Does this have tests? 11 | - [ ] Does this have documentation? 12 | - [ ] Does this break the public API (Requires major version bump)? 13 | - [ ] Is this a new feature (Requires minor version bump)? 14 | 15 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | **/xcuserdata/* 3 | **/*.xccheckout 4 | **/*.xcscmblueprint 5 | build/ 6 | .idea 7 | DerivedData/ 8 | Nimble.framework.zip 9 | 10 | # Carthage 11 | # 12 | # Add this line if you want to avoid checking in source code from Carthage dependencies. 13 | # Carthage/Checkouts 14 | 15 | Carthage/Build 16 | 17 | # Swift Package Manager 18 | # 19 | # Add this line if you want to avoid checking in source code from Swift Package Manager dependencies. 20 | # Packages/ 21 | .build/ 22 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.hound.yml: -------------------------------------------------------------------------------- 1 | swift: 2 | config_file: .swiftlint.yml 3 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.swiftlint.yml: -------------------------------------------------------------------------------- 1 | disabled_rules: 2 | - line_length 3 | - todo 4 | - variable_name 5 | - force_try 6 | - function_parameter_count 7 | - force_cast 8 | - type_name 9 | - large_tuple 10 | 11 | included: 12 | - Sources 13 | - Tests 14 | 15 | trailing_comma: 16 | mandatory_comma: true 17 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/.travis.yml: -------------------------------------------------------------------------------- 1 | osx_image: xcode8 2 | language: generic 3 | matrix: 4 | include: 5 | - os: osx 6 | sudo: required 7 | env: TYPE=podspec 8 | - os: osx 9 | env: TYPE=ios NIMBLE_RUNTIME_IOS_SDK_VERSION=10.0 10 | - os: osx 11 | env: TYPE=tvos NIMBLE_RUNTIME_TVOS_SDK_VERSION=10.0 12 | - os: osx 13 | env: TYPE=macos 14 | - os: osx 15 | env: TYPE=swiftpm 16 | - os: linux 17 | dist: trusty 18 | sudo: required 19 | env: TYPE=swiftpm 20 | install: 21 | - eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/9f442512a46d7a2af7b850d65a7e9bd31edfb09b/swiftenv-install.sh)" 22 | install: 23 | - if [[ "$TYPE" == "podspec" ]]; then sudo gem install bundler; bundle install; fi 24 | script: 25 | - ./test $TYPE 26 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Gemfile: -------------------------------------------------------------------------------- 1 | # A sample Gemfile 2 | source "https://rubygems.org" 3 | 4 | gem 'cocoapods', '1.1.0.rc.3' 5 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Nimble.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "Nimble", 5 | exclude: [ 6 | "Sources/Lib", 7 | "Sources/NimbleObjectiveC", 8 | "Tests/NimbleTests/objc", 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | project.xcworkspace/ 3 | xcuserdata/ 4 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2016 Matt Gallagher. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2016 Matt Gallagher. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// Protocol for the assertion handler that Nimble uses for all expectations. 4 | public protocol AssertionHandler { 5 | func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) 6 | } 7 | 8 | /// Global backing interface for assertions that Nimble creates. 9 | /// Defaults to a private test handler that passes through to XCTest. 10 | /// 11 | /// If XCTest is not available, you must assign your own assertion handler 12 | /// before using any matchers, otherwise Nimble will abort the program. 13 | /// 14 | /// @see AssertionHandler 15 | public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in 16 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() 17 | }() 18 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift: -------------------------------------------------------------------------------- 1 | /// AssertionDispatcher allows multiple AssertionHandlers to receive 2 | /// assertion messages. 3 | /// 4 | /// @warning Does not fully dispatch if one of the handlers raises an exception. 5 | /// This is possible with XCTest-based assertion handlers. 6 | /// 7 | public class AssertionDispatcher: AssertionHandler { 8 | let handlers: [AssertionHandler] 9 | 10 | public init(handlers: [AssertionHandler]) { 11 | self.handlers = handlers 12 | } 13 | 14 | public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { 15 | for handler in handlers { 16 | handler.assert(assertion, message: message, location: location) 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if !_runtime(_ObjC) 4 | // swift-corelibs-foundation doesn't provide NSException at all, so provide a dummy 5 | class NSException {} 6 | #endif 7 | 8 | // NOTE: This file is not intended to be included in the Xcode project. It 9 | // is picked up by the Swift Package Manager during its build process. 10 | 11 | /// A dummy reimplementation of the `NMBExceptionCapture` class to serve 12 | /// as a stand-in for build and runtime environments that don't support 13 | /// Objective C. 14 | internal class ExceptionCapture { 15 | let finally: (() -> Void)? 16 | 17 | init(handler: ((NSException) -> Void)?, finally: (() -> Void)?) { 18 | self.finally = finally 19 | } 20 | 21 | func tryBlock(_ unsafeBlock: (() -> Void)) { 22 | // We have no way of handling Objective C exceptions in Swift, 23 | // so we just go ahead and run the unsafeBlock as-is 24 | unsafeBlock() 25 | 26 | finally?() 27 | } 28 | } 29 | 30 | /// Compatibility with the actual Objective-C implementation 31 | typealias NMBExceptionCapture = ExceptionCapture 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 Jeff Hui. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Matchers/BeNil.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is nil. 4 | public func beNil() -> MatcherFunc { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be nil" 7 | let actualValue = try actualExpression.evaluate() 8 | return actualValue == nil 9 | } 10 | } 11 | 12 | #if _runtime(_ObjC) 13 | extension NMBObjCMatcher { 14 | public class func beNilMatcher() -> NMBObjCMatcher { 15 | return NMBObjCMatcher { actualExpression, failureMessage in 16 | return try! beNil().matches(actualExpression, failureMessage: failureMessage) 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Matchers/BeVoid.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual value is Void. 4 | public func beVoid() -> MatcherFunc<()> { 5 | return MatcherFunc { actualExpression, failureMessage in 6 | failureMessage.postfixMessage = "be void" 7 | let actualValue: ()? = try actualExpression.evaluate() 8 | return actualValue != nil 9 | } 10 | } 11 | 12 | public func == (lhs: Expectation<()>, rhs: ()) { 13 | lhs.to(beVoid()) 14 | } 15 | 16 | public func != (lhs: Expectation<()>, rhs: ()) { 17 | lhs.toNot(beVoid()) 18 | } 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Matchers/Match.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual string satisfies the regular expression 4 | /// described by the expected string. 5 | public func match(_ expectedValue: String?) -> NonNilMatcherFunc { 6 | return NonNilMatcherFunc { actualExpression, failureMessage in 7 | failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" 8 | 9 | if let actual = try actualExpression.evaluate() { 10 | if let regexp = expectedValue { 11 | return actual.range(of: regexp, options: .regularExpression) != nil 12 | } 13 | } 14 | 15 | return false 16 | } 17 | } 18 | 19 | #if _runtime(_ObjC) 20 | 21 | extension NMBObjCMatcher { 22 | public class func matchMatcher(_ expected: NSString) -> NMBMatcher { 23 | return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in 24 | let actual = actualExpression.cast { $0 as? String } 25 | return try! match(expected.description).matches(actual, failureMessage: failureMessage) 26 | } 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Matchers/MatchError.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /// A Nimble matcher that succeeds when the actual expression evaluates to an 4 | /// error from the specified case. 5 | /// 6 | /// Errors are tried to be compared by their implementation of Equatable, 7 | /// otherwise they fallback to comparision by _domain and _code. 8 | public func matchError(_ error: T) -> NonNilMatcherFunc { 9 | return NonNilMatcherFunc { actualExpression, failureMessage in 10 | let actualError: Error? = try actualExpression.evaluate() 11 | 12 | setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) 13 | return errorMatchesNonNilFieldsOrClosure(actualError, error: error) 14 | } 15 | } 16 | 17 | /// A Nimble matcher that succeeds when the actual expression evaluates to an 18 | /// error of the specified type 19 | public func matchError(_ errorType: T.Type) -> NonNilMatcherFunc { 20 | return NonNilMatcherFunc { actualExpression, failureMessage in 21 | let actualError: Error? = try actualExpression.evaluate() 22 | 23 | setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) 24 | return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Nimble.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NMBExceptionCapture.h" 3 | #import "NMBStringify.h" 4 | #import "DSL.h" 5 | 6 | #import "CwlCatchException.h" 7 | #import "CwlCatchBadInstruction.h" 8 | 9 | #if !TARGET_OS_TV 10 | #import "mach_excServer.h" 11 | #endif 12 | 13 | FOUNDATION_EXPORT double NimbleVersionNumber; 14 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; 15 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Utils/Functional.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension Sequence { 4 | internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { 5 | for item in self { 6 | if !fn(item) { 7 | return false 8 | } 9 | } 10 | return true 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/Nimble/Utils/SourceLocation.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | // Ideally we would always use `StaticString` as the type for tracking the file name 4 | // that expectations originate from, for consistency with `assert` etc. from the 5 | // stdlib, and because recent versions of the XCTest overlay require `StaticString` 6 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we 7 | // have to use `String` instead because StaticString can't be generated from Objective-C 8 | #if SWIFT_PACKAGE 9 | public typealias FileString = StaticString 10 | #else 11 | public typealias FileString = String 12 | #endif 13 | 14 | public final class SourceLocation: NSObject { 15 | public let file: FileString 16 | public let line: UInt 17 | 18 | override init() { 19 | file = "Unknown File" 20 | line = 0 21 | } 22 | 23 | init(file: FileString, line: UInt) { 24 | self.file = file 25 | self.line = line 26 | } 27 | 28 | override public var description: String { 29 | return "\(file):\(line)" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") 5 | @interface CurrentTestCaseTracker : NSObject 6 | + (CurrentTestCaseTracker *)sharedInstance; 7 | @end 8 | 9 | @interface CurrentTestCaseTracker (Register) @end 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface NMBExceptionCapture : NSObject 5 | 6 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; 7 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); 8 | 9 | @end 10 | 11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful); 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m: -------------------------------------------------------------------------------- 1 | #import "NMBExceptionCapture.h" 2 | 3 | @interface NMBExceptionCapture () 4 | @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); 5 | @property (nonatomic, copy) void(^ _Nullable finally)(); 6 | @end 7 | 8 | @implementation NMBExceptionCapture 9 | 10 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { 11 | self = [super init]; 12 | if (self) { 13 | self.handler = handler; 14 | self.finally = finally; 15 | } 16 | return self; 17 | } 18 | 19 | - (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { 20 | @try { 21 | unsafeBlock(); 22 | } 23 | @catch (NSException *exception) { 24 | if (self.handler) { 25 | self.handler(exception); 26 | } 27 | } 28 | @finally { 29 | if (self.finally) { 30 | self.finally(); 31 | } 32 | } 33 | } 34 | 35 | @end 36 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/NimbleObjectiveC/NMBStringify.h: -------------------------------------------------------------------------------- 1 | @class NSString; 2 | 3 | /** 4 | * Returns a string appropriate for displaying in test output 5 | * from the provided value. 6 | * 7 | * @param value A value that will show up in a test's output. 8 | * 9 | * @return The string that is returned can be 10 | * customized per type by conforming a type to the `TestOutputStringConvertible` 11 | * protocol. When stringifying a non-`TestOutputStringConvertible` type, this 12 | * function will return the value's debug description and then its 13 | * normal description if available and in that order. Otherwise it 14 | * will return the result of constructing a string from the value. 15 | * 16 | * @see `TestOutputStringConvertible` 17 | */ 18 | extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Sources/NimbleObjectiveC/NMBStringify.m: -------------------------------------------------------------------------------- 1 | #import "NMBStringify.h" 2 | #import 3 | 4 | NSString *_Nonnull NMBStringify(id _Nullable anyObject) { 5 | return [NMBStringer stringify:anyObject]; 6 | } 7 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | @testable import NimbleTests 3 | 4 | // This is the entry point for NimbleTests on Linux 5 | 6 | XCTMain([ 7 | testCase(AsyncTest.allTests), 8 | testCase(SynchronousTest.allTests), 9 | testCase(UserDescriptionTest.allTests), 10 | 11 | // Matchers 12 | testCase(AllPassTest.allTests), 13 | testCase(BeAKindOfSwiftTest.allTests), 14 | testCase(BeAnInstanceOfTest.allTests), 15 | testCase(BeCloseToTest.allTests), 16 | testCase(BeginWithTest.allTests), 17 | testCase(BeGreaterThanOrEqualToTest.allTests), 18 | testCase(BeGreaterThanTest.allTests), 19 | testCase(BeIdenticalToObjectTest.allTests), 20 | testCase(BeIdenticalToTest.allTests), 21 | testCase(BeLessThanOrEqualToTest.allTests), 22 | testCase(BeLessThanTest.allTests), 23 | testCase(BeTruthyTest.allTests), 24 | testCase(BeTrueTest.allTests), 25 | testCase(BeFalsyTest.allTests), 26 | testCase(BeFalseTest.allTests), 27 | testCase(BeNilTest.allTests), 28 | testCase(ContainTest.allTests), 29 | testCase(EndWithTest.allTests), 30 | testCase(EqualTest.allTests), 31 | testCase(HaveCountTest.allTests), 32 | testCase(MatchTest.allTests), 33 | // testCase(RaisesExceptionTest.allTests), 34 | testCase(ThrowErrorTest.allTests), 35 | testCase(SatisfyAnyOfTest.allTests), 36 | testCase(PostNotificationTest.allTests), 37 | ]) 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/Helpers/ObjectWithLazyProperty.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | class ObjectWithLazyProperty { 4 | init() {} 5 | lazy var value: String = "hello" 6 | lazy var anotherValue: String = { return "world" }() 7 | } 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/LinuxSupport.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | #if os(Linux) 4 | extension NSNotification.Name { 5 | init(_ rawValue: String) { 6 | self.init(rawValue: rawValue) 7 | } 8 | } 9 | #endif 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/Matchers/BeNilTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | final class BeNilTest: XCTestCase, XCTestCaseProvider { 5 | static var allTests: [(String, (BeNilTest) -> () throws -> Void)] { 6 | return [ 7 | ("testBeNil", testBeNil), 8 | ] 9 | } 10 | 11 | func producesNil() -> [Int]? { 12 | return nil 13 | } 14 | 15 | func testBeNil() { 16 | expect(nil as Int?).to(beNil()) 17 | expect(1 as Int?).toNot(beNil()) 18 | expect(self.producesNil()).to(beNil()) 19 | 20 | failsWithErrorMessage("expected to not be nil, got ") { 21 | expect(nil as Int?).toNot(beNil()) 22 | } 23 | 24 | failsWithErrorMessage("expected to be nil, got <1>") { 25 | expect(1 as Int?).to(beNil()) 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/Matchers/BeVoidTest.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | 4 | final class BeVoidTest: XCTestCase, XCTestCaseProvider { 5 | static var allTests: [(String, (BeVoidTest) -> () throws -> Void)] { 6 | return [ 7 | ("testBeVoid", testBeVoid), 8 | ] 9 | } 10 | 11 | func testBeVoid() { 12 | expect(()).to(beVoid()) 13 | expect(() as ()?).to(beVoid()) 14 | expect(nil as ()?).toNot(beVoid()) 15 | 16 | expect(()) == () 17 | expect(() as ()?) == () 18 | expect(nil as ()?) != () 19 | 20 | failsWithErrorMessage("expected to not be void, got <()>") { 21 | expect(()).toNot(beVoid()) 22 | } 23 | 24 | failsWithErrorMessage("expected to not be void, got <()>") { 25 | expect(() as ()?).toNot(beVoid()) 26 | } 27 | 28 | failsWithErrorMessage("expected to be void, got ") { 29 | expect(nil as ()?).to(beVoid()) 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/NimbleSpecHelper.h: -------------------------------------------------------------------------------- 1 | @import Nimble; 2 | #import "NimbleTests-Swift.h" 3 | 4 | // Use this when you want to verify the failure message for when an expectation fails 5 | #define expectFailureMessage(MSG, BLOCK) \ 6 | [NimbleHelper expectFailureMessage:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 7 | 8 | #define expectFailureMessages(MSGS, BLOCK) \ 9 | [NimbleHelper expectFailureMessages:(MSGS) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 10 | 11 | 12 | // Use this when you want to verify the failure message with the nil message postfixed 13 | // to it: " (use beNil() to match nils)" 14 | #define expectNilFailureMessage(MSG, BLOCK) \ 15 | [NimbleHelper expectFailureMessageForNil:(MSG) block:(BLOCK) file:@(__FILE__) line:__LINE__]; 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeAnInstanceOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeAnInstanceOfTest : XCTestCase 5 | @end 6 | 7 | @implementation ObjCBeAnInstanceOfTest 8 | 9 | - (void)testPositiveMatches { 10 | NSNull *obj = [NSNull null]; 11 | expect(obj).to(beAnInstanceOf([NSNull class])); 12 | expect(@1).toNot(beAnInstanceOf([NSNull class])); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be an instance of NSNull, got <__NSCFNumber instance>", ^{ 17 | expect(@1).to(beAnInstanceOf([NSNull class])); 18 | }); 19 | expectFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 20 | expect([NSNull null]).toNot(beAnInstanceOf([NSNull class])); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to be an instance of NSNull, got ", ^{ 26 | expect(nil).to(beAnInstanceOf([NSNull class])); 27 | }); 28 | 29 | expectNilFailureMessage(@"expected to not be an instance of NSNull, got ", ^{ 30 | expect(nil).toNot(beAnInstanceOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeFalseTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeFalseTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeFalseTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@NO).to(beFalse()); 12 | expect(@YES).toNot(beFalse()); 13 | 14 | expect(false).to(beFalse()); 15 | expect(true).toNot(beFalse()); 16 | 17 | expect(NO).to(beFalse()); 18 | expect(YES).toNot(beFalse()); 19 | 20 | expect(10).toNot(beFalse()); 21 | } 22 | 23 | - (void)testNegativeMatches { 24 | expectNilFailureMessage(@"expected to be false, got ", ^{ 25 | expect(nil).to(beFalse()); 26 | }); 27 | expectNilFailureMessage(@"expected to not be false, got ", ^{ 28 | expect(nil).toNot(beFalse()); 29 | }); 30 | 31 | expectFailureMessage(@"expected to be false, got <1>", ^{ 32 | expect(true).to(beFalse()); 33 | }); 34 | expectFailureMessage(@"expected to not be false, got <0>", ^{ 35 | expect(false).toNot(beFalse()); 36 | }); 37 | 38 | expectFailureMessage(@"expected to be false, got <1>", ^{ 39 | expect(YES).to(beFalse()); 40 | }); 41 | expectFailureMessage(@"expected to not be false, got <0>", ^{ 42 | expect(NO).toNot(beFalse()); 43 | }); 44 | } 45 | 46 | @end 47 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeGreaterThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeGreaterThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeGreaterThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beGreaterThan(@1)); 12 | expect(@2).toNot(beGreaterThan(@2)); 13 | expect(@2).to(beGreaterThan(0)); 14 | expect(@2).toNot(beGreaterThan(2)); 15 | } 16 | 17 | - (void)testNegativeMatches { 18 | expectFailureMessage(@"expected to be greater than <0>, got <-1>", ^{ 19 | expect(@(-1)).to(beGreaterThan(@(0))); 20 | }); 21 | expectFailureMessage(@"expected to not be greater than <1>, got <0>", ^{ 22 | expect(@0).toNot(beGreaterThan(@(1))); 23 | }); 24 | expectFailureMessage(@"expected to be greater than <0>, got <-1>", ^{ 25 | expect(-1).to(beGreaterThan(0)); 26 | }); 27 | expectFailureMessage(@"expected to not be greater than <1>, got <0>", ^{ 28 | expect(0).toNot(beGreaterThan(1)); 29 | }); 30 | } 31 | 32 | - (void)testNilMatches { 33 | expectNilFailureMessage(@"expected to be greater than <-1>, got ", ^{ 34 | expect(nil).to(beGreaterThan(@(-1))); 35 | }); 36 | expectNilFailureMessage(@"expected to not be greater than <1>, got ", ^{ 37 | expect(nil).toNot(beGreaterThan(@(1))); 38 | }); 39 | } 40 | 41 | @end 42 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeKindOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeKindOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeKindOfTest 9 | 10 | - (void)testPositiveMatches { 11 | NSMutableArray *array = [NSMutableArray array]; 12 | expect(array).to(beAKindOf([NSArray class])); 13 | expect(@1).toNot(beAKindOf([NSNull class])); 14 | } 15 | 16 | - (void)testNegativeMatches { 17 | expectFailureMessage(@"expected to be a kind of NSNull, got <__NSCFNumber instance>", ^{ 18 | expect(@1).to(beAKindOf([NSNull class])); 19 | }); 20 | expectFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 21 | expect([NSNull null]).toNot(beAKindOf([NSNull class])); 22 | }); 23 | } 24 | 25 | - (void)testNilMatches { 26 | expectNilFailureMessage(@"expected to be a kind of NSNull, got ", ^{ 27 | expect(nil).to(beAKindOf([NSNull class])); 28 | }); 29 | expectNilFailureMessage(@"expected to not be a kind of NSNull, got ", ^{ 30 | expect(nil).toNot(beAKindOf([NSNull class])); 31 | }); 32 | } 33 | 34 | @end 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeLessThanTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeLessThanTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeLessThanTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(beLessThan(@3)); 12 | expect(@2).toNot(beLessThan(@2)); 13 | expect(2).to(beLessThan(3)); 14 | expect(2).toNot(beLessThan(2)); 15 | expect(2).toNot(beLessThan(0)); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to be less than <0>, got <-1>", ^{ 20 | expect(@(-1)).to(beLessThan(@0)); 21 | }); 22 | expectFailureMessage(@"expected to not be less than <1>, got <0>", ^{ 23 | expect(@0).toNot(beLessThan(@1)); 24 | }); 25 | expectFailureMessage(@"expected to be less than <0>, got <-1>", ^{ 26 | expect(-1).to(beLessThan(0)); 27 | }); 28 | expectFailureMessage(@"expected to not be less than <1>, got <0>", ^{ 29 | expect(0).toNot(beLessThan(1)); 30 | }); 31 | } 32 | 33 | - (void)testNilMatches { 34 | expectNilFailureMessage(@"expected to be less than <-1>, got ", ^{ 35 | expect(nil).to(beLessThan(@(-1))); 36 | }); 37 | expectNilFailureMessage(@"expected to not be less than <1>, got ", ^{ 38 | expect(nil).toNot(beLessThan(@1)); 39 | }); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeNilTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeNilTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeNilTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(nil).to(beNil()); 12 | expect(@NO).toNot(beNil()); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to be nil, got <1>", ^{ 17 | expect(@1).to(beNil()); 18 | }); 19 | expectFailureMessage(@"expected to not be nil, got ", ^{ 20 | expect(nil).toNot(beNil()); 21 | }); 22 | } 23 | 24 | @end 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeTrueTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeTrueTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeTrueTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@YES).to(beTrue()); 12 | expect(@NO).toNot(beTrue()); 13 | expect(nil).toNot(beTrue()); 14 | 15 | expect(true).to(beTrue()); 16 | expect(false).toNot(beTrue()); 17 | 18 | expect(YES).to(beTrue()); 19 | expect(NO).toNot(beTrue()); 20 | } 21 | 22 | - (void)testNegativeMatches { 23 | expectFailureMessage(@"expected to be true, got <0>", ^{ 24 | expect(@NO).to(beTrue()); 25 | }); 26 | expectFailureMessage(@"expected to be true, got ", ^{ 27 | expect(nil).to(beTrue()); 28 | }); 29 | 30 | expectFailureMessage(@"expected to be true, got <0>", ^{ 31 | expect(false).to(beTrue()); 32 | }); 33 | 34 | expectFailureMessage(@"expected to not be true, got <1>", ^{ 35 | expect(true).toNot(beTrue()); 36 | }); 37 | 38 | expectFailureMessage(@"expected to be true, got <0>", ^{ 39 | expect(NO).to(beTrue()); 40 | }); 41 | 42 | expectFailureMessage(@"expected to not be true, got <1>", ^{ 43 | expect(YES).toNot(beTrue()); 44 | }); 45 | } 46 | 47 | @end 48 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCBeginWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCBeginWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCBeginWithTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"hello world!").to(beginWith(@"hello")); 12 | expect(@"hello world!").toNot(beginWith(@"world")); 13 | 14 | NSArray *array = @[@1, @2]; 15 | expect(array).to(beginWith(@1)); 16 | expect(array).toNot(beginWith(@2)); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to begin with , got ", ^{ 21 | expect(@"foo").to(beginWith(@"bar")); 22 | }); 23 | expectFailureMessage(@"expected to not begin with , got ", ^{ 24 | expect(@"foo").toNot(beginWith(@"foo")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to begin with <1>, got ", ^{ 30 | expect(nil).to(beginWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not begin with <1>, got ", ^{ 33 | expect(nil).toNot(beginWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCEndWithTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCEndWithTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCEndWithTest 9 | 10 | - (void)testPositiveMatches { 11 | NSArray *array = @[@1, @2]; 12 | expect(@"hello world!").to(endWith(@"world!")); 13 | expect(@"hello world!").toNot(endWith(@"hello")); 14 | expect(array).to(endWith(@2)); 15 | expect(array).toNot(endWith(@1)); 16 | expect(@1).toNot(contain(@"foo")); 17 | } 18 | 19 | - (void)testNegativeMatches { 20 | expectFailureMessage(@"expected to end with , got ", ^{ 21 | expect(@"hello world!").to(endWith(@"?")); 22 | }); 23 | expectFailureMessage(@"expected to not end with , got ", ^{ 24 | expect(@"hello world!").toNot(endWith(@"!")); 25 | }); 26 | } 27 | 28 | - (void)testNilMatches { 29 | expectNilFailureMessage(@"expected to end with <1>, got ", ^{ 30 | expect(nil).to(endWith(@1)); 31 | }); 32 | expectNilFailureMessage(@"expected to not end with <1>, got ", ^{ 33 | expect(nil).toNot(endWith(@1)); 34 | }); 35 | } 36 | 37 | @end 38 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCMatchTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCMatchTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCMatchTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@"11:14").to(match(@"\\d{2}:\\d{2}")); 12 | expect(@"hello").toNot(match(@"\\d{2}:\\d{2}")); 13 | } 14 | 15 | - (void)testNegativeMatches { 16 | expectFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 17 | expect(@"hello").to(match(@"\\d{2}:\\d{2}")); 18 | }); 19 | expectFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got <11:22>", ^{ 20 | expect(@"11:22").toNot(match(@"\\d{2}:\\d{2}")); 21 | }); 22 | } 23 | 24 | - (void)testNilMatches { 25 | expectNilFailureMessage(@"expected to match <\\d{2}:\\d{2}>, got ", ^{ 26 | expect(nil).to(match(@"\\d{2}:\\d{2}")); 27 | }); 28 | expectNilFailureMessage(@"expected to not match <\\d{2}:\\d{2}>, got ", ^{ 29 | expect(nil).toNot(match(@"\\d{2}:\\d{2}")); 30 | }); 31 | } 32 | 33 | @end 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCSatisfyAnyOfTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import "NimbleSpecHelper.h" 3 | 4 | @interface ObjCSatisfyAnyOfTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjCSatisfyAnyOfTest 9 | 10 | - (void)testPositiveMatches { 11 | expect(@2).to(satisfyAnyOf(equal(@2), equal(@3))); 12 | expect(@2).toNot(satisfyAnyOf(equal(@3), equal(@16))); 13 | expect(@[@1, @2, @3]).to(satisfyAnyOf(equal(@[@1, @2, @3]), allPass(beLessThan(@4)))); 14 | expect(@NO).to(satisfyAnyOf(beTrue(), beFalse())); 15 | expect(@YES).to(satisfyAnyOf(beTrue(), beFalse())); 16 | } 17 | 18 | - (void)testNegativeMatches { 19 | expectFailureMessage(@"expected to match one of: {equal <3>}, or {equal <4>}, or {equal <5>}, got 2", ^{ 20 | expect(@2).to(satisfyAnyOf(equal(@3), equal(@4), equal(@5))); 21 | }); 22 | 23 | expectFailureMessage(@"expected to match one of: {all be less than <4>, but failed first at element" 24 | " <5> in <[5, 6, 7]>}, or {equal <(1, 2, 3, 4)>}, got (5,6,7)", ^{ 25 | expect(@[@5, @6, @7]).to(satisfyAnyOf(allPass(beLessThan(@4)), equal(@[@1, @2, @3, @4]))); 26 | }); 27 | 28 | expectFailureMessage(@"satisfyAnyOf must be called with at least one matcher", ^{ 29 | expect(@"turtles").to(satisfyAnyOf()); 30 | }); 31 | } 32 | @end 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjCSyncTest.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | #import "NimbleSpecHelper.h" 4 | 5 | @interface ObjCSyncTest : XCTestCase 6 | 7 | @end 8 | 9 | @implementation ObjCSyncTest 10 | 11 | - (void)testFailureExpectation { 12 | expectFailureMessage(@"fail() always fails", ^{ 13 | fail(); 14 | }); 15 | 16 | expectFailureMessage(@"This always fails", ^{ 17 | failWithMessage(@"This always fails"); 18 | }); 19 | } 20 | 21 | @end 22 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Externals/Nimble/Tests/NimbleTests/objc/ObjcStringersTest.m: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | @import Nimble; 3 | 4 | @interface ObjcStringersTest : XCTestCase 5 | 6 | @end 7 | 8 | @implementation ObjcStringersTest 9 | 10 | - (void)testItCanStringifyArrays { 11 | NSArray *array = @[@1, @2, @3]; 12 | NSString *result = NMBStringify(array); 13 | 14 | expect(result).to(equal(@"(1, 2, 3)")); 15 | } 16 | 17 | - (void)testItCanStringifyIndexSets { 18 | NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(1, 3)]; 19 | NSString *result = NMBStringify(indexSet); 20 | 21 | expect(result).to(equal(@"(1, 2, 3)")); 22 | } 23 | 24 | - (void)testItRoundsLongDecimals { 25 | NSNumber *num = @291.123782163; 26 | NSString *result = NMBStringify(num); 27 | 28 | expect(result).to(equal(@"291.1238")); 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Gemfile: -------------------------------------------------------------------------------- 1 | source "https://rubygems.org" 2 | 3 | gem 'cocoapods', '~> 1.1.0.rc.2' 4 | gem 'danger' 5 | gem 'danger-swiftlint' 6 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "Quick", 5 | targets: { 6 | #if _runtime(_ObjC) 7 | return [ 8 | Target(name: "QuickSpecBase"), 9 | Target(name: "Quick", dependencies: [ "QuickSpecBase" ]), 10 | Target(name: "QuickTests", dependencies: [ "Quick" ]), 11 | ] 12 | #else 13 | return [ 14 | Target(name: "Quick"), 15 | Target(name: "QuickTests", dependencies: [ "Quick" ]), 16 | ] 17 | #endif 18 | }(), 19 | exclude: { 20 | var excludes = [ 21 | "Sources/QuickObjectiveC", 22 | "Tests/QuickTests/QuickAfterSuiteTests/AfterSuiteTests+ObjC.m", 23 | "Tests/QuickTests/QuickFocusedTests/FocusedTests+ObjC.m", 24 | "Tests/QuickTests/QuickTests/FunctionalTests/ObjC", 25 | "Tests/QuickTests/QuickTests/Helpers", 26 | "Tests/QuickTests/QuickTests/QuickConfigurationTests.m", 27 | ] 28 | #if !_runtime(_ObjC) 29 | excludes.append("Sources/QuickSpecBase") 30 | #endif 31 | return excludes 32 | }() 33 | ) 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Objective-C/___FILEBASENAME___.h: -------------------------------------------------------------------------------- 1 | // 2 | // ___FILENAME___ 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | //___COPYRIGHT___ 7 | // 8 | 9 | @import Quick; 10 | 11 | @interface ___FILEBASENAMEASIDENTIFIER___ : QuickConfiguration 12 | 13 | @end 14 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Objective-C/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // 2 | // ___FILENAME___ 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | //___COPYRIGHT___ 7 | // 8 | 9 | #import "___FILEBASENAMEASIDENTIFIER___.h" 10 | 11 | @implementation ___FILEBASENAMEASIDENTIFIER___ 12 | 13 | + (void)configure:(Configuration *)configuration { 14 | 15 | } 16 | 17 | @end 18 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/Swift/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ___FILENAME___ 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | //___COPYRIGHT___ 7 | // 8 | 9 | import Quick 10 | 11 | class ___FILEBASENAMEASIDENTIFIER___: QuickConfiguration { 12 | override class func configure(_ configuration: Configuration) { 13 | 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Configuration Class.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/Objective-C/___FILEBASENAME___.m: -------------------------------------------------------------------------------- 1 | // 2 | // ___FILENAME___ 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | //___COPYRIGHT___ 7 | // 8 | 9 | #import 10 | #import 11 | 12 | QuickSpecBegin(___FILEBASENAMEASIDENTIFIER___) 13 | 14 | QuickSpecEnd 15 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/Swift/___FILEBASENAME___.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ___FILENAME___ 3 | // ___PROJECTNAME___ 4 | // 5 | // Created by ___FULLUSERNAME___ on ___DATE___. 6 | //___COPYRIGHT___ 7 | // 8 | 9 | import Quick 10 | import Nimble 11 | 12 | class ___FILEBASENAMEASIDENTIFIER___: QuickSpec { 13 | override func spec() { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/TemplateIcon.icns: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Carthage/Checkouts/Quick/Quick Templates/Quick Spec Class.xctemplate/TemplateIcon.icns -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Quick.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Callsite.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | An object encapsulating the file and line number at which 5 | a particular example is defined. 6 | */ 7 | final public class Callsite: NSObject { 8 | /** 9 | The absolute path of the file in which an example is defined. 10 | */ 11 | public let file: String 12 | 13 | /** 14 | The line number on which an example is defined. 15 | */ 16 | public let line: UInt 17 | 18 | internal init(file: String, line: UInt) { 19 | self.file = file 20 | self.line = line 21 | } 22 | } 23 | 24 | extension Callsite { 25 | /** 26 | Returns a boolean indicating whether two Callsite objects are equal. 27 | If two callsites are in the same file and on the same line, they must be equal. 28 | */ 29 | @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { 30 | return lhs.file == rhs.file && lhs.line == rhs.line 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Configuration/QuickConfiguration.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import XCTest 3 | 4 | // NOTE: This file is not intended to be included in the Xcode project or CocoaPods. 5 | // It is picked up by the Swift Package Manager during its build process. 6 | 7 | #if SWIFT_PACKAGE 8 | 9 | open class QuickConfiguration: NSObject { 10 | open class func configure(_ configuration: Configuration) {} 11 | } 12 | 13 | #if _runtime(_ObjC) 14 | 15 | internal func qck_enumerateSubclasses(_ klass: T.Type, block: (T.Type) -> Void) { 16 | var classesCount = objc_getClassList(nil, 0) 17 | 18 | guard classesCount > 0 else { 19 | return 20 | } 21 | 22 | let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) 23 | classesCount = objc_getClassList(AutoreleasingUnsafeMutablePointer(classes), classesCount) 24 | 25 | var subclass, superclass: AnyClass! 26 | for i in 0.. Never { 4 | #if _runtime(_ObjC) 5 | NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() 6 | #endif 7 | 8 | // This won't be reached when ObjC is available and the exception above is raisd 9 | fatalError(message) 10 | } 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/ExampleMetadata.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | A class that encapsulates information about an example, 5 | including the index at which the example was executed, as 6 | well as the example itself. 7 | */ 8 | final public class ExampleMetadata: NSObject { 9 | /** 10 | The example for which this metadata was collected. 11 | */ 12 | public let example: Example 13 | 14 | /** 15 | The index at which this example was executed in the 16 | test suite. 17 | */ 18 | public let exampleIndex: Int 19 | 20 | internal init(example: Example, exampleIndex: Int) { 21 | self.example = example 22 | self.exampleIndex = exampleIndex 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Filter.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | /** 4 | A mapping of string keys to booleans that can be used to 5 | filter examples or example groups. For example, a "focused" 6 | example would have the flags [Focused: true]. 7 | */ 8 | public typealias FilterFlags = [String: Bool] 9 | 10 | /** 11 | A namespace for filter flag keys, defined primarily to make the 12 | keys available in Objective-C. 13 | */ 14 | final public class Filter: NSObject { 15 | /** 16 | Example and example groups with [Focused: true] are included in test runs, 17 | excluding all other examples without this flag. Use this to only run one or 18 | two tests that you're currently focusing on. 19 | */ 20 | public class var focused: String { 21 | return "focused" 22 | } 23 | 24 | /** 25 | Example and example groups with [Pending: true] are excluded from test runs. 26 | Use this to temporarily suspend examples that you know do not pass yet. 27 | */ 28 | public class var pending: String { 29 | return "pending" 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Hooks/Closures.swift: -------------------------------------------------------------------------------- 1 | // MARK: Example Hooks 2 | 3 | /** 4 | A closure executed before an example is run. 5 | */ 6 | public typealias BeforeExampleClosure = () -> Void 7 | 8 | /** 9 | A closure executed before an example is run. The closure is given example metadata, 10 | which contains information about the example that is about to be run. 11 | */ 12 | public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void 13 | 14 | /** 15 | A closure executed after an example is run. 16 | */ 17 | public typealias AfterExampleClosure = BeforeExampleClosure 18 | 19 | /** 20 | A closure executed after an example is run. The closure is given example metadata, 21 | which contains information about the example that has just finished running. 22 | */ 23 | public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure 24 | 25 | // MARK: Suite Hooks 26 | 27 | /** 28 | A closure executed before any examples are run. 29 | */ 30 | public typealias BeforeSuiteClosure = () -> Void 31 | 32 | /** 33 | A closure executed after all examples have finished running. 34 | */ 35 | public typealias AfterSuiteClosure = BeforeSuiteClosure 36 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Hooks/ExampleHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after each example. 3 | */ 4 | final internal class ExampleHooks { 5 | internal var befores: [BeforeExampleWithMetadataClosure] = [] 6 | internal var afters: [AfterExampleWithMetadataClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { 14 | befores.append { (_: ExampleMetadata) in closure() } 15 | } 16 | 17 | internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { 18 | afters.append(closure) 19 | } 20 | 21 | internal func appendAfter(_ closure: @escaping AfterExampleClosure) { 22 | afters.append { (_: ExampleMetadata) in closure() } 23 | } 24 | 25 | internal func executeBefores(_ exampleMetadata: ExampleMetadata) { 26 | phase = .beforesExecuting 27 | for before in befores { 28 | before(exampleMetadata) 29 | } 30 | 31 | phase = .beforesFinished 32 | } 33 | 34 | internal func executeAfters(_ exampleMetadata: ExampleMetadata) { 35 | phase = .aftersExecuting 36 | for after in afters { 37 | after(exampleMetadata) 38 | } 39 | 40 | phase = .aftersFinished 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Hooks/HooksPhase.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A description of the execution cycle of the current example with 3 | respect to the hooks of that example. 4 | */ 5 | internal enum HooksPhase { 6 | case nothingExecuted 7 | case beforesExecuting 8 | case beforesFinished 9 | case aftersExecuting 10 | case aftersFinished 11 | } 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Hooks/SuiteHooks.swift: -------------------------------------------------------------------------------- 1 | /** 2 | A container for closures to be executed before and after all examples. 3 | */ 4 | final internal class SuiteHooks { 5 | internal var befores: [BeforeSuiteClosure] = [] 6 | internal var afters: [AfterSuiteClosure] = [] 7 | internal var phase: HooksPhase = .nothingExecuted 8 | 9 | internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { 10 | befores.append(closure) 11 | } 12 | 13 | internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { 14 | afters.append(closure) 15 | } 16 | 17 | internal func executeBefores() { 18 | phase = .beforesExecuting 19 | for before in befores { 20 | before() 21 | } 22 | phase = .beforesFinished 23 | } 24 | 25 | internal func executeAfters() { 26 | phase = .aftersExecuting 27 | for after in afters { 28 | after() 29 | } 30 | phase = .aftersFinished 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | ${CURRENT_PROJECT_VERSION} 23 | NSHumanReadableCopyright 24 | Copyright © 2014 - present, Quick Team. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift: -------------------------------------------------------------------------------- 1 | #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) 2 | 3 | import Foundation 4 | 5 | extension Bundle { 6 | 7 | /** 8 | Locates the first bundle with a '.xctest' file extension. 9 | */ 10 | internal static var currentTestBundle: Bundle? { 11 | return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } 12 | } 13 | 14 | /** 15 | Return the module name of the bundle. 16 | Uses the bundle filename and transform it to match Xcode's transformation. 17 | Module name has to be a valid "C99 extended identifier". 18 | */ 19 | internal var moduleName: String { 20 | let fileName = bundleURL.fileName as NSString 21 | return fileName.c99ExtendedIdentifier 22 | } 23 | } 24 | 25 | #endif 26 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift: -------------------------------------------------------------------------------- 1 | #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) 2 | import Foundation 3 | 4 | public extension NSString { 5 | 6 | private static var invalidCharacters: CharacterSet = { 7 | var invalidCharacters = CharacterSet() 8 | 9 | let invalidCharacterSets: [CharacterSet] = [ 10 | .whitespacesAndNewlines, 11 | .illegalCharacters, 12 | .controlCharacters, 13 | .punctuationCharacters, 14 | .nonBaseCharacters, 15 | .symbols, 16 | ] 17 | 18 | for invalidSet in invalidCharacterSets { 19 | invalidCharacters.formUnion(invalidSet) 20 | } 21 | 22 | return invalidCharacters 23 | }() 24 | 25 | @objc(qck_c99ExtendedIdentifier) 26 | var c99ExtendedIdentifier: String { 27 | let validComponents = components(separatedBy: NSString.invalidCharacters) 28 | let result = validComponents.joined(separator: "_") 29 | 30 | return result.isEmpty ? "_" : result 31 | } 32 | } 33 | #endif 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/Quick/URL+FileName.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | extension URL { 4 | 5 | /** 6 | Returns the path file name without file extension. 7 | */ 8 | var fileName: String { 9 | return self.deletingPathExtension().lastPathComponent 10 | } 11 | 12 | } 13 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class Configuration; 4 | 5 | /** 6 | Subclass QuickConfiguration and override the +[QuickConfiguration configure:] 7 | method in order to configure how Quick behaves when running specs, or to define 8 | shared examples that are used across spec files. 9 | */ 10 | @interface QuickConfiguration : NSObject 11 | 12 | /** 13 | This method is executed on each subclass of this class before Quick runs 14 | any examples. You may override this method on as many subclasses as you like, but 15 | there is no guarantee as to the order in which these methods are executed. 16 | 17 | You can override this method in order to: 18 | 19 | 1. Configure how Quick behaves, by modifying properties on the Configuration object. 20 | Setting the same properties in several methods has undefined behavior. 21 | 22 | 2. Define shared examples using `sharedExamples`. 23 | 24 | @param configuration A mutable object that is used to configure how Quick behaves on 25 | a framework level. For details on all the options, see the 26 | documentation in Configuration.swift. 27 | */ 28 | + (void)configure:(Configuration *)configuration; 29 | 30 | @end 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/QuickObjectiveC/Quick.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | //! Project version number for Quick. 4 | FOUNDATION_EXPORT double QuickVersionNumber; 5 | 6 | //! Project version string for Quick. 7 | FOUNDATION_EXPORT const unsigned char QuickVersionString[]; 8 | 9 | #import "QuickSpec.h" 10 | #import "QCKDSL.h" 11 | #import "QuickConfiguration.h" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/QuickObjectiveC/World.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | @class ExampleGroup; 4 | @class ExampleMetadata; 5 | 6 | SWIFT_CLASS("_TtC5Quick5World") 7 | @interface World 8 | 9 | @property (nonatomic) ExampleGroup * __nullable currentExampleGroup; 10 | @property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; 11 | @property (nonatomic) BOOL isRunningAdditionalSuites; 12 | + (World * __nonnull)sharedWorld; 13 | - (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; 14 | - (void)finalizeConfiguration; 15 | - (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; 16 | - (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; 17 | - (void)performWithCurrentExampleGroup:(ExampleGroup * __nonnull)group closure:(void (^ __nonnull)(void))closure; 18 | @end 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h: -------------------------------------------------------------------------------- 1 | @import Foundation; 2 | @import XCTest; 3 | 4 | @interface _QuickSelectorWrapper : NSObject 5 | - (instancetype)initWithSelector:(SEL)selector; 6 | @end 7 | 8 | @interface _QuickSpecBase : XCTestCase 9 | + (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors; 10 | - (instancetype)init NS_DESIGNATED_INITIALIZER; 11 | @end 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickAfterSuiteTests/AfterSuiteTests+ObjC.m: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | @import Quick; 3 | @import Nimble; 4 | 5 | static BOOL afterSuiteFirstTestExecuted = NO; 6 | static BOOL afterSuiteTestsWasExecuted = NO; 7 | 8 | @interface AfterSuiteTests_ObjC : QuickSpec 9 | 10 | @end 11 | 12 | @implementation AfterSuiteTests_ObjC 13 | 14 | - (void)spec { 15 | it(@"is executed before afterSuite", ^{ 16 | expect(@(afterSuiteTestsWasExecuted)).to(beFalsy()); 17 | }); 18 | 19 | afterSuite(^{ 20 | afterSuiteTestsWasExecuted = YES; 21 | }); 22 | } 23 | 24 | + (void)tearDown { 25 | if (afterSuiteFirstTestExecuted) { 26 | assert(afterSuiteTestsWasExecuted); 27 | } else { 28 | afterSuiteFirstTestExecuted = true; 29 | } 30 | } 31 | 32 | @end 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickAfterSuiteTests/AfterSuiteTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | var afterSuiteFirstTestExecuted = false 6 | var afterSuiteTestsWasExecuted = false 7 | 8 | class AfterSuiteTests: QuickSpec { 9 | override func spec() { 10 | afterSuite { 11 | afterSuiteTestsWasExecuted = true 12 | } 13 | 14 | it("is executed before afterSuite") { 15 | expect(afterSuiteTestsWasExecuted).to(beFalsy()) 16 | } 17 | } 18 | 19 | override class func tearDown() { 20 | if afterSuiteFirstTestExecuted { 21 | assert(afterSuiteTestsWasExecuted, "afterSuiteTestsWasExecuted needs to be true") 22 | } else { 23 | afterSuiteFirstTestExecuted = true 24 | } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickAfterSuiteTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickFocusedTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTestHelpers/SpecRunner.swift: -------------------------------------------------------------------------------- 1 | @testable import Quick 2 | import Nimble 3 | 4 | @discardableResult 5 | public func qck_runSpec(_ specClass: QuickSpec.Type) -> TestRun? { 6 | return qck_runSpecs([specClass]) 7 | } 8 | 9 | @discardableResult 10 | public func qck_runSpecs(_ specClasses: [QuickSpec.Type]) -> TestRun? { 11 | Quick.World.sharedWorld.isRunningAdditionalSuites = true 12 | 13 | var executionCount: UInt = 0 14 | var hadUnexpectedFailure = false 15 | 16 | let fails = gatherFailingExpectations(silently: true) { 17 | for specClass in specClasses { 18 | for (_, test) in specClass.allTests { 19 | do { 20 | try test(specClass.init())() 21 | } catch { 22 | hadUnexpectedFailure = true 23 | } 24 | executionCount += 1 25 | } 26 | } 27 | } 28 | 29 | return TestRun(executionCount: executionCount, hasSucceeded: fails.isEmpty && !hadUnexpectedFailure) 30 | } 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTestHelpers/TestRun.swift: -------------------------------------------------------------------------------- 1 | public struct TestRun { 2 | public var executionCount: UInt 3 | public var hasSucceeded: Bool 4 | 5 | public init(executionCount: UInt, hasSucceeded: Bool) { 6 | self.executionCount = executionCount 7 | self.hasSucceeded = hasSucceeded 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Fixtures/FunctionalTests_SharedExamplesTests_SharedExamples.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | import Quick 3 | import Nimble 4 | 5 | class FunctionalTests_SharedExamplesTests_SharedExamples: QuickConfiguration { 6 | override class func configure(_ configuration: Configuration) { 7 | sharedExamples("a group of three shared examples") { 8 | it("passes once") { expect(true).to(beTruthy()) } 9 | it("passes twice") { expect(true).to(beTruthy()) } 10 | it("passes three times") { expect(true).to(beTruthy()) } 11 | } 12 | 13 | sharedExamples("shared examples that take a context") { (sharedExampleContext: @escaping SharedExampleContext) in 14 | it("is passed the correct parameters via the context") { 15 | let callsite = sharedExampleContext()["callsite"] as? String 16 | expect(callsite).to(equal("SharedExamplesSpec")) 17 | } 18 | } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/BeforeSuiteTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | var beforeSuiteWasExecuted = false 6 | 7 | class FunctionalTests_BeforeSuite_BeforeSuiteSpec: QuickSpec { 8 | override func spec() { 9 | beforeSuite { 10 | beforeSuiteWasExecuted = true 11 | } 12 | } 13 | } 14 | 15 | class FunctionalTests_BeforeSuite_Spec: QuickSpec { 16 | override func spec() { 17 | it("is executed after beforeSuite") { 18 | expect(beforeSuiteWasExecuted).to(beTruthy()) 19 | } 20 | } 21 | } 22 | 23 | final class BeforeSuiteTests: XCTestCase, XCTestCaseProvider { 24 | static var allTests: [(String, (BeforeSuiteTests) -> () throws -> Void)] { 25 | return [ 26 | ("testBeforeSuiteIsExecutedBeforeAnyExamples", testBeforeSuiteIsExecutedBeforeAnyExamples) 27 | ] 28 | } 29 | 30 | func testBeforeSuiteIsExecutedBeforeAnyExamples() { 31 | // Execute the spec with an assertion before the one with a beforeSuite 32 | let result = qck_runSpecs([ 33 | FunctionalTests_BeforeSuite_Spec.self, 34 | FunctionalTests_BeforeSuite_BeforeSuiteSpec.self 35 | ]) 36 | 37 | XCTAssert(result!.hasSucceeded) 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/BundleModuleNameTests.swift: -------------------------------------------------------------------------------- 1 | #if !SWIFT_PACKAGE 2 | 3 | import XCTest 4 | @testable import Quick 5 | import Nimble 6 | 7 | class BundleModuleNameSpecs: QuickSpec { 8 | override func spec() { 9 | describe("Bundle module name") { 10 | it("should repalce invalid characters with underscores") { 11 | let bundle = Bundle.currentTestBundle 12 | let moduleName = bundle?.moduleName 13 | expect(moduleName?.contains("Quick_")).to(beTrue()) 14 | } 15 | 16 | it("should be the correct module name to be able to retreive classes") { 17 | guard let bundle = Bundle.currentTestBundle else { 18 | XCTFail("test bundle not found") 19 | return 20 | } 21 | 22 | let moduleName = bundle.moduleName 23 | let className: AnyClass? = NSClassFromString("\(moduleName).BundleModuleNameSpecs") 24 | expect(className).to(be(BundleModuleNameSpecs.self)) 25 | } 26 | } 27 | } 28 | } 29 | 30 | #endif 31 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/Configuration/AfterEach/Configuration+AfterEach.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | public var FunctionalTests_Configuration_AfterEachWasExecuted = false 4 | 5 | class FunctionalTests_Configuration_AfterEach: QuickConfiguration { 6 | override class func configure(_ configuration: Configuration) { 7 | configuration.afterEach { 8 | FunctionalTests_Configuration_AfterEachWasExecuted = true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/Configuration/AfterEach/Configuration+AfterEachTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class Configuration_AfterEachSpec: QuickSpec { 6 | override func spec() { 7 | beforeEach { 8 | FunctionalTests_Configuration_AfterEachWasExecuted = false 9 | } 10 | it("is executed before the configuration afterEach") { 11 | expect(FunctionalTests_Configuration_AfterEachWasExecuted).to(beFalsy()) 12 | } 13 | } 14 | } 15 | 16 | final class Configuration_AfterEachTests: XCTestCase, XCTestCaseProvider { 17 | static var allTests: [(String, (Configuration_AfterEachTests) -> () throws -> Void)] { 18 | return [ 19 | ("testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted", testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted) 20 | ] 21 | } 22 | 23 | func testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted() { 24 | FunctionalTests_Configuration_AfterEachWasExecuted = false 25 | 26 | qck_runSpec(Configuration_BeforeEachSpec.self) 27 | XCTAssert(FunctionalTests_Configuration_AfterEachWasExecuted) 28 | 29 | FunctionalTests_Configuration_AfterEachWasExecuted = false 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/Configuration/BeforeEach/Configuration+BeforeEach.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | 3 | public var FunctionalTests_Configuration_BeforeEachWasExecuted = false 4 | 5 | class FunctionalTests_Configuration_BeforeEach: QuickConfiguration { 6 | override class func configure(_ configuration: Configuration) { 7 | configuration.beforeEach { 8 | FunctionalTests_Configuration_BeforeEachWasExecuted = true 9 | } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/Configuration/BeforeEach/Configuration+BeforeEachTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | class Configuration_BeforeEachSpec: QuickSpec { 6 | override func spec() { 7 | it("is executed after the configuration beforeEach") { 8 | expect(FunctionalTests_Configuration_BeforeEachWasExecuted).to(beTruthy()) 9 | } 10 | } 11 | } 12 | 13 | final class Configuration_BeforeEachTests: XCTestCase, XCTestCaseProvider { 14 | static var allTests: [(String, (Configuration_BeforeEachTests) -> () throws -> Void)] { 15 | return [ 16 | ("testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted", testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted) 17 | ] 18 | } 19 | 20 | func testExampleIsRunAfterTheConfigurationBeforeEachIsExecuted() { 21 | FunctionalTests_Configuration_BeforeEachWasExecuted = false 22 | 23 | qck_runSpec(Configuration_BeforeEachSpec.self) 24 | XCTAssert(FunctionalTests_Configuration_BeforeEachWasExecuted) 25 | 26 | FunctionalTests_Configuration_BeforeEachWasExecuted = false 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/ContextTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | import Nimble 4 | 5 | #if _runtime(_ObjC) && !SWIFT_PACKAGE 6 | class QuickContextTests: QuickSpec { 7 | override func spec() { 8 | describe("Context") { 9 | it("should throw an exception if used in an it block") { 10 | expect { 11 | context("A nested context that should throw") { } 12 | }.to(raiseException { (exception: NSException) in 13 | expect(exception.name).to(equal(NSExceptionName.internalInconsistencyException)) 14 | expect(exception.reason).to(equal("'context' cannot be used inside 'it', 'context' may only be used inside 'context' or 'describe'. ")) 15 | }) 16 | } 17 | } 18 | } 19 | } 20 | #endif 21 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/CrossReferencingSpecs.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | import Nimble 3 | 4 | // This is a functional test ensuring that no crash occurs when a spec class 5 | // references another spec class during its spec setup. 6 | 7 | class FunctionalTests_CrossReferencingSpecA: QuickSpec { 8 | override func spec() { 9 | let _ = FunctionalTests_CrossReferencingSpecB() 10 | it("does not crash") {} 11 | } 12 | } 13 | 14 | class FunctionalTests_CrossReferencingSpecB: QuickSpec { 15 | override func spec() { 16 | let _ = FunctionalTests_CrossReferencingSpecA() 17 | it("does not crash") {} 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/DescribeTests.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Nimble 3 | import Quick 4 | 5 | #if _runtime(_ObjC) && !SWIFT_PACKAGE 6 | 7 | final class DescribeTests: XCTestCase, XCTestCaseProvider { 8 | static var allTests: [(String, (DescribeTests) -> () throws -> Void)] { 9 | return [ 10 | ("testDescribeThrowsIfUsedOutsideOfQuickSpec", testDescribeThrowsIfUsedOutsideOfQuickSpec) 11 | ] 12 | } 13 | 14 | func testDescribeThrowsIfUsedOutsideOfQuickSpec() { 15 | expect { describe("this should throw an exception", {}) }.to(raiseException()) 16 | } 17 | } 18 | 19 | class QuickDescribeTests: QuickSpec { 20 | override func spec() { 21 | describe("Describe") { 22 | it("should throw an exception if used in an it block") { 23 | expect { 24 | describe("A nested describe that should throw") { } 25 | }.to(raiseException { (exception: NSException) in 26 | expect(exception.name).to(equal(NSExceptionName.internalInconsistencyException)) 27 | expect(exception.reason).to(equal("'describe' cannot be used inside 'it', 'describe' may only be used inside 'context' or 'describe'. ")) 28 | }) 29 | } 30 | } 31 | } 32 | } 33 | 34 | #endif 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/ObjC/BeforeSuiteTests+ObjC.m: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | @import Quick; 3 | @import Nimble; 4 | 5 | #import "QCKSpecRunner.h" 6 | 7 | static BOOL beforeSuiteWasExecuted = NO; 8 | 9 | QuickSpecBegin(FunctionalTests_BeforeSuite_BeforeSuiteSpec_ObjC) 10 | 11 | beforeSuite(^{ 12 | beforeSuiteWasExecuted = YES; 13 | }); 14 | 15 | QuickSpecEnd 16 | 17 | QuickSpecBegin(FunctionalTests_BeforeSuite_Spec_ObjC) 18 | 19 | it(@"is executed after beforeSuite", ^{ 20 | expect(@(beforeSuiteWasExecuted)).to(beTruthy()); 21 | }); 22 | 23 | QuickSpecEnd 24 | 25 | @interface BeforeSuiteTests_ObjC : XCTestCase; @end 26 | 27 | @implementation BeforeSuiteTests_ObjC 28 | 29 | - (void)testBeforeSuiteIsExecutedBeforeAnyExamples { 30 | // Execute the spec with an assertion before the one with a beforeSuite 31 | NSArray *specs = @[ 32 | [FunctionalTests_BeforeSuite_Spec_ObjC class], 33 | [FunctionalTests_BeforeSuite_BeforeSuiteSpec_ObjC class] 34 | ]; 35 | XCTestRun *result = qck_runSpecs(specs); 36 | XCTAssert(result.hasSucceeded); 37 | } 38 | 39 | @end 40 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/FunctionalTests/ObjC/ItTests+ObjC.m: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | @import Quick; 3 | @import Nimble; 4 | 5 | #import "QCKSpecRunner.h" 6 | #import "QuickSpec+QuickSpec_MethodList.h" 7 | 8 | QuickSpecBegin(FunctionalTests_ItSpec_ObjC) 9 | 10 | __block ExampleMetadata *exampleMetadata = nil; 11 | beforeEachWithMetadata(^(ExampleMetadata *metadata) { 12 | exampleMetadata = metadata; 13 | }); 14 | 15 | it(@" ", ^{ 16 | expect(exampleMetadata.example.name).to(equal(@" ")); 17 | }); 18 | 19 | it(@"has a description with セレクター名に使えない文字が入っている 👊💥", ^{ 20 | NSString *name = @"has a description with セレクター名に使えない文字が入っている 👊💥"; 21 | expect(exampleMetadata.example.name).to(equal(name)); 22 | }); 23 | 24 | it(@"is a test with a unique name", ^{ 25 | NSSet *allSelectors = [FunctionalTests_ItSpec_ObjC allSelectors]; 26 | 27 | expect(allSelectors).to(contain(@"is_a_test_with_a_unique_name")); 28 | expect(allSelectors).toNot(contain(@"is_a_test_with_a_unique_name_2")); 29 | }); 30 | 31 | QuickSpecEnd 32 | 33 | @interface ItTests_ObjC : XCTestCase; @end 34 | 35 | @implementation ItTests_ObjC 36 | 37 | - (void)testAllExamplesAreExecuted { 38 | XCTestRun *result = qck_runSpec([FunctionalTests_ItSpec_ObjC class]); 39 | XCTAssertEqual(result.executionCount, 3); 40 | } 41 | 42 | @end 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/QCKSpecRunner.h: -------------------------------------------------------------------------------- 1 | @import XCTest; 2 | 3 | /** 4 | Runs an XCTestSuite instance containing only the given XCTestCase subclass. 5 | Use this to run QuickSpec subclasses from within a set of unit tests. 6 | 7 | Due to implicit dependencies in _XCTFailureHandler, this function raises an 8 | exception when used in Swift to run a failing test case. 9 | 10 | @param specClass The class of the spec to be run. 11 | @return An XCTestRun instance that contains information such as the number of failures, etc. 12 | */ 13 | extern XCTestRun * _Nullable qck_runSpec(Class _Nonnull specClass); 14 | 15 | /** 16 | Runs an XCTestSuite instance containing the given XCTestCase subclasses, in the order provided. 17 | See the documentation for `qck_runSpec` for more details. 18 | 19 | @param specClasses An array of QuickSpec classes, in the order they should be run. 20 | @return An XCTestRun instance that contains information such as the number of failures, etc. 21 | */ 22 | extern XCTestRun * _Nullable qck_runSpecs(NSArray * _Nonnull specClasses); 23 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/QCKSpecRunner.m: -------------------------------------------------------------------------------- 1 | @import Quick; 2 | 3 | #import "QCKSpecRunner.h" 4 | #import "XCTestObservationCenter+QCKSuspendObservation.h" 5 | #import "World.h" 6 | 7 | @interface XCTest (Redeclaration) 8 | - (XCTestRun *)run; 9 | @end 10 | 11 | XCTestRun * _Nullable qck_runSuite(XCTestSuite * _Nonnull suite) { 12 | [World sharedWorld].isRunningAdditionalSuites = YES; 13 | 14 | __block XCTestRun *result = nil; 15 | [[XCTestObservationCenter sharedTestObservationCenter] qck_suspendObservationForBlock:^{ 16 | [suite runTest]; 17 | result = suite.testRun; 18 | }]; 19 | return result; 20 | } 21 | 22 | XCTestRun *qck_runSpec(Class specClass) { 23 | return qck_runSuite([XCTestSuite testSuiteForTestCaseClass:specClass]); 24 | } 25 | 26 | XCTestRun * _Nullable qck_runSpecs(NSArray * _Nonnull specClasses) { 27 | XCTestSuite *suite = [XCTestSuite testSuiteWithName:@"MySpecs"]; 28 | for (Class specClass in specClasses) { 29 | [suite addTest:[XCTestSuite testSuiteForTestCaseClass:specClass]]; 30 | } 31 | 32 | return qck_runSuite(suite); 33 | } 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | NS_ASSUME_NONNULL_BEGIN 4 | 5 | @interface QuickSpec (QuickSpec_MethodList) 6 | 7 | + (NSSet *)allSelectors; 8 | 9 | @end 10 | 11 | NS_ASSUME_NONNULL_END 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/QuickSpec+QuickSpec_MethodList.m: -------------------------------------------------------------------------------- 1 | #import "QuickSpec+QuickSpec_MethodList.h" 2 | #import 3 | 4 | 5 | @implementation QuickSpec (QuickSpec_MethodList) 6 | 7 | /** 8 | * This method will instantiate an instance of the class on which it is called, 9 | * returning a list of selector names for it. 10 | * 11 | * @warning Only intended to be used in test assertions! 12 | * 13 | * @return a set of NSStrings representing the list of selectors it contains 14 | */ 15 | + (NSSet *)allSelectors { 16 | QuickSpec *specInstance = [[[self class] alloc] init]; 17 | NSMutableSet *allSelectors = [NSMutableSet set]; 18 | 19 | unsigned int methodCount = 0; 20 | Method *mlist = class_copyMethodList(object_getClass(specInstance), &methodCount); 21 | 22 | for(unsigned int i = 0; i < methodCount; i++) { 23 | SEL selector = method_getName(mlist[i]); 24 | [allSelectors addObject:NSStringFromSelector(selector)]; 25 | } 26 | 27 | free(mlist); 28 | return [allSelectors copy]; 29 | } 30 | 31 | @end 32 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/QuickTestsBridgingHeader.h: -------------------------------------------------------------------------------- 1 | #import "QCKSpecRunner.h" 2 | #import "QuickSpec+QuickSpec_MethodList.h" 3 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Helpers/XCTestObservationCenter+QCKSuspendObservation.h: -------------------------------------------------------------------------------- 1 | #import 2 | 3 | /** 4 | Add the ability to temporarily disable internal XCTest execution observation in 5 | order to run isolated XCTestSuite instances while the QuickTests test suite is running. 6 | */ 7 | @interface XCTestObservationCenter (QCKSuspendObservation) 8 | 9 | /** 10 | Suspends test suite observation for XCTest-provided observers for the duration that 11 | the block is executing. Any test suites that are executed within the block do not 12 | generate any log output. Failures are still reported. 13 | 14 | Use this method to run XCTestSuite objects while another XCTestSuite is running. 15 | Without this method, tests fail with the message: "Timed out waiting for IDE 16 | barrier message to complete" or "Unexpected TestSuiteDidStart". 17 | */ 18 | - (void)qck_suspendObservationForBlock:(void (^)(void))block; 19 | 20 | @end 21 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | ${EXECUTABLE_NAME} 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | ${PRODUCT_NAME} 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/Tests/QuickTests/QuickTests/QuickConfigurationTests.m: -------------------------------------------------------------------------------- 1 | #import 2 | #import 3 | 4 | @interface QuickConfigurationTests : XCTestCase; @end 5 | 6 | @implementation QuickConfigurationTests 7 | 8 | - (void)testInitThrows { 9 | XCTAssertThrowsSpecificNamed([QuickConfiguration new], NSException, NSInternalInconsistencyException); 10 | } 11 | 12 | @end 13 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/script/travis-install-linux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env bash 2 | set -e 3 | 4 | # See: https://github.com/kylef/swiftenv/wiki/Travis-CI 5 | curl -sL https://gist.github.com/kylef/5c0475ff02b7c7671d2a/raw/621ef9b29bbb852fdfd2e10ed147b321d792c1e4/swiftenv-install.sh | bash 6 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/script/travis-install-macos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | set -e 3 | 4 | git submodule update --init --recursive 5 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/script/travis-script-linux: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | . ~/.swiftenv/init 4 | rake test:swiftpm 5 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Quick/script/travis-script-macos: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env sh 2 | 3 | if [ "$PODSPEC" ]; then 4 | TASK="podspec:lint" 5 | else 6 | TASK="test:$PLATFORM" 7 | fi 8 | 9 | echo "Executing rake task: $TASK" 10 | rake "$TASK" 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | xcuserdata 3 | *.xcuserdatad 4 | *.xccheckout 5 | *.mode* 6 | *.pbxuser 7 | 8 | Carthage/Build 9 | .build 10 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/.swift-version: -------------------------------------------------------------------------------- 1 | 3.0 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | We love that you're interested in contributing to this project! 2 | 3 | To make the process as painless as possible, we have just a couple of guidelines 4 | that should make life easier for everyone involved. 5 | 6 | ## Prefer Pull Requests 7 | 8 | If you know exactly how to implement the feature being suggested or fix the bug 9 | being reported, please open a pull request instead of an issue. Pull requests are easier than 10 | patches or inline code blocks for discussing and merging the changes. 11 | 12 | If you can't make the change yourself, please open an issue after making sure 13 | that one isn't already logged. 14 | 15 | ## Contributing Code 16 | 17 | Fork this repository, make it awesomer (preferably in a branch named for the 18 | topic), send a pull request! 19 | 20 | All code contributions should match our [coding 21 | conventions](https://github.com/github/swift-style-guide). 22 | 23 | Thanks for contributing! :boom::camel: 24 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Rob Rix 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "Result", 5 | targets: [ 6 | Target( 7 | name: "Result" 8 | ) 9 | ] 10 | ) 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Result.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = 'Result' 3 | s.version = '3.2.1' 4 | s.summary = 'Swift type modelling the success/failure of arbitrary operations' 5 | 6 | s.homepage = 'https://github.com/antitypical/Result' 7 | s.license = { :type => 'MIT', :file => 'LICENSE' } 8 | s.author = { 'Rob Rix' => 'rob.rix@github.com' } 9 | s.source = { :git => 'https://github.com/antitypical/Result.git', :tag => s.version } 10 | s.source_files = 'Result/*.swift' 11 | s.requires_arc = true 12 | s.ios.deployment_target = '8.0' 13 | s.osx.deployment_target = '10.9' 14 | s.watchos.deployment_target = '2.0' 15 | s.tvos.deployment_target = '9.0' 16 | end 17 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Result.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Result/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 3.2.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2015 Rob Rix. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Result/Result.h: -------------------------------------------------------------------------------- 1 | // Copyright (c) 2015 Rob Rix. All rights reserved. 2 | 3 | /// Project version number for Result. 4 | extern double ResultVersionNumber; 5 | 6 | /// Project version string for Result. 7 | extern const unsigned char ResultVersionString[]; 8 | 9 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | 3 | @testable import ResultTests 4 | 5 | XCTMain([ 6 | testCase(ResultTests.allTests), 7 | testCase(NoErrorTests.allTests), 8 | ]) 9 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/Result/Tests/ResultTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 3.2.1 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/.gitignore: -------------------------------------------------------------------------------- 1 | Carthage/Build 2 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Configurations/Debug.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines the base configuration for a Debug build of any project. 3 | // This should be set at the project level for the Debug configuration. 4 | // 5 | 6 | #include "../Common.xcconfig" 7 | 8 | // Whether to strip debugging symbols when copying resources (like included 9 | // binaries) 10 | COPY_PHASE_STRIP = NO 11 | 12 | // The optimization level (0, 1, 2, 3, s) for the produced binary 13 | GCC_OPTIMIZATION_LEVEL = 0 14 | 15 | // Preproccessor definitions to apply to each file compiled 16 | GCC_PREPROCESSOR_DEFINITIONS = DEBUG=1 17 | 18 | // Whether to enable link-time optimizations (such as inlining across translation 19 | // units) 20 | LLVM_LTO = NO 21 | 22 | // Whether to only build the active architecture 23 | ONLY_ACTIVE_ARCH = YES 24 | 25 | // Other compiler flags 26 | // 27 | // These settings catch some errors in integer arithmetic 28 | OTHER_CFLAGS = -ftrapv 29 | 30 | // Other flags to pass to the Swift compiler 31 | // 32 | // This enables conditional compilation with #if DEBUG 33 | OTHER_SWIFT_FLAGS = -D DEBUG 34 | 35 | // Whether to strip debugging symbols when copying the built product to its 36 | // final installation location 37 | STRIP_INSTALLED_PRODUCT = NO 38 | 39 | // The optimization level (-Onone, -O, -Ofast) for the produced Swift binary 40 | SWIFT_OPTIMIZATION_LEVEL = -Onone 41 | 42 | // Disable Developer ID timestamping 43 | OTHER_CODE_SIGN_FLAGS = --timestamp=none 44 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Configurations/Profile.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines the base configuration for an optional profiling-specific 3 | // build of any project. To use these settings, create a Profile configuration 4 | // in your project, and use this file at the project level for the new 5 | // configuration. 6 | // 7 | 8 | // based on the Release configuration, with some stuff related to debugging 9 | // symbols re-enabled 10 | #include "Release.xcconfig" 11 | 12 | // Whether to strip debugging symbols when copying resources (like included 13 | // binaries) 14 | COPY_PHASE_STRIP = NO 15 | 16 | // Whether to only build the active architecture 17 | ONLY_ACTIVE_ARCH = YES 18 | 19 | // Whether to strip debugging symbols when copying the built product to its 20 | // final installation location 21 | STRIP_INSTALLED_PRODUCT = NO 22 | 23 | // Whether to perform App Store validation checks 24 | VALIDATE_PRODUCT = NO 25 | 26 | // Disable Developer ID timestamping 27 | OTHER_CODE_SIGN_FLAGS = --timestamp=none 28 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Configurations/Release.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines the base configuration for a Release build of any project. 3 | // This should be set at the project level for the Release configuration. 4 | // 5 | 6 | #include "../Common.xcconfig" 7 | 8 | // Whether to strip debugging symbols when copying resources (like included 9 | // binaries) 10 | COPY_PHASE_STRIP = YES 11 | 12 | // The optimization level (0, 1, 2, 3, s) for the produced binary 13 | GCC_OPTIMIZATION_LEVEL = s 14 | 15 | // Preproccessor definitions to apply to each file compiled 16 | GCC_PREPROCESSOR_DEFINITIONS = NDEBUG=1 17 | 18 | // Whether to enable link-time optimizations (such as inlining across translation 19 | // units) 20 | LLVM_LTO = NO 21 | 22 | // Whether to only build the active architecture 23 | ONLY_ACTIVE_ARCH = NO 24 | 25 | // Whether to strip debugging symbols when copying the built product to its 26 | // final installation location 27 | STRIP_INSTALLED_PRODUCT = YES 28 | 29 | // The optimization level (-Onone, -O, -Owholemodule) for the produced Swift binary 30 | SWIFT_OPTIMIZATION_LEVEL = -Owholemodule 31 | 32 | // Whether to perform App Store validation checks 33 | VALIDATE_PRODUCT = YES 34 | 35 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Configurations/Test.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines the base configuration for a Test build of any project. 3 | // This should be set at the project level for the Test configuration. 4 | // 5 | 6 | #include "Debug.xcconfig" 7 | 8 | // Sandboxed apps can't be unit tested since they can't load some random 9 | // external bundle. So we disable sandboxing for testing. 10 | CODE_SIGN_ENTITLEMENTS = 11 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Targets/Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for an application. Typically, you want to use a platform-specific variant 4 | // instead. 5 | // 6 | 7 | // Whether to strip out code that isn't called from anywhere 8 | DEAD_CODE_STRIPPING = NO 9 | 10 | // Sets the @rpath for the application such that it can include frameworks in 11 | // the application bundle (inside the "Frameworks" folder) 12 | LD_RUNPATH_SEARCH_PATHS = @executable_path/../Frameworks @loader_path/../Frameworks @executable_path/Frameworks 13 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Base/Targets/StaticLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a static library. Typically, you want to use a platform-specific variant 4 | // instead. 5 | // 6 | 7 | // Whether to strip out code that isn't called from anywhere 8 | DEAD_CODE_STRIPPING = NO 9 | 10 | // Whether to strip debugging symbols when copying resources (like included 11 | // binaries). 12 | // 13 | // Overrides Release.xcconfig when used at the target level. 14 | COPY_PHASE_STRIP = NO 15 | 16 | // Whether function calls should be position-dependent (should always be 17 | // disabled for library code) 18 | GCC_DYNAMIC_NO_PIC = NO 19 | 20 | // Copy headers to "include/LibraryName" in the build folder by default. This 21 | // lets consumers use #import syntax even for static 22 | // libraries 23 | PUBLIC_HEADERS_FOLDER_PATH = include/$PRODUCT_NAME 24 | 25 | // Don't include in an xcarchive 26 | SKIP_INSTALL = YES 27 | 28 | // Disallows use of APIs that are not available 29 | // to app extensions and linking to frameworks 30 | // that have not been built with this setting enabled. 31 | APPLICATION_EXTENSION_API_ONLY = YES 32 | 33 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for an application on Mac OS X. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base application settings 8 | #include "../Base/Targets/Application.xcconfig" 9 | 10 | // Apply common settings specific to Mac OS X 11 | #include "Mac-Base.xcconfig" 12 | 13 | // Whether function calls should be position-dependent (should always be 14 | // disabled for library code) 15 | GCC_DYNAMIC_NO_PIC = YES 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for Mac OS X. This file is not standalone -- it is meant to be included into 4 | // a configuration file for a specific type of target. 5 | // 6 | 7 | // Whether to combine multiple image resolutions into a multirepresentational 8 | // TIFF 9 | COMBINE_HIDPI_IMAGES = YES 10 | 11 | // Where to find embedded frameworks 12 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/../Frameworks @loader_path/../Frameworks 13 | 14 | // The base SDK to use (if no version is specified, the latest version is 15 | // assumed) 16 | SDKROOT = macosx 17 | 18 | // Supported build architectures 19 | VALID_ARCHS = x86_64 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-DynamicLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a dynamic library on Mac OS X. This should be set at the target level 4 | // for each project configuration. 5 | // 6 | 7 | // Import common settings specific to Mac OS X 8 | #include "Mac-Base.xcconfig" 9 | 10 | // Whether to strip out code that isn't called from anywhere 11 | DEAD_CODE_STRIPPING = NO 12 | 13 | // Whether function calls should be position-dependent (should always be 14 | // disabled for library code) 15 | GCC_DYNAMIC_NO_PIC = NO 16 | 17 | // Don't include in an xcarchive 18 | SKIP_INSTALL = YES 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a framework on OS X. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base framework settings 8 | #include "../Base/Targets/Framework.xcconfig" 9 | 10 | // Import common settings specific to Mac OS X 11 | #include "Mac-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/Mac OS X/Mac-StaticLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a static library on Mac OS X. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base static library settings 8 | #include "../Base/Targets/StaticLibrary.xcconfig" 9 | 10 | // Apply common settings specific to Mac OS X 11 | #include "Mac-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/README.md: -------------------------------------------------------------------------------- 1 | This project intends to aggregate common or universal Xcode configuration settings, keeping them in hierarchial Xcode configuration files for easy modification and reuse. 2 | 3 | ## License 4 | 5 | This is free and unencumbered software released into the public domain. 6 | 7 | Anyone is free to copy, modify, publish, use, compile, sell, or distribute this software, either in source code form or as a compiled binary, for any purpose, commercial or non-commercial, and by any means. 8 | 9 | In jurisdictions that recognize copyright laws, the author or authors of this software dedicate any and all copyright interest in the software to the public domain. We make this dedication for the benefit of the public at large and to the detriment of our heirs and successors. We intend this dedication to be an overt act of relinquishment in perpetuity of all present and future rights to this software under copyright law. 10 | 11 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 12 | 13 | For more information, please refer to [unlicense.org](http://unlicense.org). 14 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/iOS/iOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for an application on iOS. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base application settings 8 | #include "../Base/Targets/Application.xcconfig" 9 | 10 | // Apply common settings specific to iOS 11 | #include "iOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/iOS/iOS-Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for iOS. This file is not standalone -- it is meant to be included into 4 | // a configuration file for a specific type of target. 5 | // 6 | 7 | // Xcode needs this to find archived headers if SKIP_INSTALL is set 8 | HEADER_SEARCH_PATHS = $(OBJROOT)/UninstalledProducts/include 9 | 10 | // Where to find embedded frameworks 11 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 12 | 13 | // The base SDK to use (if no version is specified, the latest version is 14 | // assumed) 15 | SDKROOT = iphoneos 16 | 17 | // Supported device families (1 is iPhone, 2 is iPad) 18 | TARGETED_DEVICE_FAMILY = 1,2 19 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/iOS/iOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a framework on iOS. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base framework settings 8 | #include "../Base/Targets/Framework.xcconfig" 9 | 10 | // Import common settings specific to iOS 11 | #include "iOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/iOS/iOS-StaticLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a static library on iOS. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base static library settings 8 | #include "../Base/Targets/StaticLibrary.xcconfig" 9 | 10 | // Apply common settings specific to iOS 11 | #include "iOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/tvOS/tvOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for an application on tvOS. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base application settings 8 | #include "../Base/Targets/Application.xcconfig" 9 | 10 | // Apply common settings specific to tvOS 11 | #include "tvOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/tvOS/tvOS-Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for tvOS. This file is not standalone -- it is meant to be included into 4 | // a configuration file for a specific type of target. 5 | // 6 | 7 | // Where to find embedded frameworks 8 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 9 | 10 | // The base SDK to use (if no version is specified, the latest version is 11 | // assumed) 12 | SDKROOT = appletvos 13 | 14 | // Supported device families 15 | TARGETED_DEVICE_FAMILY = 3 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/tvOS/tvOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a framework on tvOS. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base framework settings 8 | #include "../Base/Targets/Framework.xcconfig" 9 | 10 | // Import common settings specific to iOS 11 | #include "tvOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/tvOS/tvOS-StaticLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a static library on tvOS. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base static library settings 8 | #include "../Base/Targets/StaticLibrary.xcconfig" 9 | 10 | // Apply common settings specific to tvOS 11 | #include "tvOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/watchOS/watchOS-Application.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for an application on watchOS. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base application settings 8 | #include "../Base/Targets/Application.xcconfig" 9 | 10 | // Apply common settings specific to watchOS 11 | #include "watchOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/watchOS/watchOS-Base.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for watchOS. This file is not standalone -- it is meant to be included into 4 | // a configuration file for a specific type of target. 5 | // 6 | 7 | // Where to find embedded frameworks 8 | LD_RUNPATH_SEARCH_PATHS = $(inherited) @executable_path/Frameworks @loader_path/Frameworks 9 | 10 | // The base SDK to use (if no version is specified, the latest version is 11 | // assumed) 12 | SDKROOT = watchos 13 | 14 | // Supported device families 15 | TARGETED_DEVICE_FAMILY = 4 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/watchOS/watchOS-Framework.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a framework on watchOS. This should be set at the target level for each 4 | // project configuration. 5 | // 6 | 7 | // Import base framework settings 8 | #include "../Base/Targets/Framework.xcconfig" 9 | 10 | // Import common settings specific to iOS 11 | #include "watchOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/Carthage/Checkouts/xcconfigs/watchOS/watchOS-StaticLibrary.xcconfig: -------------------------------------------------------------------------------- 1 | // 2 | // This file defines additional configuration options that are appropriate only 3 | // for a static library on watchOS. This should be set at the target level for 4 | // each project configuration. 5 | // 6 | 7 | // Import base static library settings 8 | #include "../Base/Targets/StaticLibrary.xcconfig" 9 | 10 | // Apply common settings specific to watchOS 11 | #include "watchOS-Base.xcconfig" 12 | -------------------------------------------------------------------------------- /ReactiveSwift/LICENSE.md: -------------------------------------------------------------------------------- 1 | **Copyright (c) 2012 - 2016, GitHub, Inc.** 2 | **All rights reserved.** 3 | 4 | Permission is hereby granted, free of charge, to any person obtaining a copy of 5 | this software and associated documentation files (the "Software"), to deal in 6 | the Software without restriction, including without limitation the rights to 7 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 8 | the Software, and to permit persons to whom the Software is furnished to do so, 9 | subject to the following conditions: 10 | 11 | The above copyright notice and this permission notice shall be included in all 12 | copies or substantial portions of the Software. 13 | 14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 16 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 17 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 18 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 19 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 20 | -------------------------------------------------------------------------------- /ReactiveSwift/Logo/AF/Docs.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/AF/Docs.afdesign -------------------------------------------------------------------------------- /ReactiveSwift/Logo/AF/JoinSlack.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/AF/JoinSlack.afdesign -------------------------------------------------------------------------------- /ReactiveSwift/Logo/AF/ReactiveSwift.afdesign: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/AF/ReactiveSwift.afdesign -------------------------------------------------------------------------------- /ReactiveSwift/Logo/Icons/Swift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/Icons/Swift.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/PNG/Docs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/PNG/Docs.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/PNG/JoinSlack.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/PNG/JoinSlack.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/PNG/logo-Swift-unpadded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/PNG/logo-Swift-unpadded.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/PNG/logo-Swift.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/PNG/logo-Swift.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/Palette.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/Palette.png -------------------------------------------------------------------------------- /ReactiveSwift/Logo/README.md: -------------------------------------------------------------------------------- 1 | This folder contains brand assets. 2 | 3 | # Logo 4 | 5 | Four horizontal variations that include both the mark and the logotype. When 6 | using the logo in contexts where it's surrounded by other elements, leave 7 | a padding of about 10% of its height on each side. 8 | 9 | # Icon 10 | 11 | Four icon variations to be used on social media and other contexts where the 12 | horizontal logo wouldn't fit. 13 | 14 | # Colors 15 | 16 | Primary color: `#88CD79` 17 | Secondary color: `#41AD71` 18 | Tertiary color: `#4F6B97` 19 | 20 | ![](Palette.png) 21 | 22 | # Type 23 | 24 | Avenir Next, designed by Adrian Frutiger and Akira Kobayashi for Linotype. 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Logo/header.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/objcio/S01E53-test-driven-reactive-programming-at-kickstarer/3650a42a60e02bbbc48b9dccfe71df04bfecbf06/ReactiveSwift/Logo/header.png -------------------------------------------------------------------------------- /ReactiveSwift/Package.swift: -------------------------------------------------------------------------------- 1 | import PackageDescription 2 | 3 | let package = Package( 4 | name: "ReactiveSwift", 5 | dependencies: [ 6 | .Package(url: "https://github.com/antitypical/Result.git", versions: Version(3, 2, 1).. String? { 5 | if let range = range(of: suffix) { 6 | return substring(with: startIndex ..< range.lowerBound) 7 | } 8 | return nil 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift-UIExamples.playground/Sources/PlaygroundUtility.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public func scopedExample(_ exampleDescription: String, _ action: () -> Void) { 4 | print("\n--- \(exampleDescription) ---\n") 5 | action() 6 | } 7 | 8 | public enum PlaygroundError: Error { 9 | case example(String) 10 | } 11 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift-UIExamples.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift.playground/Pages/Sandbox.xcplaygroundpage/Contents.swift: -------------------------------------------------------------------------------- 1 | /*: 2 | > # IMPORTANT: To use `ReactiveSwift.playground`, please: 3 | 4 | 1. Retrieve the project dependencies using one of the following terminal commands from the ReactiveSwift project root directory: 5 | - `git submodule update --init` 6 | **OR**, if you have [Carthage](https://github.com/Carthage/Carthage) installed 7 | - `carthage checkout --no-use-binaries` 8 | 1. Open `ReactiveSwift.xcworkspace` 9 | 1. Build `Result-Mac` scheme 10 | 1. Build `ReactiveSwift-macOS` scheme 11 | 1. Finally open the `ReactiveSwift.playground` 12 | 1. Choose `View > Show Debug Area` 13 | */ 14 | 15 | import Result 16 | import ReactiveSwift 17 | import Foundation 18 | 19 | /*: 20 | ## Sandbox 21 | 22 | A place where you can build your sand castles 🏖. 23 | */ 24 | 25 | 26 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift.playground/Sources/PlaygroundUtility.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | public func scopedExample(_ exampleDescription: String, _ action: () -> Void) { 4 | print("\n--- \(exampleDescription) ---\n") 5 | action() 6 | } 7 | 8 | public enum PlaygroundError: Error { 9 | case example(String) 10 | } 11 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift.podspec: -------------------------------------------------------------------------------- 1 | Pod::Spec.new do |s| 2 | s.name = "ReactiveSwift" 3 | # Version goes here and will be used to access the git tag later on, once we have a first release. 4 | s.version = "1.1.1" 5 | s.summary = "Streams of values over time" 6 | s.description = <<-DESC 7 | ReactiveSwift is a Swift framework inspired by Functional Reactive Programming. It provides APIs for composing and transforming streams of values over time. 8 | DESC 9 | s.homepage = "https://github.com/ReactiveCocoa/ReactiveSwift" 10 | s.license = { :type => "MIT", :file => "LICENSE.md" } 11 | s.author = "ReactiveCocoa" 12 | 13 | s.ios.deployment_target = "8.0" 14 | s.osx.deployment_target = "10.9" 15 | s.watchos.deployment_target = "2.0" 16 | s.tvos.deployment_target = "9.0" 17 | s.source = { :git => "https://github.com/ReactiveCocoa/ReactiveSwift.git", :tag => "#{s.version}" } 18 | # Directory glob for all Swift files 19 | s.source_files = "Sources/*.{swift}" 20 | s.dependency 'Result', '~> 3.2' 21 | 22 | s.pod_target_xcconfig = {"OTHER_SWIFT_FLAGS[config=Release]" => "-suppress-warnings" } 23 | end 24 | -------------------------------------------------------------------------------- /ReactiveSwift/ReactiveSwift.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 9 | 10 | 12 | 13 | 15 | 16 | 18 | 19 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /ReactiveSwift/Sources/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | FMWK 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | $(CURRENT_PROJECT_VERSION) 23 | NSHumanReadableCopyright 24 | Copyright © 2014 GitHub. All rights reserved. 25 | NSPrincipalClass 26 | 27 | 28 | 29 | -------------------------------------------------------------------------------- /ReactiveSwift/Sources/Optional.swift: -------------------------------------------------------------------------------- 1 | // 2 | // Optional.swift 3 | // ReactiveSwift 4 | // 5 | // Created by Neil Pankey on 6/24/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | /// An optional protocol for use in type constraints. 10 | public protocol OptionalProtocol { 11 | /// The type contained in the otpional. 12 | associatedtype Wrapped 13 | 14 | init(reconstructing value: Wrapped?) 15 | 16 | /// Extracts an optional from the receiver. 17 | var optional: Wrapped? { get } 18 | } 19 | 20 | extension Optional: OptionalProtocol { 21 | public var optional: Wrapped? { 22 | return self 23 | } 24 | 25 | public init(reconstructing value: Wrapped?) { 26 | self = value 27 | } 28 | } 29 | 30 | extension SignalProtocol { 31 | /// Turns each value into an Optional. 32 | internal func optionalize() -> Signal { 33 | return map(Optional.init) 34 | } 35 | } 36 | 37 | extension SignalProducerProtocol { 38 | /// Turns each value into an Optional. 39 | internal func optionalize() -> SignalProducer { 40 | return lift { $0.optionalize() } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /ReactiveSwift/Sources/Reactive.swift: -------------------------------------------------------------------------------- 1 | /// Describes a provider of reactive extensions. 2 | /// 3 | /// - note: `ReactiveExtensionsProvider` does not indicate whether a type is 4 | /// reactive. It is intended for extensions to types that are not owned 5 | /// by the module in order to avoid name collisions and return type 6 | /// ambiguities. 7 | public protocol ReactiveExtensionsProvider: class {} 8 | 9 | extension ReactiveExtensionsProvider { 10 | /// A proxy which hosts reactive extensions for `self`. 11 | public var reactive: Reactive { 12 | return Reactive(self) 13 | } 14 | 15 | /// A proxy which hosts static reactive extensions for the type of `self`. 16 | public static var reactive: Reactive.Type { 17 | return Reactive.self 18 | } 19 | } 20 | 21 | /// A proxy which hosts reactive extensions of `Base`. 22 | public struct Reactive { 23 | /// The `Base` instance the extensions would be invoked with. 24 | public let base: Base 25 | 26 | /// Construct a proxy 27 | /// 28 | /// - parameters: 29 | /// - base: The object to be proxied. 30 | fileprivate init(_ base: Base) { 31 | self.base = base 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Sources/ReactiveSwift.h: -------------------------------------------------------------------------------- 1 | // 2 | // ReactiveSwift.h 3 | // ReactiveSwift 4 | // 5 | // Created by Matt Diephouse on 8/15/16. 6 | // Copyright (c) 2016 the ReactiveSwift contributors. All rights reserved. 7 | // 8 | 9 | #import 10 | 11 | //! Project version number for ReactiveSwift. 12 | FOUNDATION_EXPORT double ReactiveSwiftVersionNumber; 13 | 14 | //! Project version string for ReactiveSwift. 15 | FOUNDATION_EXPORT const unsigned char ReactiveSwiftVersionString[]; 16 | -------------------------------------------------------------------------------- /ReactiveSwift/Sources/ResultExtensions.swift: -------------------------------------------------------------------------------- 1 | import Result 2 | 3 | /// Private alias of the free `materialize()` from `Result`. 4 | /// 5 | /// This exists because within a `Signal` or `SignalProducer` operator, 6 | /// `materialize()` refers to the operator with that name. 7 | /// Namespacing as `Result.materialize()` doesn't work either, 8 | /// because it tries to resolve a static member on the _type_ 9 | /// `Result`, rather than the free function in the _module_ 10 | /// of the same name. 11 | internal func materialize(_ f: () throws -> T) -> Result { 12 | return materialize(try f()) 13 | } 14 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/LinuxMain.swift: -------------------------------------------------------------------------------- 1 | import XCTest 2 | import Quick 3 | 4 | @testable import ReactiveSwiftTests 5 | 6 | Quick.QCKMain([ 7 | ActionSpec.self, 8 | AtomicSpec.self, 9 | BagSpec.self, 10 | DisposableSpec.self, 11 | DeprecationSpec.self, 12 | FlattenSpec.self, 13 | FoundationExtensionsSpec.self, 14 | LifetimeSpec.self, 15 | PropertySpec.self, 16 | SchedulerSpec.self, 17 | SignalLifetimeSpec.self, 18 | SignalProducerLiftingSpec.self, 19 | SignalProducerSpec.self, 20 | SignalSpec.self, 21 | ]) 22 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/AtomicSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // AtomicSpec.swift 3 | // ReactiveSwift 4 | // 5 | // Created by Justin Spahr-Summers on 2014-07-13. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | import Nimble 10 | import Quick 11 | import ReactiveSwift 12 | 13 | class AtomicSpec: QuickSpec { 14 | override func spec() { 15 | var atomic: Atomic! 16 | 17 | beforeEach { 18 | atomic = Atomic(1) 19 | } 20 | 21 | it("should read and write the value directly") { 22 | expect(atomic.value) == 1 23 | 24 | atomic.value = 2 25 | expect(atomic.value) == 2 26 | } 27 | 28 | it("should swap the value atomically") { 29 | expect(atomic.swap(2)) == 1 30 | expect(atomic.value) == 2 31 | } 32 | 33 | it("should modify the value atomically") { 34 | atomic.modify { $0 += 1 } 35 | expect(atomic.value) == 2 36 | } 37 | 38 | it("should perform an action with the value") { 39 | let result: Bool = atomic.withValue { $0 == 1 } 40 | expect(result) == true 41 | expect(atomic.value) == 1 42 | } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/BagSpec.swift: -------------------------------------------------------------------------------- 1 | // 2 | // BagSpec.swift 3 | // ReactiveSwift 4 | // 5 | // Created by Justin Spahr-Summers on 2014-07-13. 6 | // Copyright (c) 2014 GitHub. All rights reserved. 7 | // 8 | 9 | import Nimble 10 | import Quick 11 | import ReactiveSwift 12 | 13 | class BagSpec: QuickSpec { 14 | override func spec() { 15 | var bag = Bag() 16 | 17 | beforeEach { 18 | bag = Bag() 19 | } 20 | 21 | it("should insert values") { 22 | bag.insert("foo") 23 | bag.insert("bar") 24 | bag.insert("buzz") 25 | 26 | expect(bag).to(contain("foo")) 27 | expect(bag).to(contain("bar")) 28 | expect(bag).to(contain("buzz")) 29 | expect(bag).toNot(contain("fuzz")) 30 | expect(bag).toNot(contain("foobar")) 31 | } 32 | 33 | it("should remove values given the token from insertion") { 34 | let a = bag.insert("foo") 35 | let b = bag.insert("bar") 36 | let c = bag.insert("buzz") 37 | 38 | bag.remove(using: b) 39 | expect(bag).to(contain("foo")) 40 | expect(bag).toNot(contain("bar")) 41 | expect(bag).to(contain("buzz")) 42 | 43 | bag.remove(using: a) 44 | expect(bag).toNot(contain("foo")) 45 | expect(bag).toNot(contain("bar")) 46 | expect(bag).to(contain("buzz")) 47 | 48 | bag.remove(using: c) 49 | expect(bag).toNot(contain("foo")) 50 | expect(bag).toNot(contain("bar")) 51 | expect(bag).toNot(contain("buzz")) 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/DeprecationSpec.swift: -------------------------------------------------------------------------------- 1 | import Quick 2 | import Nimble 3 | import ReactiveSwift 4 | import Result 5 | 6 | final class TestTarget: BindingTargetProtocol { 7 | typealias Value = Int 8 | 9 | var counter = 0 10 | 11 | let (lifetime, token) = Lifetime.make() 12 | 13 | func consume(_ value: Int) { 14 | counter += 1 15 | } 16 | } 17 | 18 | class DeprecationSpec: QuickSpec { 19 | override func spec() { 20 | describe("BindingTargetProtocol") { 21 | it("should make the conforming type a valid BindingTargetProvider automatically") { 22 | let target = TestTarget() 23 | let property = MutableProperty(0) 24 | 25 | expect(target.counter) == 0 26 | 27 | target <~ property 28 | expect(target.counter) == 1 29 | 30 | property.value = 0 31 | expect(target.counter) == 2 32 | } 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | BNDL 17 | CFBundleShortVersionString 18 | 1.0.0 19 | CFBundleSignature 20 | ???? 21 | CFBundleVersion 22 | 1 23 | 24 | 25 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/ReactiveExtensionsSpec.swift: -------------------------------------------------------------------------------- 1 | import Nimble 2 | import Quick 3 | import ReactiveSwift 4 | import Result 5 | 6 | private final class TestExtensionProvider: ReactiveExtensionsProvider { 7 | let instanceProperty = "instance" 8 | static let staticProperty = "static" 9 | } 10 | 11 | extension Reactive where Base: TestExtensionProvider { 12 | var instanceProperty: SignalProducer { 13 | return SignalProducer(value: base.instanceProperty) 14 | } 15 | 16 | static var staticProperty: SignalProducer { 17 | return SignalProducer(value: Base.staticProperty) 18 | } 19 | } 20 | 21 | final class ReactiveExtensionsSpec: QuickSpec { 22 | override func spec() { 23 | describe("ReactiveExtensions") { 24 | it("allows reactive extensions of instances") { 25 | expect(TestExtensionProvider().reactive.instanceProperty.first()?.value) == "instance" 26 | } 27 | 28 | it("allows reactive extensions of types") { 29 | expect(TestExtensionProvider.reactive.staticProperty.first()?.value) == "static" 30 | } 31 | } 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/TestError.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestError.swift 3 | // ReactiveSwift 4 | // 5 | // Created by Almas Sapargali on 1/26/15. 6 | // Copyright (c) 2015 GitHub. All rights reserved. 7 | // 8 | 9 | import ReactiveSwift 10 | import Result 11 | 12 | internal enum TestError: Int { 13 | case `default` = 0 14 | case error1 = 1 15 | case error2 = 2 16 | } 17 | 18 | extension TestError: Error { 19 | } 20 | 21 | 22 | internal extension SignalProducerProtocol { 23 | /// Halts if an error is emitted in the receiver signal. 24 | /// This is useful in tests to be able to just use `startWithNext` 25 | /// in cases where we know that an error won't be emitted. 26 | func assumeNoErrors() -> SignalProducer { 27 | return self.lift { $0.assumeNoErrors() } 28 | } 29 | } 30 | 31 | internal extension SignalProtocol { 32 | /// Halts if an error is emitted in the receiver signal. 33 | /// This is useful in tests to be able to just use `startWithNext` 34 | /// in cases where we know that an error won't be emitted. 35 | func assumeNoErrors() -> Signal { 36 | return self.mapError { error in 37 | fatalError("Unexpected error: \(error)") 38 | 39 | () 40 | } 41 | } 42 | } 43 | 44 | -------------------------------------------------------------------------------- /ReactiveSwift/Tests/ReactiveSwiftTests/TestLogger.swift: -------------------------------------------------------------------------------- 1 | // 2 | // TestLogger.swift 3 | // ReactiveSwift 4 | // 5 | // Created by Rui Peres on 29/04/2016. 6 | // Copyright © 2016 GitHub. All rights reserved. 7 | // 8 | 9 | import Foundation 10 | @testable import ReactiveSwift 11 | 12 | final class TestLogger { 13 | fileprivate var expectations: [(String) -> Void] 14 | 15 | init(expectations: [(String) -> Void]) { 16 | self.expectations = expectations 17 | } 18 | } 19 | 20 | extension TestLogger { 21 | func logEvent(_ identifier: String, event: String, fileName: String, functionName: String, lineNumber: Int) { 22 | expectations.removeFirst()("[\(identifier)] \(event)") 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /ReactiveSwift/script/build: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | BUILD_DIRECTORY="build" 4 | CONFIGURATION=Release 5 | 6 | if [[ -z $TRAVIS_XCODE_WORKSPACE ]]; then 7 | echo "Error: \$TRAVIS_XCODE_WORKSPACE is not set." 8 | exit 1 9 | fi 10 | 11 | if [[ -z $TRAVIS_XCODE_SCHEME ]]; then 12 | echo "Error: \$TRAVIS_XCODE_SCHEME is not set!" 13 | exit 1 14 | fi 15 | 16 | if [[ -z $XCODE_ACTION ]]; then 17 | echo "Error: \$XCODE_ACTION is not set!" 18 | exit 1 19 | fi 20 | 21 | if [[ -z $XCODE_SDK ]]; then 22 | echo "Error: \$XCODE_SDK is not set!" 23 | exit 1 24 | fi 25 | 26 | if [[ -z $XCODE_DESTINATION ]]; then 27 | echo "Error: \$XCODE_DESTINATION is not set!" 28 | exit 1 29 | fi 30 | 31 | set -o pipefail 32 | xcodebuild $XCODE_ACTION \ 33 | -workspace "$TRAVIS_XCODE_WORKSPACE" \ 34 | -scheme "$TRAVIS_XCODE_SCHEME" \ 35 | -sdk "$XCODE_SDK" \ 36 | -destination "$XCODE_DESTINATION" \ 37 | -derivedDataPath "${BUILD_DIRECTORY}" \ 38 | -configuration $CONFIGURATION \ 39 | ENABLE_TESTABILITY=YES \ 40 | GCC_GENERATE_DEBUGGING_SYMBOLS=NO \ 41 | RUN_CLANG_STATIC_ANALYZER=NO | xcpretty 42 | result=$? 43 | 44 | if [ "$result" -ne 0 ]; then 45 | exit $result 46 | fi 47 | 48 | # Compile code in playgrounds 49 | if [[ $XCODE_SDK = "macosx" ]]; then 50 | echo "SDK is $XCODE_SDK, validating playground..." 51 | . script/validate-playground.sh 52 | fi 53 | -------------------------------------------------------------------------------- /ReactiveSwift/script/validate-playground.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | 3 | # Bash script to lint the content of playgrounds 4 | # Heavily based on RxSwift's 5 | # https://github.com/ReactiveX/RxSwift/blob/master/scripts/validate-playgrounds.sh 6 | 7 | if [ -z "$BUILD_DIRECTORY" ]; then 8 | echo "\$BUILD_DIRECTORY is not set. Are you trying to run \`validate-playgrounds.sh\` without building RAC first?\n" 9 | echo "To validate the playground, run \`script/build\`." 10 | exit 1 11 | fi 12 | 13 | if [ -z "$XCODE_PLAYGROUND_TARGET" ]; then 14 | echo "\$XCODE_PLAYGROUND_TARGET is not set." 15 | exit 1 16 | fi 17 | 18 | PAGES_PATH=${BUILD_DIRECTORY}/Build/Products/${CONFIGURATION}/all-playground-pages.swift 19 | 20 | cat ReactiveSwift.playground/Sources/*.swift ReactiveSwift.playground/Pages/**/*.swift > ${PAGES_PATH} 21 | 22 | swift -v -target ${XCODE_PLAYGROUND_TARGET} -D NOT_IN_PLAYGROUND -F ${BUILD_DIRECTORY}/Build/Products/${CONFIGURATION} ${PAGES_PATH} > /dev/null 23 | result=$? 24 | 25 | # Cleanup 26 | rm -Rf $BUILD_DIRECTORY 27 | 28 | exit $result 29 | -------------------------------------------------------------------------------- /SwiftTalk.playground/Sources/IsValidHelpers.swift: -------------------------------------------------------------------------------- 1 | import Foundation 2 | 3 | private let pattern = "[a-zA-Z0-9\\+\\.\\_\\%\\-\\+]{1,256}\\@" + 4 | "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,64}(\\." + 5 | "[a-zA-Z0-9][a-zA-Z0-9\\-]{0,25})+" 6 | 7 | public func isValidEmail(_ email: String) -> Bool { 8 | 9 | let regex = try? NSRegularExpression( 10 | pattern: pattern, 11 | options: [] 12 | ) 13 | 14 | let range = NSRange.init(location: 0, length: email.characters.count) 15 | return regex?.firstMatch(in: email, options: [], range: range) != nil 16 | } 17 | 18 | public func isPresent(email: String?, name: String?, password: String?) -> Bool { 19 | guard let email = email, let name = name, let password = password 20 | else { return false } 21 | return email.characters.count > 0 22 | && name.characters.count > 0 23 | && password.characters.count > 0 24 | } 25 | 26 | public func isValid(email: String?, name: String?, password: String?) -> Bool { 27 | guard let email = email, let name = name, let password = password 28 | else { return false } 29 | return isValidEmail(email) 30 | && name.characters.count > 0 31 | && password.characters.count > 0 32 | } 33 | -------------------------------------------------------------------------------- /SwiftTalk.playground/contents.xcplayground: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | -------------------------------------------------------------------------------- /SwiftTalk.playground/playground.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftTalk.playground/timeline.xctimeline: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /SwiftTalk.xcodeproj/project.xcworkspace/contents.xcworkspacedata: -------------------------------------------------------------------------------- 1 | 2 | 4 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /SwiftTalk/Assets.xcassets/AppIcon.appiconset/Contents.json: -------------------------------------------------------------------------------- 1 | { 2 | "images" : [ 3 | { 4 | "idiom" : "iphone", 5 | "size" : "29x29", 6 | "scale" : "2x" 7 | }, 8 | { 9 | "idiom" : "iphone", 10 | "size" : "29x29", 11 | "scale" : "3x" 12 | }, 13 | { 14 | "idiom" : "iphone", 15 | "size" : "40x40", 16 | "scale" : "2x" 17 | }, 18 | { 19 | "idiom" : "iphone", 20 | "size" : "40x40", 21 | "scale" : "3x" 22 | }, 23 | { 24 | "idiom" : "iphone", 25 | "size" : "60x60", 26 | "scale" : "2x" 27 | }, 28 | { 29 | "idiom" : "iphone", 30 | "size" : "60x60", 31 | "scale" : "3x" 32 | } 33 | ], 34 | "info" : { 35 | "version" : 1, 36 | "author" : "xcode" 37 | } 38 | } -------------------------------------------------------------------------------- /SwiftTalk/Info.plist: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | CFBundleDevelopmentRegion 6 | en 7 | CFBundleExecutable 8 | $(EXECUTABLE_NAME) 9 | CFBundleIdentifier 10 | $(PRODUCT_BUNDLE_IDENTIFIER) 11 | CFBundleInfoDictionaryVersion 12 | 6.0 13 | CFBundleName 14 | $(PRODUCT_NAME) 15 | CFBundlePackageType 16 | APPL 17 | CFBundleShortVersionString 18 | 1.0 19 | CFBundleVersion 20 | 1 21 | LSRequiresIPhoneOS 22 | 23 | UILaunchStoryboardName 24 | LaunchScreen 25 | UIMainStoryboardFile 26 | Main 27 | UIRequiredDeviceCapabilities 28 | 29 | armv7 30 | 31 | UISupportedInterfaceOrientations 32 | 33 | UIInterfaceOrientationPortrait 34 | UIInterfaceOrientationLandscapeLeft 35 | UIInterfaceOrientationLandscapeRight 36 | 37 | 38 | 39 | -------------------------------------------------------------------------------- /SwiftTalk/ViewController.swift: -------------------------------------------------------------------------------- 1 | // 2 | // ViewController.swift 3 | // SwiftTalk 4 | // 5 | // Created by Brandon Williams on 3/30/17. 6 | // Copyright © 2017 Kickstarter. All rights reserved. 7 | // 8 | 9 | import UIKit 10 | 11 | class ViewController: UIViewController { 12 | 13 | override func viewDidLoad() { 14 | super.viewDidLoad() 15 | // Do any additional setup after loading the view, typically from a nib. 16 | } 17 | 18 | override func didReceiveMemoryWarning() { 19 | super.didReceiveMemoryWarning() 20 | // Dispose of any resources that can be recreated. 21 | } 22 | 23 | 24 | } 25 | 26 | --------------------------------------------------------------------------------