├── .circleci
└── config.yml
├── .github
└── FUNDING.yml
├── .gitignore
├── CHANGELOG.md
├── Example
├── .swift_version
├── Podfile
├── Podfile.lock
├── Pods
│ ├── Expecta
│ │ ├── Expecta
│ │ │ ├── EXPBlockDefinedMatcher.h
│ │ │ ├── EXPBlockDefinedMatcher.m
│ │ │ ├── EXPDefines.h
│ │ │ ├── EXPDoubleTuple.h
│ │ │ ├── EXPDoubleTuple.m
│ │ │ ├── EXPExpect.h
│ │ │ ├── EXPExpect.m
│ │ │ ├── EXPFloatTuple.h
│ │ │ ├── EXPFloatTuple.m
│ │ │ ├── EXPMatcher.h
│ │ │ ├── EXPUnsupportedObject.h
│ │ │ ├── EXPUnsupportedObject.m
│ │ │ ├── Expecta.h
│ │ │ ├── ExpectaObject.h
│ │ │ ├── ExpectaObject.m
│ │ │ ├── ExpectaSupport.h
│ │ │ ├── ExpectaSupport.m
│ │ │ ├── Matchers
│ │ │ │ ├── EXPMatcherHelpers.h
│ │ │ │ ├── EXPMatcherHelpers.m
│ │ │ │ ├── EXPMatchers+beCloseTo.h
│ │ │ │ ├── EXPMatchers+beCloseTo.m
│ │ │ │ ├── EXPMatchers+beFalsy.h
│ │ │ │ ├── EXPMatchers+beFalsy.m
│ │ │ │ ├── EXPMatchers+beGreaterThan.h
│ │ │ │ ├── EXPMatchers+beGreaterThan.m
│ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.h
│ │ │ │ ├── EXPMatchers+beGreaterThanOrEqualTo.m
│ │ │ │ ├── EXPMatchers+beIdenticalTo.h
│ │ │ │ ├── EXPMatchers+beIdenticalTo.m
│ │ │ │ ├── EXPMatchers+beInTheRangeOf.h
│ │ │ │ ├── EXPMatchers+beInTheRangeOf.m
│ │ │ │ ├── EXPMatchers+beInstanceOf.h
│ │ │ │ ├── EXPMatchers+beInstanceOf.m
│ │ │ │ ├── EXPMatchers+beKindOf.h
│ │ │ │ ├── EXPMatchers+beKindOf.m
│ │ │ │ ├── EXPMatchers+beLessThan.h
│ │ │ │ ├── EXPMatchers+beLessThan.m
│ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.h
│ │ │ │ ├── EXPMatchers+beLessThanOrEqualTo.m
│ │ │ │ ├── EXPMatchers+beNil.h
│ │ │ │ ├── EXPMatchers+beNil.m
│ │ │ │ ├── EXPMatchers+beSubclassOf.h
│ │ │ │ ├── EXPMatchers+beSubclassOf.m
│ │ │ │ ├── EXPMatchers+beSupersetOf.h
│ │ │ │ ├── EXPMatchers+beSupersetOf.m
│ │ │ │ ├── EXPMatchers+beTruthy.h
│ │ │ │ ├── EXPMatchers+beTruthy.m
│ │ │ │ ├── EXPMatchers+beginWith.h
│ │ │ │ ├── EXPMatchers+beginWith.m
│ │ │ │ ├── EXPMatchers+conformTo.h
│ │ │ │ ├── EXPMatchers+conformTo.m
│ │ │ │ ├── EXPMatchers+contain.h
│ │ │ │ ├── EXPMatchers+contain.m
│ │ │ │ ├── EXPMatchers+endWith.h
│ │ │ │ ├── EXPMatchers+endWith.m
│ │ │ │ ├── EXPMatchers+equal.h
│ │ │ │ ├── EXPMatchers+equal.m
│ │ │ │ ├── EXPMatchers+haveCountOf.h
│ │ │ │ ├── EXPMatchers+haveCountOf.m
│ │ │ │ ├── EXPMatchers+match.h
│ │ │ │ ├── EXPMatchers+match.m
│ │ │ │ ├── EXPMatchers+postNotification.h
│ │ │ │ ├── EXPMatchers+postNotification.m
│ │ │ │ ├── EXPMatchers+raise.h
│ │ │ │ ├── EXPMatchers+raise.m
│ │ │ │ ├── EXPMatchers+raiseWithReason.h
│ │ │ │ ├── EXPMatchers+raiseWithReason.m
│ │ │ │ ├── EXPMatchers+respondTo.h
│ │ │ │ ├── EXPMatchers+respondTo.m
│ │ │ │ └── EXPMatchers.h
│ │ │ ├── NSObject+Expecta.h
│ │ │ ├── NSValue+Expecta.h
│ │ │ └── NSValue+Expecta.m
│ │ ├── LICENSE
│ │ └── README.md
│ ├── Local Podspecs
│ │ └── ZSWTaggedString.podspec.json
│ ├── Manifest.lock
│ ├── Nimble
│ │ ├── Carthage
│ │ │ └── Checkouts
│ │ │ │ ├── CwlCatchException
│ │ │ │ └── Sources
│ │ │ │ │ ├── CwlCatchException
│ │ │ │ │ └── CwlCatchException.swift
│ │ │ │ │ └── CwlCatchExceptionSupport
│ │ │ │ │ ├── CwlCatchException.m
│ │ │ │ │ └── include
│ │ │ │ │ └── CwlCatchException.h
│ │ │ │ └── CwlPreconditionTesting
│ │ │ │ └── Sources
│ │ │ │ ├── CwlMachBadInstructionHandler
│ │ │ │ ├── CwlMachBadInstructionHandler.m
│ │ │ │ ├── include
│ │ │ │ │ └── CwlMachBadInstructionHandler.h
│ │ │ │ ├── mach_excServer.c
│ │ │ │ └── mach_excServer.h
│ │ │ │ └── CwlPreconditionTesting
│ │ │ │ ├── CwlBadInstructionException.swift
│ │ │ │ ├── CwlCatchBadInstruction.swift
│ │ │ │ ├── CwlDarwinDefinitions.swift
│ │ │ │ └── Mach
│ │ │ │ └── CwlPreconditionTesting.h
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── Sources
│ │ │ ├── Nimble
│ │ │ ├── Adapters
│ │ │ │ ├── AdapterProtocols.swift
│ │ │ │ ├── AssertionDispatcher.swift
│ │ │ │ ├── AssertionRecorder.swift
│ │ │ │ ├── NMBExpectation.swift
│ │ │ │ ├── NMBObjCMatcher.swift
│ │ │ │ ├── NimbleEnvironment.swift
│ │ │ │ └── NimbleXCTestHandler.swift
│ │ │ ├── DSL+Wait.swift
│ │ │ ├── DSL.swift
│ │ │ ├── Expectation.swift
│ │ │ ├── ExpectationMessage.swift
│ │ │ ├── Expression.swift
│ │ │ ├── FailureMessage.swift
│ │ │ ├── Matchers
│ │ │ │ ├── AllPass.swift
│ │ │ │ ├── Async.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
│ │ │ │ ├── ElementsEqual.swift
│ │ │ │ ├── EndWith.swift
│ │ │ │ ├── Equal.swift
│ │ │ │ ├── HaveCount.swift
│ │ │ │ ├── Match.swift
│ │ │ │ ├── MatchError.swift
│ │ │ │ ├── MatcherFunc.swift
│ │ │ │ ├── MatcherProtocols.swift
│ │ │ │ ├── PostNotification.swift
│ │ │ │ ├── Predicate.swift
│ │ │ │ ├── RaisesException.swift
│ │ │ │ ├── SatisfyAllOf.swift
│ │ │ │ ├── SatisfyAnyOf.swift
│ │ │ │ ├── ThrowAssertion.swift
│ │ │ │ ├── ThrowError.swift
│ │ │ │ └── ToSucceed.swift
│ │ │ ├── Nimble.h
│ │ │ └── Utils
│ │ │ │ ├── Await.swift
│ │ │ │ ├── Errors.swift
│ │ │ │ ├── Functional.swift
│ │ │ │ ├── SourceLocation.swift
│ │ │ │ └── Stringers.swift
│ │ │ └── NimbleObjectiveC
│ │ │ ├── DSL.h
│ │ │ ├── DSL.m
│ │ │ ├── NMBExceptionCapture.h
│ │ │ ├── NMBExceptionCapture.m
│ │ │ ├── NMBStringify.h
│ │ │ ├── NMBStringify.m
│ │ │ └── XCTestObservationCenter+Register.m
│ ├── OCMock
│ │ ├── License.txt
│ │ ├── README.md
│ │ └── Source
│ │ │ └── OCMock
│ │ │ ├── NSInvocation+OCMAdditions.h
│ │ │ ├── NSInvocation+OCMAdditions.m
│ │ │ ├── NSMethodSignature+OCMAdditions.h
│ │ │ ├── NSMethodSignature+OCMAdditions.m
│ │ │ ├── NSNotificationCenter+OCMAdditions.h
│ │ │ ├── NSNotificationCenter+OCMAdditions.m
│ │ │ ├── NSObject+OCMAdditions.h
│ │ │ ├── NSObject+OCMAdditions.m
│ │ │ ├── NSValue+OCMAdditions.h
│ │ │ ├── NSValue+OCMAdditions.m
│ │ │ ├── OCClassMockObject.h
│ │ │ ├── OCClassMockObject.m
│ │ │ ├── OCMArg.h
│ │ │ ├── OCMArg.m
│ │ │ ├── OCMArgAction.h
│ │ │ ├── OCMArgAction.m
│ │ │ ├── OCMBlockArgCaller.h
│ │ │ ├── OCMBlockArgCaller.m
│ │ │ ├── OCMBlockCaller.h
│ │ │ ├── OCMBlockCaller.m
│ │ │ ├── OCMBoxedReturnValueProvider.h
│ │ │ ├── OCMBoxedReturnValueProvider.m
│ │ │ ├── OCMConstraint.h
│ │ │ ├── OCMConstraint.m
│ │ │ ├── OCMExceptionReturnValueProvider.h
│ │ │ ├── OCMExceptionReturnValueProvider.m
│ │ │ ├── OCMExpectationRecorder.h
│ │ │ ├── OCMExpectationRecorder.m
│ │ │ ├── OCMFunctions.h
│ │ │ ├── OCMFunctions.m
│ │ │ ├── OCMFunctionsPrivate.h
│ │ │ ├── OCMIndirectReturnValueProvider.h
│ │ │ ├── OCMIndirectReturnValueProvider.m
│ │ │ ├── OCMInvocationExpectation.h
│ │ │ ├── OCMInvocationExpectation.m
│ │ │ ├── OCMInvocationMatcher.h
│ │ │ ├── OCMInvocationMatcher.m
│ │ │ ├── OCMInvocationStub.h
│ │ │ ├── OCMInvocationStub.m
│ │ │ ├── OCMLocation.h
│ │ │ ├── OCMLocation.m
│ │ │ ├── OCMMacroState.h
│ │ │ ├── OCMMacroState.m
│ │ │ ├── OCMNotificationPoster.h
│ │ │ ├── OCMNotificationPoster.m
│ │ │ ├── OCMObserverRecorder.h
│ │ │ ├── OCMObserverRecorder.m
│ │ │ ├── OCMPassByRefSetter.h
│ │ │ ├── OCMPassByRefSetter.m
│ │ │ ├── OCMRealObjectForwarder.h
│ │ │ ├── OCMRealObjectForwarder.m
│ │ │ ├── OCMRecorder.h
│ │ │ ├── OCMRecorder.m
│ │ │ ├── OCMReturnValueProvider.h
│ │ │ ├── OCMReturnValueProvider.m
│ │ │ ├── OCMStubRecorder.h
│ │ │ ├── OCMStubRecorder.m
│ │ │ ├── OCMVerifier.h
│ │ │ ├── OCMVerifier.m
│ │ │ ├── OCMock.h
│ │ │ ├── OCMockObject.h
│ │ │ ├── OCMockObject.m
│ │ │ ├── OCObserverMockObject.h
│ │ │ ├── OCObserverMockObject.m
│ │ │ ├── OCPartialMockObject.h
│ │ │ ├── OCPartialMockObject.m
│ │ │ ├── OCProtocolMockObject.h
│ │ │ └── OCProtocolMockObject.m
│ ├── Pods.xcodeproj
│ │ └── project.pbxproj
│ ├── Quick
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── Sources
│ │ │ ├── Quick
│ │ │ ├── Behavior.swift
│ │ │ ├── Callsite.swift
│ │ │ ├── Configuration
│ │ │ │ └── Configuration.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
│ │ │ ├── NSBundle+CurrentTestBundle.swift
│ │ │ ├── QuickSelectedTestSuiteBuilder.swift
│ │ │ ├── QuickTestSuite.swift
│ │ │ ├── String+C99ExtendedIdentifier.swift
│ │ │ ├── URL+FileName.swift
│ │ │ └── World.swift
│ │ │ ├── QuickObjectiveC
│ │ │ ├── Configuration
│ │ │ │ ├── QuickConfiguration.h
│ │ │ │ └── QuickConfiguration.m
│ │ │ ├── DSL
│ │ │ │ ├── QCKDSL.h
│ │ │ │ └── QCKDSL.m
│ │ │ ├── Quick.h
│ │ │ ├── QuickSpec.h
│ │ │ ├── QuickSpec.m
│ │ │ └── XCTestSuite+QuickTestSuiteBuilder.m
│ │ │ └── QuickSpecBase
│ │ │ ├── QuickSpecBase.m
│ │ │ └── include
│ │ │ └── QuickSpecBase.h
│ ├── Specta
│ │ ├── LICENSE
│ │ ├── README.md
│ │ └── Specta
│ │ │ └── Specta
│ │ │ ├── SPTCallSite.h
│ │ │ ├── SPTCallSite.m
│ │ │ ├── SPTCompiledExample.h
│ │ │ ├── SPTCompiledExample.m
│ │ │ ├── SPTExample.h
│ │ │ ├── SPTExample.m
│ │ │ ├── SPTExampleGroup.h
│ │ │ ├── SPTExampleGroup.m
│ │ │ ├── SPTExcludeGlobalBeforeAfterEach.h
│ │ │ ├── SPTGlobalBeforeAfterEach.h
│ │ │ ├── SPTSharedExampleGroups.h
│ │ │ ├── SPTSharedExampleGroups.m
│ │ │ ├── SPTSpec.h
│ │ │ ├── SPTSpec.m
│ │ │ ├── SPTTestSuite.h
│ │ │ ├── SPTTestSuite.m
│ │ │ ├── Specta.h
│ │ │ ├── SpectaDSL.h
│ │ │ ├── SpectaDSL.m
│ │ │ ├── SpectaTypes.h
│ │ │ ├── SpectaUtility.h
│ │ │ ├── SpectaUtility.m
│ │ │ ├── XCTest+Private.h
│ │ │ ├── XCTestCase+Specta.h
│ │ │ └── XCTestCase+Specta.m
│ └── Target Support Files
│ │ ├── Expecta
│ │ ├── Expecta-Info.plist
│ │ ├── Expecta-dummy.m
│ │ ├── Expecta-prefix.pch
│ │ ├── Expecta-umbrella.h
│ │ ├── Expecta.modulemap
│ │ ├── Expecta.xcconfig
│ │ └── Info.plist
│ │ ├── Nimble
│ │ ├── Info.plist
│ │ ├── Nimble-Info.plist
│ │ ├── Nimble-dummy.m
│ │ ├── Nimble-prefix.pch
│ │ ├── Nimble-umbrella.h
│ │ ├── Nimble.modulemap
│ │ └── Nimble.xcconfig
│ │ ├── OCMock
│ │ ├── Info.plist
│ │ ├── OCMock-Info.plist
│ │ ├── OCMock-dummy.m
│ │ ├── OCMock-prefix.pch
│ │ ├── OCMock-umbrella.h
│ │ ├── OCMock.modulemap
│ │ └── OCMock.xcconfig
│ │ ├── Pods-ZSWTaggedString
│ │ ├── Info.plist
│ │ ├── Pods-ZSWTaggedString-Info.plist
│ │ ├── Pods-ZSWTaggedString-acknowledgements.markdown
│ │ ├── Pods-ZSWTaggedString-acknowledgements.plist
│ │ ├── Pods-ZSWTaggedString-dummy.m
│ │ ├── Pods-ZSWTaggedString-frameworks.sh
│ │ ├── Pods-ZSWTaggedString-resources.sh
│ │ ├── Pods-ZSWTaggedString-umbrella.h
│ │ ├── Pods-ZSWTaggedString.debug.xcconfig
│ │ ├── Pods-ZSWTaggedString.modulemap
│ │ └── Pods-ZSWTaggedString.release.xcconfig
│ │ ├── Quick
│ │ ├── Info.plist
│ │ ├── Quick-Info.plist
│ │ ├── Quick-dummy.m
│ │ ├── Quick-prefix.pch
│ │ ├── Quick-umbrella.h
│ │ ├── Quick.modulemap
│ │ └── Quick.xcconfig
│ │ ├── Specta
│ │ ├── Info.plist
│ │ ├── Specta-Info.plist
│ │ ├── Specta-dummy.m
│ │ ├── Specta-prefix.pch
│ │ ├── Specta-umbrella.h
│ │ ├── Specta.modulemap
│ │ └── Specta.xcconfig
│ │ └── ZSWTaggedString
│ │ ├── Info.plist
│ │ ├── ZSWTaggedString-Info.plist
│ │ ├── ZSWTaggedString-dummy.m
│ │ ├── ZSWTaggedString-prefix.pch
│ │ ├── ZSWTaggedString.modulemap
│ │ └── ZSWTaggedString.xcconfig
├── Tests
│ ├── Matchers
│ │ ├── OCMArg+ZSWCapture.h
│ │ ├── OCMArg+ZSWCapture.m
│ │ ├── ZSWMatchers+haveAttribute.h
│ │ └── ZSWMatchers+haveAttribute.m
│ ├── Supporting Files
│ │ ├── Tests-Info.plist
│ │ └── Tests-Prefix.pch
│ └── Tests
│ │ ├── READMEExamples.m
│ │ ├── READMEExamples.swift
│ │ ├── ZSWStringParserSpec.m
│ │ ├── ZSWStringParserTagSpec.m
│ │ ├── ZSWTaggedString-Bridging-Header.h
│ │ ├── ZSWTaggedStringOptionsSpec.m
│ │ ├── ZSWTaggedStringOptionsSpec.swift
│ │ ├── ZSWTaggedStringSpec.m
│ │ └── ZSWTaggedStringSpec.swift
├── ZSWTaggedString.xcodeproj
│ ├── project.pbxproj
│ ├── project.xcworkspace
│ │ └── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── xcschemes
│ │ └── ZSWTaggedString-Example.xcscheme
├── ZSWTaggedString.xcworkspace
│ ├── contents.xcworkspacedata
│ └── xcshareddata
│ │ └── IDEWorkspaceChecks.plist
└── test_output
│ ├── report.html
│ └── report.junit
├── LICENSE
├── README.md
├── ZSWTaggedString.podspec
└── ZSWTaggedString
├── Classes
├── ZSWTaggedString-umbrella.h
├── ZSWTaggedString.h
├── ZSWTaggedString.m
├── ZSWTaggedString.modulemap
├── ZSWTaggedString.swift
├── ZSWTaggedStringOptions.h
├── ZSWTaggedStringOptions.m
└── ZSWTaggedStringOptions.swift
└── Private
├── ZSWStringParser.h
├── ZSWStringParser.m
├── ZSWStringParserTag.h
├── ZSWStringParserTag.m
├── ZSWTaggedStringAttribute.h
├── ZSWTaggedStringAttribute.m
└── ZSWTaggedString_Private.h
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 | jobs:
3 | build-and-test:
4 | macos:
5 | xcode: "10.2.0"
6 | environment:
7 | FL_OUTPUT_DIR: output
8 | steps:
9 | - checkout
10 | - run:
11 | name: Build and run tests
12 | command: "fastlane scan --workspace Example/ZSWTaggedString.xcworkspace"
13 | - store_test_results:
14 | path: output/scan
15 | - store_artifacts:
16 | path: output
17 |
18 | workflows:
19 | version: 2
20 | build-and-test:
21 | jobs:
22 | - build-and-test
--------------------------------------------------------------------------------
/.github/FUNDING.yml:
--------------------------------------------------------------------------------
1 | github: zacwest
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # OS X
2 | .DS_Store
3 |
4 | # Xcode
5 | build/
6 | *.pbxuser
7 | !default.pbxuser
8 | *.mode1v3
9 | !default.mode1v3
10 | *.mode2v3
11 | !default.mode2v3
12 | *.perspectivev3
13 | !default.perspectivev3
14 | xcuserdata
15 | *.xccheckout
16 | profile
17 | *.moved-aside
18 | DerivedData
19 | *.hmap
20 | *.ipa
21 |
22 | # Bundler
23 | .bundle
24 |
--------------------------------------------------------------------------------
/CHANGELOG.md:
--------------------------------------------------------------------------------
1 | # 4.2 (2019-05-12)
2 |
3 | - Update to Swift 5 (no actual source changes).
4 | - Fixes crashing on strings like `` with dynamic attributes.
5 |
6 | # 4.1 (2019-01-26)
7 |
8 | Update to Swift 4.2.
9 |
10 | # 4.0 (2017-10-16)
11 |
12 | Update to Swift 4.
13 |
14 | # 3.0 (2017-01-21)
15 |
16 | Update to Swift 3.
17 |
18 | # 2.0 (2015-12-13)
19 |
20 | Swift support! You will need to add the `ZSWTaggedString/Swift` dependency for this. This provides a cleaner API for setting attributes for tags, for example:
21 |
22 | ```swift
23 | options["a"] = .Static([
24 | NSForegroundColorAttributeName: UIColor.whiteColor()
25 | ])
26 |
27 | options["b"] = .Dynamic({ tagName, tagAttributes, existingAttributes in
28 | if tagAttributes["white"] != nil {
29 | return [
30 | NSForegroundColorAttributeName: UIColor.whiteColor()
31 | ]
32 | } else {
33 | return [
34 | NSForegroundColorAttributeName: UIColor.redColor()
35 | ]
36 | }
37 | })
38 | ```
39 |
40 | This release also fixes `ZSWTaggedString` initialization methods `init(string:)` and `init(format:...)` under Swift.
41 |
42 | **Incompatibility notes:**
43 |
44 | - `ZSWTaggedString` no longer accepts `nil` input; it will convert any `nil` input into `@""`.
45 | - `ZSWTaggedStringOptions.returnEmptyStringForNil` flag has been removed.
46 |
47 | # 1.1 (2015-06-24)
48 |
49 | Fix some cases where escaped strings (e.g. containing <) were not correctly including the start `<`.
50 |
51 | # 1.0 (2015-02-22)
52 |
53 | Initial release
54 |
--------------------------------------------------------------------------------
/Example/.swift_version:
--------------------------------------------------------------------------------
1 | 3.0
2 |
--------------------------------------------------------------------------------
/Example/Podfile.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Expecta (1.0.6)
3 | - Nimble (8.0.1)
4 | - OCMock (3.4.3)
5 | - Quick (2.1.0)
6 | - Specta (1.0.7)
7 | - ZSWTaggedString (4.2):
8 | - ZSWTaggedString/Core (= 4.2)
9 | - ZSWTaggedString/Core (4.2)
10 | - ZSWTaggedString/Swift (4.2):
11 | - ZSWTaggedString/Core
12 |
13 | DEPENDENCIES:
14 | - Expecta
15 | - Nimble
16 | - OCMock
17 | - Quick
18 | - Specta
19 | - ZSWTaggedString (from `../`)
20 | - ZSWTaggedString/Swift (from `../`)
21 |
22 | SPEC REPOS:
23 | https://github.com/cocoapods/specs.git:
24 | - Expecta
25 | - Nimble
26 | - OCMock
27 | - Quick
28 | - Specta
29 |
30 | EXTERNAL SOURCES:
31 | ZSWTaggedString:
32 | :path: "../"
33 |
34 | SPEC CHECKSUMS:
35 | Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
36 | Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
37 | OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab
38 | Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d
39 | Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
40 | ZSWTaggedString: 1a6aab3143188634c1e5dfe9383ce754c1fb5fe2
41 |
42 | PODFILE CHECKSUM: 3e8e33953f0073437731a654c10dcc1880b9439e
43 |
44 | COCOAPODS: 1.6.1
45 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXPRuntimeMatcher.h
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #import
10 | #import "EXPMatcher.h"
11 | #import "EXPDefines.h"
12 |
13 | @interface EXPBlockDefinedMatcher : NSObject {
14 | EXPBoolBlock prerequisiteBlock;
15 | EXPBoolBlock matchBlock;
16 | EXPStringBlock failureMessageForToBlock;
17 | EXPStringBlock failureMessageForNotToBlock;
18 | }
19 |
20 | @property(nonatomic, copy) EXPBoolBlock prerequisiteBlock;
21 | @property(nonatomic, copy) EXPBoolBlock matchBlock;
22 | @property(nonatomic, copy) EXPStringBlock failureMessageForToBlock;
23 | @property(nonatomic, copy) EXPStringBlock failureMessageForNotToBlock;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPBlockDefinedMatcher.m:
--------------------------------------------------------------------------------
1 | //
2 | // EXPRuntimeMatcher.m
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #import "EXPBlockDefinedMatcher.h"
10 |
11 | @implementation EXPBlockDefinedMatcher
12 |
13 | - (void)dealloc
14 | {
15 | self.prerequisiteBlock = nil;
16 | self.matchBlock = nil;
17 | self.failureMessageForToBlock = nil;
18 | self.failureMessageForNotToBlock = nil;
19 |
20 | [super dealloc];
21 | }
22 |
23 | @synthesize prerequisiteBlock;
24 | @synthesize matchBlock;
25 | @synthesize failureMessageForToBlock;
26 | @synthesize failureMessageForNotToBlock;
27 |
28 | - (BOOL)meetsPrerequesiteFor:(id)actual
29 | {
30 | if (self.prerequisiteBlock) {
31 | return self.prerequisiteBlock();
32 | }
33 | return YES;
34 | }
35 |
36 | - (BOOL)matches:(id)actual
37 | {
38 | if (self.matchBlock) {
39 | return self.matchBlock();
40 | }
41 | return YES;
42 | }
43 |
44 | - (NSString *)failureMessageForTo:(id)actual
45 | {
46 | if (self.failureMessageForToBlock) {
47 | return self.failureMessageForToBlock();
48 | }
49 | return nil;
50 | }
51 |
52 | - (NSString *)failureMessageForNotTo:(id)actual
53 | {
54 | if (self.failureMessageForNotToBlock) {
55 | return self.failureMessageForNotToBlock();
56 | }
57 | return nil;
58 | }
59 |
60 | @end
61 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDefines.h:
--------------------------------------------------------------------------------
1 | //
2 | // EXPDefines.h
3 | // Expecta
4 | //
5 | // Created by Luke Redpath on 26/03/2012.
6 | // Copyright (c) 2012 Peter Jihoon Kim. All rights reserved.
7 | //
8 |
9 | #ifndef Expecta_EXPDefines_h
10 | #define Expecta_EXPDefines_h
11 |
12 | typedef void (^EXPBasicBlock)(void);
13 | typedef id (^EXPIdBlock)(void);
14 | typedef BOOL (^EXPBoolBlock)(void);
15 | typedef NSString *(^EXPStringBlock)(void);
16 |
17 | #endif
18 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDoubleTuple.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPDoubleTuple : NSObject {
4 | double *_values;
5 | size_t _size;
6 | }
7 |
8 | @property (nonatomic, assign) double *values;
9 | @property (nonatomic, assign) size_t size;
10 |
11 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size NS_DESIGNATED_INITIALIZER;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPDoubleTuple.m:
--------------------------------------------------------------------------------
1 | #import "EXPDoubleTuple.h"
2 |
3 | #pragma clang diagnostic push
4 | #pragma clang diagnostic ignored "-Wobjc-designated-initializers"
5 | @implementation EXPDoubleTuple
6 | #pragma clang diagnostic pop
7 |
8 | @synthesize values = _values, size = _size;
9 |
10 | - (instancetype)initWithDoubleValues:(double *)values size:(size_t)size {
11 | if ((self = [super init])) {
12 | self.values = malloc(sizeof(double) * size);
13 | memcpy(self.values, values, sizeof(double) * size);
14 | self.size = size;
15 | }
16 | return self;
17 | }
18 |
19 | - (void)dealloc {
20 | free(self.values);
21 | [super dealloc];
22 | }
23 |
24 | - (BOOL)isEqual:(id)object {
25 | if (![object isKindOfClass:[EXPDoubleTuple class]]) return NO;
26 | EXPDoubleTuple *other = (EXPDoubleTuple *)object;
27 | if (self.size == other.size) {
28 | for (int i = 0; i < self.size; ++i) {
29 | if (self.values[i] != other.values[i]) return NO;
30 | }
31 | return YES;
32 | }
33 | return NO;
34 | }
35 |
36 | - (NSString *)description {
37 | if (self.size == 2) {
38 | return [NSString stringWithFormat:@"Double tuple: {%f, %f}", self.values[0], self.values[1]];
39 | } else if (self.size == 4) {
40 | return [NSString stringWithFormat:@"Double tuple: {%f, %f, %f, %f}", self.values[0], self.values[1], self.values[2], self.values[3]];
41 | }
42 | return [NSString stringWithFormat:@"Double tuple of unexpected size %zd, sadly", self.size];
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPExpect.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "EXPMatcher.h"
3 | #import "EXPDefines.h"
4 |
5 | @interface EXPExpect : NSObject {
6 | EXPIdBlock _actualBlock;
7 | id _testCase;
8 | int _lineNumber;
9 | char *_fileName;
10 | BOOL _negative;
11 | BOOL _asynchronous;
12 | NSTimeInterval _timeout;
13 | }
14 |
15 | @property(nonatomic, copy) EXPIdBlock actualBlock;
16 | @property(nonatomic, readonly) id actual;
17 | @property(nonatomic, assign) id testCase;
18 | @property(nonatomic) int lineNumber;
19 | @property(nonatomic) const char *fileName;
20 | @property(nonatomic) BOOL negative;
21 | @property(nonatomic) BOOL asynchronous;
22 | @property(nonatomic) NSTimeInterval timeout;
23 |
24 | @property(nonatomic, readonly) EXPExpect *to;
25 | @property(nonatomic, readonly) EXPExpect *toNot;
26 | @property(nonatomic, readonly) EXPExpect *notTo;
27 | @property(nonatomic, readonly) EXPExpect *will;
28 | @property(nonatomic, readonly) EXPExpect *willNot;
29 | @property(nonatomic, readonly) EXPExpect *(^after)(NSTimeInterval timeInterval);
30 |
31 | - (instancetype)initWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName NS_DESIGNATED_INITIALIZER;
32 | + (EXPExpect *)expectWithActualBlock:(id)actualBlock testCase:(id)testCase lineNumber:(int)lineNumber fileName:(const char *)fileName;
33 |
34 | - (void)applyMatcher:(id)matcher;
35 | - (void)applyMatcher:(id)matcher to:(NSObject **)actual;
36 |
37 | @end
38 |
39 | @interface EXPDynamicPredicateMatcher : NSObject {
40 | EXPExpect *_expectation;
41 | SEL _selector;
42 | }
43 | - (instancetype)initWithExpectation:(EXPExpect *)expectation selector:(SEL)selector NS_DESIGNATED_INITIALIZER;
44 | @property (nonatomic, readonly, copy) void (^dispatch)(void);
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPFloatTuple.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPFloatTuple : NSObject {
4 | float *_values;
5 | size_t _size;
6 | }
7 |
8 | @property (nonatomic, assign) float *values;
9 | @property (nonatomic, assign) size_t size;
10 |
11 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size NS_DESIGNATED_INITIALIZER;
12 |
13 | @end
14 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPFloatTuple.m:
--------------------------------------------------------------------------------
1 | #import "EXPFloatTuple.h"
2 |
3 | #pragma clang diagnostic push
4 | #pragma clang diagnostic ignored "-Wobjc-designated-initializers"
5 | @implementation EXPFloatTuple
6 | #pragma clang diagnostic pop
7 |
8 | @synthesize values = _values, size = _size;
9 |
10 | - (instancetype)initWithFloatValues:(float *)values size:(size_t)size {
11 | if ((self = [super init])) {
12 | self.values = malloc(sizeof(float) * size);
13 | memcpy(self.values, values, sizeof(float) * size);
14 | self.size = size;
15 | }
16 | return self;
17 | }
18 |
19 | - (void)dealloc {
20 | free(self.values);
21 | [super dealloc];
22 | }
23 |
24 | - (BOOL)isEqual:(id)object {
25 | if (![object isKindOfClass:[EXPFloatTuple class]]) return NO;
26 | EXPFloatTuple *other = (EXPFloatTuple *)object;
27 | if (self.size == other.size) {
28 | for (int i = 0; i < self.size; ++i) {
29 | if (self.values[i] != other.values[i]) return NO;
30 | }
31 | return YES;
32 | }
33 | return NO;
34 | }
35 |
36 | - (NSUInteger)hash
37 | {
38 | NSUInteger prime = 31;
39 | NSUInteger hash = 0;
40 | for (int i=0; i
10 |
11 | @protocol EXPMatcher
12 |
13 | - (BOOL)matches:(id)actual;
14 |
15 | @optional
16 | - (BOOL)meetsPrerequesiteFor:(id)actual;
17 | - (NSString *)failureMessageForTo:(id)actual;
18 | - (NSString *)failureMessageForNotTo:(id)actual;
19 |
20 | @end
21 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPUnsupportedObject.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface EXPUnsupportedObject : NSObject {
4 | NSString *_type;
5 | }
6 |
7 | @property (nonatomic, retain) NSString *type;
8 |
9 | - (instancetype)initWithType:(NSString *)type NS_DESIGNATED_INITIALIZER;
10 |
11 | @end
12 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/EXPUnsupportedObject.m:
--------------------------------------------------------------------------------
1 | #import "EXPUnsupportedObject.h"
2 |
3 | #pragma clang diagnostic push
4 | #pragma clang diagnostic ignored "-Wobjc-designated-initializers"
5 | @implementation EXPUnsupportedObject
6 | #pragma clang diagnostic pop
7 |
8 | @synthesize type=_type;
9 |
10 | - (instancetype)initWithType:(NSString *)type {
11 | self = [super init];
12 | if(self) {
13 | self.type = type;
14 | }
15 | return self;
16 | }
17 |
18 | - (void)dealloc {
19 | self.type = nil;
20 | [super dealloc];
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | //! Project version number for Expecta.
4 | FOUNDATION_EXPORT double ExpectaVersionNumber;
5 |
6 | //! Project version string for Expecta.
7 | FOUNDATION_EXPORT const unsigned char ExpectaVersionString[];
8 |
9 | #import
10 | #import
11 | #import
12 |
13 | // Enable shorthand by default
14 | #define expect(...) EXP_expect((__VA_ARGS__))
15 | #define failure(...) EXP_failure((__VA_ARGS__))
16 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/ExpectaObject.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #define EXPObjectify(value) _EXPObjectify(@encode(__typeof__((value))), (value))
4 | #define EXP_expect(actual) _EXP_expect(self, __LINE__, __FILE__, ^id{ __typeof__((actual)) strongActual = (actual); return EXPObjectify(strongActual); })
5 | #define EXPMatcherInterface(matcherName, matcherArguments) _EXPMatcherInterface(matcherName, matcherArguments)
6 | #define EXPMatcherImplementationBegin(matcherName, matcherArguments) _EXPMatcherImplementationBegin(matcherName, matcherArguments)
7 | #define EXPMatcherImplementationEnd _EXPMatcherImplementationEnd
8 | #define EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments) _EXPMatcherAliasImplementation(newMatcherName, oldMatcherName, matcherArguments)
9 |
10 | #define EXP_failure(message) EXPFail(self, __LINE__, __FILE__, message)
11 |
12 |
13 | @interface Expecta : NSObject
14 |
15 | + (NSTimeInterval)asynchronousTestTimeout;
16 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/ExpectaObject.m:
--------------------------------------------------------------------------------
1 | #import "ExpectaObject.h"
2 |
3 | @implementation Expecta
4 |
5 | static NSTimeInterval _asynchronousTestTimeout = 1.0;
6 |
7 | + (NSTimeInterval)asynchronousTestTimeout {
8 | return _asynchronousTestTimeout;
9 | }
10 |
11 | + (void)setAsynchronousTestTimeout:(NSTimeInterval)timeout {
12 | _asynchronousTestTimeout = timeout;
13 | }
14 |
15 | @end
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | BOOL EXPIsValuePointer(NSValue *value);
4 | BOOL EXPIsNumberFloat(NSNumber *number);
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatcherHelpers.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatcherHelpers.h"
2 |
3 | BOOL EXPIsValuePointer(NSValue *value) {
4 | return [value objCType][0] == @encode(void *)[0];
5 | }
6 |
7 | BOOL EXPIsNumberFloat(NSNumber *number) {
8 | return strcmp([number objCType], @encode(float)) == 0;
9 | }
10 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beCloseTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beCloseToWithin, (id expected, id within));
4 | EXPMatcherInterface(beCloseToWithin, (id expected, id within));
5 |
6 | #define beCloseTo(expected) _beCloseToWithin(EXPObjectify((expected)), nil)
7 | #define beCloseToWithin(expected, range) _beCloseToWithin(EXPObjectify((expected)), EXPObjectify((range)))
8 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beFalsy, (void));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beFalsy.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beFalsy.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(beFalsy, (void)) {
5 | match(^BOOL{
6 | if([actual isKindOfClass:[NSNumber class]]) {
7 | return ![(NSNumber *)actual boolValue];
8 | } else if([actual isKindOfClass:[NSValue class]]) {
9 | if(EXPIsValuePointer((NSValue *)actual)) {
10 | return ![(NSValue *)actual pointerValue];
11 | }
12 | }
13 | return !actual;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: a falsy value, got: %@, which is truthy", EXPDescribeObject(actual)];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: a non-falsy value, got: %@, which is falsy", EXPDescribeObject(actual)];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beGreaterThan, (id expected));
4 | EXPMatcherInterface(beGreaterThan, (id expected));
5 |
6 | #define beGreaterThan(expected) _beGreaterThan(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThan.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beGreaterThan.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beGreaterThan, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] == NSOrderedDescending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beGreaterThanOrEqualTo, (id expected));
4 | EXPMatcherInterface(beGreaterThanOrEqualTo, (id expected));
5 |
6 | #define beGreaterThanOrEqualTo(expected) _beGreaterThanOrEqualTo(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beGreaterThanOrEqualTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beGreaterThanOrEqualTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beGreaterThanOrEqualTo, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] != NSOrderedAscending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be greater than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beIdenticalTo, (void *expected));
4 | EXPMatcherInterface(beIdenticalTo, (void *expected)); // to aid code completion
5 |
6 | #if __has_feature(objc_arc)
7 | #define beIdenticalTo(expected) _beIdenticalTo((__bridge void*)expected)
8 | #else
9 | #define beIdenticalTo(expected) _beIdenticalTo(expected)
10 | #endif
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beIdenticalTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+equal.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beIdenticalTo, (void *expected)) {
5 | match(^BOOL{
6 | if(actual == expected) {
7 | return YES;
8 | } else if([actual isKindOfClass:[NSValue class]] && EXPIsValuePointer((NSValue *)actual)) {
9 | if([(NSValue *)actual pointerValue] == expected) {
10 | return YES;
11 | }
12 | }
13 | return NO;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: <%p>, got: <%p>", expected, actual];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: not <%p>, got: <%p>", expected, actual];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound));
4 | EXPMatcherInterface(beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound));
5 |
6 | #define beInTheRangeOf(expectedLowerBound, expectedUpperBound) _beInTheRangeOf(EXPObjectify((expectedLowerBound)), EXPObjectify((expectedUpperBound)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInTheRangeOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beInTheRangeOf.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beInTheRangeOf, (id expectedLowerBound, id expectedUpperBound)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | NSComparisonResult compareLowerBound = [expectedLowerBound compare: actual];
8 | NSComparisonResult compareUpperBound = [expectedUpperBound compare: actual];
9 | if (compareLowerBound == NSOrderedSame) {
10 | return YES;
11 | }
12 | if (compareUpperBound == NSOrderedSame) {
13 | return YES;
14 | }
15 | if ((compareLowerBound == NSOrderedAscending) && (compareUpperBound == NSOrderedDescending)) {
16 | return YES;
17 | }
18 | }
19 | return NO;
20 | });
21 |
22 | failureMessageForTo(^NSString *{
23 | return [NSString stringWithFormat:@"expected: %@ to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)];
24 | });
25 |
26 | failureMessageForNotTo(^NSString *{
27 | return [NSString stringWithFormat:@"expected: %@ not to be in the range [%@, %@] (inclusive)", EXPDescribeObject(actual), EXPDescribeObject(expectedLowerBound), EXPDescribeObject(expectedUpperBound)];
28 | });
29 | }
30 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beInstanceOf, (Class expected));
4 | EXPMatcherInterface(beAnInstanceOf, (Class expected));
5 | EXPMatcherInterface(beMemberOf, (Class expected));
6 | EXPMatcherInterface(beAMemberOf, (Class expected));
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beInstanceOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beInstanceOf.h"
2 |
3 | EXPMatcherImplementationBegin(beInstanceOf, (Class expected)) {
4 | BOOL actualIsNil = (actual == nil);
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return !(actualIsNil || expectedIsNil);
9 | });
10 |
11 | match(^BOOL{
12 | return [actual isMemberOfClass:expected];
13 | });
14 |
15 | failureMessageForTo(^NSString *{
16 | if(actualIsNil) return @"the actual value is nil/null";
17 | if(expectedIsNil) return @"the expected value is nil/null";
18 | return [NSString stringWithFormat:@"expected: an instance of %@, got: an instance of %@", [expected class], [actual class]];
19 | });
20 |
21 | failureMessageForNotTo(^NSString *{
22 | if(actualIsNil) return @"the actual value is nil/null";
23 | if(expectedIsNil) return @"the expected value is nil/null";
24 | return [NSString stringWithFormat:@"expected: not an instance of %@, got: an instance of %@", [expected class], [actual class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
29 | EXPMatcherAliasImplementation(beAnInstanceOf, beInstanceOf, (Class expected));
30 | EXPMatcherAliasImplementation(beMemberOf, beInstanceOf, (Class expected));
31 | EXPMatcherAliasImplementation(beAMemberOf, beInstanceOf, (Class expected));
32 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beKindOf, (Class expected));
4 | EXPMatcherInterface(beAKindOf, (Class expected));
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beKindOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beKindOf.h"
2 |
3 | EXPMatcherImplementationBegin(beKindOf, (Class expected)) {
4 | BOOL actualIsNil = (actual == nil);
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return !(actualIsNil || expectedIsNil);
9 | });
10 |
11 | match(^BOOL{
12 | return [actual isKindOfClass:expected];
13 | });
14 |
15 | failureMessageForTo(^NSString *{
16 | if(actualIsNil) return @"the actual value is nil/null";
17 | if(expectedIsNil) return @"the expected value is nil/null";
18 | return [NSString stringWithFormat:@"expected: a kind of %@, got: an instance of %@, which is not a kind of %@", [expected class], [actual class], [expected class]];
19 | });
20 |
21 | failureMessageForNotTo(^NSString *{
22 | if(actualIsNil) return @"the actual value is nil/null";
23 | if(expectedIsNil) return @"the expected value is nil/null";
24 | return [NSString stringWithFormat:@"expected: not a kind of %@, got: an instance of %@, which is a kind of %@", [expected class], [actual class], [expected class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
29 | EXPMatcherAliasImplementation(beAKindOf, beKindOf, (Class expected));
30 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beLessThan, (id expected));
4 | EXPMatcherInterface(beLessThan, (id expected));
5 |
6 | #define beLessThan(expected) _beLessThan(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThan.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beLessThan.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beLessThan, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] == NSOrderedAscending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be less than %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_beLessThanOrEqualTo, (id expected));
4 | EXPMatcherInterface(beLessThanOrEqualTo, (id expected));
5 |
6 | #define beLessThanOrEqualTo(expected) _beLessThanOrEqualTo(EXPObjectify((expected)))
7 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beLessThanOrEqualTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beLessThanOrEqualTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(_beLessThanOrEqualTo, (id expected)) {
5 | match(^BOOL{
6 | if ([actual respondsToSelector:@selector(compare:)]) {
7 | return [actual compare:expected] != NSOrderedDescending;
8 | }
9 | return NO;
10 | });
11 |
12 | failureMessageForTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: %@ to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
14 | });
15 |
16 | failureMessageForNotTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: %@ not to be less than or equal to %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
18 | });
19 | }
20 | EXPMatcherImplementationEnd
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beNil, (void));
4 | EXPMatcherInterface(beNull, (void));
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beNil.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beNil.h"
2 |
3 | EXPMatcherImplementationBegin(beNil, (void)) {
4 | match(^BOOL{
5 | return actual == nil;
6 | });
7 |
8 | failureMessageForTo(^NSString *{
9 | return [NSString stringWithFormat:@"expected: nil/null, got: %@", EXPDescribeObject(actual)];
10 | });
11 |
12 | failureMessageForNotTo(^NSString *{
13 | return [NSString stringWithFormat:@"expected: not nil/null, got: %@", EXPDescribeObject(actual)];
14 | });
15 | }
16 | EXPMatcherImplementationEnd
17 |
18 | EXPMatcherAliasImplementation(beNull, beNil, (void));
19 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beSubclassOf, (Class expected));
4 | EXPMatcherInterface(beASubclassOf, (Class expected));
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSubclassOf.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beSubclassOf.h"
2 | #import "NSValue+Expecta.h"
3 | #import
4 |
5 | EXPMatcherImplementationBegin(beSubclassOf, (Class expected)) {
6 | __block BOOL actualIsClass = YES;
7 |
8 | prerequisite(^BOOL {
9 | actualIsClass = class_isMetaClass(object_getClass(actual));
10 | return actualIsClass;
11 | });
12 |
13 | match(^BOOL{
14 | return [actual isSubclassOfClass:expected];
15 | });
16 |
17 | failureMessageForTo(^NSString *{
18 | if(!actualIsClass) return @"the actual value is not a Class";
19 | return [NSString stringWithFormat:@"expected: a subclass of %@, got: a class %@, which is not a subclass of %@", [expected class], actual, [expected class]];
20 | });
21 |
22 | failureMessageForNotTo(^NSString *{
23 | if(!actualIsClass) return @"the actual value is not a Class";
24 | return [NSString stringWithFormat:@"expected: not a subclass of %@, got: a class %@, which is a subclass of %@", [expected class], actual, [expected class]];
25 | });
26 | }
27 | EXPMatcherImplementationEnd
28 |
29 | EXPMatcherAliasImplementation(beASubclassOf, beSubclassOf, (Class expected));
30 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beSupersetOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beSupersetOf, (id subset));
4 |
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beTruthy, (void));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beTruthy.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beTruthy.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(beTruthy, (void)) {
5 | match(^BOOL{
6 | if([actual isKindOfClass:[NSNumber class]]) {
7 | return !![(NSNumber *)actual boolValue];
8 | } else if([actual isKindOfClass:[NSValue class]]) {
9 | if(EXPIsValuePointer((NSValue *)actual)) {
10 | return !![(NSValue *)actual pointerValue];
11 | }
12 | }
13 | return !!actual;
14 | });
15 |
16 | failureMessageForTo(^NSString *{
17 | return [NSString stringWithFormat:@"expected: a truthy value, got: %@, which is falsy", EXPDescribeObject(actual)];
18 | });
19 |
20 | failureMessageForNotTo(^NSString *{
21 | return [NSString stringWithFormat:@"expected: a non-truthy value, got: %@, which is truthy", EXPDescribeObject(actual)];
22 | });
23 | }
24 | EXPMatcherImplementationEnd
25 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+beginWith.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(beginWith, (id expected));
4 | EXPMatcherInterface(startWith, (id expected));
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(conformTo, (Protocol *expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+conformTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+conformTo.h"
2 | #import "NSValue+Expecta.h"
3 | #import
4 |
5 | EXPMatcherImplementationBegin(conformTo, (Protocol *expected)) {
6 | BOOL actualIsNil = (actual == nil);
7 | BOOL expectedIsNil = (expected == nil);
8 |
9 | prerequisite(^BOOL{
10 | return !(actualIsNil || expectedIsNil);
11 | });
12 |
13 | match(^BOOL{
14 | return [actual conformsToProtocol:expected];
15 | });
16 |
17 | failureMessageForTo(^NSString *{
18 | if(actualIsNil) return @"the object is nil/null";
19 | if(expectedIsNil) return @"the protocol is nil/null";
20 |
21 | NSString *name = NSStringFromProtocol(expected);
22 | return [NSString stringWithFormat:@"expected: %@ to conform to %@", actual, name];
23 | });
24 |
25 | failureMessageForNotTo(^NSString *{
26 | if(actualIsNil) return @"the object is nil/null";
27 | if(expectedIsNil) return @"the protocol is nil/null";
28 |
29 | NSString *name = NSStringFromProtocol(expected);
30 | return [NSString stringWithFormat:@"expected: %@ not to conform to %@", actual, name];
31 | });
32 | }
33 | EXPMatcherImplementationEnd
34 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_contain, (id expected));
4 | EXPMatcherInterface(contain, (id expected)); // to aid code completion
5 | #define contain(expected) _contain(EXPObjectify((expected)))
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+contain.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+contain.h"
2 |
3 | EXPMatcherImplementationBegin(_contain, (id expected)) {
4 | BOOL actualIsCompatible = [actual isKindOfClass:[NSString class]] || [actual conformsToProtocol:@protocol(NSFastEnumeration)];
5 | BOOL expectedIsNil = (expected == nil);
6 |
7 | prerequisite(^BOOL{
8 | return actualIsCompatible && !expectedIsNil;
9 | });
10 |
11 | match(^BOOL{
12 | if(actualIsCompatible) {
13 | if([actual isKindOfClass:[NSString class]]) {
14 | return [(NSString *)actual rangeOfString:[expected description]].location != NSNotFound;
15 | } else {
16 | for (id object in actual) {
17 | if ([object isEqual:expected]) {
18 | return YES;
19 | }
20 | }
21 | }
22 | }
23 | return NO;
24 | });
25 |
26 | failureMessageForTo(^NSString *{
27 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)];
28 | if(expectedIsNil) return @"the expected value is nil/null";
29 | return [NSString stringWithFormat:@"expected %@ to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
30 | });
31 |
32 | failureMessageForNotTo(^NSString *{
33 | if(!actualIsCompatible) return [NSString stringWithFormat:@"%@ is not an instance of NSString or NSFastEnumeration", EXPDescribeObject(actual)];
34 | if(expectedIsNil) return @"the expected value is nil/null";
35 | return [NSString stringWithFormat:@"expected %@ not to contain %@", EXPDescribeObject(actual), EXPDescribeObject(expected)];
36 | });
37 | }
38 | EXPMatcherImplementationEnd
39 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+endWith.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(endWith, (id expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+equal.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(_equal, (id expected));
4 | EXPMatcherInterface(equal, (id expected)); // to aid code completion
5 | #define equal(...) _equal(EXPObjectify((__VA_ARGS__)))
6 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+haveCountOf.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(haveCountOf, (NSUInteger expected));
4 | EXPMatcherInterface(haveCount, (NSUInteger expected));
5 | EXPMatcherInterface(haveACountOf, (NSUInteger expected));
6 | EXPMatcherInterface(haveLength, (NSUInteger expected));
7 | EXPMatcherInterface(haveLengthOf, (NSUInteger expected));
8 | EXPMatcherInterface(haveALengthOf, (NSUInteger expected));
9 |
10 | #define beEmpty() haveCountOf(0)
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+match.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(match, (NSString *expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+match.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+match.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(match, (NSString *expected)) {
5 | BOOL actualIsNil = (actual == nil);
6 | BOOL expectedIsNil = (expected == nil);
7 |
8 | __block NSRegularExpression *regex = nil;
9 | __block NSError *regexError = nil;
10 |
11 | prerequisite (^BOOL {
12 | BOOL nilInput = (actualIsNil || expectedIsNil);
13 | if (!nilInput) {
14 | regex = [NSRegularExpression regularExpressionWithPattern:expected options:0 error:®exError];
15 | }
16 | return !nilInput && regex;
17 | });
18 |
19 | match(^BOOL {
20 | NSRange range = [regex rangeOfFirstMatchInString:actual options:0 range:NSMakeRange(0, [actual length])];
21 | return !NSEqualRanges(range, NSMakeRange(NSNotFound, 0));
22 | });
23 |
24 | failureMessageForTo(^NSString *{
25 | if (actualIsNil) return @"the object is nil/null";
26 | if (expectedIsNil) return @"the expression is nil/null";
27 | if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]];
28 | return [NSString stringWithFormat:@"expected: %@ to match to %@", EXPDescribeObject(actual), expected];
29 | });
30 |
31 | failureMessageForNotTo(^NSString *{
32 | if (actualIsNil) return @"the object is nil/null";
33 | if (expectedIsNil) return @"the expression is nil/null";
34 | if (regexError) return [NSString stringWithFormat:@"unable to create regular expression from given parameter: %@", [regexError localizedDescription]];
35 | return [NSString stringWithFormat:@"expected: %@ not to match to %@", EXPDescribeObject(actual), expected];
36 | });
37 | }
38 | EXPMatcherImplementationEnd
39 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+postNotification.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(postNotification, (id expectedNotification));
4 | EXPMatcherInterface(notify, (id expectedNotification));
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(raise, (NSString *expectedExceptionName));
4 | #define raiseAny() raise(nil)
5 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raise.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+raise.h"
2 | #import "EXPDefines.h"
3 |
4 | EXPMatcherImplementationBegin(raise, (NSString *expectedExceptionName)) {
5 | __block NSException *exceptionCaught = nil;
6 |
7 | match(^BOOL{
8 | BOOL expectedExceptionCaught = NO;
9 | @try {
10 | ((EXPBasicBlock)actual)();
11 | } @catch(NSException *e) {
12 | exceptionCaught = e;
13 | expectedExceptionCaught = (expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName];
14 | }
15 | return expectedExceptionCaught;
16 | });
17 |
18 | failureMessageForTo(^NSString *{
19 | return [NSString stringWithFormat:@"expected: %@, got: %@",
20 | expectedExceptionName ? expectedExceptionName : @"any exception",
21 | exceptionCaught ? [exceptionCaught name] : @"no exception"];
22 | });
23 |
24 | failureMessageForNotTo(^NSString *{
25 | return [NSString stringWithFormat:@"expected: %@, got: %@",
26 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception",
27 | exceptionCaught ? [exceptionCaught name] : @"no exception"];
28 | });
29 | }
30 | EXPMatcherImplementationEnd
31 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+raiseWithReason.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+raiseWithReason.h"
2 | #import "EXPDefines.h"
3 |
4 | EXPMatcherImplementationBegin(raiseWithReason, (NSString *expectedExceptionName, NSString *expectedReason)) {
5 | __block NSException *exceptionCaught = nil;
6 |
7 | match(^BOOL{
8 | BOOL expectedExceptionCaught = NO;
9 | @try {
10 | ((EXPBasicBlock)actual)();
11 | } @catch(NSException *e) {
12 | exceptionCaught = e;
13 | expectedExceptionCaught = (((expectedExceptionName == nil) || [[exceptionCaught name] isEqualToString:expectedExceptionName]) &&
14 | ((expectedReason == nil) || ([[exceptionCaught reason] isEqualToString:expectedReason])));
15 | }
16 | return expectedExceptionCaught;
17 | });
18 |
19 | failureMessageForTo(^NSString *{
20 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)",
21 | expectedExceptionName ?: @"any exception",
22 | expectedReason ?: @"any reason",
23 | exceptionCaught ? [exceptionCaught name] : @"no exception",
24 | exceptionCaught ? [exceptionCaught reason] : @""];
25 | });
26 |
27 | failureMessageForNotTo(^NSString *{
28 | return [NSString stringWithFormat:@"expected: %@ (%@), got: %@ (%@)",
29 | expectedExceptionName ? [NSString stringWithFormat:@"not %@", expectedExceptionName] : @"no exception",
30 | expectedReason ? [NSString stringWithFormat:@"not '%@'", expectedReason] : @"no reason",
31 | exceptionCaught ? [exceptionCaught name] : @"no exception",
32 | exceptionCaught ? [exceptionCaught reason] : @"no reason"];
33 | });
34 | }
35 | EXPMatcherImplementationEnd
36 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.h:
--------------------------------------------------------------------------------
1 | #import "Expecta.h"
2 |
3 | EXPMatcherInterface(respondTo, (SEL expected));
4 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers+respondTo.m:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+respondTo.h"
2 | #import "EXPMatcherHelpers.h"
3 |
4 | EXPMatcherImplementationBegin(respondTo, (SEL expected)) {
5 | BOOL actualIsNil = (actual == nil);
6 | BOOL expectedIsNull = (expected == NULL);
7 |
8 | prerequisite (^BOOL {
9 | return !(actualIsNil || expectedIsNull);
10 | });
11 |
12 | match(^BOOL {
13 | if ([actual respondsToSelector:@selector(instancesRespondToSelector:)] &&
14 | [actual instancesRespondToSelector:expected]) {
15 | return YES;
16 | }
17 | return [actual respondsToSelector:expected];
18 | });
19 |
20 | failureMessageForTo(^NSString *{
21 | if (actualIsNil) return @"the object is nil/null";
22 | if (expectedIsNull) return @"the selector is null";
23 | return [NSString stringWithFormat:@"expected: %@ to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)];
24 | });
25 |
26 | failureMessageForNotTo(^NSString *{
27 | if (actualIsNil) return @"the object is nil/null";
28 | if (expectedIsNull) return @"the selector is null";
29 | return [NSString stringWithFormat:@"expected: %@ not to respond to %@", EXPDescribeObject(actual), NSStringFromSelector(expected)];
30 | });
31 | }
32 | EXPMatcherImplementationEnd
33 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/Matchers/EXPMatchers.h:
--------------------------------------------------------------------------------
1 | #import "EXPMatchers+beNil.h"
2 | #import "EXPMatchers+equal.h"
3 | #import "EXPMatchers+beInstanceOf.h"
4 | #import "EXPMatchers+beKindOf.h"
5 | #import "EXPMatchers+beSubclassOf.h"
6 | #import "EXPMatchers+conformTo.h"
7 | #import "EXPMatchers+beTruthy.h"
8 | #import "EXPMatchers+beFalsy.h"
9 | #import "EXPMatchers+contain.h"
10 | #import "EXPMatchers+beSupersetOf.h"
11 | #import "EXPMatchers+haveCountOf.h"
12 | #import "EXPMatchers+beIdenticalTo.h"
13 | #import "EXPMatchers+beGreaterThan.h"
14 | #import "EXPMatchers+beGreaterThanOrEqualTo.h"
15 | #import "EXPMatchers+beLessThan.h"
16 | #import "EXPMatchers+beLessThanOrEqualTo.h"
17 | #import "EXPMatchers+beInTheRangeOf.h"
18 | #import "EXPMatchers+beCloseTo.h"
19 | #import "EXPMatchers+raise.h"
20 | #import "EXPMatchers+raiseWithReason.h"
21 | #import "EXPMatchers+respondTo.h"
22 | #import "EXPMatchers+postNotification.h"
23 | #import "EXPMatchers+beginWith.h"
24 | #import "EXPMatchers+endWith.h"
25 | #import "EXPMatchers+match.h"
26 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSObject+Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface NSObject (Expecta)
4 |
5 | - (void)recordFailureWithDescription:(NSString *)description
6 | inFile:(NSString *)filename
7 | atLine:(NSUInteger)lineNumber
8 | expected:(BOOL)expected;
9 |
10 | @end
11 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSValue+Expecta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface NSValue (Expecta)
4 |
5 | @property (nonatomic) const char *_EXP_objCType;
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/Expecta/NSValue+Expecta.m:
--------------------------------------------------------------------------------
1 | #import "NSValue+Expecta.h"
2 | #import
3 | #import "Expecta.h"
4 |
5 | EXPFixCategoriesBug(NSValue_Expecta);
6 |
7 | @implementation NSValue (Expecta)
8 |
9 | static char _EXP_typeKey;
10 |
11 | - (const char *)_EXP_objCType {
12 | return [(NSString *)objc_getAssociatedObject(self, &_EXP_typeKey) cStringUsingEncoding:NSASCIIStringEncoding];
13 | }
14 |
15 | - (void)set_EXP_objCType:(const char *)_EXP_objCType {
16 | objc_setAssociatedObject(self, &_EXP_typeKey,
17 | @(_EXP_objCType),
18 | OBJC_ASSOCIATION_COPY_NONATOMIC);
19 | }
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Expecta/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2011-2015 Specta Team - https://github.com/specta
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/Example/Pods/Local Podspecs/ZSWTaggedString.podspec.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "ZSWTaggedString",
3 | "version": "4.2",
4 | "summary": "Converts a String (or NSString) with tags (like HTML) into an NSAttributedString",
5 | "description": "Tags in a ZSWTaggedString are like HTML, except you define what they mean.\nRead more: https://github.com/zacwest/ZSWTaggedString",
6 | "homepage": "https://github.com/zacwest/ZSWTaggedString",
7 | "license": "MIT",
8 | "authors": {
9 | "Zachary West": "zacwest@gmail.com"
10 | },
11 | "source": {
12 | "git": "https://github.com/zacwest/ZSWTaggedString.git",
13 | "tag": "4.2"
14 | },
15 | "social_media_url": "https://twitter.com/zacwest",
16 | "requires_arc": true,
17 | "platforms": {
18 | "ios": "7.0",
19 | "watchos": "2.0",
20 | "tvos": "9.0"
21 | },
22 | "default_subspecs": "Core",
23 | "pod_target_xcconfig": {
24 | "APPLICATION_EXTENSION_API_ONLY": "YES"
25 | },
26 | "module_map": "ZSWTaggedString/Classes/ZSWTaggedString.modulemap",
27 | "swift_version": "5.0",
28 | "subspecs": [
29 | {
30 | "name": "Core",
31 | "source_files": [
32 | "ZSWTaggedString/Classes/**/*.{h,m}",
33 | "ZSWTaggedString/Private/**/*.{h,m}"
34 | ],
35 | "public_header_files": "ZSWTaggedString/Classes/**/*.h",
36 | "private_header_files": "ZSWTaggedString/Private/**/*.h"
37 | },
38 | {
39 | "name": "Swift",
40 | "platforms": {
41 | "ios": "8.0"
42 | },
43 | "dependencies": {
44 | "ZSWTaggedString/Core": [
45 |
46 | ]
47 | },
48 | "source_files": [
49 | "ZSWTaggedString/Classes/**/*.swift",
50 | "ZSWTaggedString/Private/**/*.swift"
51 | ]
52 | }
53 | ]
54 | }
55 |
--------------------------------------------------------------------------------
/Example/Pods/Manifest.lock:
--------------------------------------------------------------------------------
1 | PODS:
2 | - Expecta (1.0.6)
3 | - Nimble (8.0.1)
4 | - OCMock (3.4.3)
5 | - Quick (2.1.0)
6 | - Specta (1.0.7)
7 | - ZSWTaggedString (4.2):
8 | - ZSWTaggedString/Core (= 4.2)
9 | - ZSWTaggedString/Core (4.2)
10 | - ZSWTaggedString/Swift (4.2):
11 | - ZSWTaggedString/Core
12 |
13 | DEPENDENCIES:
14 | - Expecta
15 | - Nimble
16 | - OCMock
17 | - Quick
18 | - Specta
19 | - ZSWTaggedString (from `../`)
20 | - ZSWTaggedString/Swift (from `../`)
21 |
22 | SPEC REPOS:
23 | https://github.com/cocoapods/specs.git:
24 | - Expecta
25 | - Nimble
26 | - OCMock
27 | - Quick
28 | - Specta
29 |
30 | EXTERNAL SOURCES:
31 | ZSWTaggedString:
32 | :path: "../"
33 |
34 | SPEC CHECKSUMS:
35 | Expecta: 3b6bd90a64b9a1dcb0b70aa0e10a7f8f631667d5
36 | Nimble: 45f786ae66faa9a709624227fae502db55a8bdd0
37 | OCMock: 43565190abc78977ad44a61c0d20d7f0784d35ab
38 | Quick: 4be43f6634acfa727dd106bdf3929ce125ffa79d
39 | Specta: 3e1bd89c3517421982dc4d1c992503e48bd5fe66
40 | ZSWTaggedString: 1a6aab3143188634c1e5dfe9383ce754c1fb5fe2
41 |
42 | PODFILE CHECKSUM: 3e8e33953f0073437731a654c10dcc1880b9439e
43 |
44 | COCOAPODS: 1.6.1
45 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift:
--------------------------------------------------------------------------------
1 | //
2 | // CwlCatchException.swift
3 | // CwlAssertionTesting
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 Foundation
22 |
23 | #if SWIFT_PACKAGE
24 | import CwlCatchExceptionSupport
25 | #endif
26 |
27 | private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? {
28 | return catchExceptionOfKind(type, block) as? T
29 | }
30 |
31 | extension NSException {
32 | public static func catchException(in block: () -> Void) -> Self? {
33 | return catchReturnTypeConverter(self, block: block)
34 | }
35 | }
36 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m:
--------------------------------------------------------------------------------
1 | //
2 | // CwlCatchException.m
3 | // CwlAssertionTesting
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 "CwlCatchException.h"
22 |
23 | #if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE
24 | __attribute__((visibility("hidden")))
25 | #endif
26 | NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void)) {
27 | @try {
28 | inBlock();
29 | } @catch (NSException *exception) {
30 | if ([exception isKindOfClass:type]) {
31 | return exception;
32 | } else {
33 | @throw;
34 | }
35 | }
36 | return nil;
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h:
--------------------------------------------------------------------------------
1 | //
2 | // CwlCatchException.h
3 | // CwlCatchException
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 CwlCatchException.
24 | FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber;
25 |
26 | //! Project version string for CwlCatchException.
27 | FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[];
28 |
29 | #if !SWIFT_PACKAGE && NON_SWIFT_PACKAGE
30 | __attribute__((visibility("hidden")))
31 | #endif
32 | NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)(void));
33 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/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 | extern bool _swift_reportFatalErrorsToDebugger;
24 |
25 | //! Project version number for CwlUtils.
26 | FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber;
27 |
28 | //! Project version string for CwlUtils.
29 | FOUNDATION_EXPORT const unsigned char CwlAssertingTestingVersionString[];
30 |
31 | #include "CwlMachBadInstructionHandler.h"
32 | #include "CwlCatchException.h"
33 |
--------------------------------------------------------------------------------
/Example/Pods/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 | // swiftlint:disable:previous identifier_name
17 | return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler()
18 | }()
19 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift:
--------------------------------------------------------------------------------
1 | import Dispatch
2 | import Foundation
3 |
4 | /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this
5 | /// class' existence
6 | internal class NimbleEnvironment: NSObject {
7 | static var activeInstance: NimbleEnvironment {
8 | get {
9 | let env = Thread.current.threadDictionary["NimbleEnvironment"]
10 | if let env = env as? NimbleEnvironment {
11 | return env
12 | } else {
13 | let newEnv = NimbleEnvironment()
14 | self.activeInstance = newEnv
15 | return newEnv
16 | }
17 | }
18 | set {
19 | Thread.current.threadDictionary["NimbleEnvironment"] = newValue
20 | }
21 | }
22 |
23 | // swiftlint:disable:next todo
24 | // TODO: eventually migrate the global to this environment value
25 | var assertionHandler: AssertionHandler {
26 | get { return NimbleAssertionHandler }
27 | set { NimbleAssertionHandler = newValue }
28 | }
29 |
30 | var suppressTVOSAssertionWarning: Bool = false
31 | var awaiter: Awaiter
32 |
33 | override init() {
34 | let timeoutQueue = DispatchQueue.global(qos: .userInitiated)
35 | awaiter = Awaiter(
36 | waitLock: AssertionWaitLock(),
37 | asyncQueue: .main,
38 | timeoutQueue: timeoutQueue
39 | )
40 |
41 | super.init()
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// A Nimble matcher that succeeds when the actual value is less than the expected value.
4 | public func beLessThan(_ expectedValue: T?) -> Predicate {
5 | let message = "be less than <\(stringify(expectedValue))>"
6 | return Predicate.simple(message) { actualExpression in
7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue {
8 | return PredicateStatus(bool: actual < expected)
9 | }
10 | return .fail
11 | }
12 | }
13 |
14 | /// A Nimble matcher that succeeds when the actual value is less than the expected value.
15 | public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate {
16 | let message = "be less than <\(stringify(expectedValue))>"
17 | return Predicate.simple(message) { actualExpression in
18 | let actualValue = try actualExpression.evaluate()
19 | let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending
20 | return PredicateStatus(bool: matches)
21 | }
22 | }
23 |
24 | public func <(lhs: Expectation, rhs: T) {
25 | lhs.to(beLessThan(rhs))
26 | }
27 |
28 | public func < (lhs: Expectation, rhs: NMBComparable?) {
29 | lhs.to(beLessThan(rhs))
30 | }
31 |
32 | #if canImport(Darwin)
33 | extension NMBObjCMatcher {
34 | @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBMatcher {
35 | return NMBPredicate { actualExpression in
36 | let expr = actualExpression.cast { $0 as? NMBComparable }
37 | return try beLessThan(expected).satisfies(expr).toObjectiveC()
38 | }
39 | }
40 | }
41 | #endif
42 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | /// A Nimble matcher that succeeds when the actual value is less than
4 | /// or equal to the expected value.
5 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate {
6 | return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in
7 | if let actual = try actualExpression.evaluate(), let expected = expectedValue {
8 | return PredicateStatus(bool: actual <= expected)
9 | }
10 | return .fail
11 | }
12 | }
13 |
14 | /// A Nimble matcher that succeeds when the actual value is less than
15 | /// or equal to the expected value.
16 | public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate {
17 | return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in
18 | let actualValue = try actualExpression.evaluate()
19 | let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false
20 | return PredicateStatus(bool: matches)
21 | }
22 | }
23 |
24 | public func <=(lhs: Expectation, rhs: T) {
25 | lhs.to(beLessThanOrEqualTo(rhs))
26 | }
27 |
28 | public func <=(lhs: Expectation, rhs: T) {
29 | lhs.to(beLessThanOrEqualTo(rhs))
30 | }
31 |
32 | #if canImport(Darwin)
33 | extension NMBObjCMatcher {
34 | @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher {
35 | return NMBPredicate { actualExpression in
36 | let expr = actualExpression.cast { $0 as? NMBComparable }
37 | return try beLessThanOrEqualTo(expected).satisfies(expr).toObjectiveC()
38 | }
39 | }
40 | }
41 | #endif
42 |
--------------------------------------------------------------------------------
/Example/Pods/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() -> Predicate {
5 | return Predicate.simpleNilable("be nil") { actualExpression in
6 | let actualValue = try actualExpression.evaluate()
7 | return PredicateStatus(bool: actualValue == nil)
8 | }
9 | }
10 |
11 | #if canImport(Darwin)
12 | extension NMBObjCMatcher {
13 | @objc public class func beNilMatcher() -> NMBMatcher {
14 | return NMBPredicate { actualExpression in
15 | return try beNil().satisfies(actualExpression).toObjectiveC()
16 | }
17 | }
18 | }
19 | #endif
20 |
--------------------------------------------------------------------------------
/Example/Pods/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() -> Predicate<()> {
5 | return Predicate.simpleNilable("be void") { actualExpression in
6 | let actualValue: ()? = try actualExpression.evaluate()
7 | return PredicateStatus(bool: actualValue != nil)
8 | }
9 | }
10 |
11 | extension Expectation where T == () {
12 | public static func == (lhs: Expectation<()>, rhs: ()) {
13 | lhs.to(beVoid())
14 | }
15 |
16 | public static func != (lhs: Expectation<()>, rhs: ()) {
17 | lhs.toNot(beVoid())
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift:
--------------------------------------------------------------------------------
1 | /// A Nimble matcher that succeeds when the actual sequence contain the same elements in the same order to the exepected sequence.
2 | public func elementsEqual(_ expectedValue: S?) -> Predicate where S.Element: Equatable {
3 | // A matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal
4 | return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in
5 | let actualValue = try actualExpression.evaluate()
6 | switch (expectedValue, actualValue) {
7 | case (nil, _?):
8 | return PredicateResult(status: .fail, message: msg.appendedBeNilHint())
9 | case (nil, nil), (_, nil):
10 | return PredicateResult(status: .fail, message: msg)
11 | case (let expected?, let actual?):
12 | let matches = expected.elementsEqual(actual)
13 | return PredicateResult(bool: matches, message: msg)
14 | }
15 | }
16 | }
17 |
--------------------------------------------------------------------------------
/Example/Pods/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?) -> Predicate {
6 | return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in
7 | if let actual = try actualExpression.evaluate() {
8 | if let regexp = expectedValue {
9 | let bool = actual.range(of: regexp, options: .regularExpression) != nil
10 | return PredicateStatus(bool: bool)
11 | }
12 | }
13 |
14 | return .fail
15 | }
16 | }
17 |
18 | #if canImport(Darwin)
19 |
20 | extension NMBObjCMatcher {
21 | @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher {
22 | return NMBPredicate { actualExpression in
23 | let actual = actualExpression.cast { $0 as? String }
24 | return try match(expected.description).satisfies(actual).toObjectiveC()
25 | }
26 | }
27 | }
28 |
29 | #endif
30 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift:
--------------------------------------------------------------------------------
1 | /**
2 | Used by the `toSucceed` matcher.
3 |
4 | This is the return type for the closure.
5 | */
6 | public enum ToSucceedResult {
7 | case succeeded
8 | case failed(reason: String)
9 | }
10 |
11 | /**
12 | A Nimble matcher that takes in a closure for validation.
13 |
14 | Return `.succeeded` when the validation succeeds.
15 | Return `.failed` with a failure reason when the validation fails.
16 | */
17 | public func succeed() -> Predicate<() -> ToSucceedResult> {
18 | return Predicate.define { actualExpression in
19 | let optActual = try actualExpression.evaluate()
20 | guard let actual = optActual else {
21 | return PredicateResult(status: .fail, message: .fail("expected a closure, got "))
22 | }
23 |
24 | switch actual() {
25 | case .succeeded:
26 | return PredicateResult(
27 | bool: true,
28 | message: .expectedCustomValueTo("succeed", "")
29 | )
30 | case .failed(let reason):
31 | return PredicateResult(
32 | bool: false,
33 | message: .expectedCustomValueTo("succeed", " because <\(reason)>")
34 | )
35 | }
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Nimble.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "NMBExceptionCapture.h"
3 | #import "NMBStringify.h"
4 | #import "DSL.h"
5 |
6 | #if TARGET_OS_TV
7 | #import "CwlPreconditionTesting_POSIX.h"
8 | #else
9 | #import "CwlPreconditionTesting.h"
10 | #endif
11 |
12 | FOUNDATION_EXPORT double NimbleVersionNumber;
13 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[];
14 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | #if !swift(>=4.2)
4 | extension Sequence {
5 | internal func allSatisfy(_ predicate: (Element) throws -> Bool) rethrows -> Bool {
6 | for item in self {
7 | if try !predicate(item) {
8 | return false
9 | }
10 | }
11 | return true
12 | }
13 | }
14 | #endif
15 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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)(void))finally;
7 | - (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:));
8 |
9 | @end
10 |
11 | typedef void(^NMBSourceCallbackBlock)(BOOL successful);
12 |
--------------------------------------------------------------------------------
/Example/Pods/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)(void);
6 | @end
7 |
8 | @implementation NMBExceptionCapture
9 |
10 | - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))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:(__attribute__((noescape)) void(^ _Nonnull)(void))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 |
--------------------------------------------------------------------------------
/Example/Pods/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 anyObject 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 |
--------------------------------------------------------------------------------
/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m:
--------------------------------------------------------------------------------
1 | #import "NMBStringify.h"
2 |
3 | #if __has_include("Nimble-Swift.h")
4 | #import "Nimble-Swift.h"
5 | #else
6 | #import
7 | #endif
8 |
9 | NSString *_Nonnull NMBStringify(id _Nullable anyObject) {
10 | return [NMBStringer stringify:anyObject];
11 | }
12 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/README.md:
--------------------------------------------------------------------------------
1 | OCMock
2 | ======
3 |
4 | OCMock is an Objective-C implementation of mock objects.
5 |
6 | For downloads, documentation, and support please visit [ocmock.org][].
7 |
8 | [](https://travis-ci.org/erikdoe/ocmock)
9 |
10 | [ocmock.org]: http://ocmock.org/
11 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/NSMethodSignature+OCMAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface NSMethodSignature(OCMAdditions)
20 |
21 | + (NSMethodSignature *)signatureForDynamicPropertyAccessedWithSelector:(SEL)selector inClass:(Class)aClass;
22 | + (NSMethodSignature *)signatureForBlock:(id)block;
23 |
24 | - (BOOL)usesSpecialStructureReturn;
25 |
26 | - (NSString *)fullTypeString;
27 | - (const char *)fullObjCTypes;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/NSNotificationCenter+OCMAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @class OCObserverMockObject;
20 |
21 |
22 | @interface NSNotificationCenter(OCMAdditions)
23 |
24 | - (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/NSNotificationCenter+OCMAdditions.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "NSNotificationCenter+OCMAdditions.h"
18 | #import "OCObserverMockObject.h"
19 |
20 |
21 | @implementation NSNotificationCenter(OCMAdditions)
22 |
23 | - (void)addMockObserver:(OCObserverMockObject *)notificationObserver name:(NSString *)notificationName object:(id)notificationSender
24 | {
25 | [notificationObserver autoRemoveFromCenter:self];
26 | [self addObserver:notificationObserver selector:@selector(handleNotification:) name:notificationName object:notificationSender];
27 | }
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/NSObject+OCMAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2013-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface NSObject(OCMAdditions)
20 |
21 | + (IMP)instanceMethodForwarderForSelector:(SEL)aSelector;
22 | + (void)enumerateMethodsInClass:(Class)aClass usingBlock:(void (^)(Class cls, SEL sel))aBlock;
23 |
24 | @end
25 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/NSValue+OCMAdditions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface NSValue(OCMAdditions)
20 |
21 | - (BOOL)getBytes:(void *)outputBuf objCType:(const char *)targetType;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCClassMockObject.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCClassMockObject : OCMockObject
20 | {
21 | Class mockedClass;
22 | Class originalMetaClass;
23 | Class classCreatedForNewMetaClass;
24 | }
25 |
26 | - (id)initWithClass:(Class)aClass;
27 |
28 | - (Class)mockedClass;
29 | - (Class)mockObjectClass; // since -class returns the mockedClass
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMArgAction.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMArgAction : NSObject
20 |
21 | - (void)handleArgument:(id)argument;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMArgAction.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMArgAction.h"
18 |
19 |
20 | @implementation OCMArgAction
21 |
22 | - (void)handleArgument:(id)argument
23 | {
24 |
25 | }
26 |
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMBlockArgCaller.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMArgAction.h"
18 |
19 | @interface OCMBlockArgCaller : OCMArgAction
20 | {
21 | NSArray *arguments;
22 | }
23 |
24 | - (instancetype)initWithBlockArguments:(NSArray *)someArgs;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMBlockArgCaller.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMBlockArgCaller.h"
18 | #import "NSInvocation+OCMAdditions.h"
19 |
20 |
21 | @implementation OCMBlockArgCaller
22 |
23 | - (instancetype)initWithBlockArguments:(NSArray *)someArgs
24 | {
25 | self = [super init];
26 | if(self)
27 | {
28 | arguments = [someArgs copy];
29 | }
30 | return self;
31 | }
32 |
33 | - (void)dealloc
34 | {
35 | [arguments release];
36 | [super dealloc];
37 | }
38 |
39 | - (id)copyWithZone:(NSZone *)zone
40 | {
41 | return [self retain];
42 | }
43 |
44 | - (void)handleArgument:(id)aBlock
45 | {
46 | if(aBlock)
47 | {
48 | NSInvocation *inv = [NSInvocation invocationForBlock:aBlock withArguments:arguments];
49 | [inv invokeWithTarget:aBlock];
50 | }
51 | }
52 |
53 | @end
54 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMBlockCaller.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2010-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 |
20 | @interface OCMBlockCaller : NSObject
21 | {
22 | void (^block)(NSInvocation *);
23 | }
24 |
25 | - (id)initWithCallBlock:(void (^)(NSInvocation *))theBlock;
26 |
27 | - (void)handleInvocation:(NSInvocation *)anInvocation;
28 |
29 | @end
30 |
31 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMBlockCaller.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2010-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMBlockCaller.h"
18 |
19 |
20 | @implementation OCMBlockCaller
21 |
22 | -(id)initWithCallBlock:(void (^)(NSInvocation *))theBlock
23 | {
24 | if ((self = [super init]))
25 | {
26 | block = [theBlock copy];
27 | }
28 |
29 | return self;
30 | }
31 |
32 | -(void)dealloc
33 | {
34 | [block release];
35 | [super dealloc];
36 | }
37 |
38 | - (void)handleInvocation:(NSInvocation *)anInvocation
39 | {
40 | if (block != nil)
41 | {
42 | block(anInvocation);
43 | }
44 | }
45 |
46 | @end
47 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMBoxedReturnValueProvider.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMReturnValueProvider.h"
18 |
19 | @interface OCMBoxedReturnValueProvider : OCMReturnValueProvider
20 | {
21 | }
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMExceptionReturnValueProvider.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMReturnValueProvider.h"
18 |
19 | extern NSString *OCMStubbedException;
20 |
21 | @interface OCMExceptionReturnValueProvider : OCMReturnValueProvider
22 | {
23 | }
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMExceptionReturnValueProvider.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMExceptionReturnValueProvider.h"
18 |
19 |
20 | @implementation OCMExceptionReturnValueProvider
21 |
22 | NSString *OCMStubbedException = @"OCMStubbedException";
23 |
24 |
25 | - (void)handleInvocation:(NSInvocation *)anInvocation
26 | {
27 | [[NSException exceptionWithName:OCMStubbedException reason:@"Exception stubbed in test." userInfo:@{ @"exception": returnValue }] raise];
28 | }
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMExpectationRecorder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2004-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMExpectationRecorder : OCMStubRecorder
20 |
21 | - (id)never;
22 |
23 | @end
24 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMExpectationRecorder.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2004-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMExpectationRecorder.h"
18 | #import "OCMInvocationExpectation.h"
19 |
20 | @implementation OCMExpectationRecorder
21 |
22 | #pragma mark Initialisers, description, accessors, etc.
23 |
24 | - (id)init
25 | {
26 | self = [super init];
27 | [invocationMatcher release];
28 | invocationMatcher = [[OCMInvocationExpectation alloc] init];
29 | return self;
30 | }
31 |
32 | - (OCMInvocationExpectation *)expectation
33 | {
34 | return (OCMInvocationExpectation *)invocationMatcher;
35 | }
36 |
37 |
38 | #pragma mark Modifying the expectation
39 |
40 | - (id)never
41 | {
42 | [[self expectation] setMatchAndReject:YES];
43 | return self;
44 | }
45 |
46 |
47 | #pragma mark Finishing recording
48 |
49 | - (void)forwardInvocation:(NSInvocation *)anInvocation
50 | {
51 | [super forwardInvocation:anInvocation];
52 | [mockObject addExpectation:[self expectation]];
53 | }
54 |
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMFunctions.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 |
20 | #if defined(__cplusplus)
21 | #define OCMOCK_EXTERN extern "C"
22 | #else
23 | #define OCMOCK_EXTERN extern
24 | #endif
25 |
26 |
27 | OCMOCK_EXTERN BOOL OCMIsObjectType(const char *objCType);
28 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMFunctionsPrivate.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @class OCMLocation;
20 | @class OCClassMockObject;
21 | @class OCPartialMockObject;
22 |
23 |
24 | BOOL OCMIsBlockType(const char *objCType);
25 | BOOL OCMIsObjectType(const char *objCType);
26 | const char *OCMTypeWithoutQualifiers(const char *objCType);
27 | BOOL OCMEqualTypesAllowingOpaqueStructs(const char *type1, const char *type2);
28 | CFNumberType OCMNumberTypeForObjCType(const char *objcType);
29 |
30 | Class OCMCreateSubclass(Class cls, void *ref);
31 |
32 | BOOL OCMIsAliasSelector(SEL selector);
33 | SEL OCMAliasForOriginalSelector(SEL selector);
34 | SEL OCMOriginalSelectorForAlias(SEL selector);
35 |
36 | void OCMSetAssociatedMockForClass(OCClassMockObject *mock, Class aClass);
37 | OCClassMockObject *OCMGetAssociatedMockForClass(Class aClass, BOOL includeSuperclasses);
38 |
39 | void OCMSetAssociatedMockForObject(OCClassMockObject *mock, id anObject);
40 | OCPartialMockObject *OCMGetAssociatedMockForObject(id anObject);
41 |
42 | void OCMReportFailure(OCMLocation *loc, NSString *description);
43 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMIndirectReturnValueProvider.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMIndirectReturnValueProvider : NSObject
20 | {
21 | id provider;
22 | SEL selector;
23 | }
24 |
25 | - (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector;
26 |
27 | - (void)handleInvocation:(NSInvocation *)anInvocation;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMIndirectReturnValueProvider.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "NSMethodSignature+OCMAdditions.h"
18 | #import "OCMIndirectReturnValueProvider.h"
19 | #import "NSInvocation+OCMAdditions.h"
20 |
21 |
22 | @implementation OCMIndirectReturnValueProvider
23 |
24 | - (id)initWithProvider:(id)aProvider andSelector:(SEL)aSelector
25 | {
26 | if ((self = [super init]))
27 | {
28 | provider = [aProvider retain];
29 | selector = aSelector;
30 | }
31 |
32 | return self;
33 | }
34 |
35 | - (void)dealloc
36 | {
37 | [provider release];
38 | [super dealloc];
39 | }
40 |
41 | - (void)handleInvocation:(NSInvocation *)anInvocation
42 | {
43 | id originalTarget = [anInvocation target];
44 | SEL originalSelector = [anInvocation selector];
45 |
46 | [anInvocation setTarget:provider];
47 | [anInvocation setSelector:selector];
48 | [anInvocation invoke];
49 |
50 | [anInvocation setTarget:originalTarget];
51 | [anInvocation setSelector:originalSelector];
52 | }
53 |
54 | @end
55 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMInvocationExpectation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMInvocationStub.h"
18 |
19 | @interface OCMInvocationExpectation : OCMInvocationStub
20 | {
21 | BOOL matchAndReject;
22 | BOOL isSatisfied;
23 | }
24 |
25 | - (void)setMatchAndReject:(BOOL)flag;
26 | - (BOOL)isMatchAndReject;
27 |
28 | - (BOOL)isSatisfied;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMInvocationExpectation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMInvocationExpectation.h"
18 | #import "NSInvocation+OCMAdditions.h"
19 |
20 |
21 | @implementation OCMInvocationExpectation
22 |
23 | - (void)setMatchAndReject:(BOOL)flag
24 | {
25 | matchAndReject = flag;
26 | if(matchAndReject)
27 | isSatisfied = YES;
28 | }
29 |
30 | - (BOOL)isMatchAndReject
31 | {
32 | return matchAndReject;
33 | }
34 |
35 | - (BOOL)isSatisfied
36 | {
37 | return isSatisfied;
38 | }
39 |
40 | - (void)handleInvocation:(NSInvocation *)anInvocation
41 | {
42 | [super handleInvocation:anInvocation];
43 |
44 | if(matchAndReject)
45 | {
46 | isSatisfied = NO;
47 | [NSException raise:NSInternalInconsistencyException format:@"%@: explicitly disallowed method invoked: %@",
48 | [self description], [anInvocation invocationDescription]];
49 | }
50 | else
51 | {
52 | isSatisfied = YES;
53 | }
54 | }
55 |
56 | @end
57 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMInvocationMatcher.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMInvocationMatcher : NSObject
20 | {
21 | NSInvocation *recordedInvocation;
22 | BOOL recordedAsClassMethod;
23 | BOOL ignoreNonObjectArgs;
24 | }
25 |
26 | - (void)setInvocation:(NSInvocation *)anInvocation;
27 | - (NSInvocation *)recordedInvocation;
28 |
29 | - (void)setRecordedAsClassMethod:(BOOL)flag;
30 | - (BOOL)recordedAsClassMethod;
31 |
32 | - (void)setIgnoreNonObjectArgs:(BOOL)flag;
33 |
34 | - (BOOL)matchesSelector:(SEL)aSelector;
35 | - (BOOL)matchesInvocation:(NSInvocation *)anInvocation;
36 |
37 | @end
38 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMInvocationStub.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMInvocationMatcher.h"
18 |
19 | @interface OCMInvocationStub : OCMInvocationMatcher
20 | {
21 | NSMutableArray *invocationActions;
22 | }
23 |
24 | - (void)addInvocationAction:(id)anAction;
25 | - (NSArray *)invocationActions;
26 |
27 | - (void)handleInvocation:(NSInvocation *)anInvocation;
28 |
29 | @end
30 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMLocation.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 | #import "OCMFunctions.h"
19 |
20 |
21 | @interface OCMLocation : NSObject
22 | {
23 | id testCase;
24 | NSString *file;
25 | NSUInteger line;
26 | }
27 |
28 | + (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
29 |
30 | - (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine;
31 |
32 | - (id)testCase;
33 | - (NSString *)file;
34 | - (NSUInteger)line;
35 |
36 | @end
37 |
38 | OCMOCK_EXTERN OCMLocation *OCMMakeLocation(id testCase, const char *file, int line);
39 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMLocation.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMLocation.h"
18 |
19 | @implementation OCMLocation
20 |
21 | + (instancetype)locationWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine
22 | {
23 | return [[[OCMLocation alloc] initWithTestCase:aTestCase file:aFile line:aLine] autorelease];
24 | }
25 |
26 | - (instancetype)initWithTestCase:(id)aTestCase file:(NSString *)aFile line:(NSUInteger)aLine
27 | {
28 | if ((self = [super init]))
29 | {
30 | testCase = aTestCase;
31 | file = [aFile retain];
32 | line = aLine;
33 | }
34 |
35 | return self;
36 | }
37 |
38 | - (void)dealloc
39 | {
40 | [file release];
41 | [super dealloc];
42 | }
43 |
44 | - (id)testCase
45 | {
46 | return testCase;
47 | }
48 |
49 | - (NSString *)file
50 | {
51 | return file;
52 | }
53 |
54 | - (NSUInteger)line
55 | {
56 | return line;
57 | }
58 |
59 | @end
60 |
61 |
62 | OCMLocation *OCMMakeLocation(id testCase, const char *fileCString, int line)
63 | {
64 | return [OCMLocation locationWithTestCase:testCase file:[NSString stringWithUTF8String:fileCString] line:line];
65 | }
66 |
67 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMMacroState.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @class OCMLocation;
20 | @class OCMRecorder;
21 | @class OCMStubRecorder;
22 | @class OCMockObject;
23 |
24 |
25 | @interface OCMMacroState : NSObject
26 | {
27 | OCMRecorder *recorder;
28 | }
29 |
30 | + (void)beginStubMacro;
31 | + (OCMStubRecorder *)endStubMacro;
32 |
33 | + (void)beginExpectMacro;
34 | + (OCMStubRecorder *)endExpectMacro;
35 |
36 | + (void)beginRejectMacro;
37 | + (OCMStubRecorder *)endRejectMacro;
38 |
39 | + (void)beginVerifyMacroAtLocation:(OCMLocation *)aLocation;
40 | + (void)endVerifyMacro;
41 |
42 | + (OCMMacroState *)globalState;
43 |
44 | - (OCMRecorder *)recorder;
45 |
46 | - (void)switchToClassMethod;
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMNotificationPoster.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMNotificationPoster : NSObject
20 | {
21 | NSNotification *notification;
22 | }
23 |
24 | - (id)initWithNotification:(id)aNotification;
25 |
26 | - (void)handleInvocation:(NSInvocation *)anInvocation;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMNotificationPoster.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMNotificationPoster.h"
18 |
19 |
20 | @implementation OCMNotificationPoster
21 |
22 | - (id)initWithNotification:(id)aNotification
23 | {
24 | if ((self = [super init]))
25 | {
26 | notification = [aNotification retain];
27 | }
28 |
29 | return self;
30 | }
31 |
32 | - (void)dealloc
33 | {
34 | [notification release];
35 | [super dealloc];
36 | }
37 |
38 | - (void)handleInvocation:(NSInvocation *)anInvocation
39 | {
40 | [[NSNotificationCenter defaultCenter] postNotification:notification];
41 | }
42 |
43 |
44 | @end
45 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMObserverRecorder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMObserverRecorder : NSObject
20 | {
21 | NSNotification *recordedNotification;
22 | }
23 |
24 | - (NSNotification *)notificationWithName:(NSString *)name object:(id)sender;
25 |
26 | - (NSNotification *)notificationWithName:(NSString *)name object:(id)sender userInfo:(NSDictionary *)userInfo;
27 |
28 | - (BOOL)matchesNotification:(NSNotification *)aNotification;
29 |
30 | - (BOOL)argument:(id)expectedArg matchesArgument:(id)observedArg;
31 |
32 | @end
33 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMPassByRefSetter.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMArgAction.h"
18 |
19 | @interface OCMPassByRefSetter : OCMArgAction
20 | {
21 | id value;
22 | }
23 |
24 | - (id)initWithValue:(id)value;
25 |
26 | @end
27 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMPassByRefSetter.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMPassByRefSetter.h"
18 |
19 |
20 | @implementation OCMPassByRefSetter
21 |
22 | - (id)initWithValue:(id)aValue
23 | {
24 | if ((self = [super init]))
25 | {
26 | value = [aValue retain];
27 | }
28 |
29 | return self;
30 | }
31 |
32 | - (void)dealloc
33 | {
34 | [value release];
35 | [super dealloc];
36 | }
37 |
38 | - (void)handleArgument:(id)arg
39 | {
40 | void *pointerValue = [arg pointerValue];
41 | if(pointerValue != NULL)
42 | {
43 | if([value isKindOfClass:[NSValue class]])
44 | [(NSValue *)value getValue:pointerValue];
45 | else
46 | *(id *)pointerValue = value;
47 | }
48 | }
49 |
50 | @end
51 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMRealObjectForwarder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2010-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMRealObjectForwarder : NSObject
20 | {
21 | }
22 |
23 | - (void)handleInvocation:(NSInvocation *)anInvocation;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMRealObjectForwarder.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2010-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 | #import "OCPartialMockObject.h"
19 | #import "OCMRealObjectForwarder.h"
20 | #import "OCMFunctionsPrivate.h"
21 |
22 |
23 | @implementation OCMRealObjectForwarder
24 |
25 | - (void)handleInvocation:(NSInvocation *)anInvocation
26 | {
27 | id invocationTarget = [anInvocation target];
28 |
29 | [anInvocation setSelector:OCMAliasForOriginalSelector([anInvocation selector])];
30 | if ([invocationTarget isProxy])
31 | {
32 | if (class_getInstanceMethod([invocationTarget mockObjectClass], @selector(realObject)))
33 | {
34 | // the method has been invoked on the mock, we need to change the target to the real object
35 | [anInvocation setTarget:[(OCPartialMockObject *)invocationTarget realObject]];
36 | }
37 | else
38 | {
39 | [NSException raise:NSInternalInconsistencyException
40 | format:@"Method andForwardToRealObject can only be used with partial mocks and class methods."];
41 | }
42 | }
43 |
44 | [anInvocation invoke];
45 | }
46 |
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMRecorder.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @class OCMockObject;
20 | @class OCMInvocationMatcher;
21 |
22 |
23 | @interface OCMRecorder : NSProxy
24 | {
25 | OCMockObject *mockObject;
26 | OCMInvocationMatcher *invocationMatcher;
27 | }
28 |
29 | - (instancetype)init;
30 | - (instancetype)initWithMockObject:(OCMockObject *)aMockObject;
31 |
32 | - (void)setMockObject:(OCMockObject *)aMockObject;
33 |
34 | - (OCMInvocationMatcher *)invocationMatcher;
35 |
36 | - (id)classMethod;
37 | - (id)ignoringNonObjectArgs;
38 |
39 | @end
40 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMReturnValueProvider.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCMReturnValueProvider : NSObject
20 | {
21 | id returnValue;
22 | }
23 |
24 | - (instancetype)initWithValue:(id)aValue;
25 |
26 | - (void)handleInvocation:(NSInvocation *)anInvocation;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMVerifier.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCMRecorder.h"
18 | #import "OCMLocation.h"
19 |
20 |
21 | @interface OCMVerifier : OCMRecorder
22 |
23 | @property(retain) OCMLocation *location;
24 |
25 | @end
26 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCMVerifier.m:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2014-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 | #import "OCMVerifier.h"
19 | #import "OCMockObject.h"
20 | #import "OCMLocation.h"
21 | #import "OCMInvocationMatcher.h"
22 |
23 |
24 | @implementation OCMVerifier
25 |
26 | - (id)init
27 | {
28 | if ((self = [super init]))
29 | {
30 | invocationMatcher = [[OCMInvocationMatcher alloc] init];
31 | }
32 |
33 | return self;
34 | }
35 |
36 | - (void)forwardInvocation:(NSInvocation *)anInvocation
37 | {
38 | [super forwardInvocation:anInvocation];
39 | [mockObject verifyInvocation:invocationMatcher atLocation:self.location];
40 | }
41 |
42 | - (void)dealloc
43 | {
44 | [_location release];
45 | [super dealloc];
46 | }
47 |
48 | @end
49 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCObserverMockObject.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @class OCMLocation;
20 |
21 |
22 | @interface OCObserverMockObject : NSObject
23 | {
24 | BOOL expectationOrderMatters;
25 | NSMutableArray *recorders;
26 | NSMutableArray *centers;
27 | }
28 |
29 | - (void)setExpectationOrderMatters:(BOOL)flag;
30 |
31 | - (id)expect;
32 |
33 | - (void)verify;
34 | - (void)verifyAtLocation:(OCMLocation *)location;
35 |
36 | - (void)handleNotification:(NSNotification *)aNotification;
37 |
38 | // internal use
39 |
40 | - (void)autoRemoveFromCenter:(NSNotificationCenter *)aCenter;
41 | - (NSNotification *)notificationWithName:(NSString *)name object:(id)sender;
42 |
43 | @end
44 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCPartialMockObject.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2009-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import "OCClassMockObject.h"
18 |
19 | @interface OCPartialMockObject : OCClassMockObject
20 | {
21 | NSObject *realObject;
22 | }
23 |
24 | - (id)initWithObject:(NSObject *)anObject;
25 |
26 | - (NSObject *)realObject;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/OCMock/Source/OCMock/OCProtocolMockObject.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2005-2018 Erik Doernenburg and contributors
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License"); you may
5 | * not use these files except in compliance with the License. You may obtain
6 | * a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
12 | * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
13 | * License for the specific language governing permissions and limitations
14 | * under the License.
15 | */
16 |
17 | #import
18 |
19 | @interface OCProtocolMockObject : OCMockObject
20 | {
21 | Protocol *mockedProtocol;
22 | }
23 |
24 | - (id)initWithProtocol:(Protocol *)aProtocol;
25 |
26 | @end
27 |
28 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/Behavior.swift:
--------------------------------------------------------------------------------
1 | /**
2 | A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type.
3 | */
4 |
5 | open class Behavior {
6 |
7 | public static var name: String { return String(describing: self) }
8 | /**
9 | override this method in your behavior to define a set of reusable examples.
10 |
11 | This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach`
12 | and `afterEach` closures, as well as any number of examples (defined using `it`).
13 |
14 | - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject.
15 | */
16 | open class func spec(_ aContext: @escaping () -> Context) {}
17 | }
18 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/Callsite.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | #if canImport(Darwin) && !SWIFT_PACKAGE
4 | @objcMembers
5 | public class _CallsiteBase: NSObject {}
6 | #else
7 | public class _CallsiteBase: NSObject {}
8 | #endif
9 |
10 | // Ideally we would always use `StaticString` as the type for tracking the file name
11 | // in which an example is defined, for consistency with `assert` etc. from the
12 | // stdlib, and because recent versions of the XCTest overlay require `StaticString`
13 | // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on macOS), we
14 | // have to use `String` instead because StaticString can't be generated from Objective-C
15 | #if SWIFT_PACKAGE
16 | public typealias FileString = StaticString
17 | #else
18 | public typealias FileString = String
19 | #endif
20 |
21 | /**
22 | An object encapsulating the file and line number at which
23 | a particular example is defined.
24 | */
25 | final public class Callsite: _CallsiteBase {
26 | /**
27 | The absolute path of the file in which an example is defined.
28 | */
29 | public let file: FileString
30 |
31 | /**
32 | The line number on which an example is defined.
33 | */
34 | public let line: UInt
35 |
36 | internal init(file: FileString, line: UInt) {
37 | self.file = file
38 | self.line = line
39 | }
40 | }
41 |
42 | extension Callsite {
43 | /**
44 | Returns a boolean indicating whether two Callsite objects are equal.
45 | If two callsites are in the same file and on the same line, they must be equal.
46 | */
47 | @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool {
48 | return String(describing: lhs.file) == String(describing: rhs.file) && lhs.line == rhs.line
49 | }
50 | }
51 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | internal func raiseError(_ message: String) -> Never {
4 | #if canImport(Darwin)
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 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | #if canImport(Darwin) && !SWIFT_PACKAGE
4 | @objcMembers
5 | public class _ExampleMetadataBase: NSObject {}
6 | #else
7 | public class _ExampleMetadataBase: NSObject {}
8 | #endif
9 |
10 | /**
11 | A class that encapsulates information about an example,
12 | including the index at which the example was executed, as
13 | well as the example itself.
14 | */
15 | final public class ExampleMetadata: _ExampleMetadataBase {
16 | /**
17 | The example for which this metadata was collected.
18 | */
19 | public let example: Example
20 |
21 | /**
22 | The index at which this example was executed in the
23 | test suite.
24 | */
25 | public let exampleIndex: Int
26 |
27 | internal init(example: Example, exampleIndex: Int) {
28 | self.example = example
29 | self.exampleIndex = exampleIndex
30 | }
31 | }
32 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/Filter.swift:
--------------------------------------------------------------------------------
1 | import Foundation
2 |
3 | #if canImport(Darwin) && !SWIFT_PACKAGE
4 | @objcMembers
5 | public class _FilterBase: NSObject {}
6 | #else
7 | public class _FilterBase: NSObject {}
8 | #endif
9 |
10 | /**
11 | A mapping of string keys to booleans that can be used to
12 | filter examples or example groups. For example, a "focused"
13 | example would have the flags [Focused: true].
14 | */
15 | public typealias FilterFlags = [String: Bool]
16 |
17 | /**
18 | A namespace for filter flag keys, defined primarily to make the
19 | keys available in Objective-C.
20 | */
21 | final public class Filter: _FilterBase {
22 | /**
23 | Example and example groups with [Focused: true] are included in test runs,
24 | excluding all other examples without this flag. Use this to only run one or
25 | two tests that you're currently focusing on.
26 | */
27 | public class var focused: String {
28 | return "focused"
29 | }
30 |
31 | /**
32 | Example and example groups with [Pending: true] are excluded from test runs.
33 | Use this to temporarily suspend examples that you know do not pass yet.
34 | */
35 | public class var pending: String {
36 | return "pending"
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift:
--------------------------------------------------------------------------------
1 | #if canImport(Darwin)
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
21 | return fileName.c99ExtendedIdentifier
22 | }
23 | }
24 |
25 | #endif
26 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/QuickTestSuite.swift:
--------------------------------------------------------------------------------
1 | #if canImport(Darwin)
2 |
3 | import XCTest
4 |
5 | /**
6 | This protocol defines the role of an object that builds test suites.
7 | */
8 | internal protocol QuickTestSuiteBuilder {
9 |
10 | /**
11 | Construct a `QuickTestSuite` instance with the appropriate test cases added as tests.
12 |
13 | Subsequent calls to this method should return equivalent test suites.
14 | */
15 | func buildTestSuite() -> QuickTestSuite
16 |
17 | }
18 |
19 | /**
20 | A base class for a class cluster of Quick test suites, that should correctly
21 | build dynamic test suites for XCTest to execute.
22 | */
23 | public class QuickTestSuite: XCTestSuite {
24 |
25 | private static var builtTestSuites: Set = Set()
26 |
27 | /**
28 | Construct a test suite for a specific, selected subset of test cases (rather
29 | than the default, which as all test cases).
30 |
31 | If this method is called multiple times for the same test case class, e.g..
32 |
33 | FooSpec/testFoo
34 | FooSpec/testBar
35 |
36 | It is expected that the first call should return a valid test suite, and
37 | all subsequent calls should return `nil`.
38 | */
39 | @objc
40 | public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? {
41 | guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil }
42 |
43 | let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName)
44 | if inserted {
45 | return builder.buildTestSuite()
46 | } else {
47 | return nil
48 | }
49 | }
50 | }
51 |
52 | #endif
53 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift:
--------------------------------------------------------------------------------
1 | #if canImport(Darwin)
2 | import Foundation
3 |
4 | extension String {
5 | private static var invalidCharacters: CharacterSet = {
6 | var invalidCharacters = CharacterSet()
7 |
8 | let invalidCharacterSets: [CharacterSet] = [
9 | .whitespacesAndNewlines,
10 | .illegalCharacters,
11 | .controlCharacters,
12 | .punctuationCharacters,
13 | .nonBaseCharacters,
14 | .symbols
15 | ]
16 |
17 | for invalidSet in invalidCharacterSets {
18 | invalidCharacters.formUnion(invalidSet)
19 | }
20 |
21 | return invalidCharacters
22 | }()
23 |
24 | internal var c99ExtendedIdentifier: String {
25 | let validComponents = components(separatedBy: String.invalidCharacters)
26 | let result = validComponents.joined(separator: "_")
27 |
28 | return result.isEmpty ? "_" : result
29 | }
30 | }
31 |
32 | /// Extension methods or properties for NSObject subclasses are invisible from
33 | /// the Objective-C runtime on static linking unless the consumers add `-ObjC`
34 | /// linker flag, so let's make a wrapper class to mitigate that situation.
35 | ///
36 | /// See: https://github.com/Quick/Quick/issues/785 and https://github.com/Quick/Quick/pull/803
37 | @objc
38 | class QCKObjCStringUtils: NSObject {
39 | override private init() {}
40 |
41 | @objc
42 | static func c99ExtendedIdentifier(from string: String) -> String {
43 | return string.c99ExtendedIdentifier
44 | }
45 | }
46 | #endif
47 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/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 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | #if __has_include("Quick-Swift.h")
5 | #import "Quick-Swift.h"
6 | #else
7 | #import
8 | #endif
9 |
10 | @interface XCTestSuite (QuickTestSuiteBuilder)
11 | @end
12 |
13 | @implementation XCTestSuite (QuickTestSuiteBuilder)
14 |
15 | /**
16 | In order to ensure we can correctly build dynamic test suites, we need to
17 | replace some of the default test suite constructors.
18 | */
19 | + (void)load {
20 | Method testCaseWithName = class_getClassMethod(self, @selector(testSuiteForTestCaseWithName:));
21 | Method hooked_testCaseWithName = class_getClassMethod(self, @selector(qck_hooked_testSuiteForTestCaseWithName:));
22 | method_exchangeImplementations(testCaseWithName, hooked_testCaseWithName);
23 | }
24 |
25 | /**
26 | The `+testSuiteForTestCaseWithName:` method is called when a specific test case
27 | class is run from the Xcode test navigator. If the built test suite is `nil`,
28 | Xcode will not run any tests for that test case.
29 |
30 | Given if the following test case class is run from the Xcode test navigator:
31 |
32 | FooSpec
33 | testFoo
34 | testBar
35 |
36 | XCTest will invoke this once per test case, with test case names following this format:
37 |
38 | FooSpec/testFoo
39 | FooSpec/testBar
40 | */
41 | + (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name {
42 | return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name];
43 | }
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m:
--------------------------------------------------------------------------------
1 | #import "QuickSpecBase.h"
2 |
3 | #pragma mark - _QuickSelectorWrapper
4 |
5 | @interface _QuickSelectorWrapper ()
6 | @property(nonatomic, assign) SEL selector;
7 | @end
8 |
9 | @implementation _QuickSelectorWrapper
10 |
11 | - (instancetype)initWithSelector:(SEL)selector {
12 | self = [super init];
13 | _selector = selector;
14 | return self;
15 | }
16 |
17 | @end
18 |
19 |
20 | #pragma mark - _QuickSpecBase
21 |
22 | @implementation _QuickSpecBase
23 |
24 | - (instancetype)init {
25 | self = [super initWithInvocation: nil];
26 | return self;
27 | }
28 |
29 | /**
30 | Invocations for each test method in the test case. QuickSpec overrides this method to define a
31 | new method for each example defined in +[QuickSpec spec].
32 |
33 | @return An array of invocations that execute the newly defined example methods.
34 | */
35 | + (NSArray *)testInvocations {
36 | NSArray<_QuickSelectorWrapper *> *wrappers = [self _qck_testMethodSelectors];
37 | NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:wrappers.count];
38 |
39 | for (_QuickSelectorWrapper *wrapper in wrappers) {
40 | SEL selector = wrapper.selector;
41 | NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector];
42 | NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature];
43 | invocation.selector = selector;
44 |
45 | [invocations addObject:invocation];
46 | }
47 |
48 | return invocations;
49 | }
50 |
51 | + (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors {
52 | return @[];
53 | }
54 |
55 | @end
56 |
--------------------------------------------------------------------------------
/Example/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
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 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012-2014 Specta Team.
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
21 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTCallSite.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface SPTCallSite : NSObject
4 |
5 | @property (nonatomic, copy, readonly) NSString *file;
6 | @property (nonatomic, readonly) NSUInteger line;
7 |
8 | + (instancetype)callSiteWithFile:(NSString *)file line:(NSUInteger)line;
9 |
10 | - (instancetype)initWithFile:(NSString *)file line:(NSUInteger)line;
11 |
12 | @end
13 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTCallSite.m:
--------------------------------------------------------------------------------
1 | #import "SPTCallSite.h"
2 |
3 | @implementation SPTCallSite
4 |
5 | + (instancetype)callSiteWithFile:(NSString *)file line:(NSUInteger)line {
6 | return [[self alloc] initWithFile:file line:line];
7 | }
8 |
9 | - (instancetype)initWithFile:(NSString *)file line:(NSUInteger)line {
10 | self = [super init];
11 | if (self) {
12 | _file = file;
13 | _line = line;
14 | }
15 | return self;
16 | }
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTCompiledExample.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "SpectaTypes.h"
3 |
4 | @interface SPTCompiledExample : NSObject
5 |
6 | @property (nonatomic, copy) NSString *name;
7 | @property (nonatomic, copy) NSString *testCaseName;
8 | @property (nonatomic, copy) SPTSpecBlock block;
9 |
10 | @property (nonatomic) BOOL pending;
11 | @property (nonatomic, getter=isFocused) BOOL focused;
12 |
13 | @property (nonatomic) SEL testMethodSelector;
14 |
15 | - (id)initWithName:(NSString *)name testCaseName:(NSString *)testCaseName block:(SPTSpecBlock)block pending:(BOOL)pending focused:(BOOL)focused;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTCompiledExample.m:
--------------------------------------------------------------------------------
1 | #import "SPTCompiledExample.h"
2 |
3 | @implementation SPTCompiledExample
4 |
5 | - (id)initWithName:(NSString *)name testCaseName:(NSString *)testCaseName block:(SPTSpecBlock)block pending:(BOOL)pending focused:(BOOL)focused {
6 | self = [super init];
7 | if (self) {
8 | self.name = name;
9 | self.testCaseName = testCaseName;
10 | self.block = block;
11 | self.pending = pending;
12 | self.focused = focused;
13 | }
14 | return self;
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTExample.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import "SpectaTypes.h"
3 |
4 | @class SPTCallSite;
5 |
6 | @interface SPTExample : NSObject
7 |
8 | @property (nonatomic, copy) NSString *name;
9 | @property (nonatomic, retain) SPTCallSite *callSite;
10 | @property (nonatomic, copy) SPTVoidBlock block;
11 |
12 | @property (nonatomic) BOOL pending;
13 | @property (nonatomic, getter=isFocused) BOOL focused;
14 |
15 | - (id)initWithName:(NSString *)name callSite:(SPTCallSite *)callSite focused:(BOOL)focused block:(SPTVoidBlock)block;
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTExample.m:
--------------------------------------------------------------------------------
1 | #import "SPTExample.h"
2 |
3 | @implementation SPTExample
4 |
5 | - (id)initWithName:(NSString *)name callSite:(SPTCallSite *)callSite focused:(BOOL)focused block:(SPTVoidBlock)block {
6 | self = [super init];
7 | if (self) {
8 | self.name = name;
9 | self.callSite = callSite;
10 | self.block = block;
11 | self.focused = focused;
12 | self.pending = block == nil;
13 | }
14 | return self;
15 | }
16 |
17 | @end
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTExampleGroup.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import "SpectaTypes.h"
4 |
5 | @class SPTExample;
6 | @class SPTCallSite;
7 |
8 | @interface SPTExampleGroup : NSObject
9 |
10 | @property (nonatomic, copy) NSString *name;
11 | @property (nonatomic, weak) SPTExampleGroup *root;
12 | @property (nonatomic, weak) SPTExampleGroup *parent;
13 | @property (nonatomic, strong) NSMutableArray *children;
14 | @property (nonatomic, strong) NSMutableArray *beforeAllArray;
15 | @property (nonatomic, strong) NSMutableArray *afterAllArray;
16 | @property (nonatomic, strong) NSMutableArray *beforeEachArray;
17 | @property (nonatomic, strong) NSMutableArray *afterEachArray;
18 | @property (nonatomic, strong) NSMutableDictionary *sharedExamples;
19 | @property (nonatomic) unsigned int exampleCount;
20 | @property (nonatomic) unsigned int ranExampleCount;
21 | @property (nonatomic) unsigned int pendingExampleCount;
22 | @property (nonatomic, getter=isFocused) BOOL focused;
23 |
24 | - (id)initWithName:(NSString *)name parent:(SPTExampleGroup *)parent root:(SPTExampleGroup *)root;
25 |
26 | - (SPTExampleGroup *)addExampleGroupWithName:(NSString *)name focused:(BOOL)focused;
27 | - (SPTExample *)addExampleWithName:(NSString *)name callSite:(SPTCallSite *)callSite focused:(BOOL)focused block:(SPTVoidBlock)block;
28 |
29 | - (void)addBeforeAllBlock:(SPTVoidBlock)block;
30 | - (void)addAfterAllBlock:(SPTVoidBlock)block;
31 | - (void)addBeforeEachBlock:(SPTVoidBlock)block;
32 | - (void)addAfterEachBlock:(SPTVoidBlock)block;
33 |
34 | - (NSArray *)compileExamplesWithStack:(NSArray *)stack;
35 |
36 | @end
37 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTExcludeGlobalBeforeAfterEach.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Specta Team. All rights reserved.
3 | */
4 | #import
5 |
6 | // This protocol was used for blacklisting classes for global beforeEach and afterEach blocks.
7 | // Now, instead, classes are whitelisted by implementing the SPTGlobalBeforeAfterEach protocol.
8 | __deprecated_msg("Please whitelist classes instead with the SPTGlobalBeforeAfterEach protocol")
9 | @protocol SPTExcludeGlobalBeforeAfterEach
10 | @end
11 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTGlobalBeforeAfterEach.h:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright (c) 2015 Specta Team. All rights reserved.
3 | */
4 | #import
5 |
6 | // This protocol is used for whitelisting classes for global beforeEach and afterEach blocks.
7 | // If you want a class to participate in those just add this protocol to a category and it will be
8 | // included.
9 | @protocol SPTGlobalBeforeAfterEach
10 |
11 | @optional
12 | + (void)beforeEach;
13 | + (void)afterEach;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTSharedExampleGroups.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 | #import
4 |
5 | @class _XCTestCaseImplementation;
6 |
7 | @class SPTExampleGroup;
8 |
9 | @interface SPTSharedExampleGroups : XCTestCase
10 |
11 | + (void)addSharedExampleGroupWithName:(NSString *)name block:(SPTDictionaryBlock)block exampleGroup:(SPTExampleGroup *)exampleGroup;
12 | + (SPTDictionaryBlock)sharedExampleGroupWithName:(NSString *)name exampleGroup:(SPTExampleGroup *)exampleGroup;
13 |
14 | - (void)sharedExampleGroups;
15 |
16 | @end
17 |
18 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTSpec.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | @class
5 | SPTTestSuite
6 | , SPTCompiledExample
7 | ;
8 |
9 | @interface SPTSpec : XCTestCase
10 |
11 | @property (strong) XCTestCaseRun *spt_run;
12 | @property (nonatomic) BOOL spt_pending;
13 | @property (nonatomic) BOOL spt_skipped;
14 |
15 | + (BOOL)spt_isDisabled;
16 | + (void)spt_setDisabled:(BOOL)disabled;
17 | + (BOOL)spt_focusedExamplesExist;
18 | + (SEL)spt_convertToTestMethod:(SPTCompiledExample *)example;
19 | + (SPTTestSuite *)spt_testSuite;
20 | + (void)spt_setCurrentTestSuite;
21 | + (void)spt_unsetCurrentTestSuite;
22 | + (void)spt_setCurrentTestSuiteFileName:(NSString *)fileName lineNumber:(NSUInteger)lineNumber;
23 |
24 | - (void)spec;
25 | - (BOOL)spt_shouldRunExample:(SPTCompiledExample *)example;
26 | - (void)spt_runExample:(SPTCompiledExample *)example;
27 |
28 | @end
29 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTTestSuite.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @class
4 | SPTExample
5 | , SPTExampleGroup
6 | ;
7 |
8 | @interface SPTTestSuite : NSObject
9 |
10 | @property (nonatomic, strong) SPTExampleGroup *rootGroup;
11 | @property (nonatomic, strong) NSMutableArray *groupStack;
12 | @property (nonatomic, strong) NSArray *compiledExamples;
13 | @property (nonatomic, copy) NSString *fileName;
14 | @property (nonatomic) NSUInteger lineNumber;
15 | @property (nonatomic, getter = isDisabled) BOOL disabled;
16 | @property (nonatomic) BOOL hasFocusedExamples;
17 |
18 | - (SPTExampleGroup *)currentGroup;
19 | - (void)compile;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SPTTestSuite.m:
--------------------------------------------------------------------------------
1 | #import "SPTTestSuite.h"
2 | #import "SPTExampleGroup.h"
3 | #import "SPTCompiledExample.h"
4 |
5 | @implementation SPTTestSuite
6 |
7 | - (id)init {
8 | self = [super init];
9 | if (self) {
10 | self.rootGroup = [[SPTExampleGroup alloc] init];
11 | self.rootGroup.root = self.rootGroup;
12 | self.groupStack = [NSMutableArray arrayWithObject:self.rootGroup];
13 | }
14 | return self;
15 | }
16 |
17 | - (SPTExampleGroup *)currentGroup {
18 | return [self.groupStack lastObject];
19 | }
20 |
21 | - (void)compile {
22 | self.compiledExamples = [self.rootGroup compileExamplesWithStack:@[]];
23 | for (SPTCompiledExample *example in self.compiledExamples) {
24 | if (example.focused) {
25 | self.hasFocusedExamples = YES;
26 | break;
27 | }
28 | }
29 | }
30 |
31 | @end
32 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/Specta.h:
--------------------------------------------------------------------------------
1 | #import
2 | #import
3 |
4 | //! Project version number for Specta.
5 | FOUNDATION_EXPORT double SpectaVersionNumber;
6 |
7 | //! Project version string for Specta.
8 | FOUNDATION_EXPORT const unsigned char SpectaVersionString[];
9 |
10 | // In this header, you should import all the public headers of your framework using statements like #import
11 |
12 | #import
13 | #import
14 | #import
15 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SpectaTypes.h:
--------------------------------------------------------------------------------
1 | @class SPTSpec;
2 |
3 | typedef void (^SPTVoidBlock)(void);
4 | typedef void (^SPTSpecBlock)(SPTSpec *spec);
5 | typedef void (^SPTDictionaryBlock)(NSDictionary *dictionary);
6 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/SpectaUtility.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | extern NSString * const spt_kCurrentTestSuiteKey;
4 | extern NSString * const spt_kCurrentSpecKey;
5 |
6 | #define SPTCurrentTestSuite [[NSThread mainThread] threadDictionary][spt_kCurrentTestSuiteKey]
7 | #define SPTCurrentSpec [[NSThread mainThread] threadDictionary][spt_kCurrentSpecKey]
8 | #define SPTCurrentGroup [SPTCurrentTestSuite currentGroup]
9 | #define SPTGroupStack [SPTCurrentTestSuite groupStack]
10 |
11 | #define SPTReturnUnlessBlockOrNil(block) if ((block) && !SPTIsBlock((block))) return;
12 | #define SPTIsBlock(obj) [(obj) isKindOfClass:NSClassFromString(@"NSBlock")]
13 |
14 | BOOL spt_isSpecClass(Class aClass);
15 | NSString *spt_underscorize(NSString *string);
16 | NSArray *spt_map(NSArray *array, id (^block)(id obj, NSUInteger idx));
17 | NSArray *spt_shuffle(NSArray *array);
18 | unsigned int spt_seed(void);
19 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/XCTest+Private.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #if __IPHONE_OS_VERSION_MAX_ALLOWED >= 90000 || __MAC_OS_X_VERSION_MAX_ALLOWED >= 101100
4 |
5 | @interface XCTestObservationCenter (SPTTestSuspention)
6 |
7 | - (void)_suspendObservationForBlock:(void (^)(void))block;
8 |
9 | @end
10 |
11 | #else
12 |
13 | @interface XCTestObservationCenter : NSObject
14 |
15 | + (id)sharedObservationCenter;
16 | - (void)_suspendObservationForBlock:(void (^)(void))block;
17 |
18 | @end
19 |
20 | @protocol XCTestObservation
21 | @end
22 |
23 |
24 | #endif
25 |
26 | @interface _XCTestDriverTestObserver : NSObject
27 |
28 | - (void)stopObserving;
29 | - (void)startObserving;
30 |
31 | @end
32 |
33 | @interface _XCTestCaseImplementation : NSObject
34 | @end
35 |
36 | @interface XCTestCase ()
37 |
38 | - (_XCTestCaseImplementation *)internalImplementation;
39 | - (void)_recordUnexpectedFailureWithDescription:(NSString *)description exception:(NSException *)exception;
40 |
41 | @end
42 |
--------------------------------------------------------------------------------
/Example/Pods/Specta/Specta/Specta/XCTestCase+Specta.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | @interface XCTestCase (Specta)
4 |
5 | - (void)spt_handleException:(NSException *)exception;
6 |
7 | @end
8 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta-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.6
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Expecta : NSObject
3 | @end
4 | @implementation PodsDummy_Expecta
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "EXPBlockDefinedMatcher.h"
14 | #import "EXPDefines.h"
15 | #import "EXPDoubleTuple.h"
16 | #import "Expecta.h"
17 | #import "ExpectaObject.h"
18 | #import "ExpectaSupport.h"
19 | #import "EXPExpect.h"
20 | #import "EXPFloatTuple.h"
21 | #import "EXPMatcher.h"
22 | #import "EXPUnsupportedObject.h"
23 | #import "EXPMatcherHelpers.h"
24 | #import "EXPMatchers+beCloseTo.h"
25 | #import "EXPMatchers+beFalsy.h"
26 | #import "EXPMatchers+beginWith.h"
27 | #import "EXPMatchers+beGreaterThan.h"
28 | #import "EXPMatchers+beGreaterThanOrEqualTo.h"
29 | #import "EXPMatchers+beIdenticalTo.h"
30 | #import "EXPMatchers+beInstanceOf.h"
31 | #import "EXPMatchers+beInTheRangeOf.h"
32 | #import "EXPMatchers+beKindOf.h"
33 | #import "EXPMatchers+beLessThan.h"
34 | #import "EXPMatchers+beLessThanOrEqualTo.h"
35 | #import "EXPMatchers+beNil.h"
36 | #import "EXPMatchers+beSubclassOf.h"
37 | #import "EXPMatchers+beSupersetOf.h"
38 | #import "EXPMatchers+beTruthy.h"
39 | #import "EXPMatchers+conformTo.h"
40 | #import "EXPMatchers+contain.h"
41 | #import "EXPMatchers+endWith.h"
42 | #import "EXPMatchers+equal.h"
43 | #import "EXPMatchers+haveCountOf.h"
44 | #import "EXPMatchers+match.h"
45 | #import "EXPMatchers+postNotification.h"
46 | #import "EXPMatchers+raise.h"
47 | #import "EXPMatchers+raiseWithReason.h"
48 | #import "EXPMatchers+respondTo.h"
49 | #import "EXPMatchers.h"
50 | #import "NSObject+Expecta.h"
51 | #import "NSValue+Expecta.h"
52 |
53 | FOUNDATION_EXPORT double ExpectaVersionNumber;
54 | FOUNDATION_EXPORT const unsigned char ExpectaVersionString[];
55 |
56 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta.modulemap:
--------------------------------------------------------------------------------
1 | framework module Expecta {
2 | umbrella header "Expecta-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/Expecta.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Expecta
2 | ENABLE_BITCODE = NO
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "XCTest"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Expecta
10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | SKIP_INSTALL = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Expecta/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.6
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/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 | 7.3.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/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 | 8.0.1
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/Nimble-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Nimble : NSObject
3 | @end
4 | @implementation PodsDummy_Nimble
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "Nimble.h"
14 | #import "DSL.h"
15 | #import "NMBExceptionCapture.h"
16 | #import "NMBStringify.h"
17 | #import "CwlCatchException.h"
18 | #import "CwlMachBadInstructionHandler.h"
19 | #import "mach_excServer.h"
20 | #import "CwlPreconditionTesting.h"
21 |
22 | FOUNDATION_EXPORT double NimbleVersionNumber;
23 | FOUNDATION_EXPORT const unsigned char NimbleVersionString[];
24 |
25 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/Nimble.modulemap:
--------------------------------------------------------------------------------
1 | framework module Nimble {
2 | umbrella header "Nimble-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Nimble/Nimble.xcconfig:
--------------------------------------------------------------------------------
1 | APPLICATION_EXTENSION_API_ONLY = YES
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble
3 | ENABLE_BITCODE = NO
4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
6 | OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lswiftXCTest -weak_framework "XCTest"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble
12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
13 | SKIP_INSTALL = YES
14 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/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.4.3
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock-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.4.3
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_OCMock : NSObject
3 | @end
4 | @implementation PodsDummy_OCMock
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "OCMock.h"
14 | #import "OCMockObject.h"
15 | #import "OCMArg.h"
16 | #import "OCMConstraint.h"
17 | #import "OCMLocation.h"
18 | #import "OCMMacroState.h"
19 | #import "OCMRecorder.h"
20 | #import "OCMStubRecorder.h"
21 | #import "NSNotificationCenter+OCMAdditions.h"
22 | #import "OCMFunctions.h"
23 |
24 | FOUNDATION_EXPORT double OCMockVersionNumber;
25 | FOUNDATION_EXPORT const unsigned char OCMockVersionString[];
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock.modulemap:
--------------------------------------------------------------------------------
1 | framework module OCMock {
2 | umbrella header "OCMock-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/OCMock/OCMock.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/OCMock
2 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
3 | PODS_BUILD_DIR = ${BUILD_DIR}
4 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
5 | PODS_ROOT = ${SRCROOT}
6 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/OCMock
7 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
8 | SKIP_INSTALL = YES
9 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/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 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString-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 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Pods_ZSWTaggedString : NSObject
3 | @end
4 | @implementation PodsDummy_Pods_ZSWTaggedString
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
14 | FOUNDATION_EXPORT double Pods_ZSWTaggedStringVersionNumber;
15 | FOUNDATION_EXPORT const unsigned char Pods_ZSWTaggedStringVersionString[];
16 |
17 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.debug.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Expecta" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/OCMock" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/Specta" "${PODS_CONFIGURATION_BUILD_DIR}/ZSWTaggedString"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Expecta/Expecta.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Specta/Specta.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZSWTaggedString/ZSWTaggedString.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Expecta" -framework "Foundation" -framework "Nimble" -framework "OCMock" -framework "Quick" -framework "Specta" -framework "XCTest" -framework "ZSWTaggedString" -weak_framework "XCTest"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.modulemap:
--------------------------------------------------------------------------------
1 | framework module Pods_ZSWTaggedString {
2 | umbrella header "Pods-ZSWTaggedString-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Pods-ZSWTaggedString/Pods-ZSWTaggedString.release.xcconfig:
--------------------------------------------------------------------------------
1 | ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES
2 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/Expecta" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/OCMock" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" "${PODS_CONFIGURATION_BUILD_DIR}/Specta" "${PODS_CONFIGURATION_BUILD_DIR}/ZSWTaggedString"
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Expecta/Expecta.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/OCMock/OCMock.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Specta/Specta.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ZSWTaggedString/ZSWTaggedString.framework/Headers"
5 | LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks'
6 | OTHER_LDFLAGS = $(inherited) -framework "Expecta" -framework "Foundation" -framework "Nimble" -framework "OCMock" -framework "Quick" -framework "Specta" -framework "XCTest" -framework "ZSWTaggedString" -weak_framework "XCTest"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_PODFILE_DIR_PATH = ${SRCROOT}/.
11 | PODS_ROOT = ${SRCROOT}/Pods
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/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.3.2
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/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 | 2.1.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/Quick-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Quick : NSObject
3 | @end
4 | @implementation PodsDummy_Quick
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/Quick-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/Quick-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "QuickConfiguration.h"
14 | #import "QCKDSL.h"
15 | #import "Quick.h"
16 | #import "QuickSpec.h"
17 |
18 | FOUNDATION_EXPORT double QuickVersionNumber;
19 | FOUNDATION_EXPORT const unsigned char QuickVersionString[];
20 |
21 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/Quick.modulemap:
--------------------------------------------------------------------------------
1 | framework module Quick {
2 | umbrella header "Quick-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Quick/Quick.xcconfig:
--------------------------------------------------------------------------------
1 | APPLICATION_EXTENSION_API_ONLY = YES
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick
3 | ENABLE_BITCODE = NO
4 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
5 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
6 | OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest"
7 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
8 | PODS_BUILD_DIR = ${BUILD_DIR}
9 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
10 | PODS_ROOT = ${SRCROOT}
11 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick
12 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
13 | SKIP_INSTALL = YES
14 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/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.7
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta-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.7
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_Specta : NSObject
3 | @end
4 | @implementation PodsDummy_Specta
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta-umbrella.h:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 | #import "Specta.h"
14 | #import "SpectaDSL.h"
15 | #import "SpectaTypes.h"
16 | #import "SpectaUtility.h"
17 | #import "SPTCallSite.h"
18 | #import "SPTCompiledExample.h"
19 | #import "SPTExample.h"
20 | #import "SPTExampleGroup.h"
21 | #import "SPTExcludeGlobalBeforeAfterEach.h"
22 | #import "SPTGlobalBeforeAfterEach.h"
23 | #import "SPTSharedExampleGroups.h"
24 | #import "SPTSpec.h"
25 | #import "SPTTestSuite.h"
26 | #import "XCTest+Private.h"
27 | #import "XCTestCase+Specta.h"
28 |
29 | FOUNDATION_EXPORT double SpectaVersionNumber;
30 | FOUNDATION_EXPORT const unsigned char SpectaVersionString[];
31 |
32 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta.modulemap:
--------------------------------------------------------------------------------
1 | framework module Specta {
2 | umbrella header "Specta-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 | }
7 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/Specta/Specta.xcconfig:
--------------------------------------------------------------------------------
1 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Specta
2 | ENABLE_BITCODE = NO
3 | FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"
4 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
5 | OTHER_LDFLAGS = $(inherited) -framework "Foundation" -framework "XCTest"
6 | PODS_BUILD_DIR = ${BUILD_DIR}
7 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
8 | PODS_ROOT = ${SRCROOT}
9 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/Specta
10 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
11 | SKIP_INSTALL = YES
12 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/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 | 4.0.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/ZSWTaggedString-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 | 4.2.0
19 | CFBundleSignature
20 | ????
21 | CFBundleVersion
22 | ${CURRENT_PROJECT_VERSION}
23 | NSPrincipalClass
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/ZSWTaggedString-dummy.m:
--------------------------------------------------------------------------------
1 | #import
2 | @interface PodsDummy_ZSWTaggedString : NSObject
3 | @end
4 | @implementation PodsDummy_ZSWTaggedString
5 | @end
6 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/ZSWTaggedString-prefix.pch:
--------------------------------------------------------------------------------
1 | #ifdef __OBJC__
2 | #import
3 | #else
4 | #ifndef FOUNDATION_EXPORT
5 | #if defined(__cplusplus)
6 | #define FOUNDATION_EXPORT extern "C"
7 | #else
8 | #define FOUNDATION_EXPORT extern
9 | #endif
10 | #endif
11 | #endif
12 |
13 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/ZSWTaggedString.modulemap:
--------------------------------------------------------------------------------
1 | framework module ZSWTaggedString {
2 | umbrella header "ZSWTaggedString-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | explicit module Private {
8 | header "ZSWStringParser.h"
9 | header "ZSWStringParserTag.h"
10 | header "ZSWTaggedString_Private.h"
11 | header "ZSWTaggedStringAttribute.h"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/Example/Pods/Target Support Files/ZSWTaggedString/ZSWTaggedString.xcconfig:
--------------------------------------------------------------------------------
1 | APPLICATION_EXTENSION_API_ONLY = YES
2 | CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ZSWTaggedString
3 | GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1
4 | OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS
5 | PODS_BUILD_DIR = ${BUILD_DIR}
6 | PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME)
7 | PODS_ROOT = ${SRCROOT}
8 | PODS_TARGET_SRCROOT = ${PODS_ROOT}/../..
9 | PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier}
10 | SKIP_INSTALL = YES
11 |
--------------------------------------------------------------------------------
/Example/Tests/Matchers/OCMArg+ZSWCapture.h:
--------------------------------------------------------------------------------
1 | /* from https://github.com/erikdoe/ocmock/pull/49/files */
2 |
3 | #import
4 | #import
5 |
6 | @interface OCMArg(OCMArgumentCaptureConstraint)
7 |
8 | + (id)capture:(void *)captor;
9 |
10 | @end
11 |
12 | @interface OCMArgumentCaptureConstraint : OCMConstraint {
13 | id __strong *_captor;
14 | }
15 |
16 | - (id)initWithCaptor:(id __strong *)captor;
17 |
18 | @end
19 |
--------------------------------------------------------------------------------
/Example/Tests/Matchers/OCMArg+ZSWCapture.m:
--------------------------------------------------------------------------------
1 | #import "OCMArg+ZSWCapture.h"
2 |
3 | @implementation OCMArg(OCMArgumentCaptureConstraint)
4 |
5 | + (id)capture:(void *)captor {
6 | return [[OCMArgumentCaptureConstraint alloc] initWithCaptor:(id __strong *)captor];
7 | }
8 |
9 | @end
10 |
11 | @interface OCMArgumentCaptureConstraint()
12 |
13 | @end
14 |
15 | @implementation OCMArgumentCaptureConstraint
16 |
17 | - (id)initWithCaptor:(id __strong *)captor {
18 | if (self = [super init]) {
19 | _captor = captor;
20 | }
21 | return self;
22 | }
23 |
24 | - (BOOL)evaluate:(id)value {
25 | if ([self isBlock:value]) {
26 | *_captor = [value copy];
27 | } else {
28 | *_captor = value;
29 | }
30 | return YES;
31 | }
32 |
33 | - (BOOL)isBlock:(id)item {
34 | BOOL isBlock = NO;
35 |
36 | #if NS_BLOCKS_AVAILABLE
37 | // find the block class at runtime in case it changes in a different OS version
38 | static Class blockClass = nil;
39 | static dispatch_once_t onceToken;
40 | dispatch_once(&onceToken, ^{
41 | id block = ^{};
42 | blockClass = [block class];
43 | while ([blockClass superclass] != [NSObject class]) {
44 | blockClass = [blockClass superclass];
45 | }
46 | });
47 |
48 | isBlock = [item isKindOfClass:blockClass];
49 | #endif
50 |
51 | return isBlock;
52 | }
53 | @end
--------------------------------------------------------------------------------
/Example/Tests/Matchers/ZSWMatchers+haveAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWMatchers+haveAttribute.h
3 | // ZSWStringParser
4 | //
5 | // Created by Zachary West on 2015-02-21.
6 | // Copyright (c) 2015 Zachary West. All rights reserved.
7 | //
8 |
9 | #import "Expecta.h"
10 |
11 | EXPMatcherInterface(_haveAttributeWithEnd, (id attributeName, id attributeValue, id locationStart, id locationEnd));
12 | EXPMatcherInterface(haveAttributeWithEnd, (id attributeName, id attributeValue, id locationEnd, id locationStart));
13 |
14 | #define haveAttribute(attributeName, attributeValue, locationStart) _haveAttributeWithEnd(attributeName, attributeValue, EXPObjectify(locationStart), nil)
15 | #define haveAttributeWithEnd(attributeName, attributeValue, locationStart, locationEnd) _haveAttributeWithEnd(attributeName, attributeValue, EXPObjectify(locationStart), EXPObjectify(locationEnd))
16 |
--------------------------------------------------------------------------------
/Example/Tests/Supporting Files/Tests-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIdentifier
10 | org.cocoapods.demo.${PRODUCT_NAME:rfc1034identifier}
11 | CFBundleInfoDictionaryVersion
12 | 6.0
13 | CFBundlePackageType
14 | BNDL
15 | CFBundleShortVersionString
16 | 1.0
17 | CFBundleSignature
18 | ????
19 | CFBundleVersion
20 | 1
21 |
22 |
23 |
--------------------------------------------------------------------------------
/Example/Tests/Supporting Files/Tests-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every test case source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 | #define EXP_SHORTHAND
9 | #import
10 | #import
11 | #import
12 | #import
13 | #import
14 |
15 | #import "ZSWMatchers+haveAttribute.h"
16 | #import "OCMArg+ZSWCapture.h"
17 | #endif
18 |
--------------------------------------------------------------------------------
/Example/Tests/Tests/ZSWTaggedString-Bridging-Header.h:
--------------------------------------------------------------------------------
1 | //
2 | // Use this file to import your target's public headers that you would like to expose to Swift.
3 | //
4 |
--------------------------------------------------------------------------------
/Example/Tests/Tests/ZSWTaggedStringSpec.swift:
--------------------------------------------------------------------------------
1 | //
2 | // SwiftTests.swift
3 | // ZSWTaggedString
4 | //
5 | // Created by Zachary West on 12/6/15.
6 | // Copyright © 2015 Zachary West. All rights reserved.
7 | //
8 |
9 | import Quick
10 | import Nimble
11 | @testable import ZSWTaggedString
12 |
13 | class ZSWTaggedStringTests: QuickSpec { override func spec() {
14 | context("initialization") {
15 | it("should be initable via format") {
16 | let string = ZSWTaggedString(format: "test %@", "a")
17 | expect(string.underlyingString) == "test a"
18 | }
19 |
20 | it("should be initiable via a string") {
21 | let string = ZSWTaggedString(string: "a string")
22 | expect(string.underlyingString) == "a string"
23 | }
24 | }
25 |
26 | context("invalid strings") {
27 | it("should throw for bad tags") {
28 | let string = ZSWTaggedString(string: "moo")
29 | do {
30 | let output = try string.string()
31 | fail("should have thrown but got \(output)")
32 | } catch let error as NSError {
33 | expect(error.domain) == ZSWTaggedStringErrorDomain
34 | expect(error.code) == ZSWTaggedStringErrorCode.invalidTags.rawValue
35 | }
36 | }
37 | }
38 | } }
39 |
--------------------------------------------------------------------------------
/Example/ZSWTaggedString.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Example/ZSWTaggedString.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
9 |
10 |
11 |
--------------------------------------------------------------------------------
/Example/ZSWTaggedString.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDEDidComputeMac32BitWarning
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2015 Zachary West
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/ZSWTaggedString.podspec:
--------------------------------------------------------------------------------
1 | Pod::Spec.new do |s|
2 | s.name = "ZSWTaggedString"
3 | s.version = "4.2"
4 | s.summary = "Converts a String (or NSString) with tags (like HTML) into an NSAttributedString"
5 | s.description = <<-DESC
6 | Tags in a ZSWTaggedString are like HTML, except you define what they mean.
7 | Read more: https://github.com/zacwest/ZSWTaggedString
8 | DESC
9 | s.homepage = "https://github.com/zacwest/ZSWTaggedString"
10 | s.license = 'MIT'
11 | s.author = { "Zachary West" => "zacwest@gmail.com" }
12 | s.source = { :git => "https://github.com/zacwest/ZSWTaggedString.git", :tag => s.version.to_s }
13 | s.social_media_url = 'https://twitter.com/zacwest'
14 |
15 | s.requires_arc = true
16 |
17 | s.ios.deployment_target = '7.0'
18 | s.watchos.deployment_target = '2.0'
19 | s.tvos.deployment_target = '9.0'
20 |
21 | s.default_subspecs = 'Core'
22 | s.pod_target_xcconfig = { 'APPLICATION_EXTENSION_API_ONLY' => 'YES' }
23 | s.module_map = 'ZSWTaggedString/Classes/ZSWTaggedString.modulemap'
24 | s.swift_version = '5.0'
25 |
26 | s.subspec 'Core' do |core|
27 | core.source_files = 'ZSWTaggedString/Classes/**/*.{h,m}', 'ZSWTaggedString/Private/**/*.{h,m}'
28 | core.public_header_files = 'ZSWTaggedString/Classes/**/*.h'
29 | core.private_header_files = 'ZSWTaggedString/Private/**/*.h'
30 | end
31 |
32 | s.subspec 'Swift' do |swift|
33 | swift.ios.deployment_target = '8.0'
34 |
35 | swift.dependency 'ZSWTaggedString/Core'
36 | swift.source_files = 'ZSWTaggedString/Classes/**/*.swift', 'ZSWTaggedString/Private/**/*.swift'
37 | end
38 | end
39 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Classes/ZSWTaggedString-umbrella.h:
--------------------------------------------------------------------------------
1 | #import
2 |
3 | #import "ZSWTaggedString.h"
4 | #import "ZSWTaggedStringOptions.h"
5 |
6 | FOUNDATION_EXPORT double ZSWTaggedStringVersionNumber;
7 | FOUNDATION_EXPORT const unsigned char ZSWTaggedStringVersionString[];
8 |
9 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Classes/ZSWTaggedString.modulemap:
--------------------------------------------------------------------------------
1 | framework module ZSWTaggedString {
2 | umbrella header "ZSWTaggedString-umbrella.h"
3 |
4 | export *
5 | module * { export * }
6 |
7 | explicit module Private {
8 | header "ZSWStringParser.h"
9 | header "ZSWStringParserTag.h"
10 | header "ZSWTaggedString_Private.h"
11 | header "ZSWTaggedStringAttribute.h"
12 | }
13 | }
14 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Classes/ZSWTaggedString.swift:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWTaggedString.swift
3 | // Pods
4 | //
5 | // Created by Zachary West on 12/6/15.
6 | //
7 | //
8 |
9 | extension ZSWTaggedString {
10 | public convenience init(format: String, _ arguments: CVarArg...) {
11 | let string = String(format: format, arguments: arguments)
12 | self.init(string: string)
13 | }
14 | }
15 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Private/ZSWStringParser.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWStringParser.h
3 | // Pods
4 | //
5 | // Created by Zachary West on 2015-02-21.
6 | //
7 | //
8 |
9 | /*!
10 | * @private
11 | */
12 |
13 | #import
14 | #import
15 | #import
16 |
17 | #define ZSWSelector(selectorName) (NSStringFromSelector(@selector(selectorName)))
18 |
19 | NS_ASSUME_NONNULL_BEGIN
20 |
21 | @interface ZSWStringParser : NSObject
22 |
23 | + (nullable id)stringWithTaggedString:(ZSWTaggedString *)taggedString
24 | options:(ZSWTaggedStringOptions *)options
25 | returnClass:(Class)returnClass
26 | error:(NSError **)error;
27 |
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Private/ZSWStringParserTag.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWStringParserTag.h
3 | // Pods
4 | //
5 | // Created by Zachary West on 2015-02-21.
6 | //
7 | //
8 |
9 | /*!
10 | * @private
11 | */
12 |
13 | #import
14 |
15 | NS_ASSUME_NONNULL_BEGIN
16 |
17 | @interface ZSWStringParserTag : NSObject
18 |
19 | - (instancetype)initWithTagName:(NSString *)tagName
20 | startLocation:(NSUInteger)location;
21 | @property (nonatomic, readonly) NSString *tagName;
22 | @property (nonatomic, readonly) NSUInteger location;
23 |
24 | - (BOOL)isEndingTag;
25 | - (BOOL)isEndedByTag:(ZSWStringParserTag *)tag;
26 | - (void)updateWithTag:(ZSWStringParserTag *)tag;
27 |
28 | - (void)addRawTagAttributes:(NSString *)tagAttributes;
29 | - (NSDictionary *)tagAttributes;
30 |
31 | - (NSRange)tagRange;
32 |
33 | @end
34 |
35 | NS_ASSUME_NONNULL_END
36 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Private/ZSWTaggedStringAttribute.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWTaggedStringAttribute.h
3 | // Pods
4 | //
5 | // Created by Zachary West on 12/6/15.
6 | //
7 | //
8 |
9 | #import
10 |
11 | @class ZSWStringParserTag;
12 |
13 | @interface ZSWTaggedStringAttribute: NSObject
14 | @property (nonatomic, copy) NSDictionary *staticDictionary;
15 | @property (nonatomic, copy) ZSWDynamicAttributes dynamicAttributes;
16 |
17 | - (NSDictionary *)attributesForTag:(ZSWStringParserTag *)tag forString:(NSAttributedString *)string;
18 | @end
19 |
--------------------------------------------------------------------------------
/ZSWTaggedString/Private/ZSWTaggedString_Private.h:
--------------------------------------------------------------------------------
1 | //
2 | // ZSWTaggedString_Private.h
3 | // Pods
4 | //
5 | // Created by Zachary West on 12/12/15.
6 | //
7 | //
8 |
9 | NS_ASSUME_NONNULL_BEGIN
10 |
11 | /*!
12 | * @private
13 | *
14 | * This and all other 'private' methods work around a compiler bug where
15 | * we cannot force private headers into Swift files included in the framework.
16 | * Using any API in here is not supported, and you really should not touch it.
17 | */
18 |
19 | @interface ZSWTaggedStringOptions()
20 | + (ZSWTaggedStringOptions *)_private_defaultOptionsNoCopy;
21 |
22 | - (void)_private_setWrapper:(nullable ZSWTaggedStringAttribute *)attribute forTagName:(NSString *)tagName;
23 |
24 | @property (nullable, nonatomic) ZSWTaggedStringAttribute *_private_unknownTagWrapper;
25 | @property (nonatomic) NSDictionary *_private_tagToAttributesMap;
26 | - (void)_private_updateAttributedString:(NSMutableAttributedString *)string
27 | updatedWithTags:(NSArray *)tags;
28 | @end
29 |
30 | NS_ASSUME_NONNULL_END
31 |
--------------------------------------------------------------------------------