diff --git a/.travis.yml b/.travis.yml index efbe4d4..db72aec 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,12 +3,12 @@ # * https://github.com/supermarin/xcpretty#usage language: objective-c -osx_image: xcode8.1 +osx_image: xcode13.4 # cache: cocoapods # podfile: Example/Podfile xcode_workspace: Example/ExponentialBackOff.xcworkspace xcode_scheme: ExponentialBackOff-Example -xcode_sdk: iphonesimulator9.3 +xcode_sdk: iphonesimulator15.5 before_install: - rvm install ruby-2.2.2 - rvm use ruby-2.2.2 diff --git a/Example/ExponentialBackOff.xcodeproj/project.pbxproj b/Example/ExponentialBackOff.xcodeproj/project.pbxproj index dbda829..535d4ff 100644 --- a/Example/ExponentialBackOff.xcodeproj/project.pbxproj +++ b/Example/ExponentialBackOff.xcodeproj/project.pbxproj @@ -42,7 +42,7 @@ 607FACEA1AFB9204008FA782 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 607FACEB1AFB9204008FA782 /* Tests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Tests.swift; sourceTree = ""; }; 81E6B6851271202C21686668 /* Pods-ExponentialBackOff_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponentialBackOff_Example.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.debug.xcconfig"; sourceTree = ""; }; - A40A0B7595499A2CF401A235 /* ExponentialBackOff.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ExponentialBackOff.podspec; path = ../ExponentialBackOff.podspec; sourceTree = ""; }; + A40A0B7595499A2CF401A235 /* ExponentialBackOff.podspec */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = ExponentialBackOff.podspec; path = ../ExponentialBackOff.podspec; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; ACB0F4AA07816F3E99EC5873 /* Pods_ExponentialBackOff_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponentialBackOff_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CD79422C28EC10F9117C27B0 /* Pods_ExponentialBackOff_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponentialBackOff_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CE9006178D41E6172EC9470A /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; name = LICENSE; path = ../LICENSE; sourceTree = ""; }; @@ -171,7 +171,6 @@ 607FACCD1AFB9204008FA782 /* Frameworks */, 607FACCE1AFB9204008FA782 /* Resources */, F298F5289BF98DBD31F659ED /* [CP] Embed Pods Frameworks */, - D932223E6D396DA8F92B89FC /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -191,7 +190,6 @@ 607FACE21AFB9204008FA782 /* Frameworks */, 607FACE31AFB9204008FA782 /* Resources */, 01D5D90C9B808713AF3330DE /* [CP] Embed Pods Frameworks */, - 6D00C12B95A2DF1F9C22E91F /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -229,6 +227,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, Base, ); @@ -270,28 +269,20 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework", + "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", + "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Async.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh\"\n"; - showEnvVarsInLog = 0; - }; - 6D00C12B95A2DF1F9C22E91F /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-resources.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; 78834A05EAA4CE0BC576BA29 /* [CP] Check Pods Manifest.lock */ = { @@ -300,13 +291,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExponentialBackOff_Tests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; A6B769CBED01BD17156F43DC /* [CP] Check Pods Manifest.lock */ = { @@ -315,28 +309,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExponentialBackOff_Example-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; - showEnvVarsInLog = 0; - }; - D932223E6D396DA8F92B89FC /* [CP] Copy Pods Resources */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( - ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-resources.sh\"\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; F298F5289BF98DBD31F659ED /* [CP] Embed Pods Frameworks */ = { @@ -345,13 +327,18 @@ files = ( ); inputPaths = ( + "${PODS_ROOT}/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework", + "${BUILT_PRODUCTS_DIR}/ExponentialBackOff/ExponentialBackOff.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Async.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/ExponentialBackOff.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh\"\n"; + shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -498,12 +485,12 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ExponentialBackOff/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; @@ -514,12 +501,12 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = "$(inherited)"; ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon; INFOPLIST_FILE = ExponentialBackOff/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks"; MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; @@ -538,10 +525,11 @@ "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExponentialBackOff_Example.app/ExponentialBackOff_Example"; }; name = Debug; @@ -557,10 +545,11 @@ "$(inherited)", ); INFOPLIST_FILE = Tests/Info.plist; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; TEST_HOST = "$(BUILT_PRODUCTS_DIR)/ExponentialBackOff_Example.app/ExponentialBackOff_Example"; }; name = Release; diff --git a/Example/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/Example/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/Example/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/Example/ExponentialBackOff/AppDelegate.swift b/Example/ExponentialBackOff/AppDelegate.swift index 4e01f74..9ad21f6 100644 --- a/Example/ExponentialBackOff/AppDelegate.swift +++ b/Example/ExponentialBackOff/AppDelegate.swift @@ -14,7 +14,7 @@ class AppDelegate: UIResponder, UIApplicationDelegate { var window: UIWindow? - func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } diff --git a/Example/ExponentialBackOff/Base.lproj/LaunchScreen.xib b/Example/ExponentialBackOff/Base.lproj/LaunchScreen.xib index 3d11cba..19291bb 100644 --- a/Example/ExponentialBackOff/Base.lproj/LaunchScreen.xib +++ b/Example/ExponentialBackOff/Base.lproj/LaunchScreen.xib @@ -1,8 +1,10 @@ - - + + + - - + + + @@ -11,20 +13,20 @@ - - + @@ -38,4 +40,9 @@ + + + + + diff --git a/Example/ExponentialBackOff/Images.xcassets/AppIcon.appiconset/Contents.json b/Example/ExponentialBackOff/Images.xcassets/AppIcon.appiconset/Contents.json index b8236c6..8121323 100644 --- a/Example/ExponentialBackOff/Images.xcassets/AppIcon.appiconset/Contents.json +++ b/Example/ExponentialBackOff/Images.xcassets/AppIcon.appiconset/Contents.json @@ -2,47 +2,52 @@ "images" : [ { "idiom" : "iphone", - "size" : "20x20", - "scale" : "2x" + "scale" : "2x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "20x20", - "scale" : "3x" + "scale" : "3x", + "size" : "20x20" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "2x" + "scale" : "2x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "29x29", - "scale" : "3x" + "scale" : "3x", + "size" : "29x29" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "2x" + "scale" : "2x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "40x40", - "scale" : "3x" + "scale" : "3x", + "size" : "40x40" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "2x" + "scale" : "2x", + "size" : "60x60" }, { "idiom" : "iphone", - "size" : "60x60", - "scale" : "3x" + "scale" : "3x", + "size" : "60x60" + }, + { + "idiom" : "ios-marketing", + "scale" : "1x", + "size" : "1024x1024" } ], "info" : { - "version" : 1, - "author" : "xcode" + "author" : "xcode", + "version" : 1 } -} \ No newline at end of file +} diff --git a/Example/Podfile b/Example/Podfile index d74f05a..72a06cd 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -1,4 +1,6 @@ -source 'https://github.com/CocoaPods/Specs.git' +# Uncomment this line to define a global platform for your project +platform :ios, '12.0' +# Uncomment this line if you're using Swift use_frameworks! target 'ExponentialBackOff_Example' do @@ -6,8 +8,8 @@ target 'ExponentialBackOff_Example' do target 'ExponentialBackOff_Tests' do inherit! :search_paths - - pod 'Quick', '~> 1.0' - pod 'Nimble', '~> 5.1' + pod 'AsyncSwift', :git => 'https://github.com/duemunk/Async.git' + pod 'Quick', '~> 5.0' + pod 'Nimble', '~> 10.0' end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 4943733..bd39da2 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,25 +1,38 @@ PODS: - - AsyncSwift (2.0.1) - - ExponentialBackOff (1.1.0): - - AsyncSwift (~> 2.0) - - Nimble (5.1.1) - - Quick (1.0.0) + - AsyncSwift (2.1.0) + - ExponentialBackOff (1.2.0): + - AsyncSwift + - Nimble (10.0.0) + - Quick (5.0.1) DEPENDENCIES: + - AsyncSwift (from `https://github.com/duemunk/Async.git`) - ExponentialBackOff (from `../`) - - Nimble (~> 5.1) - - Quick (~> 1.0) + - Nimble (~> 10.0) + - Quick (~> 5.0) + +SPEC REPOS: + trunk: + - Nimble + - Quick EXTERNAL SOURCES: + AsyncSwift: + :git: https://github.com/duemunk/Async.git ExponentialBackOff: :path: "../" +CHECKOUT OPTIONS: + AsyncSwift: + :commit: 5d488316afdcecd4fb25f8ae04f21f8f4c54ca02 + :git: https://github.com/duemunk/Async.git + SPEC CHECKSUMS: - AsyncSwift: 632138e42ead868b53c745fcde9bf733ce1527ad - ExponentialBackOff: 6049b621d4f0f78b89704fd5da8d4ae0df857b2e - Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 - Quick: 8024e4a47e6cc03a9d5245ef0948264fc6d27cff + AsyncSwift: 5fcad486b2fab40dc37e9b0418903375a63a5d3c + ExponentialBackOff: 35accb5f558ebc1d7e4397877e1b421080581fe6 + Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84 + Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179 -PODFILE CHECKSUM: 7240857412060b062921d8023070e60902ea3b21 +PODFILE CHECKSUM: 69b3485889e3fe3e6a422638552e95b0e6972977 -COCOAPODS: 1.1.1 +COCOAPODS: 1.11.3 diff --git a/Example/Pods/AsyncSwift/README.md b/Example/Pods/AsyncSwift/README.md index cda074a..9148e5d 100644 --- a/Example/Pods/AsyncSwift/README.md +++ b/Example/Pods/AsyncSwift/README.md @@ -1,5 +1,5 @@ # Async -[![](http://img.shields.io/badge/OS%20X-10.10%2B-blue.svg)]() [![](http://img.shields.io/badge/iOS-8.0%2B-blue.svg)]() [![](http://img.shields.io/badge/tvOS-9.0%2B-blue.svg)]() [![](http://img.shields.io/badge/watchOS-2.0%2B-blue.svg)]() [![](http://img.shields.io/badge/Swift-3.0-blue.svg)]() [![](https://travis-ci.org/duemunk/Async.svg)](https://travis-ci.org/duemunk/Async) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg)](https://github.com/CocoaPods/CocoaPods) [![](http://img.shields.io/badge/operator_overload-nope-green.svg)](https://gist.github.com/duemunk/61e45932dbb1a2ca0954) +[![](http://img.shields.io/badge/OS%20X-10.10%2B-blue.svg)]() [![](http://img.shields.io/badge/iOS-8.0%2B-blue.svg)]() [![](http://img.shields.io/badge/tvOS-9.0%2B-blue.svg)]() [![](http://img.shields.io/badge/watchOS-2.0%2B-blue.svg)]() [![](http://img.shields.io/badge/Swift-5.1-blue.svg)]() [![](https://travis-ci.org/duemunk/Async.svg)](https://travis-ci.org/duemunk/Async) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg)](https://github.com/CocoaPods/CocoaPods) [![](http://img.shields.io/badge/operator_overload-nope-green.svg)](https://gist.github.com/duemunk/61e45932dbb1a2ca0954) @@ -8,9 +8,9 @@ Now more than syntactic sugar for asynchronous dispatches in Grand Central Dispa **Async** sugar looks like this: ```swift Async.userInitiated { - return 10 + 10 }.background { - return "Score: \($0)" + "Score: \($0)" }.main { label.text = $0 } @@ -43,6 +43,15 @@ print("Both asynchronous blocks are complete") ``` ### Install +#### Swift Package Manager +##### Add To Your Project In Xcode 11: +File > Swift Packages > Add Package Dependency +##### Add As A Dependency In Package.swift: +```swift +dependencies: [ + .package(url: "https://github.com/duemunk/Async", from: "2.1.0"), +], +``` #### CocoaPods ```ruby use_frameworks! diff --git a/Example/Pods/AsyncSwift/Sources/Async.swift b/Example/Pods/AsyncSwift/Sources/Async/Async.swift similarity index 88% rename from Example/Pods/AsyncSwift/Sources/Async.swift rename to Example/Pods/AsyncSwift/Sources/Async/Async.swift index 65c0a5d..fdf4f16 100644 --- a/Example/Pods/AsyncSwift/Sources/Async.swift +++ b/Example/Pods/AsyncSwift/Sources/Async/Async.swift @@ -133,9 +133,8 @@ public struct AsyncBlock { private let input: Reference? private let output_: Reference - public var output: Out? { - return output_.value - } + + public var output: Out? { output_.value } /** Private init that takes a `@convention(block) () -> Swift.Void` @@ -161,8 +160,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func main(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return AsyncBlock.async(after: seconds, block: block, queue: .main) + public static func main(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + AsyncBlock.async(after: seconds, block: block, queue: .main) } /** @@ -177,8 +176,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func userInteractive(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return AsyncBlock.async(after: seconds, block: block, queue: .userInteractive) + public static func userInteractive(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + AsyncBlock.async(after: seconds, block: block, queue: .userInteractive) } /** @@ -193,8 +192,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func userInitiated(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .userInitiated) + public static func userInitiated(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .userInitiated) } /** @@ -209,8 +208,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func utility(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .utility) + public static func utility(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .utility) } /** @@ -225,8 +224,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func background(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .background) + public static func background(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .background) } /** @@ -241,8 +240,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func custom(queue: DispatchQueue, after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .custom(queue: queue)) + public static func custom(queue: DispatchQueue, after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .custom(queue: queue)) } @@ -258,7 +257,7 @@ public struct AsyncBlock { - returns: An `Async` struct which encapsulates the `@convention(block) () -> Swift.Void` */ - private static func async(after seconds: Double? = nil, block: @escaping (Void) -> O, queue: GCD) -> AsyncBlock { + private static func async(after seconds: Double? = nil, block: @escaping () -> O, queue: GCD) -> AsyncBlock { let reference = Reference() let block = DispatchWorkItem(block: { reference.value = block() @@ -291,7 +290,7 @@ public struct AsyncBlock { */ @discardableResult public func main(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .main) + chain(after: seconds, block: chainingBlock, queue: .main) } /** @@ -307,7 +306,7 @@ public struct AsyncBlock { */ @discardableResult public func userInteractive(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .userInteractive) + chain(after: seconds, block: chainingBlock, queue: .userInteractive) } /** @@ -323,7 +322,7 @@ public struct AsyncBlock { */ @discardableResult public func userInitiated(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .userInitiated) + chain(after: seconds, block: chainingBlock, queue: .userInitiated) } /** @@ -339,7 +338,7 @@ public struct AsyncBlock { */ @discardableResult public func utility(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .utility) + chain(after: seconds, block: chainingBlock, queue: .utility) } /** @@ -355,7 +354,7 @@ public struct AsyncBlock { */ @discardableResult public func background(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .background) + chain(after: seconds, block: chainingBlock, queue: .background) } /** @@ -371,7 +370,7 @@ public struct AsyncBlock { */ @discardableResult public func custom(queue: DispatchQueue, after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .custom(queue: queue)) + chain(after: seconds, block: chainingBlock, queue: .custom(queue: queue)) } // MARK: - Instance methods @@ -593,15 +592,12 @@ public struct AsyncGroup { /** Private property to internally on to a `dispatch_group_t` */ - private var group: DispatchGroup + private let group = DispatchGroup() /** Private init that takes a `dispatch_group_t` */ - public init() { - group = DispatchGroup() - } - + public init() {} /** Convenience for `dispatch_group_async()` @@ -717,6 +713,19 @@ public struct AsyncGroup { } } +/** +Each QoSClassDescription's case contains a description for qos_class_t or DispatchQoS.QoSClass cases + */ +private enum QoSClassDescription: String { + case main = "Main" + case userInteractive = "User Interactive" + case userInitiated = "User Initiated" + case `default` = "Default" + case utility = "Utility" + case background = "Background" + case unspecified = "Unspecified" + case unknown = "Unknown" +} // MARK: - Extension for `qos_class_t` @@ -729,18 +738,18 @@ public extension qos_class_t { Description of the `qos_class_t`. E.g. "Main", "User Interactive", etc. for the given Quality of Service class. */ var description: String { - get { - switch self { - case qos_class_main(): return "Main" - case DispatchQoS.QoSClass.userInteractive.rawValue: return "User Interactive" - case DispatchQoS.QoSClass.userInitiated.rawValue: return "User Initiated" - case DispatchQoS.QoSClass.default.rawValue: return "Default" - case DispatchQoS.QoSClass.utility.rawValue: return "Utility" - case DispatchQoS.QoSClass.background.rawValue: return "Background" - case DispatchQoS.QoSClass.unspecified.rawValue: return "Unspecified" - default: return "Unknown" - } + let result: QoSClassDescription + switch self { + case qos_class_main(): result = .main + case DispatchQoS.QoSClass.userInteractive.rawValue: result = .userInteractive + case DispatchQoS.QoSClass.userInitiated.rawValue: result = .userInitiated + case DispatchQoS.QoSClass.default.rawValue: result = .default + case DispatchQoS.QoSClass.utility.rawValue: result = .utility + case DispatchQoS.QoSClass.background.rawValue: result = .background + case DispatchQoS.QoSClass.unspecified.rawValue: result = .unspecified + default: result = .unknown } + return result.rawValue } } @@ -753,16 +762,17 @@ public extension qos_class_t { public extension DispatchQoS.QoSClass { var description: String { - get { - switch self { - case DispatchQoS.QoSClass(rawValue: qos_class_main())!: return "Main" - case .userInteractive: return "User Interactive" - case .userInitiated: return "User Initiated" - case .default: return "Default" - case .utility: return "Utility" - case .background: return "Background" - case .unspecified: return "Unspecified" - } + let result: QoSClassDescription + switch self { + case DispatchQoS.QoSClass(rawValue: qos_class_main())!: result = .main + case .userInteractive: result = .userInteractive + case .userInitiated: result = .userInitiated + case .default: result = .default + case .utility: result = .utility + case .background: result = .background + case .unspecified: result = .unspecified + @unknown default: result = .unknown } + return result.rawValue } } diff --git a/Example/Pods/Local Podspecs/AsyncSwift.podspec.json b/Example/Pods/Local Podspecs/AsyncSwift.podspec.json new file mode 100644 index 0000000..ddeba76 --- /dev/null +++ b/Example/Pods/Local Podspecs/AsyncSwift.podspec.json @@ -0,0 +1,32 @@ +{ + "name": "AsyncSwift", + "version": "2.1.0", + "summary": "Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch", + "homepage": "https://github.com/duemunk/Async", + "license": { + "type": "MIT" + }, + "authors": { + "Tobias Due Munk": "tobias@developmunk.dk" + }, + "platforms": { + "osx": "10.10", + "ios": "8.0", + "tvos": "9.0", + "watchos": "3.0" + }, + "source": { + "git": "https://github.com/duemunk/Async.git", + "tag": "2.0.5" + }, + "source_files": "Sources/**/*.swift", + "requires_arc": true, + "module_name": "Async", + "swift_versions": [ + "4.0", + "4.2", + "5.0", + "5.1" + ], + "swift_version": "5.1" +} diff --git a/Example/Pods/Local Podspecs/ExponentialBackOff.podspec.json b/Example/Pods/Local Podspecs/ExponentialBackOff.podspec.json index fc5d554..cc255da 100644 --- a/Example/Pods/Local Podspecs/ExponentialBackOff.podspec.json +++ b/Example/Pods/Local Podspecs/ExponentialBackOff.podspec.json @@ -1,6 +1,6 @@ { "name": "ExponentialBackOff", - "version": "1.1.0", + "version": "1.2.0", "summary": "A framework which implements the ExponentialBackOff algorithm which is usefull for Networking.", "description": "This framework implements the ExponentialBackOff algorithm which you can use for Networking or other tasks which should be retried after some time without worrying about how long you have to wait for the next attempt.\nGoogle mentioned this algorithm to be used to request a GCM token. In Java they implemented this in their java api repository but for iOS and OSX developers this is the right framework.\nI tried to put more features into this pod than simple a lame algorithm without much more.\nFor example you just have to pass your code as a closure or by implementing a Protocol and passing the class to one of the methods. You don't have to worry about waiting the right amount of time or recalling your code, the Handler makes this automatically.\nYou also have the option to implement your own algorithm without worrying about how to handle the automatic reattempts.", "homepage": "https://github.com/Ybrin/ExponentialBackOff", @@ -10,18 +10,20 @@ }, "source": { "git": "https://github.com/Ybrin/ExponentialBackOff.git", - "tag": "1.1.0" + "tag": "1.2.0" }, "platforms": { - "osx": "10.10", - "ios": "8.0", - "tvos": "9.0" + "osx": "10.15", + "ios": "12.0", + "tvos": "12.0" }, "requires_arc": true, "source_files": "ExponentialBackOff/ExponentialBackOff/**/*", "dependencies": { "AsyncSwift": [ - "~> 2.0" + ] - } + }, + "swift_versions": "5.0", + "swift_version": "5.0" } diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 4943733..bd39da2 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,25 +1,38 @@ PODS: - - AsyncSwift (2.0.1) - - ExponentialBackOff (1.1.0): - - AsyncSwift (~> 2.0) - - Nimble (5.1.1) - - Quick (1.0.0) + - AsyncSwift (2.1.0) + - ExponentialBackOff (1.2.0): + - AsyncSwift + - Nimble (10.0.0) + - Quick (5.0.1) DEPENDENCIES: + - AsyncSwift (from `https://github.com/duemunk/Async.git`) - ExponentialBackOff (from `../`) - - Nimble (~> 5.1) - - Quick (~> 1.0) + - Nimble (~> 10.0) + - Quick (~> 5.0) + +SPEC REPOS: + trunk: + - Nimble + - Quick EXTERNAL SOURCES: + AsyncSwift: + :git: https://github.com/duemunk/Async.git ExponentialBackOff: :path: "../" +CHECKOUT OPTIONS: + AsyncSwift: + :commit: 5d488316afdcecd4fb25f8ae04f21f8f4c54ca02 + :git: https://github.com/duemunk/Async.git + SPEC CHECKSUMS: - AsyncSwift: 632138e42ead868b53c745fcde9bf733ce1527ad - ExponentialBackOff: 6049b621d4f0f78b89704fd5da8d4ae0df857b2e - Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 - Quick: 8024e4a47e6cc03a9d5245ef0948264fc6d27cff + AsyncSwift: 5fcad486b2fab40dc37e9b0418903375a63a5d3c + ExponentialBackOff: 35accb5f558ebc1d7e4397877e1b421080581fe6 + Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84 + Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179 -PODFILE CHECKSUM: 7240857412060b062921d8023070e60902ea3b21 +PODFILE CHECKSUM: 69b3485889e3fe3e6a422638552e95b0e6972977 -COCOAPODS: 1.1.1 +COCOAPODS: 1.11.3 diff --git a/Example/Pods/Nimble/LICENSE.md b/Example/Pods/Nimble/LICENSE similarity index 99% rename from Example/Pods/Nimble/LICENSE.md rename to Example/Pods/Nimble/LICENSE index 0f3eb71..82b84bf 100644 --- a/Example/Pods/Nimble/LICENSE.md +++ b/Example/Pods/Nimble/LICENSE @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Example/Pods/Nimble/README.md b/Example/Pods/Nimble/README.md index 684255e..e92cbb2 100644 --- a/Example/Pods/Nimble/README.md +++ b/Example/Pods/Nimble/README.md @@ -1,5 +1,10 @@ # Nimble +[![Build Status](https://github.com/Quick/Nimble/actions/workflows/ci-xcode.yml/badge.svg)](https://github.com/Quick/Nimble/actions/workflows/ci-xcode.yml) +[![CocoaPods](https://img.shields.io/cocoapods/v/Nimble.svg)](https://cocoapods.org/pods/Nimble) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Nimble.svg)](https://cocoapods.org/pods/Nimble) + Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by [Cedar](https://github.com/pivotal/cedar). @@ -23,7 +28,7 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Some Background: Expressing Outcomes Using Assertions in XCTest](#some-background-expressing-outcomes-using-assertions-in-xctest) - [Nimble: Expectations Using `expect(...).to`](#nimble-expectations-using-expectto) - [Custom Failure Messages](#custom-failure-messages) - - [Type Checking](#type-checking) + - [Type Safety](#type-safety) - [Operator Overloads](#operator-overloads) - [Lazily Computed Values](#lazily-computed-values) - [C Primitives](#c-primitives) @@ -31,6 +36,7 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Objective-C Support](#objective-c-support) - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) - [Built-in Matcher Functions](#built-in-matcher-functions) + - [Type Checking](#type-checking) - [Equivalence](#equivalence) - [Identity](#identity) - [Comparisons](#comparisons) @@ -41,16 +47,22 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Exceptions](#exceptions) - [Collection Membership](#collection-membership) - [Strings](#strings) - - [Checking if all elements of a collection pass a condition](#checking-if-all-elements-of-a-collection-pass-a-condition) - - [Verify collection count](#verify-collection-count) - - [Verify a notification was posted](#verifying-a-notification-was-posted) + - [Collection Elements](#collection-elements) + - [Collection Count](#collection-count) + - [Notifications](#notifications) + - [Result](#result) - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) + - [Custom Validation](#custom-validation) - [Writing Your Own Matchers](#writing-your-own-matchers) + - [PredicateResult](#predicateresult) - [Lazy Evaluation](#lazy-evaluation) - [Type Checking via Swift Generics](#type-checking-via-swift-generics) - [Customizing Failure Messages](#customizing-failure-messages) + - [Basic Customization](#basic-customization) + - [Full Customization](#full-customization) - [Supporting Objective-C](#supporting-objective-c) - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) + - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) - [Installing Nimble](#installing-nimble) - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) @@ -164,7 +176,7 @@ expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is l // expected to equal <3.0000>, got <2.0000> ``` -## Type Checking +## Type Safety Nimble makes sure you don't compare two types that don't match: @@ -211,9 +223,9 @@ exception once evaluated: // that Nimble will catch. // (see https://github.com/Quick/Nimble/issues/220#issuecomment-172667064) let exception = NSException( - name: NSInternalInconsistencyException, - reason: "Not enough fish in the sea.", - userInfo: ["something": "is fishy"]) + name: NSInternalInconsistencyException, + reason: "Not enough fish in the sea.", + userInfo: ["something": "is fishy"]) expect { exception.raise() }.to(raiseException()) // Also, you can customize raiseException to be more specific @@ -281,9 +293,9 @@ expect(1 as CInt).to(equal(1)) make expectations on primitive C values, wrap then in an object literal: - ```objc - expect(@(1 + 1)).to(equal(@2)); - ``` +```objc +expect(@(1 + 1)).to(equal(@2)); +``` ## Asynchronous Expectations @@ -292,10 +304,9 @@ asynchronously. Just use `toEventually` or `toEventuallyNot`: ```swift // Swift - -dispatch_async(dispatch_get_main_queue()) { - ocean.add("dolphins") - ocean.add("whales") +DispatchQueue.main.async { + ocean.add("dolphins") + ocean.add("whales") } expect(ocean).toEventually(contain("dolphins", "whales")) ``` @@ -303,9 +314,10 @@ expect(ocean).toEventually(contain("dolphins", "whales")) ```objc // Objective-C + dispatch_async(dispatch_get_main_queue(), ^{ - [ocean add:@"dolphins"]; - [ocean add:@"whales"]; + [ocean add:@"dolphins"]; + [ocean add:@"whales"]; }); expect(ocean).toEventually(contain(@"dolphins", @"whales")); ``` @@ -321,6 +333,22 @@ contains dolphins and whales, the expectation passes. If `ocean` still doesn't contain them, even after being continuously re-evaluated for one whole second, the expectation fails. +You can also test that a value always or never matches throughout the length of the timeout. Use `toNever` and `toAlways` for this: + +```swift +// Swift +ocean.add("dolphins") +expect(ocean).toAlways(contain("dolphins")) +expect(ocean).toNever(contain("hares")) +``` + +```objc +// Objective-C +[ocean add:@"dolphins"] +expect(ocean).toAlways(contain(@"dolphins")) +expect(ocean).toNever(contain(@"hares")) +``` + Sometimes it takes more than a second for a value to update. In those cases, use the `timeout` parameter: @@ -328,10 +356,10 @@ cases, use the `timeout` parameter: // Swift // Waits three seconds for ocean to contain "starfish": -expect(ocean).toEventually(contain("starfish"), timeout: 3) +expect(ocean).toEventually(contain("starfish"), timeout: .seconds(3)) // Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. -expect(someValue).toEventually(equal(100), timeout: 5.5, pollInterval: 0.2) +expect(someValue).toEventually(equal(100), timeout: .milliseconds(5500), pollInterval: .milliseconds(200)) ``` ```objc @@ -347,9 +375,10 @@ You can also provide a callback by using the `waitUntil` function: // Swift waitUntil { done in - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(0.5) - done() + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } } ``` @@ -357,9 +386,10 @@ waitUntil { done in // Objective-C waitUntil(^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:0.5]; - done(); + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; }); ``` @@ -368,10 +398,11 @@ waitUntil(^(void (^done)(void)){ ```swift // Swift -waitUntil(timeout: 10) { done in - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(1) - done() +waitUntil(timeout: .seconds(10)) { done in + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } } ``` @@ -379,13 +410,14 @@ waitUntil(timeout: 10) { done in // Objective-C waitUntilTimeout(10, ^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:1]; - done(); + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; }); ``` -Note: waitUntil triggers its timeout code on the main thread. Blocking the main +Note: `waitUntil` triggers its timeout code on the main thread. Blocking the main thread will cause Nimble to stop the run loop to continue. This can cause test pollution for whatever incomplete code that was running on the main thread. Blocking the main thread can be caused by blocking IO, calls to sleep(), @@ -398,10 +430,10 @@ the default timeout and poll interval values. This can be done as follows: // Swift // Increase the global timeout to 5 seconds: -Nimble.AsyncDefaults.Timeout = 5 +Nimble.AsyncDefaults.timeout = .seconds(5) // Slow the polling interval to 0.1 seconds: -Nimble.AsyncDefaults.PollInterval = 0.1 +Nimble.AsyncDefaults.pollInterval = .milliseconds(100) ``` ## Objective-C Support @@ -489,16 +521,78 @@ NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee Nimble includes a wide variety of matcher functions. +## Type Checking + +Nimble supports checking the type membership of any kind of object, whether +Objective-C conformant or not: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// The following tests pass +expect(1).to(beAKindOf(Int.self)) +expect("turtle").to(beAKindOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).to(beAKindOf(SomeProtocol.self)) +expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).to(beAKindOf(SomeProtocol.self)) +expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self)) +``` + +```objc +// Objective-C + +// The following tests pass +NSMutableArray *array = [NSMutableArray array]; +expect(array).to(beAKindOf([NSArray class])); +expect(@1).toNot(beAKindOf([NSNull class])); +``` + +Objects can be tested for their exact types using the `beAnInstanceOf` matcher: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only +// passes if the object is the EXACT type requested. The following +// tests pass -- note its behavior when working in an inheritance hierarchy. +expect(1).to(beAnInstanceOf(Int.self)) +expect("turtle").to(beAnInstanceOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self)) +``` + ## Equivalence ```swift // Swift -// Passes if actual is equivalent to expected: +// Passes if 'actual' is equivalent to 'expected': expect(actual).to(equal(expected)) expect(actual) == expected -// Passes if actual is not equivalent to expected: +// Passes if 'actual' is not equivalent to 'expected': expect(actual).toNot(equal(expected)) expect(actual) != expected ``` @@ -506,10 +600,10 @@ expect(actual) != expected ```objc // Objective-C -// Passes if actual is equivalent to expected: +// Passes if 'actual' is equivalent to 'expected': expect(actual).to(equal(expected)) -// Passes if actual is not equivalent to expected: +// Passes if 'actual' is not equivalent to 'expected': expect(actual).toNot(equal(expected)) ``` @@ -521,25 +615,33 @@ Values must be `Equatable`, `Comparable`, or subclasses of `NSObject`. ```swift // Swift -// Passes if actual has the same pointer address as expected: +// Passes if 'actual' has the same pointer address as 'expected': expect(actual).to(beIdenticalTo(expected)) expect(actual) === expected -// Passes if actual does not have the same pointer address as expected: +// Passes if 'actual' does not have the same pointer address as 'expected': expect(actual).toNot(beIdenticalTo(expected)) expect(actual) !== expected ``` -Its important to remember that `beIdenticalTo` only makes sense when comparing types with reference semantics, which have a notion of identity. In Swift, that means a `class`. This matcher will not work with types with value semantics such as `struct` or `enum`. If you need to compare two value types, you can either compare individual properties or if it makes sense to do so, make your type implement `Equatable` and use Nimble's equivalence matchers instead. +It is important to remember that `beIdenticalTo` only makes sense when comparing +types with reference semantics, which have a notion of identity. In Swift, +that means types that are defined as a `class`. + +This matcher will not work when comparing types with value semantics such as +those defined as a `struct` or `enum`. If you need to compare two value types, +consider what it means for instances of your type to be identical. This may mean +comparing individual properties or, if it makes sense to do so, conforming your type +to `Equatable` and using Nimble's equivalence matchers instead. ```objc // Objective-C -// Passes if actual has the same pointer address as expected: +// Passes if 'actual' has the same pointer address as 'expected': expect(actual).to(beIdenticalTo(expected)); -// Passes if actual does not have the same pointer address as expected: +// Passes if 'actual' does not have the same pointer address as 'expected': expect(actual).toNot(beIdenticalTo(expected)); ``` @@ -613,7 +715,7 @@ expect(actual) ≈ expected expect(actual) ≈ (expected, delta) ``` -(Type Option-x to get ≈ on a U.S. keyboard) +(Type option+x to get `≈` on a U.S. keyboard) The former version uses the default delta of 0.0001. Here is yet another way to do this: @@ -624,7 +726,7 @@ expect(actual) ≈ expected ± delta expect(actual) == expected ± delta ``` -(Type Option-Shift-= to get ± on a U.S. keyboard) +(Type option+shift+= to get `±` on a U.S. keyboard) If you are comparing arrays of floating point numbers, you'll find the following useful: @@ -636,28 +738,27 @@ expect([0.0, 2.0]).to(beCloseTo([0.1, 2.1], within: 0.1)) ``` -> Values given to the `beCloseTo` matcher must be coercable into a - `Double`. +> Values given to the `beCloseTo` matcher must conform to `FloatingPoint`. ## Types/Classes ```swift // Swift -// Passes if instance is an instance of aClass: +// Passes if 'instance' is an instance of 'aClass': expect(instance).to(beAnInstanceOf(aClass)) -// Passes if instance is an instance of aClass or any of its subclasses: +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: expect(instance).to(beAKindOf(aClass)) ``` ```objc // Objective-C -// Passes if instance is an instance of aClass: +// Passes if 'instance' is an instance of 'aClass': expect(instance).to(beAnInstanceOf(aClass)); -// Passes if instance is an instance of aClass or any of its subclasses: +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: expect(instance).to(beAKindOf(aClass)); ``` @@ -684,38 +785,38 @@ expect(dolphin).to(beAKindOf([Mammal class])); ## Truthiness ```swift -// Passes if actual is not nil, true, or an object with a boolean value of true: +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()) -// Passes if actual is only true (not nil or an object conforming to Boolean true): +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()) -// Passes if actual is nil, false, or an object with a boolean value of false: +// Passes if 'actual' is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()) -// Passes if actual is only false (not nil or an object conforming to Boolean false): +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()) -// Passes if actual is nil: +// Passes if 'actual' is nil: expect(actual).to(beNil()) ``` ```objc // Objective-C -// Passes if actual is not nil, true, or an object with a boolean value of true: +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()); -// Passes if actual is only true (not nil or an object conforming to Boolean true): +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()); -// Passes if actual is nil, false, or an object with a boolean value of false: +// Passes if 'actual' is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()); -// Passes if actual is only false (not nil or an object conforming to Boolean false): +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()); -// Passes if actual is nil: +// Passes if 'actual' is nil: expect(actual).to(beNil()); ``` @@ -726,14 +827,16 @@ If you're using Swift, you can use the `throwAssertion` matcher to check if an a ```swift // Swift -// Passes if somethingThatThrows() throws an assertion, such as calling fatalError() or precondition fails: +// Passes if 'somethingThatThrows()' throws an assertion, +// such as by calling 'fatalError()' or if a precondition fails: +expect { try somethingThatThrows() }.to(throwAssertion()) expect { () -> Void in fatalError() }.to(throwAssertion()) expect { precondition(false) }.to(throwAssertion()) -// Passes if throwing a NSError is not equal to throwing an assertion: +// Passes if throwing an NSError is not equal to throwing an assertion: expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) -// Passes if the post assertion code is not run: +// Passes if the code after the precondition check is not run: var reachedPoint1 = false var reachedPoint2 = false expect { @@ -749,45 +852,53 @@ expect(reachedPoint2) == false Notes: * This feature is only available in Swift. -* It is only supported for `x86_64` binaries, meaning _you cannot run this matcher on iOS devices, only simulators_. * The tvOS simulator is supported, but using a different mechanism, requiring you to turn off the `Debug executable` scheme setting for your tvOS scheme's Test configuration. ## Swift Error Handling -If you're using Swift 2.0+, you can use the `throwError` matcher to check if an error is thrown. +You can use the `throwError` matcher to check if an error is thrown. ```swift // Swift -// Passes if somethingThatThrows() throws an ErrorProtocol: -expect{ try somethingThatThrows() }.to(throwError()) +// Passes if 'somethingThatThrows()' throws an 'Error': +expect { try somethingThatThrows() }.to(throwError()) -// Passes if somethingThatThrows() throws an error with a given domain: -expect{ try somethingThatThrows() }.to(throwError { (error: ErrorProtocol) in +// Passes if 'somethingThatThrows()' throws an error within a particular domain: +expect { try somethingThatThrows() }.to(throwError { (error: Error) in expect(error._domain).to(equal(NSCocoaErrorDomain)) }) -// Passes if somethingThatThrows() throws an error with a given case: -expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) +// Passes if 'somethingThatThrows()' throws a particular error enum case: +expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) -// Passes if somethingThatThrows() throws an error with a given type: -expect{ try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) +// Passes if 'somethingThatThrows()' throws an error of a particular type: +expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) ``` -If you are working directly with `ErrorProtocol` values, as is sometimes the case when using `Result` or `Promise` types, you can use the `matchError` matcher to check if the error is the same error is is supposed to be, without requiring explicit casting. +When working directly with `Error` values, using the `matchError` matcher +allows you to perform certain checks on the error itself without having to +explicitly cast the error. + +The `matchError` matcher allows you to check whether or not the error: + +- is the same _type_ of error you are expecting. +- represents a particular error value that you are expecting. + +This can be useful when using `Result` or `Promise` types, for example. ```swift // Swift -let actual: ErrorProtocol = … +let actual: Error = ... -// Passes if actual contains any error value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum)) +// Passes if 'actual' represents any error value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.self)) -// Passes if actual contains the Timeout value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.Timeout)) +// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.timeout)) -// Passes if actual contains an NSError equal to the given one: +// Passes if 'actual' contains an NSError equal to the one provided: expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) ``` @@ -798,17 +909,17 @@ Note: This feature is only available in Swift. ```swift // Swift -// Passes if actual, when evaluated, raises an exception: +// Passes if 'actual', when evaluated, raises an exception: expect(actual).to(raiseException()) -// Passes if actual raises an exception with the given name: +// Passes if 'actual' raises an exception with the given name: expect(actual).to(raiseException(named: name)) -// Passes if actual raises an exception with the given name and reason: +// Passes if 'actual' raises an exception with the given name and reason: expect(actual).to(raiseException(named: name, reason: reason)) -// Passes if actual raises an exception and it passes expectations in the block -// (in this case, if name begins with 'a r') +// Passes if 'actual' raises an exception which passes expectations defined in the given closure: +// (in this case, if the exception's name begins with "a r") expect { exception.raise() }.to(raiseException { (exception: NSException) in expect(exception.name).to(beginWith("a r")) }) @@ -817,44 +928,44 @@ expect { exception.raise() }.to(raiseException { (exception: NSException) in ```objc // Objective-C -// Passes if actual, when evaluated, raises an exception: +// Passes if 'actual', when evaluated, raises an exception: expect(actual).to(raiseException()) -// Passes if actual raises an exception with the given name +// Passes if 'actual' raises an exception with the given name expect(actual).to(raiseException().named(name)) -// Passes if actual raises an exception with the given name and reason: +// Passes if 'actual' raises an exception with the given name and reason: expect(actual).to(raiseException().named(name).reason(reason)) -// Passes if actual raises an exception and it passes expectations in the block -// (in this case, if name begins with 'a r') +// Passes if 'actual' raises an exception and it passes expectations defined in the given block: +// (in this case, if name begins with "a r") expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) { expect(exception.name).to(beginWith(@"a r")); })); ``` -Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). Only Objective-C code can raise -exceptions that Nimble will catch. +Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). +Only Objective-C code can raise exceptions that Nimble will catch. ## Collection Membership ```swift // Swift -// Passes if all of the expected values are members of actual: +// Passes if all of the expected values are members of 'actual': expect(actual).to(contain(expected...)) -// Passes if actual is an empty collection (it contains no elements): +// Passes if 'actual' is empty (i.e. it contains no elements): expect(actual).to(beEmpty()) ``` ```objc // Objective-C -// Passes if expected is a member of actual: +// Passes if expected is a member of 'actual': expect(actual).to(contain(expected)); -// Passes if actual is an empty collection (it contains no elements): +// Passes if 'actual' is empty (i.e. it contains no elements): expect(actual).to(beEmpty()); ``` @@ -887,20 +998,20 @@ an ordered collection, use `beginWith` and `endWith`: ```swift // Swift -// Passes if the elements in expected appear at the beginning of actual: +// Passes if the elements in expected appear at the beginning of 'actual': expect(actual).to(beginWith(expected...)) -// Passes if the the elements in expected come at the end of actual: +// Passes if the the elements in expected come at the end of 'actual': expect(actual).to(endWith(expected...)) ``` ```objc // Objective-C -// Passes if the elements in expected appear at the beginning of actual: +// Passes if the elements in expected appear at the beginning of 'actual': expect(actual).to(beginWith(expected)); -// Passes if the the elements in expected come at the end of actual: +// Passes if the the elements in expected come at the end of 'actual': expect(actual).to(endWith(expected)); ``` @@ -911,115 +1022,233 @@ expect(actual).to(endWith(expected)); Like `contain`, in Objective-C `beginWith` and `endWith` only support a single argument [for now](https://github.com/Quick/Nimble/issues/27). +For code that returns collections of complex objects without a strict +ordering, there is the `containElementSatisfying` matcher: + +```swift +// Swift + +struct Turtle { + let color: String +} + +let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder() + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "green" +})) +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "blue" +}, "that is a turtle with color 'blue'")) + +// The second matcher will incorporate the provided string in the error message +// should it fail +``` + +```objc +// Objective-C + +@interface Turtle : NSObject +@property (nonatomic, readonly, nonnull) NSString *color; +@end + +@implementation Turtle +@end + +NSArray * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder(); + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"green"]; +})); +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"blue"]; +})); +``` + +For asserting on if the given `Comparable` value is inside of a `Range`, use the `beWithin` matcher. + +```swift +// Swift + +// Passes if 5 is within the range 1 through 10, inclusive +expect(5).to(beWithin(1...10)) + +// Passes if 5 is not within the range 2 through 4. +expect(5).toNot(beWithin(2..<5)) +``` + ## Strings ```swift // Swift -// Passes if actual contains substring expected: -expect(actual).to(contain(expected)) +// Passes if 'actual' contains 'substring': +expect(actual).to(contain(substring)) -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)) +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)) -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)) +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)) -// Passes if actual is an empty string, "": +// Passes if 'actual' represents the empty string, "": expect(actual).to(beEmpty()) -// Passes if actual matches the regular expression defined in expected: +// Passes if 'actual' matches the regular expression defined in 'expected': expect(actual).to(match(expected)) ``` ```objc // Objective-C -// Passes if actual contains substring expected: +// Passes if 'actual' contains 'substring': expect(actual).to(contain(expected)); -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)); +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)); -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)); +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)); -// Passes if actual is an empty string, "": +// Passes if 'actual' represents the empty string, "": expect(actual).to(beEmpty()); -// Passes if actual matches the regular expression defined in expected: +// Passes if 'actual' matches the regular expression defined in 'expected': expect(actual).to(match(expected)) ``` -## Checking if all elements of a collection pass a condition +## Collection Elements + +Nimble provides a means to check that all elements of a collection pass a given expectation. + +### Swift + +In Swift, the collection must be an instance of a type conforming to +`Sequence`. ```swift // Swift -// with a custom function: -expect([1,2,3,4]).to(allPass({$0 < 5})) +// Providing a custom function: +expect([1, 2, 3, 4]).to(allPass { $0 < 5 }) -// with another matcher: -expect([1,2,3,4]).to(allPass(beLessThan(5))) +// Composing the expectation with another matcher: +expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) ``` +### Objective-C + +In Objective-C, the collection must be an instance of a type which implements +the `NSFastEnumeration` protocol, and whose elements are instances of a type +which subclasses `NSObject`. + +Additionally, unlike in Swift, there is no override to specify a custom +matcher function. + ```objc // Objective-C -expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); +expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5))); ``` -For Swift the actual value has to be a Sequence, e.g. an array, a set or a custom seqence type. - -For Objective-C the actual value has to be a NSFastEnumeration, e.g. NSArray and NSSet, of NSObjects and only the variant which -uses another matcher is available here. - -## Verify collection count +## Collection Count ```swift // Swift -// passes if actual collection's count is equal to expected +// Passes if 'actual' contains the 'expected' number of elements: expect(actual).to(haveCount(expected)) -// passes if actual collection's count is not equal to expected +// Passes if 'actual' does _not_ contain the 'expected' number of elements: expect(actual).notTo(haveCount(expected)) ``` ```objc // Objective-C -// passes if actual collection's count is equal to expected +// Passes if 'actual' contains the 'expected' number of elements: expect(actual).to(haveCount(expected)) -// passes if actual collection's count is not equal to expected +// Passes if 'actual' does _not_ contain the 'expected' number of elements: expect(actual).notTo(haveCount(expected)) ``` -For Swift the actual value must be a `Collection` such as array, dictionary or set. +For Swift, the actual value must be an instance of a type conforming to `Collection`. +For example, instances of `Array`, `Dictionary`, or `Set`. -For Objective-C the actual value has to be one of the following classes `NSArray`, `NSDictionary`, `NSSet`, `NSHashTable` or one of their subclasses. +For Objective-C, the actual value must be one of the following classes, or their subclasses: -## Foundation + - `NSArray`, + - `NSDictionary`, + - `NSSet`, or + - `NSHashTable`. -### Verifying a Notification was posted +## Notifications ```swift // Swift -let testNotification = Notification(name: "Foo", object: nil) +let testNotification = Notification(name: Notification.Name("Foo"), object: nil) -// passes if the closure in expect { ... } posts a notification to the default +// Passes if the closure in expect { ... } posts a notification to the default // notification center. expect { - NotificationCenter.default.postNotification(testNotification) -}.to(postNotifications(equal([testNotification])) + NotificationCenter.default.post(testNotification) +}.to(postNotifications(equal([testNotification]))) -// passes if the closure in expect { ... } posts a notification to a given +// Passes if the closure in expect { ... } posts a notification to a given // notification center let notificationCenter = NotificationCenter() expect { - notificationCenter.postNotification(testNotification) -}.to(postNotifications(equal([testNotification]), fromNotificationCenter: notificationCenter)) + notificationCenter.post(testNotification) +}.to(postNotifications(equal([testNotification]), from: notificationCenter)) + +// Passes if the closure in expect { ... } posts a notification with the provided names to a given +// notification center. Make sure to use this when running tests on Catalina, +// using DistributedNotificationCenter as there is currently no way +// of observing notifications without providing specific names. +let distributedNotificationCenter = DistributedNotificationCenter() +expect { + distributedNotificationCenter.post(testNotification) +}.toEventually(postDistributedNotifications(equal([testNotification]), + from: distributedNotificationCenter, + names: [testNotification.name])) +``` + +> This matcher is only available in Swift. + +## Result + +```swift +// Swift +let aResult: Result = .success("Hooray") + +// passes if result is .success +expect(aResult).to(beSuccess()) + +// passes if result value is .success and validates Success value +expect(aResult).to(beSuccess { value in + expect(value).to(equal("Hooray")) +}) + + +enum AnError: Error { + case somethingHappened +} +let otherResult: Result = .failure(.somethingHappened) + +// passes if result is .failure +expect(otherResult).to(beFailure()) + +// passes if result value is .failure and validates error +expect(otherResult).to(beFailure { error in + expect(error).to(matchError(AnError.somethingHappened)) +}) ``` > This matcher is only available in Swift. @@ -1027,6 +1256,8 @@ expect { ## Matching a value to any of a group of matchers ```swift +// Swift + // passes if actual is either less than 10 or greater than 20 expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20))) @@ -1039,6 +1270,8 @@ expect(82).to(beLessThan(50) || beGreaterThan(80)) ``` ```objc +// Objective-C + // passes if actual is either less than 10 or greater than 20 expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) @@ -1052,33 +1285,70 @@ Note: This matcher allows you to chain any number of matchers together. This pro could instead refactor that single test into multiple, more precisely focused tests for better coverage. +## Custom Validation + +```swift +// Swift + +// passes if .succeeded is returned from the closure +expect { + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}.to(succeed()) + +// passes if .failed is returned from the closure +expect { + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}.notTo(succeed()) +``` + +The `String` provided with `.failed()` is shown when the test fails. + +When using `toEventually()` be careful not to make state changes or run process intensive code since this closure will be ran many times. + # Writing Your Own Matchers In Nimble, matchers are Swift functions that take an expected -value and return a `MatcherFunc` closure. Take `equal`, for example: +value and return a `Predicate` closure. Take `equal`, for example: ```swift // Swift -public func equal(expectedValue: T?) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(expectedValue)>" - if let actualValue = try actualExpression.evaluate() { - return actualValue == expectedValue - } else { - return false +public func equal(expectedValue: T?) -> Predicate { + // Can be shortened to: + // Predicate { actual in ... } + // + // But shown with types here for clarity. + return Predicate { (actualExpression: Expression) throws -> PredicateResult in + let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") + if let actualValue = try actualExpression.evaluate() { + return PredicateResult( + bool: actualValue == expectedValue!, + message: msg + ) + } else { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } } - } } ``` -The return value of a `MatcherFunc` closure is a `Bool` that indicates -whether the actual value matches the expectation: `true` if it does, or -`false` if it doesn't. +The return value of a `Predicate` closure is a `PredicateResult` that indicates +whether the actual value matches the expectation and what error message to +display on failure. -> The actual `equal` matcher function does not match when either - `actual` or `expected` are nil; the example above has been edited for - brevity. +> The actual `equal` matcher function does not match when + `expected` are nil; the example above has been edited for brevity. Since matchers are just Swift functions, you can define them anywhere: at the top of your test file, in a file shared by all of your tests, or @@ -1089,10 +1359,67 @@ in an Xcode project you distribute to others. distribute it yourself via GitHub. For examples of how to write your own matchers, just check out the -[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) +[`Matchers` directory](https://github.com/Quick/Nimble/tree/main/Sources/Nimble/Matchers) to see how Nimble's built-in set of matchers are implemented. You can also check out the tips below. +## PredicateResult + +`PredicateResult` is the return struct that `Predicate` return to indicate +success and failure. A `PredicateResult` is made up of two values: +`PredicateStatus` and `ExpectationMessage`. + +Instead of a boolean, `PredicateStatus` captures a trinary set of values: + +```swift +// Swift + +public enum PredicateStatus { +// The predicate "passes" with the given expression +// eg - expect(1).to(equal(1)) +case matches + +// The predicate "fails" with the given expression +// eg - expect(1).toNot(equal(1)) +case doesNotMatch + +// The predicate never "passes" with the given expression, even if negated +// eg - expect(nil as Int?).toNot(equal(1)) +case fail + +// ... +} +``` + +Meanwhile, `ExpectationMessage` provides messaging semantics for error reporting. + +```swift +// Swift + +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// ... +} +``` + +Predicates should usually depend on either `.expectedActualValueTo(..)` or +`.fail(..)` when reporting errors. Special cases can be used for the other enum +cases. + +Finally, if your Predicate utilizes other Predicates, you can utilize +`.appended(details:)` and `.appended(message:)` methods to annotate an existing +error with more details. + +A common message to append is failing on nils. For that, `.appendedBeNilHint()` +can be used. + ## Lazy Evaluation `actualExpression` is a lazy, memoized closure around the value provided to the @@ -1103,22 +1430,24 @@ custom matchers should call `actualExpression.evaluate()`: ```swift // Swift -public func beNil() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" - return actualExpression.evaluate() == nil - } +public func beNil() -> Predicate { + // Predicate.simpleNilable(..) automatically generates ExpectationMessage for + // us based on the string we provide to it. Also, the 'Nilable' postfix indicates + // that this Predicate supports matching against nil actualExpressions, instead of + // always resulting in a PredicateStatus.fail result -- which is true for + // Predicate.simple(..) + return Predicate.simpleNilable("be nil") { actualExpression in + let actualValue = try actualExpression.evaluate() + return PredicateStatus(bool: actualValue == nil) + } } ``` -In the above example, `actualExpression` is not `nil`--it is a closure +In the above example, `actualExpression` is not `nil` -- it is a closure that returns a value. The value it returns, which is accessed via the `evaluate()` method, may be `nil`. If that value is `nil`, the `beNil` matcher function returns `true`, indicating that the expectation passed. -Use `expression.isClosure` to determine if the expression will be invoking -a closure to produce its value. - ## Type Checking via Swift Generics Using Swift's generics, matchers can constrain the type of the actual value @@ -1131,63 +1460,126 @@ against the one provided to the matcher function, and passes if they are the sam ```swift // Swift -public func haveDescription(description: String) -> MatcherFunc { - return MatcherFunc { actual, failureMessage in - return actual.evaluate().description == description - } +public func haveDescription(description: String) -> Predicate { + return Predicate.simple("have description") { actual in + return PredicateStatus(bool: actual.evaluate().description == description) + } } ``` ## Customizing Failure Messages -By default, Nimble outputs the following failure message when an -expectation fails: +When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble +outputs the following failure message when an expectation fails: +```swift +// where `message` is the first string argument and +// `actual` is the actual value received in `expect(..)` +"expected to \(message), got <\(actual)>" ``` -expected to match, got <\(actual)> -``` -You can customize this message by modifying the `failureMessage` struct -from within your `MatcherFunc` closure. To change the verb "match" to -something else, update the `postfixMessage` property: +You can customize this message by modifying the way you create a `Predicate`. + +### Basic Customization + +For slightly more complex error messaging, receive the created failure message +with `Predicate.define(..)`: ```swift // Swift -// Outputs: expected to be under the sea, got <\(actual)> -failureMessage.postfixMessage = "be under the sea" +public func equal(_ expectedValue: T?) -> Predicate { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + let matches = actualValue == expectedValue && expectedValue != nil + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult(status: .fail, message: msg) + } + return PredicateResult(bool: matches, message: msg) + } +} ``` -You can change how the `actual` value is displayed by updating -`failureMessage.actualValue`. Or, to remove it altogether, set it to -`nil`: +In the example above, `msg` is defined based on the string given to +`Predicate.define`. The code looks akin to: ```swift // Swift -// Outputs: expected to be under the sea -failureMessage.actualValue = nil -failureMessage.postfixMessage = "be under the sea" +let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>") +``` + +### Full Customization + +To fully customize the behavior of the Predicate, use the overload that expects +a `PredicateResult` to be returned. + +Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: + +```swift +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// Emits standard error message with a custom actual value instead of the default. +// eg - "expected to , got " +case expectedCustomValueTo(/* message: */ String, /* actual: */ String) + +// Emits standard error message without mentioning the actual value +// eg - "expected to " +case expectedTo(/* message: */ String) + +// ... +} +``` + +For matchers that compose other matchers, there are a handful of helper +functions to annotate messages. + +`appended(message: String)` is used to append to the original failure message: + +```swift +// produces "expected to be true, got (use beFalse() for inverse)" +// appended message do show up inline in Xcode. +.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)") +``` + +For a more comprehensive message that spans multiple lines, use +`appended(details: String)` instead: + +```swift +// produces "expected to be true, got \n\nuse beFalse() for inverse\nor use beNil()" +// details do not show inline in Xcode, but do show up in test logs. +.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") ``` ## Supporting Objective-C To use a custom matcher written in Swift from Objective-C, you'll have -to extend the `NMBObjCMatcher` class, adding a new class method for your +to extend the `NMBPredicate` class, adding a new class method for your custom matcher. The example below defines the class method -`+[NMBObjCMatcher beNilMatcher]`: +`+[NMBPredicate beNilMatcher]`: ```swift // Swift -extension NMBObjCMatcher { - public class func beNilMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualBlock, failureMessage, location in - let block = ({ actualBlock() as NSObject? }) - let expr = Expression(expression: block, location: location) - return beNil().matches(expr, failureMessage: failureMessage) +extension NMBPredicate { + @objc public class func beNilMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in + return try beNil().satisfies(actualExpression).toObjectiveC() + } } - } } ``` @@ -1196,7 +1588,7 @@ The above allows you to use the matcher from Objective-C: ```objc // Objective-C -expect(actual).to([NMBObjCMatcher beNilMatcher]()); +expect(actual).to([NMBPredicate beNilMatcher]()); ``` To make the syntax easier to use, define a C function that calls the @@ -1205,8 +1597,8 @@ class method: ```objc // Objective-C -FOUNDATION_EXPORT id beNil() { - return [NMBObjCMatcher beNilMatcher]; +FOUNDATION_EXPORT NMBPredicate *beNil() { + return [NMBPredicate beNilMatcher]; } ``` @@ -1228,40 +1620,47 @@ expect(nil).to(equal(nil)); // fails expect(nil).to(beNil()); // passes ``` -If your matcher does not want to match with nil, you use `NonNilMatcherFunc` -and the `canMatchNil` constructor on `NMBObjCMatcher`. Using both types will -automatically generate expected value failure messages when they're nil. +If your matcher does not want to match with nil, you use `Predicate.define` or `Predicate.simple`. +Using those factory methods will automatically generate expected value failure messages when they're nil. ```swift +public func beginWith(_ startingElement: S.Element) -> Predicate where S.Element: Equatable { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { return .fail } -public func beginWith(startingElement: T) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false + var actualGenerator = actualValue.makeIterator() + return PredicateStatus(bool: actualGenerator.next() == startingElement) } } -extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = actualExpression.evaluate() +extension NMBPredicate { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate { + return NMBPredicate { actualExpression in + let actual = try actualExpression.evaluate() let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return beginWith(expected).matches(expr, failureMessage: failureMessage) + return try beginWith(expected).satisfies(expr).toObjectiveC() } } } ``` +## Migrating from the Old Matcher API + +Previously (`<7.0.0`), Nimble supported matchers via the following types: + +- `Matcher` +- `NonNilMatcherFunc` +- `MatcherFunc` + +All of those types have been replaced by `Predicate`. The old API has been +removed completely in Nimble v10. + # Installing Nimble > Nimble can be used on its own, or in conjunction with its sister project, [Quick](https://github.com/Quick/Quick). To install both Quick and Nimble, follow [the installation instructions in the Quick - Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). + Documentation](https://github.com/Quick/Quick/blob/main/Documentation/en-us/InstallingQuick.md). Nimble can currently be installed in one of two ways: using CocoaPods, or with git submodules. @@ -1296,7 +1695,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do use_frameworks! - pod 'Nimble', '~> 5.0.0' + pod 'Nimble' end ``` diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h deleted file mode 100644 index 6ec6a29..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// CwlCatchException.h -// CwlCatchException -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import - -//! Project version number for CwlCatchException. -FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; - -//! Project version string for CwlCatchException. -FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; - -__attribute__((visibility("hidden"))) -NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()); diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m deleted file mode 100644 index 4f9772c..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// CwlCatchException.m -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import "CwlCatchException.h" - -__attribute__((visibility("hidden"))) -NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()) { - @try { - inBlock(); - } @catch (NSException *exception) { - if ([exception isKindOfClass:type]) { - return exception; - } else { - @throw; - } - } - return nil; -} diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift deleted file mode 100644 index b44a232..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CwlCatchException.swift -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -// We can't simply cast to Self? in the catchInBlock method so we need this generic function wrapper to do the conversion for us. Mildly annoying. -private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? { - return catchExceptionOfKind(type, block) as? T -} - -extension NSException { - public static func catchException(in block: () -> Void) -> Self? { - return catchReturnTypeConverter(self, block: block) - } -} diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift deleted file mode 100644 index 2fa67c9..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// CwlBadInstructionException.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -private func raiseBadInstructionException() { - BadInstructionException().raise() -} - -/// A simple NSException subclass. It's not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type. -@objc public class BadInstructionException: NSException { - static var name: String = "com.cocoawithlove.BadInstruction" - - init() { - super.init(name: NSExceptionName(rawValue: BadInstructionException.name), reason: nil, userInfo: nil) - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - /// An Objective-C callable function, invoked from the `mach_exc_server` callback function `catch_mach_exception_raise_state` to push the `raiseBadInstructionException` function onto the stack. - public class func catch_mach_exception_raise_state(_ exception_port: mach_port_t, exception: exception_type_t, code: UnsafePointer, codeCnt: mach_msg_type_number_t, flavor: UnsafeMutablePointer, old_state: UnsafePointer, old_stateCnt: mach_msg_type_number_t, new_state: thread_state_t, new_stateCnt: UnsafeMutablePointer) -> kern_return_t { - - #if arch(x86_64) - // Make sure we've been given enough memory - if old_stateCnt != x86_THREAD_STATE64_COUNT || new_stateCnt.pointee < x86_THREAD_STATE64_COUNT { - return KERN_INVALID_ARGUMENT - } - - // Read the old thread state - var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee } - - // 1. Decrement the stack pointer - state.__rsp -= __uint64_t(MemoryLayout.size) - - // 2. Save the old Instruction Pointer to the stack. - if let pointer = UnsafeMutablePointer<__uint64_t>(bitPattern: UInt(state.__rsp)) { - pointer.pointee = state.__rip - } else { - return KERN_INVALID_ARGUMENT - } - - // 3. Set the Instruction Pointer to the new function's address - var f: @convention(c) () -> Void = raiseBadInstructionException - withUnsafePointer(to: &f) { - state.__rip = $0.withMemoryRebound(to: __uint64_t.self, capacity: 1) { return $0.pointee } - } - - // Write the new thread state - new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state } - new_stateCnt.pointee = x86_THREAD_STATE64_COUNT - - return KERN_SUCCESS - #else - fatalError("Unavailable for this CPU architecture") - #endif - } -} diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h deleted file mode 100644 index 0333ed2..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// CwlCatchBadInstruction.h -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if defined(__x86_64__) - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -// The request_mach_exception_raise_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; -} request_mach_exception_raise_t; - -// The reply_mach_exception_raise_state_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; -} reply_mach_exception_raise_state_t; - -extern boolean_t mach_exc_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -NS_ASSUME_NONNULL_END - -#endif diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m deleted file mode 100644 index 22c1377..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// CwlCatchBadInstruction.m -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if defined(__x86_64__) - -#import "CwlCatchBadInstruction.h" - -// Assuming the "PRODUCT_NAME" macro is defined, this will create the name of the Swift generated header file -#define STRINGIZE_NO_EXPANSION(A) #A -#define STRINGIZE_WITH_EXPANSION(A) STRINGIZE_NO_EXPANSION(A) -#define SWIFT_INCLUDE STRINGIZE_WITH_EXPANSION(PRODUCT_NAME-Swift.h) - -// Include the Swift generated header file -#import SWIFT_INCLUDE - -/// A basic function that receives callbacks from mach_exc_server and relays them to the Swift implemented BadInstructionException.catch_mach_exception_raise_state. -kern_return_t catch_mach_exception_raise_state(mach_port_t exception_port, exception_type_t exception, const mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, const thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - return [BadInstructionException catch_mach_exception_raise_state:exception_port exception:exception code:code codeCnt:codeCnt flavor:flavor old_state:old_state old_stateCnt:old_stateCnt new_state:new_state new_stateCnt:new_stateCnt]; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt) { - assert(false); - return KERN_FAILURE; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - assert(false); - return KERN_FAILURE; -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift deleted file mode 100644 index ab460b3..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift +++ /dev/null @@ -1,194 +0,0 @@ -// -// CwlCatchBadInstruction.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -#if arch(x86_64) - - private enum PthreadError: Error { case code(Int32) } - private enum MachExcServer: Error { case code(kern_return_t) } - - /// A quick function for converting Mach error results into Swift errors - private func kernCheck(_ f: () -> Int32) throws { - let r = f() - guard r == KERN_SUCCESS else { - throw NSError(domain: NSMachErrorDomain, code: Int(r), userInfo: nil) - } - } - - extension execTypesCountTuple { - mutating func pointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: T.self, capacity: EXC_TYPES_COUNT) { ptr -> R in - return block(ptr) - } - } - } - } - - extension request_mach_exception_raise_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } - } - - extension reply_mach_exception_raise_state_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } - } - - /// A structure used to store context associated with the Mach message port - private struct MachContext { - var masks = execTypesCountTuple() - var count: mach_msg_type_number_t = 0 - var ports = execTypesCountTuple() - var behaviors = execTypesCountTuple() - var flavors = execTypesCountTuple() - var currentExceptionPort: mach_port_t = 0 - var handlerThread: pthread_t? = nil - - mutating func withUnsafeMutablePointers(in block: (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { - return masks.pointer { masksPtr in - return ports.pointer { portsPtr in - return behaviors.pointer { behaviorsPtr in - return flavors.pointer { flavorsPtr in - return block(masksPtr, portsPtr, behaviorsPtr, flavorsPtr) - } - } - } - } - } - } - - /// A function for receiving mach messages and parsing the first with mach_exc_server (and if any others are received, throwing them away). - private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { - let context = arg.assumingMemoryBound(to: MachContext.self).pointee - var request = request_mach_exception_raise_t() - var reply = reply_mach_exception_raise_state_t() - - var handledfirstException = false - repeat { do { - // Request the next mach message from the port - request.Head.msgh_local_port = context.currentExceptionPort - request.Head.msgh_size = UInt32(MemoryLayout.size) - try kernCheck { request.withMsgHeaderPointer { requestPtr in - mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, request.Head.msgh_size, context.currentExceptionPort, 0, UInt32(MACH_PORT_NULL)) - } } - - // Prepare the reply structure - reply.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request.Head.msgh_bits), 0) - reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) - reply.Head.msgh_remote_port = request.Head.msgh_remote_port - reply.Head.msgh_size = UInt32(MemoryLayout.size) - reply.NDR = NDR_record - - if !handledfirstException { - // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure - guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in - mach_exc_server(requestPtr, replyPtr) - } }) != 0 else { throw MachExcServer.code(reply.RetCode) } - - handledfirstException = true - } else { - // If multiple fatal errors occur, don't handle subsquent errors (let the program crash) - reply.RetCode = KERN_FAILURE - } - - // Send the reply - try kernCheck { reply.withMsgHeaderPointer { replyPtr in - mach_msg(replyPtr, MACH_SEND_MSG, reply.Head.msgh_size, 0, UInt32(MACH_PORT_NULL), 0, UInt32(MACH_PORT_NULL)) - } } - } catch let error as NSError where (error.domain == NSMachErrorDomain && (error.code == Int(MACH_RCV_PORT_CHANGED) || error.code == Int(MACH_RCV_INVALID_NAME))) { - // Port was already closed before we started or closed while we were listening. - // This means the controlling thread shut down. - return nil - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach message error: \(error)") - } } while true - } - - /// Run the provided block. If a mach "BAD_INSTRUCTION" exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. - /// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a "BAD_INSTRUCTION" exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are *not* exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state. - /// - parameter block: a function without parameters that will be run - /// - returns: if an EXC_BAD_INSTRUCTION is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. - public func catchBadInstruction(in block: () -> Void) -> BadInstructionException? { - var context = MachContext() - var result: BadInstructionException? = nil - do { - var handlerThread: pthread_t? = nil - defer { - // 8. Wait for the thread to terminate *if* we actually made it to the creation point - // The mach port should be destroyed *before* calling pthread_join to avoid a deadlock. - if handlerThread != nil { - pthread_join(handlerThread!, nil) - } - } - - try kernCheck { - // 1. Create the mach port - mach_port_allocate(mach_task_self_, MACH_PORT_RIGHT_RECEIVE, &context.currentExceptionPort) - } - defer { - // 7. Cleanup the mach port - mach_port_destroy(mach_task_self_, context.currentExceptionPort) - } - - try kernCheck { - // 2. Configure the mach port - mach_port_insert_right(mach_task_self_, context.currentExceptionPort, context.currentExceptionPort, MACH_MSG_TYPE_MAKE_SEND) - } - - try kernCheck { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 3. Apply the mach port as the handler for this thread - thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, context.currentExceptionPort, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) - } } - - defer { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 6. Unapply the mach port - _ = thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, 0, EXCEPTION_DEFAULT, THREAD_STATE_NONE, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) - } } - - try withUnsafeMutablePointer(to: &context) { c throws in - // 4. Create the thread - let e = pthread_create(&handlerThread, nil, machMessageHandler, c) - guard e == 0 else { throw PthreadError.code(e) } - - // 5. Run the block - result = BadInstructionException.catchException(in: block) - } - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach port error: \(error)") - } - return result - } - -#endif - diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift deleted file mode 100644 index 12a6b9f..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// CwlDarwinDefinitions.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Darwin - -#if arch(x86_64) - -// From /usr/include/mach/port.h -// #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) -let MACH_PORT_RIGHT_RECEIVE: mach_port_right_t = 1 - -// From /usr/include/mach/message.h -// #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ -// #define MACH_MSGH_BITS_REMOTE(bits) \ -// ((bits) & MACH_MSGH_BITS_REMOTE_MASK) -// #define MACH_MSGH_BITS(remote, local) /* legacy */ \ -// ((remote) | ((local) << 8)) -let MACH_MSG_TYPE_MAKE_SEND: UInt32 = 20 -func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32 { return bits & UInt32(MACH_MSGH_BITS_REMOTE_MASK) } -func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32 { return ((remote) | ((local) << 8)) } - -// From /usr/include/mach/exception_types.h -// #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ -// #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) -// #define EXCEPTION_DEFAULT 1 -let EXC_BAD_INSTRUCTION: UInt32 = 2 -let EXC_MASK_BAD_INSTRUCTION: UInt32 = 1 << EXC_BAD_INSTRUCTION -let EXCEPTION_DEFAULT: Int32 = 1 - -// From /usr/include/mach/i386/thread_status.h -// #define THREAD_STATE_NONE 13 -// #define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ -// ( sizeof (x86_thread_state64_t) / sizeof (int) )) -let THREAD_STATE_NONE: Int32 = 13 -let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout.size / MemoryLayout.size) - -let EXC_TYPES_COUNT = 14 -struct execTypesCountTuple { - // From /usr/include/mach/i386/exception.h - // #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ - var value: (T,T,T,T,T,T,T,T,T,T,T,T,T,T) = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - init() { - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c deleted file mode 100644 index 2334538..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c +++ /dev/null @@ -1,537 +0,0 @@ -/* - * IDENTIFICATION: - * stub generated Mon Jan 11 00:24:26 2016 - * with a MiG generated by bootstrap_cmds-93 - * OPTIONS: - */ - -/* Module mach_exc */ - -#if defined(__x86_64__) - -#define __MIG_check__Request__mach_exc_subsystem__ 1 - -#include "mach_excServer.h" - -#ifndef mig_internal -#define mig_internal static __inline__ -#endif /* mig_internal */ - -#ifndef mig_external -#define mig_external -#endif /* mig_external */ - -#if !defined(__MigTypeCheck) && defined(TypeCheck) -#define __MigTypeCheck TypeCheck /* Legacy setting */ -#endif /* !defined(__MigTypeCheck) */ - -#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) -#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ -#endif /* !defined(__MigKernelSpecificCode) */ - -#ifndef LimitCheck -#define LimitCheck 0 -#endif /* LimitCheck */ - -#ifndef min -#define min(a,b) ( ((a) < (b))? (a): (b) ) -#endif /* min */ - -#if !defined(_WALIGN_) -#define _WALIGN_(x) (((x) + 3) & ~3) -#endif /* !defined(_WALIGN_) */ - -#if !defined(_WALIGNSZ_) -#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) -#endif /* !defined(_WALIGNSZ_) */ - -#ifndef UseStaticTemplates -#define UseStaticTemplates 0 -#endif /* UseStaticTemplates */ - -#ifndef __DeclareRcvRpc -#define __DeclareRcvRpc(_NUM_, _NAME_) -#endif /* __DeclareRcvRpc */ - -#ifndef __BeforeRcvRpc -#define __BeforeRcvRpc(_NUM_, _NAME_) -#endif /* __BeforeRcvRpc */ - -#ifndef __AfterRcvRpc -#define __AfterRcvRpc(_NUM_, _NAME_) -#endif /* __AfterRcvRpc */ - -#ifndef __DeclareRcvSimple -#define __DeclareRcvSimple(_NUM_, _NAME_) -#endif /* __DeclareRcvSimple */ - -#ifndef __BeforeRcvSimple -#define __BeforeRcvSimple(_NUM_, _NAME_) -#endif /* __BeforeRcvSimple */ - -#ifndef __AfterRcvSimple -#define __AfterRcvSimple(_NUM_, _NAME_) -#endif /* __AfterRcvSimple */ - -#define novalue void - -#define msgh_request_port msgh_local_port -#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) -#define msgh_reply_port msgh_remote_port -#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) - -#define MIG_RETURN_ERROR(X, code) {\ - ((mig_reply_error_t *)X)->RetCode = code;\ - ((mig_reply_error_t *)X)->NDR = NDR_record;\ - return;\ - } - -/* Forward Declarations */ - - -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_t__defined) -#define __MIG_check__Request__mach_exception_raise_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_t(__attribute__((__unused__)) __Request__mach_exception_raise_t *In0P) -{ - - typedef __Request__mach_exception_raise_t __Request; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 16)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined */ -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 16)) / 8 < In0P->codeCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 16) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise */ -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_t __Request; - typedef __Reply__mach_exception_raise_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_t__defined */ - - __DeclareRcvRpc(2405, "mach_exception_raise") - __BeforeRcvRpc(2405, "mach_exception_raise") - -#if defined(__MIG_check__Request__mach_exception_raise_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_t((__Request *)In0P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_t__defined) */ - - OutP->RetCode = catch_mach_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); - - OutP->NDR = NDR_record; - - - __AfterRcvRpc(2405, "mach_exception_raise") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state */ -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_t __Request; - typedef __Reply__mach_exception_raise_state_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_t__defined */ - - __DeclareRcvRpc(2406, "mach_exception_raise_state") - __BeforeRcvRpc(2406, "mach_exception_raise_state") - -#if defined(__MIG_check__Request__mach_exception_raise_state_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2406, "mach_exception_raise_state") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_identity_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_identity_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_identity_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state_identity */ -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_identity_t __Request; - typedef __Reply__mach_exception_raise_state_identity_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_identity_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_identity_t__defined */ - - __DeclareRcvRpc(2407, "mach_exception_raise_state_identity") - __BeforeRcvRpc(2407, "mach_exception_raise_state_identity") - -#if defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2407, "mach_exception_raise_state_identity") -} - - - -/* Description of this subsystem, for use in direct RPC */ -const struct catch_mach_exc_subsystem catch_mach_exc_subsystem = { - mach_exc_server_routine, - 2405, - 2408, - (mach_msg_size_t)sizeof(union __ReplyUnion__catch_mach_exc_subsystem), - (vm_address_t)0, - { - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_identity_t)}, - } -}; - -mig_external boolean_t mach_exc_server - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - register mig_routine_t routine; - - OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - - if ((InHeadP->msgh_id > 2407) || (InHeadP->msgh_id < 2405) || - ((routine = catch_mach_exc_subsystem.routine[InHeadP->msgh_id - 2405].stub_routine) == 0)) { - ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - (*routine) (InHeadP, OutHeadP); - return TRUE; -} - -mig_external mig_routine_t mach_exc_server_routine - (mach_msg_header_t *InHeadP) -{ - register int msgh_id; - - msgh_id = InHeadP->msgh_id - 2405; - - if ((msgh_id > 2) || (msgh_id < 0)) - return 0; - - return catch_mach_exc_subsystem.routine[msgh_id].stub_routine; -} - -#endif - diff --git a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h deleted file mode 100644 index 766ba11..0000000 --- a/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h +++ /dev/null @@ -1,298 +0,0 @@ -#ifndef _mach_exc_server_ -#define _mach_exc_server_ - -/* Module mach_exc */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* BEGIN VOUCHER CODE */ - -#ifndef KERNEL -#if defined(__has_include) -#if __has_include() -#ifndef USING_VOUCHERS -#define USING_VOUCHERS -#endif -#ifndef __VOUCHER_FORWARD_TYPE_DECLS__ -#define __VOUCHER_FORWARD_TYPE_DECLS__ -#ifdef __cplusplus -extern "C" { -#endif - extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); -#ifdef __cplusplus -} -#endif -#endif // __VOUCHER_FORWARD_TYPE_DECLS__ -#endif // __has_include() -#endif // __has_include -#endif // !KERNEL - -/* END VOUCHER CODE */ - - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_exc_MSG_COUNT -#define mach_exc_MSG_COUNT 3 -#endif /* mach_exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigServerHeader -__BeforeMigServerHeader -#endif /* __BeforeMigServerHeader */ - - -/* Routine mach_exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine mach_exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine mach_exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -boolean_t mach_exc_server( - mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -mig_routine_t mach_exc_server_routine( - mach_msg_header_t *InHeadP); - - -/* Description of this subsystem, for use in direct RPC */ -extern const struct catch_mach_exc_subsystem { - mig_server_routine_t server; /* Server routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max msg size */ - vm_address_t reserved; /* Reserved */ - struct routine_descriptor /*Array of routine descriptors */ - routine[3]; -} catch_mach_exc_subsystem; - -/* typedefs for all requests */ - -#ifndef __Request__mach_exc_subsystem__defined -#define __Request__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - } __Request__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_exc_subsystem__defined */ - - -/* union of all requests */ - -#ifndef __RequestUnion__catch_mach_exc_subsystem__defined -#define __RequestUnion__catch_mach_exc_subsystem__defined -union __RequestUnion__catch_mach_exc_subsystem { - __Request__mach_exception_raise_t Request_mach_exception_raise; - __Request__mach_exception_raise_state_t Request_mach_exception_raise_state; - __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_exc_subsystem__defined -#define __Reply__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_exc_subsystem__defined */ - - -/* union of all replies */ - -#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined -#define __ReplyUnion__catch_mach_exc_subsystem__defined -union __ReplyUnion__catch_mach_exc_subsystem { - __Reply__mach_exception_raise_t Reply_mach_exception_raise; - __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state; - __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_exc -#define subsystem_to_name_map_mach_exc \ - { "mach_exception_raise", 2405 },\ - { "mach_exception_raise_state", 2406 },\ - { "mach_exception_raise_state_identity", 2407 } -#endif - -#ifdef __AfterMigServerHeader -__AfterMigServerHeader -#endif /* __AfterMigServerHeader */ - -#endif /* _mach_exc_server_ */ diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift index 2e58fdf..a28bf2b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift @@ -1,5 +1,3 @@ -import Foundation - /// Protocol for the assertion handler that Nimble uses for all expectations. public protocol AssertionHandler { func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) @@ -13,5 +11,6 @@ public protocol AssertionHandler { /// /// @see AssertionHandler public var NimbleAssertionHandler: AssertionHandler = { () -> AssertionHandler in + // swiftlint:disable:previous identifier_name return isXCTestAvailable() ? NimbleXCTestHandler() : NimbleXCTestUnavailableHandler() }() diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift index 2e30f61..94a9030 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift @@ -1,4 +1,3 @@ - /// AssertionDispatcher allows multiple AssertionHandlers to receive /// assertion messages. /// diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift index 7d0bab2..ac75467 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -1,5 +1,3 @@ -import Foundation - /// A data structure that stores information about an assertion when /// AssertionRecorder is set as the Nimble assertion handler. /// @@ -22,7 +20,7 @@ public struct AssertionRecord: CustomStringConvertible { /// This is useful for testing failure messages for matchers. /// /// @see AssertionHandler -public class AssertionRecorder : AssertionHandler { +public class AssertionRecorder: AssertionHandler { /// All the assertions that were captured by this recorder public var assertions = [AssertionRecord]() @@ -37,21 +35,48 @@ public class AssertionRecorder : AssertionHandler { } } +extension NMBExceptionCapture { + internal func tryBlockThrows(_ unsafeBlock: () throws -> Void) throws { + var catchedError: Error? + tryBlock { + do { + try unsafeBlock() + } catch { + catchedError = error + } + } + if let error = catchedError { + throw error + } + } +} + /// Allows you to temporarily replace the current Nimble assertion handler with /// the one provided for the scope of the closure. /// /// Once the closure finishes, then the original Nimble assertion handler is restored. /// /// @see AssertionHandler -public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: @escaping () throws -> Void) { +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, + file: FileString = #file, + line: UInt = #line, + closure: () throws -> Void) { let environment = NimbleEnvironment.activeInstance let oldRecorder = environment.assertionHandler let capturer = NMBExceptionCapture(handler: nil, finally: ({ environment.assertionHandler = oldRecorder })) environment.assertionHandler = tempAssertionHandler - capturer.tryBlock { - try! closure() + + do { + try capturer.tryBlockThrows { + try closure() + } + } catch { + let failureMessage = FailureMessage() + failureMessage.stringValue = "unexpected error thrown: <\(error)>" + let location = SourceLocation(file: file, line: line) + tempAssertionHandler.assert(false, message: failureMessage, location: location) } } @@ -65,7 +90,7 @@ public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closu /// assertion handler when this is true. Defaults to false. /// /// @see gatherFailingExpectations -public func gatherExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { +public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler let recorder = AssertionRecorder() let handlers: [AssertionHandler] @@ -92,7 +117,7 @@ public func gatherExpectations(silently: Bool = false, closure: @escaping () -> /// /// @see gatherExpectations /// @see raiseException source for an example use case. -public func gatherFailingExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { +public func gatherFailingExpectations(silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { let assertions = gatherExpectations(silently: silently, closure: closure) return assertions.filter { assertion in !assertion.success diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift index 47d4eed..6d7d9b9 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -1,34 +1,27 @@ -import Foundation - -#if _runtime(_ObjC) - -internal struct ObjCMatcherWrapper : Matcher { - let matcher: NMBMatcher - - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.matches( - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) - } - - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - return matcher.doesNotMatch( - ({ try! actualExpression.evaluate() }), - failureMessage: failureMessage, - location: actualExpression.location) +#if !os(WASI) + +#if canImport(Darwin) && !SWIFT_PACKAGE +import class Foundation.NSObject +import typealias Foundation.TimeInterval +import enum Dispatch.DispatchTimeInterval + +private func from(objcPredicate: NMBPredicate) -> Predicate { + return Predicate { actualExpression in + let result = objcPredicate.satisfies(({ try actualExpression.evaluate() }), + location: actualExpression.location) + return result.toSwift() } } // Equivalent to Expectation, but for Nimble's Objective-C interface -public class NMBExpectation : NSObject { - internal let _actualBlock: () -> NSObject! +public class NMBExpectation: NSObject { + internal let _actualBlock: () -> NSObject? internal var _negative: Bool internal let _file: FileString internal let _line: UInt - internal var _timeout: TimeInterval = 1.0 + internal var _timeout: DispatchTimeInterval = .seconds(1) - public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { + @objc public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt) { self._actualBlock = actualBlock self._negative = negative self._file = file @@ -36,96 +29,156 @@ public class NMBExpectation : NSObject { } private var expectValue: Expectation { - return expect(_file, line: _line){ - self._actualBlock() as NSObject? - } + return expect(file: _file, line: _line, self._actualBlock() as NSObject?) } - public var withTimeout: (TimeInterval) -> NMBExpectation { - return ({ timeout in self._timeout = timeout + @objc public var withTimeout: (TimeInterval) -> NMBExpectation { + return { timeout in self._timeout = timeout.dispatchInterval return self - }) + } } - public var to: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) - }) + @objc public var to: (NMBPredicate) -> NMBExpectation { + return { predicate in + self.expectValue.to(from(objcPredicate: predicate)) + return self + } } - public var toWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) - }) + @objc public var toWithDescription: (NMBPredicate, String) -> NMBExpectation { + return { predicate, description in + self.expectValue.to(from(objcPredicate: predicate), description: description) + return self + } } - public var toNot: (NMBMatcher) -> Void { - return ({ matcher in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher) - ) - }) + @objc public var toNot: (NMBPredicate) -> NMBExpectation { + return { predicate in + self.expectValue.toNot(from(objcPredicate: predicate)) + return self + } } - public var toNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher), description: description - ) - }) + @objc public var toNotWithDescription: (NMBPredicate, String) -> NMBExpectation { + return { predicate, description in + self.expectValue.toNot(from(objcPredicate: predicate), description: description) + return self + } } - public var notTo: (NMBMatcher) -> Void { return toNot } + @objc public var notTo: (NMBPredicate) -> NMBExpectation { return toNot } - public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } + @objc public var notToWithDescription: (NMBPredicate, String) -> NMBExpectation { return toNotWithDescription } - public var toEventually: (NMBMatcher) -> Void { - return ({ matcher in + @objc public var toEventually: (NMBPredicate) -> Void { + return { predicate in self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), + from(objcPredicate: predicate), timeout: self._timeout, description: nil ) - }) + } } - public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in + @objc public var toEventuallyWithDescription: (NMBPredicate, String) -> Void { + return { predicate, description in self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), + from(objcPredicate: predicate), timeout: self._timeout, description: description ) - }) + } } - public var toEventuallyNot: (NMBMatcher) -> Void { - return ({ matcher in + @objc public var toEventuallyNot: (NMBPredicate) -> Void { + return { predicate in self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), + from(objcPredicate: predicate), timeout: self._timeout, description: nil ) - }) + } } - public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { - return ({ matcher, description in + @objc public var toEventuallyNotWithDescription: (NMBPredicate, String) -> Void { + return { predicate, description in self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), + from(objcPredicate: predicate), timeout: self._timeout, description: description ) - }) + } + } + + @objc public var toNotEventually: (NMBPredicate) -> Void { + return toEventuallyNot + } + + @objc public var toNotEventuallyWithDescription: (NMBPredicate, String) -> Void { + return toEventuallyNotWithDescription + } + + @objc public var toNever: (NMBPredicate) -> Void { + return { predicate in + self.expectValue.toNever( + from(objcPredicate: predicate), + until: self._timeout, + description: nil + ) + } + } + + @objc public var toNeverWithDescription: (NMBPredicate, String) -> Void { + return { predicate, description in + self.expectValue.toNever( + from(objcPredicate: predicate), + until: self._timeout, + description: description + ) + } + } + + @objc public var neverTo: (NMBPredicate) -> Void { + return toNever + } + + @objc public var neverToWithDescription: (NMBPredicate, String) -> Void { + return toNeverWithDescription + } + + @objc public var toAlways: (NMBPredicate) -> Void { + return { predicate in + self.expectValue.toAlways( + from(objcPredicate: predicate), + until: self._timeout, + description: nil + ) + } + } + + @objc public var toAlwaysWithDescription: (NMBPredicate, String) -> Void { + return { predicate, description in + self.expectValue.toAlways( + from(objcPredicate: predicate), + until: self._timeout, + description: description + ) + } } - public var toNotEventually: (NMBMatcher) -> Void { return toEventuallyNot } + @objc public var alwaysTo: (NMBPredicate) -> Void { + return toAlways + } - public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } + @objc public var alwaysToWithDescription: (NMBPredicate, String) -> Void { + return toAlwaysWithDescription + } - public class func failWithMessage(_ message: String, file: FileString, line: UInt) { + @objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) { fail(message, location: SourceLocation(file: file, line: line)) } } #endif + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift deleted file mode 100644 index c609f69..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift +++ /dev/null @@ -1,81 +0,0 @@ -import Foundation - -#if _runtime(_ObjC) - -public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) -> Bool -public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) -> Bool - -public class NMBObjCMatcher : NSObject, NMBMatcher { - let _match: MatcherBlock - let _doesNotMatch: MatcherBlock - let canMatchNil: Bool - - public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { - self.canMatchNil = canMatchNil - self._match = matcher - self._doesNotMatch = notMatcher - } - - public convenience init(matcher: @escaping MatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return !matcher(actualExpression, failureMessage) - })) - } - - public convenience init(matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: true, matcher: matcher) - } - - public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { - self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return matcher(actualExpression, failureMessage, false) - }), notMatcher: ({ actualExpression, failureMessage in - return matcher(actualExpression, failureMessage, true) - })) - } - - private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - do { - if !canMatchNil { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return false - } - } - } catch let error { - failureMessage.actualValue = "an unexpected error thrown: \(error)" - return false - } - return true - } - - public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result = _match( - expr, - failureMessage) - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let expr = Expression(expression: actualBlock, location: location) - let result = _doesNotMatch( - expr, - failureMessage) - if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { - return result - } else { - return false - } - } -} - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift index a55cb27..d20dd31 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -1,9 +1,15 @@ +#if !os(WASI) import Dispatch -import Foundation +import class Foundation.Thread +#endif +import class Foundation.NSObject /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this -/// class' existance -internal class NimbleEnvironment { +/// class' existence +internal class NimbleEnvironment: NSObject { + #if os(WASI) + static var activeInstance: NimbleEnvironment = NimbleEnvironment() + #else static var activeInstance: NimbleEnvironment { get { let env = Thread.current.threadDictionary["NimbleEnvironment"] @@ -19,7 +25,9 @@ internal class NimbleEnvironment { Thread.current.threadDictionary["NimbleEnvironment"] = newValue } } + #endif + // swiftlint:disable:next todo // TODO: eventually migrate the global to this environment value var assertionHandler: AssertionHandler { get { return NimbleAssertionHandler } @@ -27,19 +35,20 @@ internal class NimbleEnvironment { } var suppressTVOSAssertionWarning: Bool = false + #if !os(WASI) var awaiter: Awaiter + #endif - init() { - let timeoutQueue: DispatchQueue - if #available(OSX 10.10, *) { - timeoutQueue = DispatchQueue.global(qos: .userInitiated) - } else { - timeoutQueue = DispatchQueue.global(priority: .high) - } - + override init() { + #if !os(WASI) + let timeoutQueue = DispatchQueue.global(qos: .userInitiated) awaiter = Awaiter( waitLock: AssertionWaitLock(), asyncQueue: .main, - timeoutQueue: timeoutQueue) + timeoutQueue: timeoutQueue + ) + #endif + + super.init() } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 1aba8bc..18ec18b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -3,7 +3,7 @@ import XCTest /// Default handler for Nimble. This assertion handler passes failures along to /// XCTest. -public class NimbleXCTestHandler : AssertionHandler { +public class NimbleXCTestHandler: AssertionHandler { public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { recordFailure("\(message.stringValue)\n", location: location) @@ -29,32 +29,42 @@ public class NimbleShortXCTestHandler: AssertionHandler { /// Fallback handler in case XCTest is unavailable. This assertion handler will abort /// the program if it is invoked. -class NimbleXCTestUnavailableHandler : AssertionHandler { +class NimbleXCTestUnavailableHandler: AssertionHandler { func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") } } -#if _runtime(_ObjC) - /// Helper class providing access to the currently executing XCTestCase instance, if any +#if !SWIFT_PACKAGE +/// Helper class providing access to the currently executing XCTestCase instance, if any @objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { @objc static let sharedInstance = CurrentTestCaseTracker() private(set) var currentTestCase: XCTestCase? + private var stashed_swift_reportFatalErrorsToDebugger: Bool = false + @objc func testCaseWillStart(_ testCase: XCTestCase) { + #if os(macOS) || os(iOS) + stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger + _swift_reportFatalErrorsToDebugger = false + #endif + currentTestCase = testCase } @objc func testCaseDidFinish(_ testCase: XCTestCase) { currentTestCase = nil + + #if os(macOS) || os(iOS) + _swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger + #endif } } #endif - func isXCTestAvailable() -> Bool { -#if _runtime(_ObjC) +#if canImport(Darwin) // XCTest is weakly linked and so may not be present return NSClassFromString("XCTestCase") != nil #else @@ -62,16 +72,23 @@ func isXCTestAvailable() -> Bool { #endif } -private func recordFailure(_ message: String, location: SourceLocation) { -#if _runtime(_ObjC) +public func recordFailure(_ message: String, location: SourceLocation) { +#if SWIFT_PACKAGE + XCTFail("\(message)", file: location.file, line: location.line) +#else if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - testCase.recordFailure(withDescription: message, inFile: location.file, atLine: location.line, expected: true) + let line = Int(location.line) + let location = XCTSourceCodeLocation(filePath: location.file, lineNumber: line) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue(type: .assertionFailure, compactDescription: message, sourceCodeContext: sourceCodeContext) + testCase.record(issue) } else { - let msg = "Attempted to report a test failure to XCTest while no test case was running. " + - "The failure was:\n\"\(message)\"\nIt occurred at: \(location.file):\(location.line)" + let msg = """ + Attempted to report a test failure to XCTest while no test case was running. The failure was: + \"\(message)\" + It occurred at: \(location.file):\(location.line) + """ NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() } -#else - XCTFail("\(message)\n", file: location.file, line: location.line) #endif } diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift index 619b6dc..a1b51c3 100644 --- a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -1,3 +1,5 @@ +#if !os(WASI) + import Dispatch import Foundation @@ -11,11 +13,26 @@ private enum ErrorResult { /// bridges to Objective-C via the @objc keyword. This class encapsulates callback-style /// asynchronous waiting logic so that it may be called from Objective-C and Swift. internal class NMBWait: NSObject { +// About these kind of lines, `@objc` attributes are only required for Objective-C +// support, so that should be conditional on Darwin platforms and normal Xcode builds +// (non-SwiftPM builds). +#if canImport(Darwin) && !SWIFT_PACKAGE + @objc internal class func until( timeout: TimeInterval, file: FileString = #file, line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) -> Void { + action: @escaping (@escaping () -> Void) -> Void) { + // Convert TimeInterval to DispatchTimeInterval + until(timeout: timeout.dispatchInterval, file: file, line: line, action: action) + } +#endif + + internal class func until( + timeout: DispatchTimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { return throwableUntil(timeout: timeout, file: file, line: line) { done in action(done) } @@ -23,13 +40,13 @@ internal class NMBWait: NSObject { // Using a throwable closure makes this method not objc compatible. internal class func throwableUntil( - timeout: TimeInterval, + timeout: DispatchTimeInterval, file: FileString = #file, line: UInt = #line, - action: @escaping (@escaping () -> Void) throws -> Void) -> Void { + action: @escaping (@escaping () -> Void) throws -> Void) { let awaiter = NimbleEnvironment.activeInstance.awaiter - let leeway = timeout / 2.0 - let result = awaiter.performBlock { (done: @escaping (ErrorResult) -> Void) throws -> Void in + let leeway = timeout.divided + let result = awaiter.performBlock(file: file, line: line) { (done: @escaping (ErrorResult) -> Void) throws -> Void in DispatchQueue.main.async { let capture = NMBExceptionCapture( handler: ({ exception in @@ -39,7 +56,7 @@ internal class NMBWait: NSObject { ) capture.tryBlock { do { - try action() { + try action { done(.none) } } catch let e { @@ -55,8 +72,7 @@ internal class NMBWait: NSObject { fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), file: file, line: line) case .timedOut: - let pluralize = (timeout == 1 ? "" : "s") - fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) + fail("Waited more than \(timeout.description)", file: file, line: line) case let .raisedException(exception): fail("Unexpected exception raised: \(exception)") case let .errorThrown(error): @@ -70,20 +86,27 @@ internal class NMBWait: NSObject { } } - #if _runtime(_ObjC) +#if canImport(Darwin) && !SWIFT_PACKAGE @objc(untilFile:line:action:) - internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) -> Void { - until(timeout: 1, file: file, line: line, action: action) + internal class func until( + _ file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { + until(timeout: .seconds(1), file: file, line: line, action: action) } - #else - internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) -> Void { - until(timeout: 1, file: file, line: line, action: action) +#else + internal class func until( + _ file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { + until(timeout: .seconds(1), file: file, line: line, action: action) } - #endif +#endif } -internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { - return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) seconds is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." +internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: DispatchTimeInterval) -> String { + // swiftlint:disable:next line_length + return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway.description) is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." } /// Wait asynchronously until the done closure is called or the timeout has been reached. @@ -93,6 +116,8 @@ internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterv /// /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. -public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) -> Void { +public func waitUntil(timeout: DispatchTimeInterval = AsyncDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { NMBWait.until(timeout: timeout, file: file, line: line, action: action) } + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL.swift b/Example/Pods/Nimble/Sources/Nimble/DSL.swift index 7ebd684..4df36a4 100644 --- a/Example/Pods/Nimble/Sources/Nimble/DSL.swift +++ b/Example/Pods/Nimble/Sources/Nimble/DSL.swift @@ -1,7 +1,5 @@ -import Foundation - /// Make an expectation on a given actual value. The value given is lazily evaluated. -public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> Expectation { return Expectation( expression: Expression( expression: expression, @@ -10,10 +8,28 @@ public func expect(_ expression: @autoclosure @escaping () throws -> T?, file } /// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> Expectation { return Expectation( expression: Expression( - expression: expression, + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an expectation on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> Expectation { + return Expectation( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an expectation on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> Expectation { + return Expectation( + expression: Expression( + expression: expression(), location: SourceLocation(file: file, line: line), isClosure: true)) } @@ -36,29 +52,52 @@ public func fail(_ file: FileString = #file, line: UInt = #line) { /// Like Swift's precondition(), but raises NSExceptions instead of sigaborts internal func nimblePrecondition( - _ expr: @autoclosure() -> Bool, - _ name: @autoclosure() -> String, - _ message: @autoclosure() -> String, + _ expr: @autoclosure () -> Bool, + _ name: @autoclosure () -> String, + _ message: @autoclosure () -> String, file: StaticString = #file, - line: UInt = #line) { - let result = expr() - if !result { -#if _runtime(_ObjC) - let e = NSException( - name: NSExceptionName(name()), - reason: message(), - userInfo: nil) - e.raise() -#else - preconditionFailure("\(name()) - \(message())", file: file, line: line) -#endif - } + line: UInt = #line +) { + let result = expr() + if !result { + _nimblePrecondition(name(), message(), file, line) + } } internal func internalError(_ msg: String, file: FileString = #file, line: UInt = #line) -> Never { fatalError( - "Nimble Bug Found: \(msg) at \(file):\(line).\n" + - "Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the " + - "code snippet that caused this error." + """ + Nimble Bug Found: \(msg) at \(file):\(line). + Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the code snippet that caused this error. + """ + ) + // swiftlint:enable line_length +} + +#if canImport(Darwin) +import class Foundation.NSException +import struct Foundation.NSExceptionName + +private func _nimblePrecondition( + _ name: String, + _ message: String, + _ file: StaticString, + _ line: UInt +) { + let exception = NSException( + name: NSExceptionName(name), + reason: message, + userInfo: nil ) + exception.raise() } +#else +private func _nimblePrecondition( + _ name: String, + _ message: String, + _ file: StaticString, + _ line: UInt +) { + preconditionFailure("\(name) - \(message)", file: file, line: line) +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift index 16d7c3b..e4a12fa 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -1,76 +1,76 @@ -import Foundation - -internal func expressionMatches(_ expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T -{ - let msg = FailureMessage() - msg.userDescription = description - msg.to = to - do { - let pass = try matcher.matches(expression, failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" +internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { + func run() -> (Bool, FailureMessage) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let result = try predicate.satisfies(expression) + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try expression.evaluate()))>" + } + return (result.toBoolean(expectation: style), msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) } - return (pass, msg) - } catch let error { - msg.actualValue = "an unexpected error thrown: <\(error)>" - return (false, msg) } -} -internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T -{ - let msg = FailureMessage() - msg.userDescription = description - msg.to = toNot - do { - let pass = try matcher.doesNotMatch(expression, failureMessage: msg) - if msg.actualValue == "" { - msg.actualValue = "<\(stringify(try expression.evaluate()))>" + var result: (Bool, FailureMessage) = (false, FailureMessage()) + if captureExceptions { + let capture = NMBExceptionCapture(handler: ({ exception -> Void in + let msg = FailureMessage() + msg.stringValue = "unexpected exception raised: \(exception)" + result = (false, msg) + }), finally: nil) + capture.tryBlock { + result = run() } - return (pass, msg) - } catch let error { - msg.actualValue = "an unexpected error thrown: <\(error)>" - return (false, msg) + } else { + result = run() } + + return result } public struct Expectation { public let expression: Expression + public init(expression: Expression) { + self.expression = expression + } + public func verify(_ pass: Bool, _ message: FailureMessage) { let handler = NimbleEnvironment.activeInstance.assertionHandler handler.assert(pass, message: message, location: expression.location) } /// Tests the actual value using a matcher to match. - public func to(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { - let (pass, msg) = expressionMatches(expression, matcher: matcher, to: "to", description: description) + @discardableResult + public func to(_ predicate: Predicate, description: String? = nil) -> Self { + let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) verify(pass, msg) + return self } /// Tests the actual value using a matcher to not match. - public func toNot(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { - let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) + @discardableResult + public func toNot(_ predicate: Predicate, description: String? = nil) -> Self { + let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) verify(pass, msg) + return self } /// Tests the actual value using a matcher to not match. /// /// Alias to toNot(). - public func notTo(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { - toNot(matcher, description: description) + @discardableResult + public func notTo(_ predicate: Predicate, description: String? = nil) -> Self { + return toNot(predicate, description: description) } // see: - // - AsyncMatcherWrapper for extension + // - `async` for extension // - NMBExpectation for Objective-C interface } diff --git a/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift b/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift new file mode 100644 index 0000000..4efda7c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift @@ -0,0 +1,258 @@ +public indirect enum ExpectationMessage { + // --- Primary Expectations --- + /// includes actual value in output ("expected to , got ") + case expectedActualValueTo(/* message: */ String) + /// uses a custom actual value string in output ("expected to , got ") + case expectedCustomValueTo(/* message: */ String, actual: String) + /// excludes actual value in output ("expected to ") + case expectedTo(/* message: */ String) + /// allows any free-form message ("") + case fail(/* message: */ String) + + // --- Composite Expectations --- + // Generally, you'll want the methods, appended(message:) and appended(details:) instead. + + /// Not Fully Implemented Yet. + case prepends(/* Prepended Message */ String, ExpectationMessage) + + /// appends after an existing message (" (use beNil() to match nils)") + case appends(ExpectationMessage, /* Appended Message */ String) + + /// provides long-form multi-line explainations ("\n\n") + case details(ExpectationMessage, String) + + /// Returns the smallest message after the "expected to" string that summarizes the error. + /// + /// Returns the message part from ExpectationMessage, ignoring all .appends and .details. + public var expectedMessage: String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return msg + case let .expectedActualValueTo(msg): + return msg + case let .expectedCustomValueTo(msg, _): + return msg + case let .prepends(_, expectation): + return expectation.expectedMessage + case let .appends(expectation, msg): + return "\(expectation.expectedMessage)\(msg)" + case let .details(expectation, _): + return expectation.expectedMessage + } + } + + /// Appends a message after the primary expectation message + public func appended(message: String) -> ExpectationMessage { + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo, .appends, .prepends: + return .appends(self, message) + case let .details(expectation, msg): + return .details(expectation.appended(message: message), msg) + } + } + + /// Appends a message hinting to use beNil() for when the actual value given was nil. + public func appendedBeNilHint() -> ExpectationMessage { + return appended(message: " (use beNil() to match nils)") + } + + /// Appends a detailed (aka - multiline) message after the primary expectation message + /// Detailed messages will be placed after .appended(message:) calls. + public func appended(details: String) -> ExpectationMessage { + return .details(self, details) + } + + internal func visitLeafs(_ f: (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + // swiftlint:disable:previous identifier_name + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(self) + case let .prepends(msg, expectation): + return .prepends(msg, expectation.visitLeafs(f)) + case let .appends(expectation, msg): + return .appends(expectation.visitLeafs(f), msg) + case let .details(expectation, msg): + return .details(expectation.visitLeafs(f), msg) + } + } + + /// Replaces a primary expectation with one returned by f. Preserves all composite expectations + /// that were built upon it (aka - all appended(message:) and appended(details:). + public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + // swiftlint:disable:previous identifier_name + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(msg) + default: + return msg + } + } + return visitLeafs(walk) + } + + /// Wraps a primary expectation with text before and after it. + /// Alias to prepended(message: before).appended(message: after) + public func wrappedExpectation(before: String, after: String) -> ExpectationMessage { + return prepended(expectation: before).appended(message: after) + } + + /// Prepends a message by modifying the primary expectation + public func prepended(expectation message: String) -> ExpectationMessage { + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case let .expectedTo(msg): + return .expectedTo(message + msg) + case let .expectedActualValueTo(msg): + return .expectedActualValueTo(message + msg) + case let .expectedCustomValueTo(msg, actual): + return .expectedCustomValueTo(message + msg, actual: actual) + default: + return msg.visitLeafs(walk) + } + } + return visitLeafs(walk) + } + + // swiftlint:disable:next todo + // TODO: test & verify correct behavior + internal func prepended(message: String) -> ExpectationMessage { + return .prepends(message, self) + } + + /// Converts the tree of ExpectationMessages into a final built string. + public func toString(actual: String, expected: String = "expected", to: String = "to") -> String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return "\(expected) \(to) \(msg)" + case let .expectedActualValueTo(msg): + return "\(expected) \(to) \(msg), got \(actual)" + case let .expectedCustomValueTo(msg, actual): + return "\(expected) \(to) \(msg), got \(actual)" + case let .prepends(msg, expectation): + return "\(msg)\(expectation.toString(actual: actual, expected: expected, to: to))" + case let .appends(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\(msg)" + case let .details(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\n\n\(msg)" + } + } + + // Backwards compatibility: converts ExpectationMessage tree to FailureMessage + internal func update(failureMessage: FailureMessage) { + switch self { + case let .fail(msg) where !msg.isEmpty: + failureMessage.stringValue = msg + case .fail: + break + case let .expectedTo(msg): + failureMessage.actualValue = nil + failureMessage.postfixMessage = msg + case let .expectedActualValueTo(msg): + failureMessage.postfixMessage = msg + case let .expectedCustomValueTo(msg, actual): + failureMessage.postfixMessage = msg + failureMessage.actualValue = actual + case let .prepends(msg, expectation): + expectation.update(failureMessage: failureMessage) + if let desc = failureMessage.userDescription { + failureMessage.userDescription = "\(msg)\(desc)" + } else { + failureMessage.userDescription = msg + } + case let .appends(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendMessage(msg) + case let .details(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendDetails(msg) + } + } +} + +extension FailureMessage { + internal func toExpectationMessage() -> ExpectationMessage { + let defaultMessage = FailureMessage() + if expected != defaultMessage.expected || _stringValueOverride != nil { + return .fail(stringValue) + } + + var message: ExpectationMessage = .fail(userDescription ?? "") + if actualValue != "" && actualValue != nil { + message = .expectedCustomValueTo(postfixMessage, actual: actualValue ?? "") + } else if postfixMessage != defaultMessage.postfixMessage { + if actualValue == nil { + message = .expectedTo(postfixMessage) + } else { + message = .expectedActualValueTo(postfixMessage) + } + } + if postfixActual != defaultMessage.postfixActual { + message = .appends(message, postfixActual) + } + if let extended = extendedMessage { + message = .details(message, extended) + } + return message + } +} + +#if canImport(Darwin) +import class Foundation.NSObject + +public class NMBExpectationMessage: NSObject { + private let msg: ExpectationMessage + + internal init(swift msg: ExpectationMessage) { + self.msg = msg + } + + public init(expectedTo message: String) { + self.msg = .expectedTo(message) + } + public init(expectedActualValueTo message: String) { + self.msg = .expectedActualValueTo(message) + } + + public init(expectedActualValueTo message: String, customActualValue actual: String) { + self.msg = .expectedCustomValueTo(message, actual: actual) + } + + public init(fail message: String) { + self.msg = .fail(message) + } + + public init(prepend message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(appendedMessage message: String, child: NMBExpectationMessage) { + self.msg = .appends(child.msg, message) + } + + public init(prependedMessage message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(details message: String, child: NMBExpectationMessage) { + self.msg = .details(child.msg, message) + } + + public func appendedBeNilHint() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: msg.appendedBeNilHint()) + } + + public func toSwift() -> ExpectationMessage { return self.msg } +} + +extension ExpectationMessage { + func toObjectiveC() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: self) + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Expression.swift b/Example/Pods/Nimble/Sources/Nimble/Expression.swift index 8ba53e4..ecef26f 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Expression.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Expression.swift @@ -1,15 +1,13 @@ -import Foundation - // Memoizes the given closure, only calling the passed // closure once; even if repeat calls to the returned closure internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { var cache: T? - return ({ withoutCaching in - if (withoutCaching || cache == nil) { + return { withoutCaching in + if withoutCaching || cache == nil { cache = try closure() } return cache! - }) + } } /// Expression represents the closure of the value inside expect(...). @@ -77,7 +75,11 @@ public struct Expression { /// @param block The block that can cast the current Expression value to a /// new type. public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { - return Expression(expression: ({ try block(self.evaluate()) }), location: self.location, isClosure: self.isClosure) + return Expression( + expression: ({ try block(self.evaluate()) }), + location: self.location, + isClosure: self.isClosure + ) } public func evaluate() throws -> T? { @@ -85,6 +87,11 @@ public struct Expression { } public func withoutCaching() -> Expression { - return Expression(memoizedExpression: self._expression, location: location, withoutCaching: true, isClosure: isClosure) + return Expression( + memoizedExpression: self._expression, + location: location, + withoutCaching: true, + isClosure: isClosure + ) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift index 2d245e5..2bc57eb 100644 --- a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -12,8 +12,8 @@ public class FailureMessage: NSObject { /// An optional message that will be appended as a new line and provides additional details /// about the failure. This message will only be visible in the issue navigator / in logs but /// not directly in the source editor since only a single line is presented there. - public var extendedMessage: String? = nil - public var userDescription: String? = nil + public var extendedMessage: String? + public var userDescription: String? public var stringValue: String { get { @@ -29,6 +29,9 @@ public class FailureMessage: NSObject { } internal var _stringValueOverride: String? + internal var hasOverriddenStringValue: Bool { + return _stringValueOverride != nil + } public override init() { } @@ -59,7 +62,31 @@ public class FailureMessage: NSObject { if let userDescription = userDescription { return "\(userDescription)\n\(value)" } - + return value } + + internal func appendMessage(_ msg: String) { + if hasOverriddenStringValue { + stringValue += "\(msg)" + } else if actualValue != nil { + postfixActual += msg + } else { + postfixMessage += msg + } + } + + internal func appendDetails(_ msg: String) { + if hasOverriddenStringValue { + if let desc = userDescription { + stringValue = "\(desc)\n\(stringValue)" + } + stringValue += "\n\(msg)" + } else { + if let desc = userDescription { + userDescription = desc + } + extendedMessage = msg + } + } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift index 3a9258d..104fc9f 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -1,71 +1,83 @@ -import Foundation - -public func allPass - (_ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc - where U: Sequence, U.Iterator.Element == T -{ - return allPass("pass a condition", passFunc) +public func allPass( + _ passFunc: @escaping (S.Element) throws -> Bool +) -> Predicate { + let matcher = Predicate.define("pass a condition") { actualExpression, message in + guard let actual = try actualExpression.evaluate() else { + return PredicateResult(status: .fail, message: message) + } + return PredicateResult(bool: try passFunc(actual), message: message) + } + return createPredicate(matcher) } -public func allPass - (_ passName: String, _ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc - where U: Sequence, U.Iterator.Element == T -{ - return createAllPassMatcher() { - expression, failureMessage in - failureMessage.postfixMessage = passName - return passFunc(try expression.evaluate()) +public func allPass( + _ passName: String, + _ passFunc: @escaping (S.Element) throws -> Bool +) -> Predicate { + let matcher = Predicate.define(passName) { actualExpression, message in + guard let actual = try actualExpression.evaluate() else { + return PredicateResult(status: .fail, message: message) + } + return PredicateResult(bool: try passFunc(actual), message: message) } + return createPredicate(matcher) } -public func allPass - (_ matcher: V) -> NonNilMatcherFunc - where U: Sequence, V: Matcher, U.Iterator.Element == V.ValueType -{ - return createAllPassMatcher() { - try matcher.matches($0, failureMessage: $1) - } +public func allPass(_ elementPredicate: Predicate) -> Predicate { + return createPredicate(elementPredicate) } -private func createAllPassMatcher - (_ elementEvaluator: @escaping (Expression, FailureMessage) throws -> Bool) -> NonNilMatcherFunc - where U: Sequence, U.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.actualValue = nil - if let actualValue = try actualExpression.evaluate() { - for currentElement in actualValue { - let exp = Expression( - expression: {currentElement}, location: actualExpression.location) - if try !elementEvaluator(exp, failureMessage) { - failureMessage.postfixMessage = - "all \(failureMessage.postfixMessage)," - + " but failed first at element <\(stringify(currentElement))>" - + " in <\(stringify(actualValue))>" - return false - } - } - failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" - } else { - failureMessage.postfixMessage = "all pass (use beNil() to match nils)" - return false +private func createPredicate(_ elementMatcher: Predicate) -> Predicate { + return Predicate { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") + ) } - return true + var failure: ExpectationMessage = .expectedTo("all pass") + for currentElement in actualValue { + let exp = Expression( + expression: { currentElement }, + location: actualExpression.location + ) + let predicateResult = try elementMatcher.satisfies(exp) + if predicateResult.status == .matches { + failure = predicateResult.message.prepended(expectation: "all ") + } else { + failure = predicateResult.message + .replacedExpectation({ .expectedTo($0.expectedMessage) }) + .wrappedExpectation( + before: "all ", + after: ", but failed first at element <\(stringify(currentElement))>" + + " in <\(stringify(actualValue))>" + ) + return PredicateResult(status: .doesNotMatch, message: failure) + } + } + failure = failure.replacedExpectation({ expectation in + return .expectedTo(expectation.expectedMessage) + }) + return PredicateResult(status: .matches, message: failure) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func allPassMatcher(_ matcher: NMBObjCMatcher) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +#if canImport(Darwin) +import class Foundation.NSObject +import struct Foundation.NSFastEnumerationIterator +import protocol Foundation.NSFastEnumeration + +extension NMBPredicate { + @objc public class func allPassMatcher(_ predicate: NMBPredicate) -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() + let actualValue = try actualExpression.evaluate() var nsObjects = [NSObject]() - + var collectionIsUsable = true if let value = actualValue as? NSFastEnumeration { - let generator = NSFastEnumerationIterator(value) + var generator = NSFastEnumerationIterator(value) while let obj = generator.next() { if let nsObject = obj as? NSObject { nsObjects.append(nsObject) @@ -77,23 +89,22 @@ extension NMBObjCMatcher { } else { collectionIsUsable = false } - + if !collectionIsUsable { - failureMessage.postfixMessage = - "allPass only works with NSFastEnumeration (NSArray, NSSet, ...) of NSObjects" - failureMessage.expected = "" - failureMessage.to = "" - return false + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + // swiftlint:disable:next line_length + fail: "allPass can only be used with types which implement NSFastEnumeration (NSArray, NSSet, ...), and whose elements subclass NSObject, got <\(actualValue?.description ?? "nil")>" + ) + ) } - + let expr = Expression(expression: ({ nsObjects }), location: location) - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: expr.location) - } - return try! createAllPassMatcher(elementEvaluator).matches( - expr, failureMessage: failureMessage) + let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in + return predicate.satisfies(({ try expr.evaluate() }), location: expr.location).toSwift() + }) + return try pred.satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift new file mode 100644 index 0000000..2f86e32 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Async.swift @@ -0,0 +1,232 @@ +#if !os(WASI) + +import Foundation +import Dispatch + +/// If you are running on a slower machine, it could be useful to increase the default timeout value +/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. +public struct AsyncDefaults { + public static var timeout: DispatchTimeInterval = .seconds(1) + public static var pollInterval: DispatchTimeInterval = .milliseconds(10) +} + +private enum AsyncMatchStyle { + case eventually, never, always +} + +// swiftlint:disable:next function_parameter_count +private func async( + style: ExpectationStyle, + matchStyle: AsyncMatchStyle, + predicate: Predicate, + timeout: DispatchTimeInterval, + poll: DispatchTimeInterval, + fnName: String +) -> Predicate { + return Predicate { actualExpression in + let uncachedExpression = actualExpression.withoutCaching() + let fnName = "expect(...).\(fnName)(...)" + var lastPredicateResult: PredicateResult? + let result = pollBlock( + pollInterval: poll, + timeoutInterval: timeout, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: fnName) { + lastPredicateResult = try predicate.satisfies(uncachedExpression) + return lastPredicateResult!.toBoolean(expectation: style) + } + switch result { + case .completed: + switch matchStyle { + case .eventually: + return lastPredicateResult! + case .never: + return PredicateResult( + status: .fail, + message: lastPredicateResult?.message ?? .fail("matched the predicate when it shouldn't have") + ) + case .always: + return PredicateResult( + status: .fail, + message: lastPredicateResult?.message ?? .fail("didn't match the predicate when it should have") + ) + } + case .timedOut: + switch matchStyle { + case .eventually: + let message = lastPredicateResult?.message ?? .fail("timed out before returning a value") + return PredicateResult(status: .fail, message: message) + case .never: + return PredicateResult(status: .doesNotMatch, message: .expectedTo("never match the predicate")) + case .always: + return PredicateResult(status: .matches, message: .expectedTo("always match the predicate")) + } + case let .errorThrown(error): + return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) + case let .raisedException(exception): + return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) + case .blockedRunLoop: + let message = lastPredicateResult?.message.appended(message: " (timed out, but main run loop was unresponsive).") ?? + .fail("main run loop was unresponsive") + return PredicateResult(status: .fail, message: message) + case .incomplete: + internalError("Reached .incomplete state for \(fnName)(...).") + } + } +} + +private let toEventuallyRequiresClosureError = FailureMessage( + stringValue: """ + expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) ) + Swift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function + """ +) + +extension Expectation { + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventually(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + async( + style: .toMatch, + matchStyle: .eventually, + predicate: predicate, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually" + ), + to: "to eventually", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventuallyNot(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + async( + style: .toNotMatch, + matchStyle: .eventually, + predicate: predicate, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot" + ), + to: "to eventually not", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toNotEventually(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toNever(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + async( + style: .toMatch, + matchStyle: .never, + predicate: predicate, + timeout: until, + poll: pollInterval, + fnName: "toNever" + ), + to: "to never", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func neverTo(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + return toNever(predicate, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toAlways(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + async( + style: .toNotMatch, + matchStyle: .always, + predicate: predicate, + timeout: until, + poll: pollInterval, + fnName: "toAlways" + ), + to: "to always", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func alwaysTo(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { + return toAlways(predicate, until: until, pollInterval: pollInterval, description: description) + } +} + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift deleted file mode 100644 index 6b89c76..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift +++ /dev/null @@ -1,146 +0,0 @@ -import Foundation - -/// If you are running on a slower machine, it could be useful to increase the default timeout value -/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. -public struct AsyncDefaults { - public static var Timeout: TimeInterval = 1 - public static var PollInterval: TimeInterval = 0.01 -} - -internal struct AsyncMatcherWrapper: Matcher - where U: Matcher, U.ValueType == T -{ - let fullMatcher: U - let timeoutInterval: TimeInterval - let pollInterval: TimeInterval - - init(fullMatcher: U, timeoutInterval: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval) { - self.fullMatcher = fullMatcher - self.timeoutInterval = timeoutInterval - self.pollInterval = pollInterval - } - - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - let uncachedExpression = actualExpression.withoutCaching() - let fnName = "expect(...).toEventually(...)" - let result = pollBlock( - pollInterval: pollInterval, - timeoutInterval: timeoutInterval, - file: actualExpression.location.file, - line: actualExpression.location.line, - fnName: fnName) { - try self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) - } - switch (result) { - case let .completed(isSuccessful): return isSuccessful - case .timedOut: return false - case let .errorThrown(error): - failureMessage.actualValue = "an unexpected error thrown: <\(error)>" - return false - case let .raisedException(exception): - failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" - return false - case .blockedRunLoop: - failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." - return false - case .incomplete: - internalError("Reached .incomplete state for toEventually(...).") - } - } - - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { - let uncachedExpression = actualExpression.withoutCaching() - let result = pollBlock( - pollInterval: pollInterval, - timeoutInterval: timeoutInterval, - file: actualExpression.location.file, - line: actualExpression.location.line, - fnName: "expect(...).toEventuallyNot(...)") { - try self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) - } - switch (result) { - case let .completed(isSuccessful): return isSuccessful - case .timedOut: return false - case let .errorThrown(error): - failureMessage.actualValue = "an unexpected error thrown: <\(error)>" - return false - case let .raisedException(exception): - failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" - return false - case .blockedRunLoop: - failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." - return false - case .incomplete: - internalError("Reached .incomplete state for toEventuallyNot(...).") - } - } -} - -private let toEventuallyRequiresClosureError = FailureMessage(stringValue: "expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) )\nSwift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function") - - -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { - if expression.isClosure { - let (pass, msg) = expressionMatches( - expression, - matcher: AsyncMatcherWrapper( - fullMatcher: matcher, - timeoutInterval: timeout, - pollInterval: pollInterval), - to: "to eventually", - description: description - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { - if expression.isClosure { - let (pass, msg) = expressionDoesNotMatch( - expression, - matcher: AsyncMatcherWrapper( - fullMatcher: matcher, - timeoutInterval: timeout, - pollInterval: pollInterval), - toNot: "to eventually not", - description: description - ) - verify(pass, msg) - } else { - verify(false, toEventuallyRequiresClosureError) - } - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { - return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift index 99b8f8f..f01ca77 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -1,36 +1,65 @@ -import Foundation +private func matcherMessage(forType expectedType: T.Type) -> String { + return "be a kind of \(String(describing: expectedType))" +} +private func matcherMessage(forClass expectedClass: AnyClass) -> String { + return "be a kind of \(String(describing: expectedClass))" +} -#if _runtime(_ObjC) +/// A Nimble matcher that succeeds when the actual value is an instance of the given class. +public func beAKindOf(_ expectedType: T.Type) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage -// A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types -public func beAKindOf(_ expectedClass: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAKindOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + message = .expectedCustomValueTo(matcherMessage(forType: expectedType), actual: "") + return PredicateResult(status: .fail, message: message) + } + message = .expectedCustomValueTo( + "be a kind of \(String(describing: expectedType))", + actual: "<\(String(describing: type(of: validInstance))) instance>" + ) + + return PredicateResult( + bool: validInstance is T, + message: message + ) } } +#if canImport(Darwin) +import class Foundation.NSObject + /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + let status: PredicateStatus + let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" + status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + actual: "<\(String(describing: type(of: validInstance))) instance>" + ) } else { - failureMessage.actualValue = "" + status = .fail + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + actual: "" + ) } - failureMessage.postfixMessage = "be a kind of \(String(describing: expectedClass))" - return instance != nil && instance!.isKind(of: expectedClass) + + return PredicateResult(status: status, message: message) } } -extension NMBObjCMatcher { - public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) +extension NMBPredicate { + @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBPredicate { + return NMBPredicate { actualExpression in + return try beAKindOf(expected).satisfies(actualExpression).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift index 2298c78..47ea663 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -1,39 +1,55 @@ import Foundation -// A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types -public func beAnInstanceOf(_ expectedClass: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false +/// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. +public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedType))" + return Predicate.define { actualExpression in + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + return PredicateResult( + status: .doesNotMatch, + message: .expectedActualValueTo(errorMessage) + ) + } + + let actualString = "<\(String(describing: type(of: validInstance))) instance>" + + return PredicateResult( + status: PredicateStatus(bool: type(of: validInstance) == expectedType), + message: .expectedCustomValueTo(errorMessage, actual: actualString) + ) } } /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAKindOf if you want to match against subclasses -public func beAnInstanceOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedClass))" + return Predicate.define { actualExpression in let instance = try actualExpression.evaluate() + let actualString: String if let validInstance = instance { - failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" + actualString = "<\(String(describing: type(of: validInstance))) instance>" } else { - failureMessage.actualValue = "" + actualString = "" } - failureMessage.postfixMessage = "be an instance of \(String(describing: expectedClass))" -#if _runtime(_ObjC) - return instance != nil && instance!.isMember(of: expectedClass) -#else - return instance != nil && type(of: instance!) == expectedClass -#endif + #if canImport(Darwin) + let matches = instance != nil && instance!.isMember(of: expectedClass) + #else + let matches = instance != nil && type(of: instance!) == expectedClass + #endif + return PredicateResult( + status: PredicateStatus(bool: matches), + message: .expectedCustomValueTo(errorMessage, actual: actualString) + ) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBPredicate { + return NMBPredicate { actualExpression in + return try beAnInstanceOf(expected).satisfies(actualExpression).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift index 48e9895..e7fd2d1 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -1,20 +1,46 @@ import Foundation -internal let DefaultDelta = 0.0001 +// swiftlint:disable:next identifier_name +public let DefaultDelta: Double = 0.0001 + +public func defaultDelta() -> F { 1/10000 /* 0.0001 */ } + +internal func isCloseTo( + _ actualValue: Value?, + expectedValue: Value, + delta: Value +) -> PredicateResult { + let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" + return PredicateResult( + bool: actualValue != nil && + abs(actualValue! - expectedValue) < delta, + message: .expectedCustomValueTo(errorMessage, actual: "<\(stringify(actualValue))>") + ) +} -internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { - failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - failureMessage.actualValue = "<\(stringify(actualValue))>" - return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta +internal func isCloseTo( + _ actualValue: NMBDoubleConvertible?, + expectedValue: NMBDoubleConvertible, + delta: Double +) -> PredicateResult { + let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" + return PredicateResult( + bool: actualValue != nil && + abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, + message: .expectedCustomValueTo(errorMessage, actual: "<\(stringify(actualValue))>") + ) } /// A Nimble matcher that succeeds when a value is close to another. This is used for floating /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) +public func beCloseTo( + _ expectedValue: Value, + within delta: Value = defaultDelta() +) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } @@ -22,71 +48,74 @@ public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDel /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) +public func beCloseTo( + _ expectedValue: Value, + within delta: Double = DefaultDelta +) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } -#if _runtime(_ObjC) -public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { - var _expected: NSNumber - var _delta: CDouble - init(expected: NSNumber, within: CDouble) { - _expected = expected - _delta = within +private func beCloseTo( + _ expectedValue: NMBDoubleConvertible, + within delta: Double = DefaultDelta +) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } +} - public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let matcher = beCloseTo(self._expected, within: self._delta) - return try! matcher.matches(expr, failureMessage: failureMessage) - } +#if canImport(Darwin) +public class NMBObjCBeCloseToPredicate: NMBPredicate { + private let _expected: NSNumber - public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let actualBlock: () -> NMBDoubleConvertible? = ({ - return actualExpression() as? NMBDoubleConvertible - }) - let expr = Expression(expression: actualBlock, location: location) - let matcher = beCloseTo(self._expected, within: self._delta) - return try! matcher.doesNotMatch(expr, failureMessage: failureMessage) + fileprivate init(expected: NSNumber, within: CDouble) { + _expected = expected + + let predicate = beCloseTo(expected, within: within) + let predicateBlock: PredicateBlock = { actualExpression in + let expr = actualExpression.cast { $0 as? NMBDoubleConvertible } + return try predicate.satisfies(expr).toObjectiveC() + } + super.init(predicate: predicateBlock) } - public var within: (CDouble) -> NMBObjCBeCloseToMatcher { - return ({ delta in - return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) - }) + @objc public var within: (CDouble) -> NMBObjCBeCloseToPredicate { + let expected = _expected + return { delta in + return NMBObjCBeCloseToPredicate(expected: expected, within: delta) + } } } -extension NMBObjCMatcher { - public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { - return NMBObjCBeCloseToMatcher(expected: expected, within: within) +extension NMBPredicate { + @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToPredicate { + return NMBObjCBeCloseToPredicate(expected: expected, within: within) } } #endif -public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> NonNilMatcherFunc <[Double]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" - if let actual = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actual))>" - - if actual.count != expectedValues.count { - return false - } else { - for (index, actualItem) in actual.enumerated() { - if fabs(actualItem - expectedValues[index]) > delta { - return false - } - } - return true +public func beCloseTo( + _ expectedValues: Values, + within delta: Value = defaultDelta() +) -> Predicate where Values.Element == Value { + let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" + return Predicate.simple(errorMessage) { actualExpression in + guard let actualValues = try actualExpression.evaluate() else { + return .doesNotMatch + } + + if actualValues.count != expectedValues.count { + return .doesNotMatch + } + + for index in actualValues.indices { + if abs(actualValues[index] - expectedValues[index]) > delta { + return .doesNotMatch } } - return false + return .matches } } @@ -94,20 +123,43 @@ public func beCloseTo(_ expectedValues: [Double], within delta: Double = Default infix operator ≈ : ComparisonPrecedence -public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { - lhs.to(beCloseTo(rhs)) +extension Expectation where T: Collection, T.Element: FloatingPoint { + // swiftlint:disable:next identifier_name + public static func ≈(lhs: Expectation, rhs: T) { + lhs.to(beCloseTo(rhs)) + } } -public func ≈(lhs: Expectation, rhs: NMBDoubleConvertible) { - lhs.to(beCloseTo(rhs)) -} +extension Expectation where T: FloatingPoint { + // swiftlint:disable:next identifier_name + public static func ≈(lhs: Expectation, rhs: T) { + lhs.to(beCloseTo(rhs)) + } + + // swiftlint:disable:next identifier_name + public static func ≈(lhs: Expectation, rhs: (expected: T, delta: T)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) + } -public func ≈(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) + public static func == (lhs: Expectation, rhs: (expected: T, delta: T)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) + } } -public func ==(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +extension Expectation where T: NMBDoubleConvertible { + // swiftlint:disable:next identifier_name + public static func ≈(lhs: Expectation, rhs: T) { + lhs.to(beCloseTo(rhs)) + } + + // swiftlint:disable:next identifier_name + public static func ≈(lhs: Expectation, rhs: (expected: T, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) + } + + public static func == (lhs: Expectation, rhs: (expected: T, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) + } } // make this higher precedence than exponents so the Doubles either end aren't pulled in @@ -117,6 +169,11 @@ precedencegroup PlusMinusOperatorPrecedence { } infix operator ± : PlusMinusOperatorPrecedence -public func ±(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, delta: Double) { +// swiftlint:disable:next identifier_name +public func ±(lhs: Value, rhs: Value) -> (expected: Value, delta: Value) { + return (expected: lhs, delta: rhs) +} +// swiftlint:disable:next identifier_name +public func ±(lhs: Value, rhs: Double) -> (expected: Value, delta: Double) { return (expected: lhs, delta: rhs) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift index 19df0d2..4036471 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -1,37 +1,49 @@ import Foundation +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + var generator = actual.makeIterator() + return PredicateStatus(bool: generator.next() == nil) + } +} /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualSeq = try actualExpression.evaluate() - if actualSeq == nil { - return true - } - var generator = actualSeq!.makeIterator() - return generator.next() == nil +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.isEmpty) + } +} + +/// A Nimble matcher that succeeds when a value is "empty". For collections, this +/// means the are no items in that collection. For strings, it is an empty string. +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.isEmpty) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualString = try actualExpression.evaluate() - return actualString == nil || NSString(string: actualString!).length == 0 +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.isEmpty) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For NSString instances, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualString = try actualExpression.evaluate() - return actualString == nil || actualString!.length == 0 +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.length == 0) } } @@ -40,52 +52,58 @@ public func beEmpty() -> NonNilMatcherFunc { /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualDictionary = try actualExpression.evaluate() - return actualDictionary == nil || actualDictionary!.count == 0 - } +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.count == 0) + } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actualArray = try actualExpression.evaluate() - return actualArray == nil || actualArray!.count == 0 - } +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.count == 0) + } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" - let actual = try actualExpression.evaluate() - return actual == nil || actual!.count == 0 +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + return PredicateStatus(bool: actual.count == 0) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beEmptyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func beEmptyMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() - failureMessage.postfixMessage = "be empty" + let actualValue = try actualExpression.evaluate() + if let value = actualValue as? NMBCollection { - let expr = Expression(expression: ({ value as NMBCollection }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) + let expr = Expression(expression: ({ value }), location: location) + return try beEmpty().satisfies(expr).toObjectiveC() } else if let value = actualValue as? NSString { - let expr = Expression(expression: ({ value as String }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) + let expr = Expression(expression: ({ value }), location: location) + return try beEmpty().satisfies(expr).toObjectiveC() } else if let actualValue = actualValue { - failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - failureMessage.actualValue = "\(String(describing: type(of: actualValue))) type" + let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + expectedActualValueTo: badTypeErrorMsg, + customActualValue: "\(String(describing: type(of: actualValue))) type" + ) + ) } - return false + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage(expectedActualValueTo: "be empty").appendedBeNilHint() + ) } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift index 1345199..a8d1212 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -1,24 +1,10 @@ -import Foundation - - /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return actual > expected - } - return false - } -} +public func beGreaterThan(_ expectedValue: T?) -> Predicate { + let errorMessage = "be greater than <\(stringify(expectedValue))>" + return Predicate.simple(errorMessage) { actualExpression in + guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } -/// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending - return matches + return PredicateStatus(bool: actual > expected) } } @@ -26,16 +12,29 @@ public func >(lhs: Expectation, rhs: T) { lhs.to(beGreaterThan(rhs)) } -public func >(lhs: Expectation, rhs: NMBComparable?) { +#if canImport(Darwin) +import enum Foundation.ComparisonResult + +/// A Nimble matcher that succeeds when the actual value is greater than the expected value. +public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { + let errorMessage = "be greater than <\(stringify(expectedValue))>" + return Predicate.simple(errorMessage) { actualExpression in + let actualValue = try actualExpression.evaluate() + let matches = actualValue != nil + && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending + return PredicateStatus(bool: matches) + } +} + +public func > (lhs: Expectation, rhs: NMBComparable?) { lhs.to(beGreaterThan(rhs)) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +extension NMBPredicate { + @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } - return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) + return try beGreaterThan(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift index 2949fce..affa58c 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -1,43 +1,41 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - if let actual = actualValue, let expected = expectedValue { - return actual >= expected - } - return false +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + let message = "be greater than or equal to <\(stringify(expectedValue))>" + return Predicate.simple(message) { actualExpression in + guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } + + return PredicateStatus(bool: actual >= expected) } } +public func >=(lhs: Expectation, rhs: T) { + lhs.to(beGreaterThanOrEqualTo(rhs)) +} + +#if canImport(Darwin) +import enum Foundation.ComparisonResult + /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + let message = "be greater than or equal to <\(stringify(expectedValue))>" + return Predicate.simple(message) { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending - return matches + return PredicateStatus(bool: matches) } } -public func >=(lhs: Expectation, rhs: T) { - lhs.to(beGreaterThanOrEqualTo(rhs)) -} - public func >=(lhs: Expectation, rhs: T) { lhs.to(beGreaterThanOrEqualTo(rhs)) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +extension NMBPredicate { + @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } - return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + return try beGreaterThanOrEqualTo(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift index ca3357b..f3db774 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -1,46 +1,46 @@ -import Foundation - - /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. -public func beIdenticalTo(_ expected: Any?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - #if os(Linux) - let actual = try actualExpression.evaluate() as? AnyObject - #else - let actual = try actualExpression.evaluate() as AnyObject? - #endif - failureMessage.actualValue = "\(identityAsString(actual))" - failureMessage.postfixMessage = "be identical to \(identityAsString(expected))" - #if os(Linux) - return actual === (expected as? AnyObject) && actual !== nil - #else - return actual === (expected as AnyObject?) && actual !== nil - #endif +public func beIdenticalTo(_ expected: AnyObject?) -> Predicate { + return Predicate.define { actualExpression in + let actual = try actualExpression.evaluate() + + let bool = actual === expected && actual !== nil + return PredicateResult( + bool: bool, + message: .expectedCustomValueTo( + "be identical to \(identityAsString(expected))", + actual: "\(identityAsString(actual))" + ) + ) } } -public func ===(lhs: Expectation, rhs: Any?) { - lhs.to(beIdenticalTo(rhs)) -} -public func !==(lhs: Expectation, rhs: Any?) { - lhs.toNot(beIdenticalTo(rhs)) +extension Expectation where T == AnyObject { + public static func === (lhs: Expectation, rhs: AnyObject?) { + lhs.to(beIdenticalTo(rhs)) + } + + public static func !== (lhs: Expectation, rhs: AnyObject?) { + lhs.toNot(beIdenticalTo(rhs)) + } } /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. /// /// Alias for "beIdenticalTo". -public func be(_ expected: Any?) -> NonNilMatcherFunc { +public func be(_ expected: AnyObject?) -> Predicate { return beIdenticalTo(expected) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let aExpr = actualExpression.cast { $0 as Any? } - return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) +#if canImport(Darwin) +import class Foundation.NSObject + +extension NMBPredicate { + @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBPredicate { + return NMBPredicate { actualExpression in + let aExpr = actualExpression.cast { $0 as AnyObject? } + return try beIdenticalTo(expected).satisfies(aExpr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift index fbcd7c7..256f3a6 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -1,40 +1,39 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return actual < expected - } - return false +public func beLessThan(_ expectedValue: T?) -> Predicate { + let message = "be less than <\(stringify(expectedValue))>" + return Predicate.simple(message) { actualExpression in + guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } + + return PredicateStatus(bool: actual < expected) } } +public func <(lhs: Expectation, rhs: T) { + lhs.to(beLessThan(rhs)) +} + +#if canImport(Darwin) +import enum Foundation.ComparisonResult + /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" +public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { + let message = "be less than <\(stringify(expectedValue))>" + return Predicate.simple(message) { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending - return matches + return PredicateStatus(bool: matches) } } -public func <(lhs: Expectation, rhs: T) { - lhs.to(beLessThan(rhs)) -} - -public func <(lhs: Expectation, rhs: NMBComparable?) { +public func < (lhs: Expectation, rhs: NMBComparable?) { lhs.to(beLessThan(rhs)) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +extension NMBPredicate { + @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } - return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) + return try beLessThan(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift index a0cd2f0..6174be5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -1,41 +1,39 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" - if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return actual <= expected - } - return false +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in + guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } + + return PredicateStatus(bool: actual <= expected) } } +public func <=(lhs: Expectation, rhs: T) { + lhs.to(beLessThanOrEqualTo(rhs)) +} + +#if canImport(Darwin) +import enum Foundation.ComparisonResult + /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in let actualValue = try actualExpression.evaluate() - return actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedDescending + let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false + return PredicateStatus(bool: matches) } } -public func <=(lhs: Expectation, rhs: T) { - lhs.to(beLessThanOrEqualTo(rhs)) -} - public func <=(lhs: Expectation, rhs: T) { lhs.to(beLessThanOrEqualTo(rhs)) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in +extension NMBPredicate { + @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } - return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) + return try beLessThanOrEqualTo(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift index 49272a3..a4094d5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -72,101 +72,76 @@ extension UInt: ExpressibleByBooleanLiteral { } } -internal func matcherWithFailureMessage(_ matcher: NonNilMatcherFunc, postprocessor: @escaping (FailureMessage) -> Void) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - defer { postprocessor(failureMessage) } - return try matcher.matcher(actualExpression, failureMessage) - } +internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { + return Predicate { actualExpression in + let result = try matcher.satisfies(actualExpression) + return PredicateResult(status: result.status, message: message) + }.requireNonNil } // MARK: beTrue() / beFalse() /// A Nimble matcher that succeeds when the actual value is exactly true. /// This matcher will not match against nils. -public func beTrue() -> NonNilMatcherFunc { - return matcherWithFailureMessage(equal(true)) { failureMessage in - failureMessage.postfixMessage = "be true" - } +public func beTrue() -> Predicate { + return rename(equal(true), failureMessage: .expectedActualValueTo("be true")) } /// A Nimble matcher that succeeds when the actual value is exactly false. /// This matcher will not match against nils. -public func beFalse() -> NonNilMatcherFunc { - return matcherWithFailureMessage(equal(false)) { failureMessage in - failureMessage.postfixMessage = "be false" - } +public func beFalse() -> Predicate { + return rename(equal(false), failureMessage: .expectedActualValueTo("be false")) } // MARK: beTruthy() / beFalsy() /// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be truthy" +public func beTruthy() -> Predicate { + return Predicate.simpleNilable("be truthy") { actualExpression in let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - // FIXME: This is a workaround to SR-2290. - // See: - // - https://bugs.swift.org/browse/SR-2290 - // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 - if let number = actualValue as? NSNumber { - return number.boolValue == true - } - - return actualValue == (true as T) - } - return actualValue != nil + return PredicateStatus(bool: actualValue == (true as T)) } } /// A Nimble matcher that succeeds when the actual value is logically false. /// This matcher will match against nils. -public func beFalsy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be falsy" +public func beFalsy() -> Predicate { + return Predicate.simpleNilable("be falsy") { actualExpression in let actualValue = try actualExpression.evaluate() - if let actualValue = actualValue { - // FIXME: This is a workaround to SR-2290. - // See: - // - https://bugs.swift.org/browse/SR-2290 - // - https://github.com/norio-nomura/Nimble/pull/5#issuecomment-237835873 - if let number = actualValue as? NSNumber { - return number.boolValue == false - } - - return actualValue == (false as T) - } - return actualValue == nil + return PredicateStatus(bool: actualValue != (true as T)) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beTruthyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func beTruthyMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try! beTruthy().matches(expr, failureMessage: failureMessage) + return try beTruthy().satisfies(expr).toObjectiveC() } } - public class func beFalsyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in + @objc public class func beFalsyMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try! beFalsy().matches(expr, failureMessage: failureMessage) + return try beFalsy().satisfies(expr).toObjectiveC() } } - public class func beTrueMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in + @objc public class func beTrueMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try! beTrue().matches(expr, failureMessage: failureMessage) + return try beTrue().satisfies(expr).toObjectiveC() } } - public class func beFalseMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } - return try! beFalse().matches(expr, failureMessage: failureMessage) + @objc public class func beFalseMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in + let expr = actualExpression.cast { value -> Bool? in + guard let value = value else { return nil } + return (value as? NSNumber)?.boolValue ?? false + } + return try beFalse().satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift index a6fb31f..c87099d 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift @@ -1,19 +1,45 @@ -import Foundation +/// A protocol which represents whether the value is nil or not. +private protocol _OptionalProtocol { + var isNil: Bool { get } +} + +extension Optional: _OptionalProtocol { + var isNil: Bool { self == nil } +} /// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" +public func beNil() -> Predicate { + return Predicate.simpleNilable("be nil") { actualExpression in let actualValue = try actualExpression.evaluate() - return actualValue == nil + if let actual = actualValue, let nestedOptionl = actual as? _OptionalProtocol { + return PredicateStatus(bool: nestedOptionl.isNil) + } + return PredicateStatus(bool: actualValue == nil) + } +} + +extension Expectation { + /// Represents `nil` value to be used with the operator overloads for `beNil`. + public struct Nil: ExpressibleByNilLiteral { + public init(nilLiteral: ()) {} + } + + public static func == (lhs: Expectation, rhs: Expectation.Nil) { + lhs.to(beNil()) + } + + public static func != (lhs: Expectation, rhs: Expectation.Nil) { + lhs.toNot(beNil()) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beNilMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher { actualExpression, failureMessage in - return try! beNil().matches(actualExpression, failureMessage: failureMessage) +#if canImport(Darwin) +import Foundation + +extension NMBPredicate { + @objc public class func beNilMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in + return try beNil().satisfies(actualExpression).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift new file mode 100644 index 0000000..b05db7f --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift @@ -0,0 +1,67 @@ +import Foundation + +/// A Nimble matcher for Result that succeeds when the actual value is success. +/// +/// You can pass a closure to do any arbitrary custom matching to the value inside result. +/// The closure only gets called when the result is success. +public func beSuccess( + test: ((Success) -> Void)? = nil +) -> Predicate> { + return Predicate.define { expression in + var rawMessage = "be " + if test != nil { + rawMessage += " that satisfies block" + } + let message = ExpectationMessage.expectedActualValueTo(rawMessage) + + guard case let .success(value)? = try expression.evaluate() else { + return PredicateResult(status: .doesNotMatch, message: message) + } + + var matches = true + if let test = test { + let assertions = gatherFailingExpectations { + test(value) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } + + return PredicateResult(bool: matches, message: message) + } +} + +/// A Nimble matcher for Result that succeeds when the actual value is failure. +/// +/// You can pass a closure to do any arbitrary custom matching to the error inside result. +/// The closure only gets called when the result is failure. +public func beFailure( + test: ((Failure) -> Void)? = nil +) -> Predicate> { + return Predicate.define { expression in + var rawMessage = "be " + if test != nil { + rawMessage += " that satisfies block" + } + let message = ExpectationMessage.expectedActualValueTo(rawMessage) + + guard case let .failure(error)? = try expression.evaluate() else { + return PredicateResult(status: .doesNotMatch, message: message) + } + + var matches = true + if let test = test { + let assertions = gatherFailingExpectations { + test(error) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } + + return PredicateResult(bool: matches, message: message) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift index 8f86265..c4bbaf6 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift @@ -1,18 +1,17 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> MatcherFunc<()> { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be void" +public func beVoid() -> Predicate<()> { + return Predicate.simpleNilable("be void") { actualExpression in let actualValue: ()? = try actualExpression.evaluate() - return actualValue != nil + return PredicateStatus(bool: actualValue != nil) } } -public func ==(lhs: Expectation<()>, rhs: ()) { - lhs.to(beVoid()) -} +extension Expectation where T == () { + public static func == (lhs: Expectation<()>, rhs: ()) { + lhs.to(beVoid()) + } -public func !=(lhs: Expectation<()>, rhs: ()) { - lhs.toNot(beVoid()) -} \ No newline at end of file + public static func != (lhs: Expectation<()>, rhs: ()) { + lhs.toNot(beVoid()) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift new file mode 100644 index 0000000..9c56e9e --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift @@ -0,0 +1,21 @@ +/// A Nimble matcher that succeeds when the actual value is within given range. +public func beWithin(_ range: Range) -> Predicate { + let errorMessage = "be within range <(\(range.lowerBound)..<\(range.upperBound))>" + return Predicate.simple(errorMessage) { actualExpression in + if let actual = try actualExpression.evaluate() { + return PredicateStatus(bool: range.contains(actual)) + } + return .fail + } +} + +/// A Nimble matcher that succeeds when the actual value is within given range. +public func beWithin(_ range: ClosedRange) -> Predicate { + let errorMessage = "be within range <(\(range.lowerBound)...\(range.upperBound))>" + return Predicate.simple(errorMessage) { actualExpression in + if let actual = try actualExpression.evaluate() { + return PredicateStatus(bool: range.contains(actual)) + } + return .fail + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift index ef6c603..90b6b5d 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -1,63 +1,55 @@ import Foundation - /// A Nimble matcher that succeeds when the actual sequence's first element /// is equal to the expected value. -public func beginWith(_ startingElement: T) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement - } - return false +public func beginWith(_ startingElement: S.Element) -> Predicate where S.Element: Equatable { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { return .fail } + + var actualGenerator = actualValue.makeIterator() + return PredicateStatus(bool: actualGenerator.next() == startingElement) } } /// A Nimble matcher that succeeds when the actual collection's first element /// is equal to the expected object. -public func beginWith(_ startingElement: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - guard let collection = try actualExpression.evaluate() else { return false } - guard collection.count > 0 else { return false } - #if os(Linux) +public func beginWith(_ startingElement: Any) -> Predicate { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + guard let collection = try actualExpression.evaluate() else { return .fail } + guard collection.count > 0 else { return .doesNotMatch } + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let collectionValue = collection.object(at: 0) as AnyObject + #else guard let collectionValue = collection.object(at: 0) as? NSObject else { - return false + return .fail } - #else - let collectionValue = collection.object(at: 0) as AnyObject #endif - return collectionValue.isEqual(startingElement) + return PredicateStatus(bool: collectionValue.isEqual(startingElement)) } } /// A Nimble matcher that succeeds when the actual string contains expected substring /// where the expected substring's location is zero. -public func beginWith(_ startingSubstring: String) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingSubstring)>" - if let actual = try actualExpression.evaluate() { - let range = actual.range(of: startingSubstring) - return range != nil && range!.lowerBound == actual.startIndex - } - return false +public func beginWith(_ startingSubstring: String) -> Predicate { + return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + return PredicateStatus(bool: actual.hasPrefix(startingSubstring)) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try! actualExpression.evaluate() - if let _ = actual as? String { +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate { + return NMBPredicate { actualExpression in + let actual = try actualExpression.evaluate() + if actual is String { let expr = actualExpression.cast { $0 as? String } - return try! beginWith(expected as! String).matches(expr, failureMessage: failureMessage) + // swiftlint:disable:next force_cast + return try beginWith(expected as! String).satisfies(expr).toObjectiveC() } else { let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try! beginWith(expected).matches(expr, failureMessage: failureMessage) + return try beginWith(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift new file mode 100644 index 0000000..c3a79b1 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift @@ -0,0 +1,39 @@ +/// A Nimble matcher that succeeds when the exepected sequence is a prefix of the actual sequence. +/// +/// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854218-starts +public func beginWith(prefix expectedPrefix: Seq2?) + -> Predicate where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { + return Predicate.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in + let actualPrefix = try actualExpression.evaluate() + switch (expectedPrefix, actualPrefix) { + case (nil, _?): + return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + case (nil, nil), (_, nil): + return PredicateResult(status: .fail, message: msg) + case (let expected?, let actual?): + let matches = actual.starts(with: expected) + return PredicateResult(bool: matches, message: msg) + } + } +} + +/// A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test. +/// +/// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2996828-starts +public func beginWith( + prefix expectedPrefix: Seq2?, + by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool +) -> Predicate { + return Predicate.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in + let actualPrefix = try actualExpression.evaluate() + switch (expectedPrefix, actualPrefix) { + case (nil, _?): + return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + case (nil, nil), (_, nil): + return PredicateResult(status: .fail, message: msg) + case (let expected?, let actual?): + let matches = actual.starts(with: expected, by: areEquivalent) + return PredicateResult(bool: matches, message: msg) + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift index 4400d30..38d1dab 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -1,95 +1,136 @@ +#if canImport(Foundation) import Foundation +#endif -/// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(_ items: T...) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ +/// A Nimble matcher that succeeds when the actual sequence contains the expected values. +public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { return contain(items) } -public func contain(_ items: [T]) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" - if let actual = try actualExpression.evaluate() { - return items.all { - return actual.contains($0) - } +/// A Nimble matcher that succeeds when the actual sequence contains the expected values. +public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { + return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = items.allSatisfy { + return actual.contains($0) + } + return PredicateStatus(bool: matches) + } +} + +/// A Nimble matcher that succeeds when the actual set contains the expected values. +public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { + return contain(items) +} + +/// A Nimble matcher that succeeds when the actual set contains the expected values. +public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { + return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = items.allSatisfy { + return actual.contains($0) } - return false + return PredicateStatus(bool: matches) + } +} + +/// A Nimble matcher that succeeds when the actual set contains the expected values. +public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { + return contain(items) +} + +/// A Nimble matcher that succeeds when the actual set contains the expected values. +public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { + return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = items.allSatisfy { + return actual.contains($0) + } + return PredicateStatus(bool: matches) } } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: String...) -> NonNilMatcherFunc { +public func contain(_ substrings: String...) -> Predicate { return contain(substrings) } -public func contain(_ substrings: [String]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" - if let actual = try actualExpression.evaluate() { - return substrings.all { - let range = actual.range(of: $0) - return range != nil && !range!.isEmpty - } +public func contain(_ substrings: [String]) -> Predicate { + return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = substrings.allSatisfy { + let range = actual.range(of: $0) + return range != nil && !range!.isEmpty } - return false + return PredicateStatus(bool: matches) } } +#if canImport(Foundation) /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: NSString...) -> NonNilMatcherFunc { +public func contain(_ substrings: NSString...) -> Predicate { return contain(substrings) } -public func contain(_ substrings: [NSString]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" - if let actual = try actualExpression.evaluate() { - return substrings.all { actual.range(of: $0.description).length != 0 } - } - return false +public func contain(_ substrings: [NSString]) -> Predicate { + return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = substrings.allSatisfy { actual.range(of: $0.description).length != 0 } + return PredicateStatus(bool: matches) } } +#endif /// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(_ items: Any?...) -> NonNilMatcherFunc { +public func contain(_ items: Any?...) -> Predicate { return contain(items) } -public func contain(_ items: [Any?]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" - guard let actual = try actualExpression.evaluate() else { return false } - return items.all { item in - return item != nil && actual.contains(item!) +public func contain(_ items: [Any?]) -> Predicate { + return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in + guard let actual = try actualExpression.evaluate() else { return .fail } + + let matches = items.allSatisfy { item in + return item.map { actual.contains($0) } ?? false } + return PredicateStatus(bool: matches) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func containMatcher(_ expected: [NSObject]) -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() + let actualValue = try actualExpression.evaluate() if let value = actualValue as? NMBContainer { let expr = Expression(expression: ({ value as NMBContainer }), location: location) // A straightforward cast on the array causes this to crash, so we have to cast the individual items let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) - return try! contain(expectedOptionals).matches(expr, failureMessage: failureMessage) + return try contain(expectedOptionals).satisfies(expr).toObjectiveC() } else if let value = actualValue as? NSString { let expr = Expression(expression: ({ value as String }), location: location) - return try! contain(expected as! [String]).matches(expr, failureMessage: failureMessage) - } else if actualValue != nil { - failureMessage.postfixMessage = "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" + // swiftlint:disable:next force_cast + return try contain(expected as! [String]).satisfies(expr).toObjectiveC() + } + + let message: ExpectationMessage + if actualValue != nil { + message = ExpectationMessage.expectedActualValueTo( + "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" + ) } else { - failureMessage.postfixMessage = "contain <\(arrayAsString(expected))>" + message = ExpectationMessage + .expectedActualValueTo("contain <\(arrayAsString(expected))>") + .appendedBeNilHint() } - return false + return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift new file mode 100644 index 0000000..2e7875b --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift @@ -0,0 +1,61 @@ +public func containElementSatisfying( + _ predicate: @escaping ((S.Element) -> Bool), _ predicateDescription: String = "" +) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + if predicateDescription == "" { + message = .expectedTo("find object in collection that satisfies predicate") + } else { + message = .expectedTo("find object in collection \(predicateDescription)") + } + + if let sequence = try actualExpression.evaluate() { + for object in sequence { + if predicate(object) { + return PredicateResult(bool: true, message: message) + } + } + + return PredicateResult(bool: false, message: message) + } + + return PredicateResult(status: .fail, message: message) + } +} + +#if canImport(Darwin) +import class Foundation.NSObject +import struct Foundation.NSFastEnumerationIterator +import protocol Foundation.NSFastEnumeration + +extension NMBPredicate { + @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBPredicate { + return NMBPredicate { actualExpression in + let value = try actualExpression.evaluate() + guard let enumeration = value as? NSFastEnumeration else { + let message = ExpectationMessage.fail( + "containElementSatisfying must be provided an NSFastEnumeration object" + ) + return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) + } + + let message = ExpectationMessage + .expectedTo("find object in collection that satisfies predicate") + .toObjectiveC() + + var iterator = NSFastEnumerationIterator(enumeration) + while let item = iterator.next() { + guard let object = item as? NSObject else { + continue + } + + if predicate(object) { + return NMBPredicateResult(status: .matches, message: message) + } + } + + return NMBPredicateResult(status: .doesNotMatch, message: message) + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift new file mode 100644 index 0000000..708cf1c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift @@ -0,0 +1,42 @@ +/// A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain the same elements in +/// the same order. +/// +/// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854213-elementsequal +public func elementsEqual( + _ expectedValue: Seq2? +) -> Predicate where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { + return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in + let actualValue = try actualExpression.evaluate() + switch (expectedValue, actualValue) { + case (nil, _?): + return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + case (nil, nil), (_, nil): + return PredicateResult(status: .fail, message: msg) + case (let expected?, let actual?): + let matches = expected.elementsEqual(actual) + return PredicateResult(bool: matches, message: msg) + } + } +} + +/// A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in +/// the same order, using the given predicate as the equivalence test. +/// +/// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal +public func elementsEqual( + _ expectedValue: Seq2?, + by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool +) -> Predicate { + return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in + let actualValue = try actualExpression.evaluate() + switch (expectedValue, actualValue) { + case (nil, _?): + return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + case (nil, nil), (_, nil): + return PredicateResult(status: .fail, message: msg) + case (let expected?, let actual?): + let matches = actual.elementsEqual(expected, by: areEquivalent) + return PredicateResult(bool: matches, message: msg) + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift index b96e96c..950d9d5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -1,73 +1,65 @@ import Foundation - /// A Nimble matcher that succeeds when the actual sequence's last element /// is equal to the expected value. -public func endWith(_ endingElement: T) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingElement)>" +public func endWith(_ endingElement: S.Element) -> Predicate where S.Element: Equatable { + return Predicate.simple("end with <\(endingElement)>") { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { return .fail } - if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.makeIterator() - var lastItem: T? - var item: T? - repeat { - lastItem = item - item = actualGenerator.next() - } while(item != nil) - - return lastItem == endingElement - } - return false + var actualGenerator = actualValue.makeIterator() + var lastItem: S.Element? + var item: S.Element? + repeat { + lastItem = item + item = actualGenerator.next() + } while(item != nil) + + return PredicateStatus(bool: lastItem == endingElement) } } /// A Nimble matcher that succeeds when the actual collection's last element /// is equal to the expected object. -public func endWith(_ endingElement: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingElement)>" - guard let collection = try actualExpression.evaluate() else { return false } - guard collection.count > 0 else { return false } - #if os(Linux) +public func endWith(_ endingElement: Any) -> Predicate { + return Predicate.simple("end with <\(endingElement)>") { actualExpression in + guard let collection = try actualExpression.evaluate() else { return .fail } + + guard collection.count > 0 else { return PredicateStatus(bool: false) } + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let collectionValue = collection.object(at: collection.count - 1) as AnyObject + #else guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { - return false + return .fail } - #else - let collectionValue = collection.object(at: collection.count - 1) as AnyObject #endif - return collectionValue.isEqual(endingElement) + return PredicateStatus(bool: collectionValue.isEqual(endingElement)) } } - /// A Nimble matcher that succeeds when the actual string contains the expected substring /// where the expected substring's location is the actual string's length minus the /// expected substring's length. -public func endWith(_ endingSubstring: String) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "end with <\(endingSubstring)>" - if let collection = try actualExpression.evaluate() { - return collection.hasSuffix(endingSubstring) - } - return false +public func endWith(_ endingSubstring: String) -> Predicate { + return Predicate.simple("end with <\(endingSubstring)>") { actualExpression in + guard let collection = try actualExpression.evaluate() else { return .fail } + + return PredicateStatus(bool: collection.hasSuffix(endingSubstring)) } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let actual = try! actualExpression.evaluate() - if let _ = actual as? String { +#if canImport(Darwin) +extension NMBPredicate { + @objc public class func endWithMatcher(_ expected: Any) -> NMBPredicate { + return NMBPredicate { actualExpression in + let actual = try actualExpression.evaluate() + if actual is String { let expr = actualExpression.cast { $0 as? String } - return try! endWith(expected as! String).matches(expr, failureMessage: failureMessage) + // swiftlint:disable:next force_cast + return try endWith(expected as! String).satisfies(expr).toObjectiveC() } else { let expr = actualExpression.cast { $0 as? NMBOrderedCollection } - return try! endWith(expected).matches(expr, failureMessage: failureMessage) + return try endWith(expected).satisfies(expr).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift new file mode 100644 index 0000000..0d05ba9 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift @@ -0,0 +1,127 @@ +// swiftlint:disable large_tuple vertical_whitespace + +// MARK: Tuple2 + +/// A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: (T1, T2)? +) -> Predicate<(T1, T2)> { + equal(expectedValue, by: ==) +} + +public func ==( + lhs: Expectation<(T1, T2)>, + rhs: (T1, T2)? +) { + lhs.to(equal(rhs)) +} + +public func !=( + lhs: Expectation<(T1, T2)>, + rhs: (T1, T2)? +) { + lhs.toNot(equal(rhs)) +} + + +// MARK: Tuple3 + +/// A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: (T1, T2, T3)? +) -> Predicate<(T1, T2, T3)> { + equal(expectedValue, by: ==) +} + +public func ==( + lhs: Expectation<(T1, T2, T3)>, + rhs: (T1, T2, T3)? +) { + lhs.to(equal(rhs)) +} + +public func !=( + lhs: Expectation<(T1, T2, T3)>, + rhs: (T1, T2, T3)? +) { + lhs.toNot(equal(rhs)) +} + + +// MARK: Tuple4 + +/// A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: (T1, T2, T3, T4)? +) -> Predicate<(T1, T2, T3, T4)> { + equal(expectedValue, by: ==) +} + +public func ==( + lhs: Expectation<(T1, T2, T3, T4)>, + rhs: (T1, T2, T3, T4)? +) { + lhs.to(equal(rhs)) +} + +public func !=( + lhs: Expectation<(T1, T2, T3, T4)>, + rhs: (T1, T2, T3, T4)? +) { + lhs.toNot(equal(rhs)) +} + + +// MARK: Tuple5 + +/// A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: (T1, T2, T3, T4, T5)? +) -> Predicate<(T1, T2, T3, T4, T5)> { + equal(expectedValue, by: ==) +} + +public func ==( + lhs: Expectation<(T1, T2, T3, T4, T5)>, + rhs: (T1, T2, T3, T4, T5)? +) { + lhs.to(equal(rhs)) +} + +public func !=( + lhs: Expectation<(T1, T2, T3, T4, T5)>, + rhs: (T1, T2, T3, T4, T5)? +) { + lhs.toNot(equal(rhs)) +} + + +// MARK: Tuple6 + +/// A Nimble matcher that succeeds when the actual tuple is equal to the expected tuple. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: (T1, T2, T3, T4, T5, T6)? +) -> Predicate<(T1, T2, T3, T4, T5, T6)> { + equal(expectedValue, by: ==) +} + +public func ==( + lhs: Expectation<(T1, T2, T3, T4, T5, T6)>, + rhs: (T1, T2, T3, T4, T5, T6)? +) { + lhs.to(equal(rhs)) +} + +public func !=( + lhs: Expectation<(T1, T2, T3, T4, T5, T6)>, + rhs: (T1, T2, T3, T4, T5, T6)? +) { + lhs.toNot(equal(rhs)) +} + +// swiftlint:enable large_tuple vertical_whitespace diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift index 53579e0..7b89860 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -1,21 +1,41 @@ -import Foundation +internal func equal( + _ expectedValue: T?, + by areEquivalent: @escaping (T, T) -> Bool +) -> Predicate { + Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + switch (expectedValue, actualValue) { + case (nil, _?): + return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + case (_, nil): + return PredicateResult(status: .fail, message: msg) + case (let expected?, let actual?): + let matches = areEquivalent(expected, actual) + return PredicateResult(bool: matches, message: msg) + } + } +} /// A Nimble matcher that succeeds when the actual value is equal to the expected value. /// Values can support equal by supporting the Equatable protocol. /// /// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - let matches = actualValue == expectedValue && expectedValue != nil - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false +public func equal(_ expectedValue: T) -> Predicate { + equal(expectedValue as T?) +} + +/// A Nimble matcher allowing comparison of collection with optional type +public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { + Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - return matches + + let matches = expectedValue == actualValue + return PredicateResult(bool: matches, message: msg) } } @@ -23,117 +43,106 @@ public func equal(_ expectedValue: T?) -> NonNilMatcherFunc { /// Values can support equal by supporting the Equatable protocol. /// /// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: [T: C]?) -> NonNilMatcherFunc<[T: C]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false - } - return expectedValue! == actualValue! - } +public func equal(_ expectedValue: T?) -> Predicate { + equal(expectedValue, by: ==) } -/// A Nimble matcher that succeeds when the actual collection is equal to the expected collection. -/// Items must implement the Equatable protocol. -public func equal(_ expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - let actualValue = try actualExpression.evaluate() - if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - return false - } - return expectedValue! == actualValue! - } +/// A Nimble matcher that succeeds when the actual set is equal to the expected set. +public func equal(_ expectedValue: Set) -> Predicate> { + equal(expectedValue as Set?) } -/// A Nimble matcher allowing comparison of collection with optional type -public func equal(_ expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" - if let actualValue = try actualExpression.evaluate() { - if expectedValue.count != actualValue.count { - return false - } - - for (index, item) in actualValue.enumerated() { - let otherItem = expectedValue[index] - if item == nil && otherItem == nil { - continue - } else if item == nil && otherItem != nil { - return false - } else if item != nil && otherItem == nil { - return false - } else if item! != otherItem! { - return false - } - } - - return true - } else { - failureMessage.postfixActual = " (use beNil() to match nils)" - } - - return false - } +/// A Nimble matcher that succeeds when the actual set is equal to the expected set. +public func equal(_ expectedValue: Set?) -> Predicate> { + equal(expectedValue, stringify: { stringify($0) }) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { - return equal(expectedValue, stringify: { stringify($0) }) +public func equal(_ expectedValue: Set) -> Predicate> { + equal(expectedValue as Set?) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { - return equal(expectedValue, stringify: { - if let set = $0 { - return stringify(Array(set).sorted { $0 < $1 }) - } else { - return "nil" - } +public func equal(_ expectedValue: Set?) -> Predicate> { + equal(expectedValue, stringify: { set in + stringify(set.map { Array($0).sorted(by: <) }) }) } -private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> NonNilMatcherFunc> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { + Predicate { actualExpression in + var errorMessage: ExpectationMessage = + .expectedActualValueTo("equal <\(stringify(expectedValue))>") + + guard let expectedValue = expectedValue else { + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) + } + + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) + } + + errorMessage = .expectedCustomValueTo( + "equal <\(stringify(expectedValue))>", + actual: "<\(stringify(actualValue))>" + ) - if let expectedValue = expectedValue { - if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actualValue))>" + if expectedValue == actualValue { + return PredicateResult( + status: .matches, + message: errorMessage + ) + } - if expectedValue == actualValue { - return true - } + let missing = expectedValue.subtracting(actualValue) + if missing.count > 0 { + errorMessage = errorMessage.appended(message: ", missing <\(stringify(missing))>") + } - let missing = expectedValue.subtracting(actualValue) - if missing.count > 0 { - failureMessage.postfixActual += ", missing <\(stringify(missing))>" - } + let extra = actualValue.subtracting(expectedValue) + if extra.count > 0 { + errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") + } + return PredicateResult( + status: .doesNotMatch, + message: errorMessage + ) + } +} - let extra = actualValue.subtracting(expectedValue) - if extra.count > 0 { - failureMessage.postfixActual += ", extra <\(stringify(extra))>" - } - } - } else { - failureMessage.postfixActual = " (use beNil() to match nils)" +/// A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary +public func equal(_ expectedValue: [K: V?]) -> Predicate<[K: V]> { + Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - return false + let matches = expectedValue == actualValue + return PredicateResult(bool: matches, message: msg) } } +public func ==(lhs: Expectation, rhs: T) { + lhs.to(equal(rhs)) +} + public func ==(lhs: Expectation, rhs: T?) { lhs.to(equal(rhs)) } +public func !=(lhs: Expectation, rhs: T) { + lhs.toNot(equal(rhs)) +} + public func !=(lhs: Expectation, rhs: T?) { lhs.toNot(equal(rhs)) } @@ -146,35 +155,53 @@ public func !=(lhs: Expectation<[T]>, rhs: [T]?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation>, rhs: Set?) { +public func == (lhs: Expectation>, rhs: Set) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation>, rhs: Set?) { +public func == (lhs: Expectation>, rhs: Set?) { + lhs.to(equal(rhs)) +} + +public func != (lhs: Expectation>, rhs: Set) { + lhs.toNot(equal(rhs)) +} + +public func != (lhs: Expectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } +public func ==(lhs: Expectation>, rhs: Set) { + lhs.to(equal(rhs)) +} + public func ==(lhs: Expectation>, rhs: Set?) { lhs.to(equal(rhs)) } +public func !=(lhs: Expectation>, rhs: Set) { + lhs.toNot(equal(rhs)) +} + public func !=(lhs: Expectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { lhs.toNot(equal(rhs)) } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - return try! equal(expected).matches(actualExpression, failureMessage: failureMessage) +#if canImport(Darwin) +import class Foundation.NSObject + +extension NMBPredicate { + @objc public class func equalMatcher(_ expected: NSObject) -> NMBPredicate { + NMBPredicate { actualExpression in + try equal(expected).satisfies(actualExpression).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift index 5b24af2..20397f5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -1,5 +1,3 @@ -import Foundation - // The `haveCount` matchers do not print the full string representation of the collection value, // instead they only print the type name and the expected count. This makes it easier to understand // the reason for failed expectations. See: https://github.com/Quick/Nimble/issues/308. @@ -7,50 +5,69 @@ import Foundation /// A Nimble matcher that succeeds when the actual Collection's count equals /// the expected value -public func haveCount(_ expectedValue: T.IndexDistance) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func haveCount(_ expectedValue: Int) -> Predicate { + return Predicate.define { actualExpression in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" + let message = ExpectationMessage + .expectedCustomValueTo( + "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", + actual: "\(actualValue.count)" + ) + .appended(details: "Actual Value: \(stringify(actualValue))") + let result = expectedValue == actualValue.count - failureMessage.actualValue = "\(actualValue.count)" - failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" - return result + return PredicateResult(bool: result, message: message) } else { - return false + return PredicateResult(status: .fail, message: .fail("")) } } } /// A Nimble matcher that succeeds when the actual collection's count equals /// the expected value -public func haveCount(_ expectedValue: Int) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in +public func haveCount(_ expectedValue: Int) -> Predicate { + return Predicate { actualExpression in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" + let message = ExpectationMessage + .expectedCustomValueTo( + "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", + actual: "\(actualValue.count)" + ) + .appended(details: "Actual Value: \(stringify(actualValue))") + let result = expectedValue == actualValue.count - failureMessage.actualValue = "\(actualValue.count)" - failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" - return result + return PredicateResult(bool: result, message: message) } else { - return false + return PredicateResult(status: .fail, message: .fail("")) } } } -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +#if canImport(Darwin) +import Foundation + +extension NMBPredicate { + @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location - let actualValue = try! actualExpression.evaluate() + let actualValue = try actualExpression.evaluate() if let value = actualValue as? NMBCollection { let expr = Expression(expression: ({ value as NMBCollection}), location: location) - return try! haveCount(expected.intValue).matches(expr, failureMessage: failureMessage) - } else if let actualValue = actualValue { - failureMessage.postfixMessage = "get type of NSArray, NSSet, NSDictionary, or NSHashTable" - failureMessage.actualValue = "\(String(describing: type(of: actualValue)))" + return try haveCount(expected.intValue).satisfies(expr).toObjectiveC() + } + + let message: ExpectationMessage + if let actualValue = actualValue { + message = ExpectationMessage.expectedCustomValueTo( + "get type of NSArray, NSSet, NSDictionary, or NSHashTable", + actual: "\(String(describing: type(of: actualValue)))" + ) + } else { + message = ExpectationMessage + .expectedActualValueTo("have a collection with count \(stringify(expected.intValue))") + .appendedBeNilHint() } - return false + return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift index 3ad5fb5..93363b3 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -1,30 +1,23 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual string satisfies the regular expression /// described by the expected string. -public func match(_ expectedValue: String?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" - - if let actual = try actualExpression.evaluate() { - if let regexp = expectedValue { - return actual.range(of: regexp, options: .regularExpression) != nil - } - } +public func match(_ expectedValue: String?) -> Predicate { + return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in + guard let actual = try actualExpression.evaluate(), let regexp = expectedValue else { return .fail } - return false + let bool = actual.range(of: regexp, options: .regularExpression) != nil + return PredicateStatus(bool: bool) } } -#if _runtime(_ObjC) +#if canImport(Darwin) +import class Foundation.NSString -extension NMBObjCMatcher { - public class func matchMatcher(_ expected: NSString) -> NMBMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in +extension NMBPredicate { + @objc public class func matchMatcher(_ expected: NSString) -> NMBPredicate { + return NMBPredicate { actualExpression in let actual = actualExpression.cast { $0 as? String } - return try! match(expected.description).matches(actual, failureMessage: failureMessage) + return try match(expected.description).satisfies(actual).toObjectiveC() } } } - #endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift index 2092cb6..3edc99b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -1,26 +1,68 @@ -import Foundation +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +public func matchError(_ error: T) -> Predicate { + return Predicate.define { actualExpression in + let actualError = try actualExpression.evaluate() + + let message = messageForError( + postfixMessageVerb: "match", + actualError: actualError, + error: error + ) + + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + } + + return PredicateResult(bool: matches, message: message) + } +} /// A Nimble matcher that succeeds when the actual expression evaluates to an /// error from the specified case. /// /// Errors are tried to be compared by their implementation of Equatable, /// otherwise they fallback to comparision by _domain and _code. -public func matchError(_ error: T) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - let actualError: Error? = try actualExpression.evaluate() +public func matchError(_ error: T) -> Predicate { + return Predicate.define { actualExpression in + let actualError = try actualExpression.evaluate() + + let message = messageForError( + postfixMessageVerb: "match", + actualError: actualError, + error: error + ) - setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) - return errorMatchesNonNilFieldsOrClosure(actualError, error: error) + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + } + + return PredicateResult(bool: matches, message: message) } } /// A Nimble matcher that succeeds when the actual expression evaluates to an /// error of the specified type -public func matchError(_ errorType: T.Type) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - let actualError: Error? = try actualExpression.evaluate() +public func matchError(_ errorType: T.Type) -> Predicate { + return Predicate.define { actualExpression in + let actualError = try actualExpression.evaluate() + + let message = messageForError( + postfixMessageVerb: "match", + actualError: actualError, + errorType: errorType + ) + + var matches = false + if actualError as? T != nil { + matches = true + } - setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) - return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) + return PredicateResult(bool: matches, message: message) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift deleted file mode 100644 index 02d3245..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift +++ /dev/null @@ -1,69 +0,0 @@ -/// A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// @see NonNilMatcherFunc if you prefer to have this matcher fail when nil -/// values are recieved in an expectation. -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -public struct MatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage) - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try !matcher(actualExpression, failureMessage) - } -} - -/// A convenience API to build matchers that don't need special negation -/// behavior. The toNot() behavior is the negation of to(). -/// -/// Unlike MatcherFunc, this will always fail if an expectation contains nil. -/// This applies regardless of using to() or toNot(). -/// -/// You may use this when implementing your own custom matchers. -/// -/// Use the Matcher protocol instead of this type to accept custom matchers as -/// input parameters. -/// @see allPass for an example that uses accepts other matchers as input. -public struct NonNilMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage) throws -> Bool - - public init(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) { - self.matcher = matcher - } - - public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - let pass = try !matcher(actualExpression, failureMessage) - if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { - return false - } - return pass - } - - internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - if try actualExpression.evaluate() == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" - return true - } - return false - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift index ac1eb9d..7d969ad 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -1,99 +1,52 @@ import Foundation // `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. -#if _runtime(_ObjC) +#if canImport(Darwin) import CoreGraphics #endif -/// Implement this protocol to implement a custom matcher for Swift -public protocol Matcher { - associatedtype ValueType - func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool -} - -#if _runtime(_ObjC) -/// Objective-C interface to the Swift variant of Matcher. -@objc public protocol NMBMatcher { - func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool -} -#endif - -#if _runtime(_ObjC) /// Protocol for types that support contain() matcher. -@objc public protocol NMBContainer { - @objc(containsObject:) +public protocol NMBContainer { func contains(_ anObject: Any) -> Bool } +#if canImport(Darwin) +// swiftlint:disable:next todo // FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a -//extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet -#else -public protocol NMBContainer { - func contains(_ anObject: Any) -> Bool -} +// extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet #endif -extension NSArray : NMBContainer {} -extension NSSet : NMBContainer {} +extension NSArray: NMBContainer {} +extension NSSet: NMBContainer {} -#if _runtime(_ObjC) /// Protocol for types that support only beEmpty(), haveCount() matchers -@objc public protocol NMBCollection { - var count: Int { get } -} - -extension NSHashTable : NMBCollection {} // Corelibs Foundation does not include these classes yet -extension NSMapTable : NMBCollection {} -#else public protocol NMBCollection { var count: Int { get } } + +#if canImport(Darwin) +extension NSHashTable: NMBCollection {} // Corelibs Foundation does not include these classes yet +extension NSMapTable: NMBCollection {} #endif -extension NSSet : NMBCollection {} -extension NSIndexSet : NMBCollection {} -extension NSDictionary : NMBCollection {} +extension NSSet: NMBCollection {} +extension NSIndexSet: NMBCollection {} +extension NSDictionary: NMBCollection {} -#if _runtime(_ObjC) /// Protocol for types that support beginWith(), endWith(), beEmpty() matchers -@objc public protocol NMBOrderedCollection : NMBCollection { - @objc(objectAtIndex:) +public protocol NMBOrderedCollection: NMBCollection { func object(at index: Int) -> Any } -#else -public protocol NMBOrderedCollection : NMBCollection { - func object(at index: Int) -> Any -} -#endif -extension NSArray : NMBOrderedCollection {} +extension NSArray: NMBOrderedCollection {} public protocol NMBDoubleConvertible { var doubleValue: CDouble { get } } -extension Double : NMBDoubleConvertible { - public var doubleValue: CDouble { - return self - } -} - -extension Float : NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension CGFloat: NMBDoubleConvertible { - public var doubleValue: CDouble { - return CDouble(self) - } -} - -extension NSNumber : NMBDoubleConvertible { +extension NSNumber: NMBDoubleConvertible { } +#if !os(WASI) private let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" @@ -101,6 +54,7 @@ private let dateFormatter: DateFormatter = { return formatter }() +#endif extension Date: NMBDoubleConvertible { public var doubleValue: CDouble { @@ -114,6 +68,7 @@ extension NSDate: NMBDoubleConvertible { } } +#if !os(WASI) extension Date: TestOutputStringConvertible { public var testDescription: String { return dateFormatter.string(from: self) @@ -125,29 +80,27 @@ extension NSDate: TestOutputStringConvertible { return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) } } +#endif +#if canImport(Darwin) /// Protocol for types to support beLessThan(), beLessThanOrEqualTo(), /// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. /// /// Types that conform to Swift's Comparable protocol will work implicitly too -#if _runtime(_ObjC) @objc public protocol NMBComparable { func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult } -#else -// This should become obsolete once Corelibs Foundation adds Comparable conformance to NSNumber -public protocol NMBComparable { - func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult -} -#endif -extension NSNumber : NMBComparable { +extension NSNumber: NMBComparable { public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { + // swiftlint:disable:next force_cast return compare(otherObject as! NSNumber) } } -extension NSString : NMBComparable { +extension NSString: NMBComparable { public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { + // swiftlint:disable:next force_cast return compare(otherObject as! String) } } +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift index 84b9d49..e04bf55 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -1,57 +1,65 @@ +#if !os(WASI) + +#if canImport(Foundation) import Foundation internal class NotificationCollector { private(set) var observedNotifications: [Notification] private let notificationCenter: NotificationCenter - #if _runtime(_ObjC) - private var token: AnyObject? - #else - private var token: NSObjectProtocol? - #endif + private let names: Set + private var tokens: [NSObjectProtocol] - required init(notificationCenter: NotificationCenter) { + required init(notificationCenter: NotificationCenter, names: Set = []) { self.notificationCenter = notificationCenter self.observedNotifications = [] + self.names = names + self.tokens = [] } func startObserving() { - self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil) { - // linux-swift gets confused by .append(n) - [weak self] n in self?.observedNotifications.append(n) + func addObserver(forName name: Notification.Name?) -> NSObjectProtocol { + return notificationCenter.addObserver(forName: name, object: nil, queue: nil) { [weak self] notification in + // linux-swift gets confused by .append(n) + self?.observedNotifications.append(notification) + } + } + + if names.isEmpty { + tokens.append(addObserver(forName: nil)) + } else { + names.forEach { name in + tokens.append(addObserver(forName: name)) + } } } deinit { - #if _runtime(_ObjC) - if let token = self.token { - self.notificationCenter.removeObserver(token) - } - #else - if let token = self.token as? AnyObject { - self.notificationCenter.removeObserver(token) - } - #endif + tokens.forEach { token in + notificationCenter.removeObserver(token) + } } } private let mainThread = pthread_self() -let notificationCenterDefault = NotificationCenter.default - -public func postNotifications( - _ notificationsMatcher: T, - fromNotificationCenter center: NotificationCenter = notificationCenterDefault) - -> MatcherFunc - where T: Matcher, T.ValueType == [Notification] -{ - let _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) +private func _postNotifications( + _ predicate: Predicate<[Notification]>, + from center: NotificationCenter, + names: Set = [] +) -> Predicate { + _ = mainThread // Force lazy-loading of this value + let collector = NotificationCollector(notificationCenter: center, names: names) collector.startObserving() var once: Bool = false - return MatcherFunc { actualExpression, failureMessage in - let collectorNotificationsExpression = Expression(memoizedExpression: { _ in - return collector.observedNotifications - }, location: actualExpression.location, withoutCaching: true) + + return Predicate { actualExpression in + let collectorNotificationsExpression = Expression( + memoizedExpression: { _ in + return collector.observedNotifications + }, + location: actualExpression.location, + withoutCaching: true + ) assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") if !once { @@ -59,12 +67,38 @@ public func postNotifications( _ = try actualExpression.evaluate() } - let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) + let actualValue: String if collector.observedNotifications.isEmpty { - failureMessage.actualValue = "no notifications" + actualValue = "no notifications" } else { - failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" + actualValue = "<\(stringify(collector.observedNotifications))>" + } + + var result = try predicate.satisfies(collectorNotificationsExpression) + result.message = result.message.replacedExpectation { message in + return .expectedCustomValueTo(message.expectedMessage, actual: actualValue) } - return match + return result } } + +public func postNotifications( + _ predicate: Predicate<[Notification]>, + from center: NotificationCenter = .default +) -> Predicate { + _postNotifications(predicate, from: center) +} + +#if os(macOS) +public func postDistributedNotifications( + _ predicate: Predicate<[Notification]>, + from center: DistributedNotificationCenter = .default(), + names: Set +) -> Predicate { + _postNotifications(predicate, from: center, names: names) +} +#endif + +#endif // #if canImport(Foundation) + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift new file mode 100644 index 0000000..ce20c6b --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift @@ -0,0 +1,289 @@ +// New Matcher API +// + +/// A Predicate is part of the new matcher API that provides assertions to expectations. +/// +/// Given a code snippet: +/// +/// expect(1).to(equal(2)) +/// ^^^^^^^^ +/// Called a "matcher" +/// +/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate +/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble +/// matcher API. +/// +/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, +/// predicates are simple wrappers around closures to provide static type information and +/// allow composition and wrapping of existing behaviors. +public struct Predicate { + fileprivate var matcher: (Expression) throws -> PredicateResult + + /// Constructs a predicate that knows how take a given value + public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { + self.matcher = matcher + } + + /// Uses a predicate on a given value to see if it passes the predicate. + /// + /// @param expression The value to run the predicate's logic against + /// @returns A predicate result indicate passing or failing and an associated error message. + public func satisfies(_ expression: Expression) throws -> PredicateResult { + return try matcher(expression) + } +} + +/// Provides convenience helpers to defining predicates +extension Predicate { + /// Like Predicate() constructor, but automatically guard against nil (actual) values + public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func define(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. + public static func defineNilable(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(message)) + } + } +} + +extension Predicate { + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func simple(_ message: String = "match", matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. + public static func simpleNilable(_ message: String = "match", matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(message)) + } + } +} + +// The Expectation style intended for comparison to a PredicateStatus. +public enum ExpectationStyle { + case toMatch, toNotMatch +} + +/// The value that a Predicates return to describe if the given (actual) value matches the +/// predicate. +public struct PredicateResult { + /// Status indicates if the predicate matches, does not match, or fails. + public var status: PredicateStatus + /// The error message that can be displayed if it does not match + public var message: ExpectationMessage + + /// Constructs a new PredicateResult with a given status and error message + public init(status: PredicateStatus, message: ExpectationMessage) { + self.status = status + self.message = message + } + + /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) + public init(bool: Bool, message: ExpectationMessage) { + self.status = PredicateStatus(bool: bool) + self.message = message + } + + /// Converts the result to a boolean based on what the expectation intended + public func toBoolean(expectation style: ExpectationStyle) -> Bool { + return status.toBoolean(expectation: style) + } +} + +/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not +public enum PredicateStatus { + /// Matches indicates if the predicate / matcher passes with the given value + /// + /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. + case matches + /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* + /// succeed if the expectation was inverted. + /// + /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. + case doesNotMatch + /// Fail indicates the predicate will never satisfy with the given value in any case. + /// A perfect example is that most matchers fail whenever given `nil`. + /// + /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. + /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. + /// Your predicate will still need to guard against nils, but error messaging will be + /// handled for you. + case fail + + /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). + public init(bool matches: Bool) { + if matches { + self = .matches + } else { + self = .doesNotMatch + } + } + + private func shouldMatch() -> Bool { + switch self { + case .matches: return true + case .doesNotMatch, .fail: return false + } + } + + private func shouldNotMatch() -> Bool { + switch self { + case .doesNotMatch: return true + case .matches, .fail: return false + } + } + + /// Converts the PredicateStatus result to a boolean based on what the expectation intended + internal func toBoolean(expectation style: ExpectationStyle) -> Bool { + if style == .toMatch { + return shouldMatch() + } else { + return shouldNotMatch() + } + } +} + +extension Predicate { + // Someday, make this public? Needs documentation + internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { + // swiftlint:disable:previous identifier_name + return Predicate { actual -> PredicateResult in + let result = try self.satisfies(actual) + return try f(actual, result) + } + } + + /// Returns a new Predicate based on the current one that always fails if nil is given as + /// the actual value. + public var requireNonNil: Predicate { + return after { actual, result in + if try actual.evaluate() == nil { + return PredicateResult( + status: .fail, + message: result.message.appendedBeNilHint() + ) + } + return result + } + } +} + +#if canImport(Darwin) +import class Foundation.NSObject + +public typealias PredicateBlock = (_ actualExpression: Expression) throws -> NMBPredicateResult + +public class NMBPredicate: NSObject { + private let predicate: PredicateBlock + + public init(predicate: @escaping PredicateBlock) { + self.predicate = predicate + } + + func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBPredicateResult { + let expr = Expression(expression: expression, location: location) + do { + return try self.predicate(expr) + } catch let error { + return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() + } + } +} + +final public class NMBPredicateResult: NSObject { + public var status: NMBPredicateStatus + public var message: NMBExpectationMessage + + public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { + self.status = status + self.message = message + } + + public init(bool success: Bool, message: NMBExpectationMessage) { + self.status = NMBPredicateStatus.from(bool: success) + self.message = message + } + + public func toSwift() -> PredicateResult { + return PredicateResult(status: status.toSwift(), + message: message.toSwift()) + } +} + +extension PredicateResult { + public func toObjectiveC() -> NMBPredicateResult { + return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) + } +} + +final public class NMBPredicateStatus: NSObject { + private let status: Int + private init(status: Int) { + self.status = status + } + + public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) + public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) + public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) + + public override var hash: Int { return self.status.hashValue } + + public override func isEqual(_ object: Any?) -> Bool { + guard let otherPredicate = object as? NMBPredicateStatus else { + return false + } + return self.status == otherPredicate.status + } + + public static func from(status: PredicateStatus) -> NMBPredicateStatus { + switch status { + case .matches: return self.matches + case .doesNotMatch: return self.doesNotMatch + case .fail: return self.fail + } + } + + public static func from(bool success: Bool) -> NMBPredicateStatus { + return self.from(status: PredicateStatus(bool: success)) + } + + public func toSwift() -> PredicateStatus { + switch status { + case NMBPredicateStatus.matches.status: return .matches + case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch + case NMBPredicateStatus.fail.status: return .fail + default: + internalError("Unhandle status for NMBPredicateStatus") + } + } +} + +extension PredicateStatus { + public func toObjectiveC() -> NMBPredicateStatus { + return NMBPredicateStatus.from(status: self) + } +} + +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift index 09e28c7..7c1b2b2 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -1,7 +1,8 @@ -import Foundation - -// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager -#if _runtime(_ObjC) && !SWIFT_PACKAGE +// This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager +#if canImport(Darwin) && !SWIFT_PACKAGE +import class Foundation.NSObject +import class Foundation.NSDictionary +import class Foundation.NSException /// A Nimble matcher that succeeds when the actual expression raises an /// exception with the specified name, reason, and/or userInfo. @@ -12,58 +13,97 @@ import Foundation /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func raiseException( - named: String? = nil, +public func raiseException( + named: NSExceptionName? = nil, reason: String? = nil, userInfo: NSDictionary? = nil, - closure: ((NSException) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var exception: NSException? - let capture = NMBExceptionCapture(handler: ({ e in - exception = e - }), finally: nil) + closure: ((NSException) -> Void)? = nil +) -> Predicate { + return raiseException(named: named?.rawValue, reason: reason, userInfo: userInfo, closure: closure) +} - capture.tryBlock { - _ = try! actualExpression.evaluate() - return +/// A Nimble matcher that succeeds when the actual expression raises an +/// exception with the specified name, reason, and/or userInfo. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the raised exception. The closure only gets called when an exception +/// is raised. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func raiseException( + named: String?, + reason: String? = nil, + userInfo: NSDictionary? = nil, + closure: ((NSException) -> Void)? = nil +) -> Predicate { + return Predicate { actualExpression in + var exception: NSException? + let capture = NMBExceptionCapture(handler: ({ e in + exception = e + }), finally: nil) + + do { + try capture.tryBlockThrows { + _ = try actualExpression.evaluate() } - - setFailureMessageForException(failureMessage, exception: exception, named: named, reason: reason, userInfo: userInfo, closure: closure) - return exceptionMatchesNonNilFieldsOrClosure(exception, named: named, reason: reason, userInfo: userInfo, closure: closure) + } catch { + return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) } + + let message = messageForException( + exception: exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) + + let matches = exceptionMatchesNonNilFieldsOrClosure( + exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) + return PredicateResult(bool: matches, message: message) + } } -internal func setFailureMessageForException( - _ failureMessage: FailureMessage, +internal func messageForException( exception: NSException?, named: String?, reason: String?, userInfo: NSDictionary?, - closure: ((NSException) -> Void)?) { - failureMessage.postfixMessage = "raise exception" + closure: ((NSException) -> Void)? +) -> ExpectationMessage { + var rawMessage: String = "raise exception" - if let named = named { - failureMessage.postfixMessage += " with name <\(named)>" - } - if let reason = reason { - failureMessage.postfixMessage += " with reason <\(reason)>" - } - if let userInfo = userInfo { - failureMessage.postfixMessage += " with userInfo <\(userInfo)>" - } - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } - if named == nil && reason == nil && userInfo == nil && closure == nil { - failureMessage.postfixMessage = "raise any exception" - } + if let named = named { + rawMessage += " with name <\(named)>" + } + if let reason = reason { + rawMessage += " with reason <\(reason)>" + } + if let userInfo = userInfo { + rawMessage += " with userInfo <\(userInfo)>" + } + if closure != nil { + rawMessage += " that satisfies block" + } + if named == nil && reason == nil && userInfo == nil && closure == nil { + rawMessage = "raise any exception" + } - if let exception = exception { - failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" - } else { - failureMessage.actualValue = "no exception" - } + let actual: String + if let exception = exception { + // swiftlint:disable:next line_length + actual = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" + } else { + actual = "no exception" + } + + return .expectedCustomValueTo(rawMessage, actual: actual) } internal func exceptionMatchesNonNilFieldsOrClosure( @@ -97,87 +137,86 @@ internal func exceptionMatchesNonNilFieldsOrClosure( } } } - + return matches } -public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { - internal var _name: String? - internal var _reason: String? - internal var _userInfo: NSDictionary? - internal var _block: ((NSException) -> Void)? +public class NMBObjCRaiseExceptionPredicate: NMBPredicate { + private let _name: String? + private let _reason: String? + private let _userInfo: NSDictionary? + private let _block: ((NSException) -> Void)? - internal init(name: String?, reason: String?, userInfo: NSDictionary?, block: ((NSException) -> Void)?) { + fileprivate init(name: String?, reason: String?, userInfo: NSDictionary?, block: ((NSException) -> Void)?) { _name = name _reason = reason _userInfo = userInfo _block = block - } - public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let block: () -> Any? = ({ _ = actualBlock(); return nil }) - let expr = Expression(expression: block, location: location) - - return try! raiseException( - named: _name, - reason: _reason, - userInfo: _userInfo, - closure: _block - ).matches(expr, failureMessage: failureMessage) - } - - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - return !matches(actualBlock, failureMessage: failureMessage, location: location) + let predicate: Predicate = raiseException( + named: name, + reason: reason, + userInfo: userInfo, + closure: block + ) + let predicateBlock: PredicateBlock = { actualExpression in + return try predicate.satisfies(actualExpression).toObjectiveC() + } + super.init(predicate: predicateBlock) } - public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { - return ({ name in - return NMBObjCRaiseExceptionMatcher( + @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionPredicate { + let (reason, userInfo, block) = (_reason, _userInfo, _block) + return { name in + return NMBObjCRaiseExceptionPredicate( name: name, - reason: self._reason, - userInfo: self._userInfo, - block: self._block + reason: reason, + userInfo: userInfo, + block: block ) - }) + } } - public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { - return ({ reason in - return NMBObjCRaiseExceptionMatcher( - name: self._name, + @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionPredicate { + let (name, userInfo, block) = (_name, _userInfo, _block) + return { reason in + return NMBObjCRaiseExceptionPredicate( + name: name, reason: reason, - userInfo: self._userInfo, - block: self._block + userInfo: userInfo, + block: block ) - }) + } } - public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { - return ({ userInfo in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, + @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionPredicate { + let (name, reason, block) = (_name, _reason, _block) + return { userInfo in + return NMBObjCRaiseExceptionPredicate( + name: name, + reason: reason, userInfo: userInfo, - block: self._block + block: block ) - }) + } } - public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { - return ({ block in - return NMBObjCRaiseExceptionMatcher( - name: self._name, - reason: self._reason, - userInfo: self._userInfo, + @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionPredicate { + let (name, reason, userInfo) = (_name, _reason, _userInfo) + return { block in + return NMBObjCRaiseExceptionPredicate( + name: name, + reason: reason, + userInfo: userInfo, block: block ) - }) + } } } -extension NMBObjCMatcher { - public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { - return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) +extension NMBPredicate { + @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionPredicate { + return NMBObjCRaiseExceptionPredicate(name: nil, reason: nil, userInfo: nil, block: nil) } } #endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift new file mode 100644 index 0000000..50ab641 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift @@ -0,0 +1,71 @@ +/// A Nimble matcher that succeeds when the actual value matches with all of the matchers +/// provided in the variable list of matchers. +public func satisfyAllOf(_ predicates: Predicate...) -> Predicate { + return satisfyAllOf(predicates) +} + +/// A Nimble matcher that succeeds when the actual value matches with all of the matchers +/// provided in the array of matchers. +public func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { + return Predicate.define { actualExpression in + var postfixMessages = [String]() + var status: PredicateStatus = .matches + for predicate in predicates { + let result = try predicate.satisfies(actualExpression) + if result.status == .fail { + status = .fail + } else if result.status == .doesNotMatch, status != .fail { + status = .doesNotMatch + } + postfixMessages.append("{\(result.message.expectedMessage)}") + } + + var msg: ExpectationMessage + if let actualValue = try actualExpression.evaluate() { + msg = .expectedCustomValueTo( + "match all of: " + postfixMessages.joined(separator: ", and "), + actual: "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match all of: " + postfixMessages.joined(separator: ", and ") + ) + } + + return PredicateResult(status: status, message: msg) + } +} + +public func && (left: Predicate, right: Predicate) -> Predicate { + return satisfyAllOf(left, right) +} + +#if canImport(Darwin) +import class Foundation.NSObject + +extension NMBPredicate { + @objc public class func satisfyAllOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate { + return NMBPredicate { actualExpression in + if predicates.isEmpty { + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + fail: "satisfyAllOf must be called with at least one matcher" + ) + ) + } + + var elementEvaluators = [Predicate]() + for predicate in predicates { + let elementEvaluator = Predicate { expression in + return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() + } + + elementEvaluators.append(elementEvaluator) + } + + return try satisfyAllOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() + } + } +} +#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift index b24b3ec..bd027d2 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -1,64 +1,70 @@ -import Foundation - /// A Nimble matcher that succeeds when the actual value matches with any of the matchers -/// provided in the variable list of matchers. -public func satisfyAnyOf(_ matchers: U...) -> NonNilMatcherFunc - where U: Matcher, U.ValueType == T -{ - return satisfyAnyOf(matchers) +/// provided in the variable list of matchers. +public func satisfyAnyOf(_ predicates: Predicate...) -> Predicate { + return satisfyAnyOf(predicates) } -internal func satisfyAnyOf(_ matchers: [U]) -> NonNilMatcherFunc - where U: Matcher, U.ValueType == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - let postfixMessages = NSMutableArray() - var matches = false - for matcher in matchers { - if try matcher.matches(actualExpression, failureMessage: failureMessage) { - matches = true +/// A Nimble matcher that succeeds when the actual value matches with any of the matchers +/// provided in the array of matchers. +public func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { + return Predicate.define { actualExpression in + var postfixMessages = [String]() + var status: PredicateStatus = .doesNotMatch + for predicate in predicates { + let result = try predicate.satisfies(actualExpression) + if result.status == .fail { + status = .fail + } else if result.status == .matches, status != .fail { + status = .matches + } + postfixMessages.append("{\(result.message.expectedMessage)}") } - postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) - } - failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") - if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "\(actualValue)" - } + var msg: ExpectationMessage + if let actualValue = try actualExpression.evaluate() { + msg = .expectedCustomValueTo( + "match one of: " + postfixMessages.joined(separator: ", or "), + actual: "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match one of: " + postfixMessages.joined(separator: ", or ") + ) + } - return matches - } + return PredicateResult(status: status, message: msg) + } } -public func ||(left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> NonNilMatcherFunc { +public func || (left: Predicate, right: Predicate) -> Predicate { return satisfyAnyOf(left, right) } -public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherFunc { - return satisfyAnyOf(left, right) -} +#if canImport(Darwin) +import class Foundation.NSObject -#if _runtime(_ObjC) -extension NMBObjCMatcher { - public class func satisfyAnyOfMatcher(_ matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - if matchers.isEmpty { - failureMessage.stringValue = "satisfyAnyOf must be called with at least one matcher" - return false +extension NMBPredicate { + @objc public class func satisfyAnyOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate { + return NMBPredicate { actualExpression in + if predicates.isEmpty { + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + fail: "satisfyAnyOf must be called with at least one matcher" + ) + ) } - - var elementEvaluators = [NonNilMatcherFunc]() - for matcher in matchers { - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: actualExpression.location) + + var elementEvaluators = [Predicate]() + for predicate in predicates { + let elementEvaluator = Predicate { expression in + return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() } - - elementEvaluators.append(NonNilMatcherFunc(elementEvaluator)) + + elementEvaluators.append(elementEvaluator) } - - return try! satisfyAnyOf(elementEvaluators).matches(actualExpression, failureMessage: failureMessage) + + return try satisfyAnyOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() } } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift index 67f9cf6..34a94fb 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -1,16 +1,97 @@ -import Foundation - -public func throwAssertion() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - #if arch(x86_64) && _runtime(_ObjC) && !SWIFT_PACKAGE - failureMessage.postfixMessage = "throw an assertion" - failureMessage.actualValue = nil - - var succeeded = true - +#if canImport(CwlPreconditionTesting) && (os(macOS) || os(iOS)) +import CwlPreconditionTesting +#elseif canImport(CwlPosixPreconditionTesting) +import CwlPosixPreconditionTesting +#elseif canImport(Glibc) +// swiftlint:disable all +import Glibc + +// This function is called from the signal handler to shut down the thread and return 1 (indicating a SIGILL was received). +private func callThreadExit() { + pthread_exit(UnsafeMutableRawPointer(bitPattern: 1)) +} + +// When called, this signal handler simulates a function call to `callThreadExit` +private func sigIllHandler(code: Int32, info: UnsafeMutablePointer?, uap: UnsafeMutableRawPointer?) -> Void { + guard let context = uap?.assumingMemoryBound(to: ucontext_t.self) else { return } + + // 1. Decrement the stack pointer + context.pointee.uc_mcontext.gregs.15 /* REG_RSP */ -= Int64(MemoryLayout.size) + + // 2. Save the old Instruction Pointer to the stack. + let rsp = context.pointee.uc_mcontext.gregs.15 /* REG_RSP */ + if let ump = UnsafeMutablePointer(bitPattern: Int(rsp)) { + ump.pointee = rsp + } + + // 3. Set the Instruction Pointer to the new function's address + var f: @convention(c) () -> Void = callThreadExit + withUnsafePointer(to: &f) { $0.withMemoryRebound(to: Int64.self, capacity: 1) { ptr in + context.pointee.uc_mcontext.gregs.16 /* REG_RIP */ = ptr.pointee + } } +} + +/// Without Mach exceptions or the Objective-C runtime, there's nothing to put in the exception object. It's really just a boolean – either a SIGILL was caught or not. +public class BadInstructionException { +} + +/// Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil. +/// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a SIGILL is received, the block will be interrupted using a C `longjmp`. The risks associated with abrupt jumps apply here: most Swift functions are *not* interrupt-safe. Memory may be leaked and the program will not necessarily be left in a safe state. +/// - parameter block: a function without parameters that will be run +/// - returns: if an SIGILL is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. +public func catchBadInstruction(block: @escaping () -> Void) -> BadInstructionException? { + // Construct the signal action + var sigActionPrev = sigaction() + var sigActionNew = sigaction() + sigemptyset(&sigActionNew.sa_mask) + sigActionNew.sa_flags = SA_SIGINFO + sigActionNew.__sigaction_handler = .init(sa_sigaction: sigIllHandler) + + // Install the signal action + if sigaction(SIGILL, &sigActionNew, &sigActionPrev) != 0 { + fatalError("Sigaction error: \(errno)") + } + + defer { + // Restore the previous signal action + if sigaction(SIGILL, &sigActionPrev, nil) != 0 { + fatalError("Sigaction error: \(errno)") + } + } + + var b = block + let caught: Bool = withUnsafeMutablePointer(to: &b) { blockPtr in + // Run the block on its own thread + var handlerThread: pthread_t = 0 + let e = pthread_create(&handlerThread, nil, { arg in + guard let arg = arg else { return nil } + (arg.assumingMemoryBound(to: (() -> Void).self).pointee)() + return nil + }, blockPtr) + precondition(e == 0, "Unable to create thread") + + // Wait for completion and get the result. It will be either `nil` or bitPattern 1 + var rawResult: UnsafeMutableRawPointer? = nil + let e2 = pthread_join(handlerThread, &rawResult) + precondition(e2 == 0, "Thread join failed") + return Int(bitPattern: rawResult) != 0 + } + + return caught ? BadInstructionException() : nil +} +// swiftlint:enable all +#endif + +public func throwAssertion() -> Predicate { + return Predicate { actualExpression in + #if os(watchOS) + fatalError("Nimble currently doesn't support watchOS.") + #elseif (arch(x86_64) || arch(arm64)) && (canImport(Darwin) || canImport(Glibc)) + let message = ExpectationMessage.expectedTo("throw an assertion") + var actualError: Error? let caughtException: BadInstructionException? = catchBadInstruction { #if os(tvOS) - if (!NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning) { + if !NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning { print() print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + "fatal error while using throwAssertion(), please disable 'Debug Executable' " + @@ -26,30 +107,27 @@ public func throwAssertion() -> MatcherFunc { } #endif do { - try actualExpression.evaluate() - } catch let error { - succeeded = false - failureMessage.postfixMessage += "; threw error instead <\(error)>" + _ = try actualExpression.evaluate() + } catch { + actualError = error } } - if !succeeded { - return false - } - - if caughtException == nil { - return false + if let actualError = actualError { + return PredicateResult( + bool: false, + message: message.appended(message: "; threw error instead <\(actualError)>") + ) + } else { + return PredicateResult(bool: caughtException != nil, message: message) } - - return true - #elseif SWIFT_PACKAGE - fatalError("The throwAssertion Nimble matcher does not currently support Swift CLI." + - " You can silence this error by placing the test case inside an #if !SWIFT_PACKAGE" + - " conditional statement") #else - fatalError("The throwAssertion Nimble matcher can only run on x86_64 platforms with " + - "Objective-C (e.g. Mac, iPhone 5s or later simulators). You can silence this error " + - "by placing the test case inside an #if arch(x86_64) or _runtime(_ObjC) conditional statement") + let message = """ + The throwAssertion Nimble matcher can only run on x86_64 and arm64 platforms. + You can silence this error by placing the test case inside an #if arch(x86_64) || arch(arm64) conditional \ + statement. + """ + fatalError(message) #endif } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift index 8c9b91b..d5ac732 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -1,4 +1,36 @@ -import Foundation +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError() -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + if let actualError = actualError { + return PredicateResult( + bool: true, + message: .expectedCustomValueTo("throw any error", actual: "<\(actualError)>") + ) + } else { + return PredicateResult( + bool: false, + message: .expectedCustomValueTo("throw any error", actual: "no error") + ) + } + } +} /// A Nimble matcher that succeeds when the actual expression throws an /// error of the specified type or from the specified case. @@ -11,22 +43,186 @@ import Foundation /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func throwError( - _ error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError +public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + let message = messageForError( + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } } + } + + return PredicateResult(bool: matches, message: message) + } +} - setFailureMessageForError(failureMessage, actualError: actualError, error: error, errorType: errorType, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, error: error, errorType: errorType, closure: closure) +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + let message = messageForError( + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } } + + return PredicateResult(bool: matches, message: message) + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError( + errorType: T.Type, + closure: ((T) -> Void)? = nil +) -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + let message = messageForError( + actualError: actualError, + error: nil, + errorType: errorType, + closure: closure + ) + + var matches = false + if let actualError = actualError { + matches = true + + if let actualError = actualError as? T { + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } + } else { + matches = (actualError is T) + // The closure expects another ErrorProtocol as argument, so this + // is _supposed_ to fail, so that it becomes more obvious. + if let closure = closure { + let assertions = gatherExpectations { + if let actual = actualError as? T { + closure(actual) + } + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } + } + } + + return PredicateResult(bool: matches, message: message) + } +} + +/// A Nimble matcher that succeeds when the actual expression throws any +/// error or when the passed closures' arbitrary custom matching succeeds. +/// +/// This duplication to it's generic adequate is required to allow to receive +/// values of the existential type `Error` in the closure. +/// +/// The closure only gets called when an error was thrown. +public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + let message = messageForError(actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false + } + } + + return PredicateResult(bool: matches, message: message) + } } /// A Nimble matcher that succeeds when the actual expression throws any @@ -36,18 +232,30 @@ public func throwError( /// values of the existential type `Error` in the closure. /// /// The closure only gets called when an error was thrown. -public func throwError( - closure: ((Error) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError +public func throwError(closure: @escaping ((T) -> Void)) -> Predicate { + return Predicate { actualExpression in + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch { + actualError = error + } + + let message = messageForError(actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError as? T { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if !messages.isEmpty { + matches = false } - - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, closure: closure) } + + return PredicateResult(bool: matches, message: message) + } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift new file mode 100644 index 0000000..d9c616a --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift @@ -0,0 +1,37 @@ +/** + Used by the `succeed` matcher. + + This is the return type for the closure. + */ +public enum ToSucceedResult { + case succeeded + case failed(reason: String) +} + +/** + A Nimble matcher that takes in a closure for validation. + + Return `.succeeded` when the validation succeeds. + Return `.failed` with a failure reason when the validation fails. + */ +public func succeed() -> Predicate { + return Predicate.define { actualExpression in + let optActual = try actualExpression.evaluate() + guard let actual = optActual else { + return PredicateResult(status: .fail, message: .fail("expected a ToSucceedResult, got ")) + } + + switch actual { + case .succeeded: + return PredicateResult( + bool: true, + message: .expectedCustomValueTo("succeed", actual: "") + ) + case .failed(let reason): + return PredicateResult( + bool: false, + message: .expectedCustomValueTo("succeed", actual: " because <\(reason)>") + ) + } + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Nimble.h b/Example/Pods/Nimble/Sources/Nimble/Nimble.h index 790d16d..dc68ded 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Nimble.h +++ b/Example/Pods/Nimble/Sources/Nimble/Nimble.h @@ -1,13 +1,11 @@ #import -#import "NMBExceptionCapture.h" -#import "NMBStringify.h" -#import "DSL.h" +#import +#import +#import -#import "CwlCatchException.h" -#import "CwlCatchBadInstruction.h" - -#if !TARGET_OS_TV - #import "mach_excServer.h" +#if TARGET_OS_OSX || TARGET_OS_IOS + #import + #import #endif FOUNDATION_EXPORT double NimbleVersionNumber; diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift similarity index 82% rename from Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift rename to Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift index c902692..1933d99 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Await.swift @@ -1,11 +1,9 @@ +#if !os(WASI) + import CoreFoundation import Dispatch import Foundation -#if !_runtime(_ObjC) - import CDispatch -#endif - private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) private let pollLeeway = DispatchTimeInterval.milliseconds(1) @@ -27,16 +25,12 @@ internal protocol WaitLock { } internal class AssertionWaitLock: WaitLock { - private var currentWaiter: WaitingInfo? = nil + private var currentWaiter: WaitingInfo? init() { } func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - #if _runtime(_ObjC) - let isMainThread = Thread.isMainThread - #else - let isMainThread = _CFIsMainThread() - #endif + let isMainThread = Thread.isMainThread nimblePrecondition( isMainThread, "InvalidNimbleAPIUsage", @@ -45,10 +39,15 @@ internal class AssertionWaitLock: WaitLock { nimblePrecondition( currentWaiter == nil, "InvalidNimbleAPIUsage", - "Nested async expectations are not allowed to avoid creating flaky tests.\n\n" + - "The call to\n\t\(info)\n" + - "triggered this exception because\n\t\(currentWaiter!)\n" + - "is currently managing the main run loop." + """ + Nested async expectations are not allowed to avoid creating flaky tests. + + The call to + \t\(info) + triggered this exception because + \t\(currentWaiter!) + is currently managing the main run loop. + """ ) currentWaiter = info } @@ -89,7 +88,7 @@ internal enum AwaitResult { func isCompleted() -> Bool { switch self { - case .completed(_): return true + case .completed: return true default: return false } } @@ -97,7 +96,7 @@ internal enum AwaitResult { /// Holds the resulting value from an asynchronous expectation. /// This class is thread-safe at receiving an "response" to this promise. -internal class AwaitPromise { +internal final class AwaitPromise { private(set) internal var asyncResult: AwaitResult = .incomplete private var signal: DispatchSemaphore @@ -105,11 +104,15 @@ internal class AwaitPromise { signal = DispatchSemaphore(value: 1) } + deinit { + signal.signal() + } + /// Resolves the promise with the given result if it has not been resolved. Repeated calls to /// this method will resolve in a no-op. /// /// @returns a Bool that indicates if the async result was accepted or rejected because another - /// value was recieved first. + /// value was received first. func resolveResult(_ result: AwaitResult) -> Bool { if signal.wait(timeout: .now()) == .success { self.asyncResult = result @@ -147,7 +150,7 @@ internal class AwaitPromiseBuilder { self.trigger = trigger } - func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { + func timeout(_ timeoutInterval: DispatchTimeInterval, forcefullyAbortTimeout: DispatchTimeInterval) -> Self { // = Discussion = // // There's a lot of technical decisions here that is useful to elaborate on. This is @@ -176,16 +179,18 @@ internal class AwaitPromiseBuilder { // checked. // // In addition, stopping the run loop is used to halt code executed on the main run loop. - trigger.timeoutSource.scheduleOneshot( + trigger.timeoutSource.schedule( deadline: DispatchTime.now() + timeoutInterval, - leeway: timeoutLeeway) - trigger.timeoutSource.setEventHandler() { + repeating: .never, + leeway: timeoutLeeway + ) + trigger.timeoutSource.setEventHandler { guard self.promise.asyncResult.isIncomplete() else { return } let timedOutSem = DispatchSemaphore(value: 0) let semTimedOutOrBlocked = DispatchSemaphore(value: 0) semTimedOutOrBlocked.signal() let runLoop = CFRunLoopGetMain() - #if _runtime(_ObjC) + #if canImport(Darwin) let runLoopMode = CFRunLoopMode.defaultMode.rawValue #else let runLoopMode = kCFRunLoopDefaultMode @@ -218,7 +223,7 @@ internal class AwaitPromiseBuilder { /// @discussion /// This function must be executed on the main thread and cannot be nested. This is because /// this function (and it's related methods) coordinate through the main run loop. Tampering - /// with the run loop can cause undesireable behavior. + /// with the run loop can cause undesirable behavior. /// /// This method will return an AwaitResult in the following cases: /// @@ -250,9 +255,9 @@ internal class AwaitPromiseBuilder { self.trigger.timeoutSource.resume() while self.promise.asyncResult.isIncomplete() { // Stopping the run loop does not work unless we run only 1 mode - _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) + _ = RunLoop.current.run(mode: .default, before: .distantFuture) } - self.trigger.timeoutSource.suspend() + self.trigger.timeoutSource.cancel() if let asyncSource = self.trigger.actionSource { asyncSource.cancel() @@ -282,20 +287,31 @@ internal class Awaiter { } func performBlock( - _ closure: @escaping (@escaping (T) -> Void) throws -> Void) -> AwaitPromiseBuilder { + file: FileString, + line: UInt, + _ closure: @escaping (@escaping (T) -> Void) throws -> Void + ) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) var completionCount = 0 let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { - try closure() { + try closure { result in completionCount += 1 - nimblePrecondition( - completionCount < 2, - "InvalidNimbleAPIUsage", - "Done closure's was called multiple times. waitUntil(..) expects its " + - "completion closure to only be called once.") - if promise.resolveResult(.completed($0)) { - CFRunLoopStop(CFRunLoopGetMain()) + if completionCount < 2 { + func completeBlock() { + if promise.resolveResult(.completed(result)) { + CFRunLoopStop(CFRunLoopGetMain()) + } + } + + if Thread.isMainThread { + completeBlock() + } else { + DispatchQueue.main.async { completeBlock() } + } + } else { + fail("waitUntil(..) expects its completion closure to be only called once", + file: file, line: line) } } } @@ -307,14 +323,14 @@ internal class Awaiter { trigger: trigger) } - func poll(_ pollInterval: TimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { + func poll(_ pollInterval: DispatchTimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) let asyncSource = createTimerSource(asyncQueue) let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { - let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) - asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) - asyncSource.setEventHandler() { + let interval = pollInterval + asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) + asyncSource.setEventHandler { do { if let result = try closure() { if promise.resolveResult(.completed(result)) { @@ -339,23 +355,21 @@ internal class Awaiter { } internal func pollBlock( - pollInterval: TimeInterval, - timeoutInterval: TimeInterval, + pollInterval: DispatchTimeInterval, + timeoutInterval: DispatchTimeInterval, file: FileString, line: UInt, fnName: String = #function, expression: @escaping () throws -> Bool) -> AwaitResult { let awaiter = NimbleEnvironment.activeInstance.awaiter let result = awaiter.poll(pollInterval) { () throws -> Bool? in - do { - if try expression() { - return true - } - return nil - } catch let error { - throw error + if try expression() { + return true } - }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) + return nil + }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval.divided).wait(fnName, file: file, line: line) return result } + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift new file mode 100644 index 0000000..9583683 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift @@ -0,0 +1,45 @@ +#if !os(WASI) + +import Dispatch + +#if canImport(CDispatch) +import CDispatch +#endif + +extension DispatchTimeInterval { + // ** Note: We cannot simply divide the time interval because DispatchTimeInterval associated value type is Int + var divided: DispatchTimeInterval { + switch self { + case let .seconds(val): return val < 2 ? .milliseconds(Int(Float(val)/2*1000)) : .seconds(val/2) + case let .milliseconds(val): return .milliseconds(val/2) + case let .microseconds(val): return .microseconds(val/2) + case let .nanoseconds(val): return .nanoseconds(val/2) + case .never: return .never + @unknown default: fatalError("Unknown DispatchTimeInterval value") + } + } + + var description: String { + switch self { + case let .seconds(val): return val == 1 ? "\(Float(val)) second" : "\(Float(val)) seconds" + case let .milliseconds(val): return "\(Float(val)/1_000) seconds" + case let .microseconds(val): return "\(Float(val)/1_000_000) seconds" + case let .nanoseconds(val): return "\(Float(val)/1_000_000_000) seconds" + default: fatalError("Unknown DispatchTimeInterval value") + } + } +} + +#if canImport(Foundation) +import typealias Foundation.TimeInterval + +extension TimeInterval { + var dispatchInterval: DispatchTimeInterval { + let microseconds = Int64(self * TimeInterval(USEC_PER_SEC)) + // perhaps use nanoseconds, though would more often be > Int.max + return microseconds < Int.max ? .microseconds(Int(microseconds)) : .seconds(Int(self)) + } +} +#endif + +#endif // #if !os(WASI) diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift index d424c98..4c3e434 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift @@ -1,37 +1,34 @@ -import Foundation - // Generic -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, +internal func messageForError( postfixMessageVerb: String = "throw", actualError: Error?, error: T? = nil, errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) { - failureMessage.postfixMessage = "\(postfixMessageVerb) error" + closure: ((T) -> Void)? = nil +) -> ExpectationMessage { + var rawMessage = "\(postfixMessageVerb) error" if let error = error { - if let error = error as? CustomDebugStringConvertible { - failureMessage.postfixMessage += " <\(error.debugDescription)>" - } else { - failureMessage.postfixMessage += " <\(error)>" - } + rawMessage += " <\(error)>" } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" + rawMessage += " from type <\(T.self)>" } - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" + if closure != nil { + rawMessage += " that satisfies block" } if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "\(postfixMessageVerb) any error" + rawMessage = "\(postfixMessageVerb) any error" } + let actual: String if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" + actual = "<\(actualError)>" } else { - failureMessage.actualValue = "no error" + actual = "no error" } + + return .expectedCustomValueTo(rawMessage, actual: actual) } internal func errorMatchesExpectedError( @@ -41,102 +38,26 @@ internal func errorMatchesExpectedError( && actualError._code == expectedError._code } -internal func errorMatchesExpectedError( - _ actualError: Error, - expectedError: T) -> Bool - where T: Equatable -{ - if let actualError = actualError as? T { - return actualError == expectedError - } - return false -} - -internal func errorMatchesNonNilFieldsOrClosure( - _ actualError: Error?, - error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let error = error { - if !errorMatchesExpectedError(actualError, expectedError: error) { - matches = false - } - } - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError as T) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } else if errorType != nil { - matches = (actualError is T) - // The closure expects another ErrorProtocol as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - if let closure = closure { - let assertions = gatherExpectations { - if let actual = actualError as? T { - closure(actual) - } - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } - } - - return matches -} - // Non-generic -internal func setFailureMessageForError( - _ failureMessage: FailureMessage, +internal func messageForError( actualError: Error?, - closure: ((Error) -> Void)?) { - failureMessage.postfixMessage = "throw error" + closure: ((Error) -> Void)? +) -> ExpectationMessage { + var rawMessage = "throw error" - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" + if closure != nil { + rawMessage += " that satisfies block" } else { - failureMessage.postfixMessage = "throw any error" + rawMessage = "throw any error" } + let actual: String if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" + actual = "<\(actualError)>" } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesNonNilFieldsOrClosure( - _ actualError: Error?, - closure: ((Error) -> Void)?) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } + actual = "no error" } - return matches + return .expectedCustomValueTo(rawMessage, actual: actual) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift deleted file mode 100644 index 6c5126a..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension Sequence { - internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { - for item in self { - if !fn(item) { - return false - } - } - return true - } -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift index a7279aa..4e37aef 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift @@ -5,13 +5,13 @@ import Foundation // stdlib, and because recent versions of the XCTest overlay require `StaticString` // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we // have to use `String` instead because StaticString can't be generated from Objective-C -#if _runtime(_ObjC) -public typealias FileString = String -#else +#if SWIFT_PACKAGE public typealias FileString = StaticString +#else +public typealias FileString = String #endif -public final class SourceLocation : NSObject { +public final class SourceLocation: NSObject { public let file: FileString public let line: UInt diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift index 012e1e3..88e84bb 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift @@ -1,13 +1,7 @@ import Foundation - internal func identityAsString(_ value: Any?) -> String { - let anyObject: AnyObject? -#if os(Linux) - anyObject = value as? AnyObject -#else - anyObject = value as AnyObject? -#endif + let anyObject = value as AnyObject? if let value = anyObject { return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description } else { @@ -46,32 +40,24 @@ extension Float: TestOutputStringConvertible { } extension NSNumber: TestOutputStringConvertible { - // This is using `NSString(format:)` instead of - // `String(format:)` because the latter somehow breaks - // the travis CI build on linux. public var testDescription: String { let description = self.description - + if description.contains(".") { - // Travis linux swiftpm build doesn't like casting String to NSString, - // which is why this annoying nested initializer thing is here. - // Maybe this will change in a future snapshot. - let decimalPlaces = NSString(string: NSString(string: description) - .components(separatedBy: ".")[1]) - - // SeeAlso: https://bugs.swift.org/browse/SR-1464 - switch decimalPlaces.length { + let decimalPlaces = description.split(separator: ".")[1] + switch decimalPlaces.count { case 1: - return NSString(format: "%0.1f", self.doubleValue).description + return String(format: "%0.1f", doubleValue) case 2: - return NSString(format: "%0.2f", self.doubleValue).description + return String(format: "%0.2f", doubleValue) case 3: - return NSString(format: "%0.3f", self.doubleValue).description + return String(format: "%0.3f", doubleValue) default: - return NSString(format: "%0.4f", self.doubleValue).description + return String(format: "%0.4f", doubleValue) } } - return self.description + + return description } } @@ -86,15 +72,15 @@ extension AnySequence: TestOutputStringConvertible { public var testDescription: String { let generator = self.makeIterator() var strings = [String]() - var value: AnySequence.Iterator.Element? - + var value: AnySequence.Element? + repeat { value = generator.next() if let value = value { strings.append(stringify(value)) } } while value != nil - + let list = strings.joined(separator: ", ") return "[\(list)]" } @@ -122,12 +108,7 @@ extension String: TestOutputStringConvertible { extension Data: TestOutputStringConvertible { public var testDescription: String { - #if os(Linux) - // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11-16) - return "Data" - #else - return "Data" - #endif + return "Data" } } @@ -145,27 +126,21 @@ extension Data: TestOutputStringConvertible { /// will return the result of constructing a string from the value. /// /// - SeeAlso: `TestOutputStringConvertible` -public func stringify(_ value: T) -> String { +public func stringify(_ value: T?) -> String { + guard let value = value else { return "nil" } + if let value = value as? TestOutputStringConvertible { return value.testDescription } - + if let value = value as? CustomDebugStringConvertible { return value.debugDescription } - - return String(describing: value) -} -/// -SeeAlso: `stringify(value: T)` -public func stringify(_ value: T?) -> String { - if let unboxed = value { - return stringify(unboxed) - } - return "nil" + return String(describing: value) } -#if _runtime(_ObjC) +#if canImport(Darwin) @objc public class NMBStringer: NSObject { @objc public class func stringify(_ obj: Any?) -> String { return Nimble.stringify(obj) diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h deleted file mode 100644 index 5d416e4..0000000 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h +++ /dev/null @@ -1,9 +0,0 @@ -#import -#import - -SWIFT_CLASS("_TtC6Nimble22CurrentTestCaseTracker") -@interface CurrentTestCaseTracker : NSObject -+ (CurrentTestCaseTracker *)sharedInstance; -@end - -@interface CurrentTestCaseTracker (Register) @end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h index 54677ee..9ae06a4 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h @@ -1,9 +1,9 @@ #import @class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; +@class NMBPredicate; +@class NMBObjCBeCloseToPredicate; +@class NMBObjCRaiseExceptionPredicate; NS_ASSUME_NONNULL_BEGIN @@ -30,12 +30,12 @@ NS_ASSUME_NONNULL_BEGIN #define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBExpectation *NMB_expect(TYPE(^actualBlock)(), NSString *file, NSUInteger line) { \ + NMBExpectation *NMB_expect(TYPE(^actualBlock)(void), NSString *file, NSUInteger line) { \ return NMB_expect(^id { return EXPR; }, file, line); \ } NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); + NMBExpectation *NMB_expect(id(^actualBlock)(void), NSString *file, NSUInteger line); // overloaded dispatch for nils - expect(nil) DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) @@ -60,22 +60,22 @@ NS_ASSUME_NONNULL_BEGIN -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line); #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_equal(TYPE expectedValue) { \ + NMBPredicate *NMB_equal(TYPE expectedValue) { \ return NMB_equal((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); + NIMBLE_SHORT_OVERLOADED(NMBPredicate *equal(TYPE expectedValue), NMB_equal(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_equal(__nullable id expectedValue); + NMBPredicate *NMB_equal(__nullable id expectedValue); - NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), + NIMBLE_SHORT_OVERLOADED(NMBPredicate *equal(__nullable id expectedValue), NMB_equal(expectedValue)); // overloaded dispatch for nils - expect(nil) @@ -101,17 +101,17 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *f #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_haveCount(TYPE expectedValue) { \ + NMBPredicate *NMB_haveCount(TYPE expectedValue) { \ return NMB_haveCount((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBPredicate *haveCount(TYPE expectedValue), \ NMB_haveCount(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_haveCount(id expectedValue); + NMBPredicate *NMB_haveCount(id expectedValue); - NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), + NIMBLE_SHORT_OVERLOADED(NMBPredicate *haveCount(id expectedValue), NMB_haveCount(expectedValue)); DEFINE_OVERLOAD(long, @(expectedValue)) @@ -127,14 +127,14 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *f #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ + NMBObjCBeCloseToPredicate *NMB_beCloseTo(TYPE expectedValue) { \ return NMB_beCloseTo((NSNumber *)(EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToPredicate *beCloseTo(TYPE expectedValue), \ NMB_beCloseTo(expectedValue)); - NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), + NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToPredicate *NMB_beCloseTo(NSNumber *expectedValue); + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToPredicate *beCloseTo(NSNumber *expectedValue), NMB_beCloseTo(expectedValue)); // it would be better to only overload float & double, but zero becomes ambigious @@ -152,33 +152,33 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *f #undef DEFINE_OVERLOAD -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { +NIMBLE_EXPORT NMBPredicate *NMB_beAnInstanceOf(Class expectedClass); +NIMBLE_EXPORT_INLINE NMBPredicate *beAnInstanceOf(Class expectedClass) { return NMB_beAnInstanceOf(expectedClass); } -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { +NIMBLE_EXPORT NMBPredicate *NMB_beAKindOf(Class expectedClass); +NIMBLE_EXPORT_INLINE NMBPredicate *beAKindOf(Class expectedClass) { return NMB_beAKindOf(expectedClass); } -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { +NIMBLE_EXPORT NMBPredicate *NMB_beginWith(id itemElementOrSubstring); +NIMBLE_EXPORT_INLINE NMBPredicate *beginWith(id itemElementOrSubstring) { return NMB_beginWith(itemElementOrSubstring); } #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThan(TYPE expectedValue) { \ + NMBPredicate *NMB_beGreaterThan(TYPE expectedValue) { \ return NMB_beGreaterThan((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); + NIMBLE_SHORT_OVERLOADED(NMBPredicate *beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThan(NSNumber *expectedValue); + NMBPredicate *NMB_beGreaterThan(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThan(NSNumber *expectedValue) { + NMBPredicate *beGreaterThan(NSNumber *expectedValue) { return NMB_beGreaterThan(expectedValue); } @@ -186,6 +186,8 @@ NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { DEFINE_OVERLOAD(unsigned long, @(expectedValue)) DEFINE_OVERLOAD(int, @(expectedValue)) DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) DEFINE_OVERLOAD(long long, @(expectedValue)) DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) DEFINE_OVERLOAD(char, @(expectedValue)) @@ -195,17 +197,17 @@ NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ + NMBPredicate *NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ return NMB_beGreaterThanOrEqualTo((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBPredicate *beGreaterThanOrEqualTo(TYPE expectedValue), \ NMB_beGreaterThanOrEqualTo(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); + NMBPredicate *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beGreaterThanOrEqualTo(NSNumber *expectedValue) { + NMBPredicate *beGreaterThanOrEqualTo(NSNumber *expectedValue) { return NMB_beGreaterThanOrEqualTo(expectedValue); } @@ -223,28 +225,28 @@ NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { #undef DEFINE_OVERLOAD -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), +NIMBLE_EXPORT NMBPredicate *NMB_beIdenticalTo(id expectedInstance); +NIMBLE_SHORT(NMBPredicate *beIdenticalTo(id expectedInstance), NMB_beIdenticalTo(expectedInstance)); -NIMBLE_EXPORT id NMB_be(id expectedInstance); -NIMBLE_SHORT(id be(id expectedInstance), +NIMBLE_EXPORT NMBPredicate *NMB_be(id expectedInstance); +NIMBLE_SHORT(NMBPredicate *be(id expectedInstance), NMB_be(expectedInstance)); #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThan(TYPE expectedValue) { \ + NMBPredicate *NMB_beLessThan(TYPE expectedValue) { \ return NMB_beLessThan((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBPredicate *beLessThan(TYPE expectedValue), \ NMB_beLessThan(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThan(NSNumber *expectedValue); + NMBPredicate *NMB_beLessThan(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThan(NSNumber *expectedValue) { + NMBPredicate *beLessThan(NSNumber *expectedValue) { return NMB_beLessThan(expectedValue); } @@ -264,18 +266,18 @@ NIMBLE_SHORT(id be(id expectedInstance), #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ + NMBPredicate *NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ return NMB_beLessThanOrEqualTo((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBPredicate *beLessThanOrEqualTo(TYPE expectedValue), \ NMB_beLessThanOrEqualTo(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); + NMBPredicate *NMB_beLessThanOrEqualTo(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - id beLessThanOrEqualTo(NSNumber *expectedValue) { + NMBPredicate *beLessThanOrEqualTo(NSNumber *expectedValue) { return NMB_beLessThanOrEqualTo(expectedValue); } @@ -292,58 +294,68 @@ NIMBLE_SHORT(id be(id expectedInstance), #undef DEFINE_OVERLOAD -NIMBLE_EXPORT id NMB_beTruthy(void); -NIMBLE_SHORT(id beTruthy(void), +NIMBLE_EXPORT NMBPredicate *NMB_beTruthy(void); +NIMBLE_SHORT(NMBPredicate *beTruthy(void), NMB_beTruthy()); -NIMBLE_EXPORT id NMB_beFalsy(void); -NIMBLE_SHORT(id beFalsy(void), +NIMBLE_EXPORT NMBPredicate *NMB_beFalsy(void); +NIMBLE_SHORT(NMBPredicate *beFalsy(void), NMB_beFalsy()); -NIMBLE_EXPORT id NMB_beTrue(void); -NIMBLE_SHORT(id beTrue(void), +NIMBLE_EXPORT NMBPredicate *NMB_beTrue(void); +NIMBLE_SHORT(NMBPredicate *beTrue(void), NMB_beTrue()); -NIMBLE_EXPORT id NMB_beFalse(void); -NIMBLE_SHORT(id beFalse(void), +NIMBLE_EXPORT NMBPredicate *NMB_beFalse(void); +NIMBLE_SHORT(NMBPredicate *beFalse(void), NMB_beFalse()); -NIMBLE_EXPORT id NMB_beNil(void); -NIMBLE_SHORT(id beNil(void), +NIMBLE_EXPORT NMBPredicate *NMB_beNil(void); +NIMBLE_SHORT(NMBPredicate *beNil(void), NMB_beNil()); -NIMBLE_EXPORT id NMB_beEmpty(void); -NIMBLE_SHORT(id beEmpty(void), +NIMBLE_EXPORT NMBPredicate *NMB_beEmpty(void); +NIMBLE_SHORT(NMBPredicate *beEmpty(void), NMB_beEmpty()); -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; +NIMBLE_EXPORT NMBPredicate *NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; #define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) #ifndef NIMBLE_DISABLE_SHORT_SYNTAX #define contain(...) NMB_contain(__VA_ARGS__) #endif -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); -NIMBLE_SHORT(id endWith(id itemElementOrSubstring), +NIMBLE_EXPORT NMBPredicate *NMB_containElementSatisfying(BOOL(^predicate)(id)); +NIMBLE_SHORT(NMBPredicate *containElementSatisfying(BOOL(^predicate)(id)), + NMB_containElementSatisfying(predicate)); + +NIMBLE_EXPORT NMBPredicate *NMB_endWith(id itemElementOrSubstring); +NIMBLE_SHORT(NMBPredicate *endWith(id itemElementOrSubstring), NMB_endWith(itemElementOrSubstring)); -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), +NIMBLE_EXPORT NMBObjCRaiseExceptionPredicate *NMB_raiseException(void); +NIMBLE_SHORT(NMBObjCRaiseExceptionPredicate *raiseException(void), NMB_raiseException()); -NIMBLE_EXPORT id NMB_match(id expectedValue); -NIMBLE_SHORT(id match(id expectedValue), +NIMBLE_EXPORT NMBPredicate *NMB_match(id expectedValue); +NIMBLE_SHORT(NMBPredicate *match(id expectedValue), NMB_match(expectedValue)); -NIMBLE_EXPORT id NMB_allPass(id matcher); -NIMBLE_SHORT(id allPass(id matcher), +NIMBLE_EXPORT NMBPredicate *NMB_allPass(id matcher); +NIMBLE_SHORT(NMBPredicate *allPass(id matcher), NMB_allPass(matcher)); -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); +NIMBLE_EXPORT NMBPredicate *NMB_satisfyAnyOfWithMatchers(id matchers); #define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) #ifndef NIMBLE_DISABLE_SHORT_SYNTAX #define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) #endif +NIMBLE_EXPORT NMBPredicate *NMB_satisfyAllOfWithMatchers(id matchers); +#define NMB_satisfyAllOf(...) NMB_satisfyAllOfWithMatchers(@[__VA_ARGS__]) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define satisfyAllOf(...) NMB_satisfyAllOf(__VA_ARGS__) +#endif + // In order to preserve breakpoint behavior despite using macros to fill in __FILE__ and __LINE__, // define a builder that populates __FILE__ and __LINE__, and returns a block that takes timeout // and action arguments. See https://github.com/Quick/Quick/pull/185 for details. diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m index cd93ddd..6f7572f 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -1,26 +1,23 @@ #import -#import - -SWIFT_CLASS("_TtC6Nimble7NMBWait") -@interface NMBWait : NSObject -+ (void)untilTimeout:(NSTimeInterval)timeout file:(NSString *)file line:(NSUInteger)line action:(void(^)())action; -+ (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())action; - -@end +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else +#import +#endif NS_ASSUME_NONNULL_BEGIN -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(), NSString *__nonnull file, NSUInteger line) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(void), NSString *__nonnull file, NSUInteger line) { return [[NMBExpectation alloc] initWithActualBlock:actualBlock negative:NO file:file line:line]; } -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line) { +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line) { return NMB_expect(^id{ actualBlock(); return nil; @@ -31,71 +28,71 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBExpectation failWithMessage:msg file:file line:line]; } -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass) { - return [NMBObjCMatcher beAnInstanceOfMatcher:expectedClass]; +NIMBLE_EXPORT NMBPredicate *NMB_beAnInstanceOf(Class expectedClass) { + return [NMBPredicate beAnInstanceOfMatcher:expectedClass]; } -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass) { - return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; +NIMBLE_EXPORT NMBPredicate *NMB_beAKindOf(Class expectedClass) { + return [NMBPredicate beAKindOfMatcher:expectedClass]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToPredicate *NMB_beCloseTo(NSNumber *expectedValue) { + return [NMBPredicate beCloseToMatcher:expectedValue within:0.001]; } -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring) { - return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; +NIMBLE_EXPORT NMBPredicate *NMB_beginWith(id itemElementOrSubstring) { + return [NMBPredicate beginWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beGreaterThan(NSNumber *expectedValue) { + return [NMBPredicate beGreaterThanMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return [NMBPredicate beGreaterThanOrEqualToMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; +NIMBLE_EXPORT NMBPredicate *NMB_beIdenticalTo(id expectedInstance) { + return [NMBPredicate beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT id NMB_be(id expectedInstance) { - return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; +NIMBLE_EXPORT NMBPredicate *NMB_be(id expectedInstance) { + return [NMBPredicate beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beLessThan(NSNumber *expectedValue) { + return [NMBPredicate beLessThanMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { - return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { + return [NMBPredicate beLessThanOrEqualToMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beTruthy() { - return [NMBObjCMatcher beTruthyMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beTruthy() { + return [NMBPredicate beTruthyMatcher]; } -NIMBLE_EXPORT id NMB_beFalsy() { - return [NMBObjCMatcher beFalsyMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beFalsy() { + return [NMBPredicate beFalsyMatcher]; } -NIMBLE_EXPORT id NMB_beTrue() { - return [NMBObjCMatcher beTrueMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beTrue() { + return [NMBPredicate beTrueMatcher]; } -NIMBLE_EXPORT id NMB_beFalse() { - return [NMBObjCMatcher beFalseMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beFalse() { + return [NMBPredicate beFalseMatcher]; } -NIMBLE_EXPORT id NMB_beNil() { - return [NMBObjCMatcher beNilMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beNil() { + return [NMBPredicate beNilMatcher]; } -NIMBLE_EXPORT id NMB_beEmpty() { - return [NMBObjCMatcher beEmptyMatcher]; +NIMBLE_EXPORT NMBPredicate *NMB_beEmpty() { + return [NMBPredicate beEmptyMatcher]; } -NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, ...) { +NIMBLE_EXPORT NMBPredicate *NMB_containWithNilTermination(id itemOrSubstring, ...) { NSMutableArray *itemOrSubstringArray = [NSMutableArray array]; if (itemOrSubstring) { @@ -110,45 +107,53 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger va_end(args); } - return [NMBObjCMatcher containMatcher:itemOrSubstringArray]; + return [NMBPredicate containMatcher:itemOrSubstringArray]; +} + +NIMBLE_EXPORT NMBPredicate *NMB_containElementSatisfying(BOOL(^predicate)(id)) { + return [NMBPredicate containElementSatisfyingMatcher:predicate]; +} + +NIMBLE_EXPORT NMBPredicate *NMB_endWith(id itemElementOrSubstring) { + return [NMBPredicate endWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring) { - return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_equal(__nullable id expectedValue) { + return [NMBPredicate equalMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { - return [NMBObjCMatcher equalMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_haveCount(id expectedValue) { + return [NMBPredicate haveCountMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { - return [NMBObjCMatcher haveCountMatcher:expectedValue]; +NIMBLE_EXPORT NMBPredicate *NMB_match(id expectedValue) { + return [NMBPredicate matchMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_match(id expectedValue) { - return [NMBObjCMatcher matchMatcher:expectedValue]; +NIMBLE_EXPORT NMBPredicate *NMB_allPass(id expectedValue) { + return [NMBPredicate allPassMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_allPass(id expectedValue) { - return [NMBObjCMatcher allPassMatcher:expectedValue]; +NIMBLE_EXPORT NMBPredicate *NMB_satisfyAnyOfWithMatchers(id matchers) { + return [NMBPredicate satisfyAnyOfMatcher:matchers]; } -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers) { - return [NMBObjCMatcher satisfyAnyOfMatcher:matchers]; +NIMBLE_EXPORT NMBPredicate *NMB_satisfyAllOfWithMatchers(id matchers) { + return [NMBPredicate satisfyAllOfMatcher:matchers]; } -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException() { - return [NMBObjCMatcher raiseExceptionMatcher]; +NIMBLE_EXPORT NMBObjCRaiseExceptionPredicate *NMB_raiseException() { + return [NMBPredicate raiseExceptionMatcher]; } NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { - return ^(NSTimeInterval timeout, void (^action)(void (^)(void))) { + return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { [NMBWait untilTimeout:timeout file:file line:line action:action]; }; } NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { - return ^(void (^action)(void (^)(void))) { + return ^(void (^ _Nonnull action)(void (^ _Nonnull)(void))) { [NMBWait untilFile:file line:line action:action]; }; } diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h index e0ec05a..e6e0272 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h @@ -3,8 +3,8 @@ @interface NMBExceptionCapture : NSObject -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; -- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; +- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); @end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m index 0a882b7..52684b7 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m @@ -2,12 +2,12 @@ @interface NMBExceptionCapture () @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); -@property (nonatomic, copy) void(^ _Nullable finally)(); +@property (nonatomic, copy) void(^ _Nullable finally)(void); @end @implementation NMBExceptionCapture -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { self = [super init]; if (self) { self.handler = handler; @@ -16,7 +16,7 @@ - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnul return self; } -- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { +- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock { @try { unsafeBlock(); } diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h index e5d5ddd..7938bca 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h @@ -4,7 +4,7 @@ * Returns a string appropriate for displaying in test output * from the provided value. * - * @param value A value that will show up in a test's output. + * @param anyObject A value that will show up in a test's output. * * @return The string that is returned can be * customized per type by conforming a type to the `TestOutputStringConvertible` diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m index 329d39a..31a80d6 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m @@ -1,5 +1,10 @@ #import "NMBStringify.h" + +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else #import +#endif NSString *_Nonnull NMBStringify(id _Nullable anyObject) { return [NMBStringer stringify:anyObject]; diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m index 35f26fd..3c1110b 100644 --- a/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m @@ -1,78 +1,17 @@ -#import "CurrentTestCaseTracker.h" #import -#import -#pragma mark - Method Swizzling - -/// Swaps the implementations between two instance methods. -/// -/// @param class The class containing `originalSelector`. -/// @param originalSelector Original method to replace. -/// @param replacementSelector Replacement method. -void swizzleSelectors(Class class, SEL originalSelector, SEL replacementSelector) { - Method originalMethod = class_getInstanceMethod(class, originalSelector); - Method replacementMethod = class_getInstanceMethod(class, replacementSelector); - - BOOL didAddMethod = - class_addMethod(class, - originalSelector, - method_getImplementation(replacementMethod), - method_getTypeEncoding(replacementMethod)); - - if (didAddMethod) { - class_replaceMethod(class, - replacementSelector, - method_getImplementation(originalMethod), - method_getTypeEncoding(originalMethod)); - } else { - method_exchangeImplementations(originalMethod, replacementMethod); - } -} +#if __has_include("Nimble-Swift.h") +#import "Nimble-Swift.h" +#else +#import +#endif #pragma mark - Private -@interface XCTestObservationCenter (Private) -- (void)_addLegacyTestObserver:(id)observer; -@end - @implementation XCTestObservationCenter (Register) -/// Uses objc method swizzling to register `CurrentTestCaseTracker` as a test observer. This is necessary -/// because Xcode 7.3 introduced timing issues where if a custom `XCTestObservation` is registered too early -/// it suppresses all console output (generated by `XCTestLog`), breaking any tools that depend on this output. -/// This approach waits to register our custom test observer until XCTest adds its first "legacy" observer, -/// falling back to registering after the first normal observer if this private method ever changes. + (void)load { - if (class_getInstanceMethod([self class], @selector(_addLegacyTestObserver:))) { - // Swizzle -_addLegacyTestObserver: - swizzleSelectors([self class], @selector(_addLegacyTestObserver:), @selector(NMB_original__addLegacyTestObserver:)); - } else { - // Swizzle -addTestObserver:, only if -_addLegacyTestObserver: is not implemented - swizzleSelectors([self class], @selector(addTestObserver:), @selector(NMB_original_addTestObserver:)); - } -} - -#pragma mark - Replacement Methods - -/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. -- (void)NMB_original__addLegacyTestObserver:(id)observer { - [self NMB_original__addLegacyTestObserver:observer]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self addTestObserver:[CurrentTestCaseTracker sharedInstance]]; - }); -} - -/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. -/// This method is only used if `-_addLegacyTestObserver:` is not impelemented. (added in Xcode 7.3) -- (void)NMB_original_addTestObserver:(id)observer { - [self NMB_original_addTestObserver:observer]; - - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - [self NMB_original_addTestObserver:[CurrentTestCaseTracker sharedInstance]]; - }); + [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:[CurrentTestCaseTracker sharedInstance]]; } @end diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 777c914..8e6033e 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,1635 +7,1779 @@ objects = { /* Begin PBXBuildFile section */ - 01B42E78BE990DA78204A99D8A6AA23C /* ExponentialBackOffInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A5926524A8F619959432E476E918384 /* ExponentialBackOffInstance.swift */; }; - 047A68C646E00EB6D7D4D7343B801D09 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59FB88AED4F4CEF998FCC87DF7244972 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 07722FBCF6B380961B9D2832D5883F45 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 926AFF053CA8F9A5C8BCFAC7BFA85654 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0A218456970EDD313C0515D863A1BA71 /* ExponentialBackOff-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8E0BACD2C4F31AB219B29ECD302ADAD0 /* ExponentialBackOff-dummy.m */; }; - 0AEC20AACF9B10846830274E3B2AA6FD /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6AC2B6C737D92677583A7A03587786F6 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0D5BC39A2A178E473FF8AA3B9DC776C5 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D58F1A041323DD70FB9446FA069D5B5 /* QuickSpec.m */; }; - 0ECEEBC712D404AA6CF1E76A9284BFF9 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 781A6E60C7D466CDE85BBE952644B8D9 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 0FB0D2EE8B53C04B1529DC6F59BBE908 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 6ECAFD6A68B04C5B6F535DAE4741AFB2 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 110A640A9BE45841BA938B4C29EF5446 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEBE779526CFF046DB844CC0B8C4396A /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 127CD37052B8E0BC645D83D4664F59D4 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 355E4D2199675C75CFA200321595EB72 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 17261E344C2027602431A636759AC7F2 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3670B51CFD1009630D1D87F6D9C1898C /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1765D51C3C51DDB29680E5B4F5E3A7D3 /* BackOffAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51E23571200FF56897459F28DB4E91F0 /* BackOffAlgorithm.swift */; }; - 1B44F3CDBC3B9C4D5337FB6E1BA4CD37 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - 1C50F54510D5C2B2AD84D7B74A6EDEBB /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 141464B8426B43C0AFD120F196CB5954 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1C7CA1FAFBF8B865596C739FEA39CDEE /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = C0CB81F86EB2620E24DD3AA686E705FB /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1DAA15460589958F4633E73E56F682A8 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 212F5143D0E6A10B812E27113340C67E /* HooksPhase.swift */; }; - 22C1DE74D494C10BBE727F239A68447D /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1AF2913BAB89914DE8641E7BFBB86DD /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 234BFC45ACAC4A8FB945EA17B6A74B0B /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F5EDEB3D8230B545E0362CAD2D6F73D9 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 23E26265D83D18DF9A1586C509062020 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 6B8E5D65FA727A4D30DA2985D47DAA62 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 23E2E1E02FE79EE1E1688CBBAA777297 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE42B380178497DC5E976313EC1AB328 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 24EF979DB6A2B88464E07F5C5937EE14 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - 25126A944C2B70A9B5F669EA82984186 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = A89425684E63258E873B7EFA062C25AC /* Random.swift */; }; - 27133DDA9676D7602C0D63308CDA29C3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - 27B262F95D3CF9E3C74541A41929691C /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 635BB7EC529CB5A8F5C337AF3D1AB06F /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2ACC34FFA86F7C686D8B23C729CCE6E1 /* Pods-ExponentialBackOff_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 91D7E6D7CCD128CC1FE5A7B89C197D05 /* Pods-ExponentialBackOff_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 373E70BFC35DD641FE30A48EF3FD45E5 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B7B289D9FF96D59B9835C95B1704EE0 /* ExampleGroup.swift */; }; - 3915DBB4731CB17B255A7FE86E240B6E /* CwlCatchBadInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = CB85F4EA53AA76AB9CA96FDC2FBDA244 /* CwlCatchBadInstruction.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 39F04E7462B4D56D3B1BF233B05130C7 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7A93044B62340566A28FB2770409CEBC /* QCKDSL.m */; }; - 3AED1D58A76E3C2296D15E0797DA54B7 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A5570F041A1E00822E40577D7F05F07 /* Example.swift */; }; - 3C3FB4EC8347D1FFE551514E32A50218 /* Pods-ExponentialBackOff_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8D61FB50109F40EC3EA425F9A23B51E7 /* Pods-ExponentialBackOff_Tests-dummy.m */; }; - 3FC6F09CCC4A6CA2E735155F9132FDF6 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 500810ECD2FF5439186276CB41EEA2D9 /* XCTest.framework */; }; - 4272D41819B8C6F9980A5DE9AA34B2A8 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B271FBAD072277E3FF9C511A7BDD33C /* World.swift */; }; - 469E9C3ED9FD6009F7C9AAF9E537E212 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 9A9183A080EAF248FB6C91B58D295418 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 48B84CE8E07E951FB20466EDB146601F /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26C1416A60EC50D63B8D18DBAE59A1A1 /* Tools.swift */; }; - 4B9FA79D99AAB9582FA3183232551A12 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF8A3B3863B3573539419C70D5646B9F /* QuickSelectedTestSuiteBuilder.swift */; }; - 4F3F103945CC52D0A3B8A891BB0E21C4 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14D69C7104AA2B0203B0B13085C3592 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 501916B3B4F333CFDB4CEA49C86E66DA /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8B006B9F6FC803E7655461B425A49F7 /* URL+FileName.swift */; }; - 50B80F12A9BAE302F07F6CF94752F462 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 9EF0C828D93701F36DA1040E684ACE0E /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 551440A0F92574039C1D2EB39227D6B8 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D6FF3E68264B0C36D21F8FC7B3A941C /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 574705A0CCFE1EEF17C0A9B35C1E7E9B /* Pods-ExponentialBackOff_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1011EE9D897CCC2E3862C120FEEAACDD /* Pods-ExponentialBackOff_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 599669823A2EED2928C77F301F6B0515 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 23C19FB43F3E14845BADB41B70FC00CE /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5A3DA430E9193D2B2EA5B70C77EAF29E /* BackOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3959B075029ECBEED80A69D922B09FA2 /* BackOff.swift */; }; - 5BA758E97639BABA7951E8B4787BF587 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 8BC1C9B6C351AAB3C6EFBA156DBC18CB /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 5E042396F1CB7F0187FDD519EB8F89B4 /* ExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = DB35989FACD2EA301C5644B61D785BA6 /* ExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6011CE3488C6310EB4C661E26CC59860 /* ExponentialBackOff-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 80383DB0E40570907BC336FD81260524 /* ExponentialBackOff-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 62744EF299751FB49B5FCD81D8C8FFF7 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68A32206A8493CADE643791E4ABE6DE /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 65F5217D44A557FC16218DE5DE348C35 /* CwlCatchBadInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 352EC3C68019412C78305360325040B0 /* CwlCatchBadInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6A7C4216E234750863A2117E3172EB1B /* ExponentialBackOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5FB957F07321E541AD68AC6CA5A4EEF /* ExponentialBackOff.swift */; }; - 6CDBA48C3A8621E4EE1DAFFE240F0D82 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 468094E5FFC081FBDDC82BCAAE7E6670 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6E397D9FB11A47E48D70287D734B12B2 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B2C77B779BD9CFED9F7F731D2F7C7A3 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 737E19F3254F5929263982C29237C0BA /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DA94359074A7C904B5D17685AF24603 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 74FD712F3B503891B6BD9E5CD287E481 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2693462023BF12BE8C426BE8642D3125 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 76036D32625A56D480D84AA46961EF91 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3017275085004FD285AEF82EAB576F80 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78F3DE174B4F8D368EF8EEFD7EE62087 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1692309414CCA978A359633B0D58D70 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7D6269A3CFE53C28DAA6B92E8FC017A7 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A6F9E84C63CBC66EF2ECDFE101E1E4C /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7F6750C7B1847733370B18C4CBFE32DF /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABF5D315A5B9E3FF24E4FE9411231ABD /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8015239010C1D642F14C105F8FF8E035 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33C5F9B53D4651E8ABB7468246500016 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 807F78D9BB76966418364A108660B7A1 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 15B3DA24790C3E69B14BA6F34E8CE5F6 /* Quick-dummy.m */; }; - 83AEAE21B1146E541C0899B5B9A07D82 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 921B3E3E396F7AF6DDC0CD6A5A51FD43 /* NSBundle+CurrentTestBundle.swift */; }; - 8507F4BF7437EB40A3626EDCC68BFF6D /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64EDDEFE354E05E90F87A54AA1512DFA /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8654571F855691C23B7B8E61B2141944 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 184FC3CD22C62088613DE9012F80D124 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 86FFB76B2EDCF4AE79CC4C0BD8A0FE9A /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB9ED0D403D5D92C55EBFE07E45523CE /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 870EC62EEF4C28367539D803C0663C7D /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = BBF4188A1E4D012B0B42AE6ADFA7AD7E /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 878A7EB83560F9B2703D36D186F6EC32 /* AsyncSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1B39E8E27CE79FFB28F5717EBA52474E /* AsyncSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 87DD62F200DAB5E1D701AB9F94D1D422 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = F6C823FAE7A78C4FA4D787419EFA1C93 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8C30EAD5FFD28B387099B41C74657A67 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA45B4F1384FD5D39A772D3B97C68F71 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8E07E4F1AD04B3F0290A58EAEB0D4F23 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 41F7F1880ED50D0CA763787A9D413CE0 /* DSL.swift */; }; - 8F899DAC4387338E4ADE9423D869CA5C /* AsyncSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = DA5ED83225E3A768A164EB925543E678 /* AsyncSwift-dummy.m */; }; - 9137587BDE48B101A5A29B4106454BBD /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2875DAE37ED7057A9119AB9CD61E7CB5 /* Callsite.swift */; }; - 917949F596E1188261FC59214782C3D9 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 321A05DBBCBDDAC59B20BD0312063DB5 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 947162383483B6391F8CDF38249BFBD2 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 1CC3EF09AF3A988539F7940B3C812AFE /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 95230742FE57D3B368280516A9CED7D6 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B347D1556F7CEAEFAADC0B86350F59F7 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 953083A0E80C4FBDB46980C1906051C8 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 352E2D34D466F5C3A40553CD52690170 /* Configuration.swift */; }; - 9544A4EEC2A8448743ECA9981F88B60F /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95D640CD8B3E763485B3C2DCD8AEE59D /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9AF235C16362BA00BFBF12147907E953 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAEAD4D6B3058847A8DA10B76E16FBA4 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9BEBD1791C233763A8DC13080BFB99C9 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = A36ACB5379A58C42C24619B2ED1453AD /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9E95D6E15DBE9B0FC92AAF60D42D1464 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6D80955241C1B213B750DF9F5C12347E /* Nimble-dummy.m */; }; - A33F1754198E8E8CCC7087F6176FFDC8 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AC5E9CD25D9C1D9D7566DDEBFACF924 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A360B3E8F34200519B16292F2F2EDC07 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = E4EFA20DCD550C4845752763701BFA86 /* SuiteHooks.swift */; }; - A448F837592E21D9387322E8DA0DD93F /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42A029A8A516B85056E454C8BE27FF88 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A91166D0A5E8F1D5D5377622C381C045 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39493A7EB91FCA72336F05B13F13B705 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A914F9B344A1154B64AE1826AE108DEE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - AB255C27EF10E742C6567775022F49D5 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1855C2E271A2D13CE36C4B5B106E6A83 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC0B24EF198E3BEDFCC9F25D7B8EEDAB /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB9F5B6A82F4D6787A121211FE7813EA /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC29CC89E22273BF0D0DC2C841B7524C /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = AAE3388BB1AE4602E5F446FFEC2F24C0 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B093484B1637B3D3AF65DF2232FDBADC /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 8A5747516A0A1FE46806679A6EAA5E73 /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B9BD565DAB07F8E2288A960A1D3EFAC1 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC292B3A595C376991C6A6FC37BD0F3A /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B9F6252176B0A89B111B917078E2C214 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - BB10A2D0B1EE5B1BA811354116F83E3F /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB29A9B2C233F98C524C395FCB744598 /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BC56374E1B6568CDD3F4AAEDEC7295A2 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = BECF2E6B7124FD5FA972EC798996873F /* World+DSL.swift */; }; - BC813029EE97962144603C6DDE8647C0 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A257A0418A6F96D0EED88FBDCE73180 /* ExampleMetadata.swift */; }; - BDB10E62B0A604DE4F145F25477912FA /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29E76CD31803C31EBD0518FDF27742A6 /* ErrorUtility.swift */; }; - BF3AF1D2B46E09E2B3DCC824E6C1F5AF /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DB165EFF7255E110383C24B63FD680 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C00F6B1E17B983FE6541D06A742A049E /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE7C5269B6605E09A777D3DA830627D8 /* Closures.swift */; }; - C221D6CE5229B6348A11B19914777FE4 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 24A2410F9B727E2DEE01C36FC78861D7 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C272D1A1F8DA8D556CB2EC5D5C5F8428 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 639D0817925DB830C39E87BAF62735E9 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C5C6B79CCF87168CB73561C11EECDAF9 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = A36441EBFCB279BC2D51BA40D55C10B9 /* ExampleHooks.swift */; }; - CB7558CCDD935C9E82BBF454022ED1D3 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 92E5C8610278D49E288169732958C4A9 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CCE59792905DF457AD40DF4E19525708 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = D4BCB3B03CE0A05B8EED110EEFC100A1 /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - CE3FA6AE0944D4AE737F0E57CFF4A615 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 742C383481521A79CF41D97AC9521226 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CE4CEF6328E255B380E2B2692B351CF8 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99CB5931D2B171AD49E7DCE7BE909B15 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D5C184C9D0B401C7FB2693BAAB89E857 /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = EB76FF77DE88002EF4FBD99E2A040D6C /* NSString+QCKSelectorName.m */; }; - D88575ED37BC462E8130CDBEFE9EA308 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = CCC25640612240E9356EE04909545B06 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DC32331BE565888E694E1321BB1D80F5 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 206F1C8D2A415585D40A165617043EAE /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DCEE854E62441E78FED15CC994497F61 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4B235D16BAF3A68866D48817094229C1 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DDD6090EA577DEEB6CFF7891089A19BF /* BackOffState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81D946D71C525FC5BD16C4ABDCA6F6B9 /* BackOffState.swift */; }; - E15E6B5455484FB1CD2C8741FCD9C778 /* Pods-ExponentialBackOff_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 9A754FC47F1DD58D01A8746812A29852 /* Pods-ExponentialBackOff_Example-dummy.m */; }; - E223EA6BA4D38FDABFF1F2C429C760CE /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 1A982A81CDA132A3AC6F11C02527448C /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5CCEF0B83F8272D10671C01AAE4FFA0 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2010CFF08E9071A11B5F8DB47124B6C /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - EBA52C16F42E42A1824D87C284F4A60C /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 95CD1C5D6DCD7CDAC0142F8E9A8949E0 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F4A1B7A059AAA6727EB70E58E09332A4 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8C8D527427CE7509CCE4FD027B5F04E /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F606C6DD77B6B85FED2A8F7F59686682 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 405D68A14F65B32CFC4E78E61BE052B7 /* QuickTestSuite.swift */; }; - F60D221B548716DF35193FC2CF244676 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3798D7199BC48EC873B49D59D3837B64 /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F6813F25F43A35035BAEDD857CF4290D /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 67EDD5E108165933655C52E7CBC9A96D /* QuickConfiguration.m */; }; - F693D0A9E0D05F815A85DC258E75AF8D /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 869706583CC2281388CFF7AA634F6CA4 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; - F6F2103F1815820EF3039ABC742A5035 /* Async.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D40362A749DED46073575ECAF13EFCD6 /* Async.framework */; }; - F9D61EB5EEB799105913685722FF4C9C /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 79A3B26A415D3611214D174FA1577768 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F9E05A63D447B51E008B89731192FE7F /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A49F48528C25349FD50DEB57BFB24FD /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FAB4ECE0C5039D99BB7173880670871D /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4629E1720380B433A8BBEEA00C5CFBB5 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FB2F5A8B175D3CF019388DA33CAE108F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */; }; - FC409927BF977D84485B211DFC648E26 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12824F6F5FFB0849B79E7E7D1AC8498 /* Filter.swift */; }; - FCFFEB587281358CFF05A65ED9E94C12 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5059744B8849B84AFA683ED5FFA30F7 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FD4742F9C1D1C5E526745B6E8A5D0ED2 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = AD1F81DF61A4F317C96BD896B53DE300 /* Async.swift */; }; + 00B4ED147B8F26FAB5B300D958EA1B87 /* BackOffState.swift in Sources */ = {isa = PBXBuildFile; fileRef = F7B58019046AA6CA4F5120E3DEC5B780 /* BackOffState.swift */; }; + 01236C984BBB2918575C35713E2E08B4 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8554D6BAA8EF320C8F3ED18EF51815C3 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 057C1964EBAFCBC649F8012723CDADF5 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = DFE633FA4513A12DFCFD38A73C5799A1 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0650AF0DB8DE333CE5D99D704E29AC02 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 01DC30DDD1BD005761311BE45C0D8C32 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 088A5A88342D60B6FCFAEADBF0749220 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = B7D7B55755447C9C94F9B062258F7EC6 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 09D4B856CFEA59F4E16AB91D1F06D50C /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = CFD12A4DEA59F991E0F87EBD52A13BE7 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0BAC760A19A0F7BAD74264AA4DDDD679 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7729D96F2F30F7DD8297C8636297753 /* World+DSL.swift */; }; + 0E398EF6297FFF6CC9BC74421BF1712D /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 227A9D7D1AF726C18BD8BE6849F21F71 /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0F776B26BC641CB895C2E7D961C71152 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 177B6EC7273A8EC49BC0A1573671E31A /* ExampleHooks.swift */; }; + 154A42D3BBF847E3C2C7A6BB4EFAEE84 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B4ED2A44E78B3B3C7156E94C24CA1BD /* DSL.swift */; }; + 16DB8678649F0D286B1785ABD6852F79 /* Pods-ExponentialBackOff_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = E6F8E0EB38E497172E882785E6CB75AD /* Pods-ExponentialBackOff_Tests-dummy.m */; }; + 19A8009537BCAD56435B2DDC620B29AA /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = E2FAA544C4F21DA3E89BECC4F4761B70 /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1B5648DECACC2C478440DD19516ADCC5 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5507E12F862CCF261F8E747944099A7 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1C469C17A0E35E4508F74FEB1EDA586C /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 68B8EDC590A6A7696E19F9B8C3FD7DCC /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1E8F68F9665D4F98E5D1AE28F58DD03E /* Pods-ExponentialBackOff_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 092B856DF8975269BCC9B956D638E7B4 /* Pods-ExponentialBackOff_Example-dummy.m */; }; + 207866DD86EDE603026D5AEDAF5ABE44 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = C1C65F7F071609436F20F99ACB14339C /* QuickConfiguration.m */; }; + 21F3408E9BD0BE7C7A9FFBF43B4F28A0 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = E3419F257A3972FCFCF607AB726B27E5 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2223D9864ED3F01713DA2180EF7190B9 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26F10DDF82C6A18515676F39E155BD43 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 233AB756F67ABBD886C54BF9F12403DF /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = A66A31B067A8ACEBFB5D45F6689DB32D /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2357EB01C617A8A015615080DBB012D6 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBC0A5DA2D70B920E25234D39AB1E439 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2539752F01773A27A85D444242FE528B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 289B613DD13E58EA28C0DFAF4358BA68 /* ElementsEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A214194E4FF334262EEC5187BF5F845 /* ElementsEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 28D6E884D7AB6CF2B4BFF328D2537D22 /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3618198BC2CF4690EFC181BA2182E7B6 /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2C85A44748A3F58CE8C0AE291B9EDDFB /* QCKConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 56B16417997A4E9112135537DDC20D27 /* QCKConfiguration.swift */; }; + 2D6DB63EBCA201CFABA3012CD1C360BD /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30447D41F9474F948164CC6255AF60AE /* ExampleGroup.swift */; }; + 2FA2F8885BD01627142AC2DBA9D8E894 /* AsyncSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1DCD424C57D6BA27578675858D247887 /* AsyncSwift-dummy.m */; }; + 309DFDD7DFF5A110397616277B8317E9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 32995147DC30DF5022DD66C0470BFDE9 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2CAD87AE48B10E491D1ABE7728CF539C /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 35169D1FF4D58B58BA133F2C1644C8F4 /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6946379166CBCD04F52D4678B48EC922 /* Random.swift */; }; + 35C095305E5FB8CF40BB6C6A7F02E678 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = AA90684431882E032604E591B40A8AA8 /* ErrorUtility.swift */; }; + 38D43865105801806AB59B26F42602E7 /* AsyncSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 737BEDB2257CDE930098154515FAC34A /* AsyncSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3ABDA920FDD838A534E55347FF35ACCC /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0E452D832665063FC2DE9E89EF36900 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3B59EB43186F324A79D05C3201369283 /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = EAF46085470AD62EF683C3400D7E840C /* QuickSpecBase.m */; }; + 3B5E796F1BFBB87AAB31305D6FCE160E /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 31475A88A962ACCB1B844BFA9E8FBA59 /* Nimble-dummy.m */; }; + 3CFE6D672FEFBE8A9D10D5723FB88BF2 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1A93D0FF5E51023B0E24F7744F3FB4A5 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3E1105B44CCBDA9EC8C6C96EACCCC28F /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDD0A6DA5ACDFC3896BBAF20817925D6 /* Behavior.swift */; }; + 3E97A584E7FDD55A6AC072DB23043FCC /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = B190F12D86D2E28593BB342BE3FA1C08 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3FA8E6AEBD8687BF75B467C33ADF0045 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 59FE4E051D77B911DC33BB8F282478D8 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 40D9B846E5A8AF781C0A0C41FED0E0F8 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06F7D5BCA8016A65FC1F991A7CD34189 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 42BC3C3CBE7E5484F09BAD3204DE521D /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEC5DDB919E5D5645283534CC279D31F /* NSBundle+CurrentTestBundle.swift */; }; + 498D0CEF04FDF36BE2B89A67015FF3A0 /* String+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47ED34C935751BB78ED6CA1C726A3A44 /* String+C99ExtendedIdentifier.swift */; }; + 4A457767C9968D139BD8AAD877DFC117 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 313F99400FFC3AB47723221BE1D2832A /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4DB106EF5D81F121EA58D82401C5DD1C /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5FE134E07F4A407A35E2A9FA4F52C89 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4DFD4AE1B1C12F59014A9C1FE8F7AE47 /* BeResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E7FC2D2AF821C6B469305D238E20B32 /* BeResult.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4EC19A4F9EE9863B3CF7BDB7607FE96B /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42CBB8AA6FA00EDB41FE5EC1A430CE51 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 51BAE003E7BD972B4F6EB54CFB7E1BF0 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF2B0C7A87F44D9B7CA7435B546FA859 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5258586AADBC8482EFAFB4B591A17E03 /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 82C8A071061F8B5D75F25FC43A829EF9 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5448447D317610CE0DF66B87CF6F1094 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2A94452D00839E9F50E37C97B56E6425 /* Closures.swift */; }; + 58CAB839E63D7D4575D3DEDF8C98EDD9 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74423F41B41DE26EFF94C6E4EAB09A7B /* Await.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5DE534ADC468F5FFC43371CE7138923F /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70007C93BE379F504C38C86F5466E339 /* URL+FileName.swift */; }; + 5EB8F48CE35984BAA5B73CB513F53650 /* BackOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = C11BD0F396A245E3DACCE07673113BBD /* BackOff.swift */; }; + 604A73AD1D0E82356F2A073C53BC6517 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 60A059AA3734D5D3F2F73D07C427F4C1 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EBD3D9E7E953062C304ED4F12AFE999 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 612581CCD8346C696A80E6BC09D24C1F /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 544CF918709539DE5DB60459DD45DC5F /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 61F1ADB6BE662783C1A01C2C1720A9BE /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 601E1A99A706F386660E55599BB2DE76 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 654580360E6694D7F7CE85CE5390DA79 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D7AA82B13C87A0EA1CF223FA31D1035 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6A47C53473FBCF2FF5C85069FBD4CA8D /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 78C730D5E20BF1B2DD306BD557D0CB18 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6C1386A39405BDA544D5BEE2C9155AB1 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = DD79C5447AC5EF21FDDD9EAA28313DCF /* QuickSpec.m */; }; + 6D2F9F1DC6C1DE1C73F4382904B9C97C /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7005DF22D61B82C142ABAC5FAA751F36 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6F4F5989C108EB29AB735E9CAF4B6E0A /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4396C714C732AED9821F7AE1ED0CF0C4 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6F796B7E3AA428C9D8E88F0F2269664F /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8569A5D2776E99A4F479C7253723D97B /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 707245706183C9814604FBE34CD83152 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB87C163E704B44912AF2C31E047E3AD /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7190961540266108624E854866842A81 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = F2D35A1513203DD646431793E0519020 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 723FE76A3C21BB17463C76C2E3C6CE0B /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 19D90C641C50D1FF869F539A42B396D2 /* Async.swift */; }; + 79A9ADCAE72B5F30CE882F79CDDDD47F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 7DF5C2582E1C9DE5BC6BF84C0AF1337B /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2FE35428005CDEF2E405C90983185109 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 80428B0834B1272AB4E96E00D3FAA081 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4CCC5B7D0521FF9B56CB783C4BF6A6BE /* Example.swift */; }; + 8053ABE3D273A84BE66DFE35667E7534 /* BackOffAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34084C93EBCE9575AE15837CDE4520BD /* BackOffAlgorithm.swift */; }; + 80DB7C67B0D7A32BF885B5CD17C745A1 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 689DEC51C73942D5EE13F00CBF2BA6D9 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8275BDF98C2D72134C12F6337A368E69 /* ExponentialBackOff-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 928CE3619C3C2D9DA50DF5B20638156B /* ExponentialBackOff-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 82B9D1C1103E0663E9B97412CE47E4F9 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 83E6E2EAD18016A08CF5F80E74BC1D95 /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57A7A203963D7730F7C00E4E88ABDAA /* Tools.swift */; }; + 86037D5CAD49EC09A2B944ADBF561059 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 98DD750B670465773F63E9DCDA471C1A /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 86F84DE049A0E2CADAC8344E20D070BE /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 26ED8C59933FBC7EB7328379B133A2D7 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 87535E5C51E9F6B7B1517FEA95033D1C /* QuickConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = AB9C9494576D5E03DB6141BA83B92AB6 /* QuickConfiguration.swift */; }; + 88380C6AB029E423E69827B204BFF18A /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 77CA72F0968D7BF97629B6D3F952C632 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8A9FE00A3D26CFEDEF3503C93FEFC954 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8AD7B560A03C405E894384AFC354BE3F /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8EFA132322053E7D8A1F9F380B5D8935 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = CEC0BC47C01C1F857FE22AC67A753253 /* SuiteHooks.swift */; }; + 8F5593DFFFCAC3D618365EC2590A3E31 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4A8160F94E644F2FCB8681C816D8B852 /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 92DE6AC67462F0A507D3187892D4FA8A /* Equal+Tuple.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6BFE7635858534FEC382535A4152084 /* Equal+Tuple.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 981F6B1579CE5D0BDB6E936DFC0B24F1 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = FA2BC3192CEB8E2C4F5EBEA20476FCE9 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 983DFB51B0C7F5F45101B582CFA753FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 993ED0D1D74DDFAF99D4108636EFFA64 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A286A0B96DC9CCBEFA1B8E8AF8E8AAA0 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 994DAB83E925F5BF28B00DFD0F9795CB /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 5CCCE11086CD762346C90BF3743D7D54 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 99E8D5AB6B9BC309C60A29C32269B398 /* ExponentialBackOff-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D32632E3B045D7CFC75E1CFE0D81688A /* ExponentialBackOff-dummy.m */; }; + 9AB3D03BC12D48113C0AFB7E687A274D /* BeginWithPrefix.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57D16B235FE409ADE89051032606559D /* BeginWithPrefix.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9B4B84C8A58733E87C1F30CDE34F3BEE /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B886EC0A76CAC77C778F54C5218F230 /* Filter.swift */; }; + 9B981E6DB0846F597838D6995E3F2EAC /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 773D5728C06E15CEE4317DAB54FC160C /* QuickSelectedTestSuiteBuilder.swift */; }; + 9C75931ADE8431B4C3C4AE2D59E70977 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25AD7528B8E654E647354C63D04E8F7 /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A017E1A4E1C0AA61CDB6F1E8382D3384 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65BA089199DE46A764CD31ADEDB79417 /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A0F1DDBCD61B35967DED6A8F6A69B9A5 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 57F35562339CC8B7158B8E5D847148AE /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A327A211C8B71069F32FAE5F5B3807C4 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = D44836B16096A74E6E6C136B90B00EC1 /* HooksPhase.swift */; }; + A357C8E38B58FA37B8E1A6103D4E9A0A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0C4ECD9991C7577FD497EFDB50749D8E /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + A487451E3CC40D7F9549FA292435273B /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = E2B444BFC047468593923E89D723F085 /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A51C1467A9FF4131B57163C326F08E59 /* ExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 7625BA37F61C82FA9DFC787E06AD352F /* ExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A5A97FBDC50F2EF8F0CE8C6B6BDD2A44 /* Pods-ExponentialBackOff_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = A3A595A8C086FE4328745E66FA092F32 /* Pods-ExponentialBackOff_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AC0278DBE6921D2AA8CA82CBE8805202 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1EB1BD192C82C3B632DB0BC422E3CCE2 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AC1B0A94D98FF6A485E56165BDAAFB8F /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2836ABFFDF647C7F93DC1643135DA42 /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + ACAA345A1CCAFA1F4EE69B3C25D62558 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2975A2517C328EC996A1D9672979DA3C /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AD022386EA01CE480072E4C2E261BEC6 /* QuickTestObservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = A8199286098D1AD09F8C9E16F5855DB4 /* QuickTestObservation.swift */; }; + AEC066EC3752C35F72B7BCF9693F1DE1 /* Pods-ExponentialBackOff_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = F0A7F0796771506771E6A1BF24AD77CB /* Pods-ExponentialBackOff_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + AFB4F603FD0F5C407CB8920F6A5BA7A1 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6739558328600573C53F1FB9D8989C1E /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B93F3526A95D7F43EEBFEE5E453E4795 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C19A85FB26D7FA6C08DEF69C4B1DFF2 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BD3ABAC28025564DCF2E6C12009435DF /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 4B54E6B59F87BC799FA418ACBA46FC37 /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BF62525E5628A9F7604BA8479691318C /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E28A69636C8AA8A70A82AADD994B0EA /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C03116C765F1A8893559730965ECBAD8 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 344FA1EA94F60C0E0BC7D15C351DD2BD /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C20BFECB0A04FE439AE243D89E687B8A /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7845FC8A1A031B346E2D06360FF506DC /* QuickTestSuite.swift */; }; + C5DF891232B50DB810099403734CFCEE /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40B457CDB23F6403F2B87806DFE3BE5B /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C7DB9FB7C8378ADC0DBC744F9359C0C9 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = E03F4CB3E2BED5903EBCC2EDBDABB5CB /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C8539F1BDF052B57BDB129D3D4B07364 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 70B2EF71C696CB60EB09B380CC072BA4 /* Callsite.swift */; }; + C85E1092F4DAACDD63FB8E8B0E144095 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8AF972B1E51DAD2673BF5DD5B79ACBE /* ExampleMetadata.swift */; }; + C96B370E9B3442878448F8FFFDC98C7A /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = E481CEA55D9237E4E48DE2F89F0A49EF /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA32F74C00C2448397720AB161360835 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DE393F0579522C1316B1772C54F797A /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + CE1C9D9F020DA8AAEBE4A77C3E0B660E /* ExponentialBackOffInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6127C4CADBBA0A767780CBD542A87E8E /* ExponentialBackOffInstance.swift */; }; + D6F1A9AFE522D73CB8BDF851FF6F7ACC /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = E68378B56CADA12EAB9EE92D340A0B24 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D8B8FCEC597824B40986C8F4F7B50899 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 85D1DF3755A30D24A77FA0495C478D3E /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DA9B61878019B5428B614BDDB5948F01 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 62584C3B198D28D5F1A07B1CE621C34F /* QCKDSL.m */; }; + DD130331C3820B0A4A655D6422167410 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 474DA3851475E3ED41BD74029BA9D3EB /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + DDBF65AA3D1EC44DFB9943393D9639D1 /* ExponentialBackOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = D0EECB6D3FB222B55272457240342A01 /* ExponentialBackOff.swift */; }; + E1CD0FEF6BA86FA9C28038C818E2514A /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 1DFD77986001BB2D516CF302D5CA249B /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E2EE2E7797C383576ACBFE4986179459 /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 77E154677392AE639B0C7095BC48F324 /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E5ACC239A1C2E515D4939ACECD147445 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9DE8D59400003DAE36ADE6FAC16B9D44 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EA4EC4B3853541FDC946239C036D12C9 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = F1D24F460178E59A48A66C1327CE4C3A /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EB892573E1CA332ED26DCC659406E79B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */; }; + F1D91144B0B756BA7723E0AE68ED6605 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4DA0ECBEA5C2AD07C2AEB6C132CB22B6 /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F591765960EECDBB53CB4E5329290A4B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3E7055B8E76B44F836ACE25D199E677D /* World.swift */; }; + F8211C89835CD4106BCC584D260CF7C8 /* DispatchTimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8CF0DF47FDE1D0E1921C9489A7B84265 /* DispatchTimeInterval.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F94ED0C040D8EFE1B1227A464F81E92E /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77346E8B008D76D296331976F1E57315 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F9A961CFA0E2BD3C6A94E282069AD80E /* BeWithin.swift in Sources */ = {isa = PBXBuildFile; fileRef = D53C6690E10FAB032AE89C9B79406D4B /* BeWithin.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + FC4F734925BC0EDDCD7C10AFBF93C576 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = EED44A84E37FA72BC3378770C0F0F5E9 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FE67CE5AE4DFFE6B850FA43334EEBDC0 /* QuickObjCRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 29995EB3CFDF343EA7DC28324B8C6FCF /* QuickObjCRuntime.h */; settings = {ATTRIBUTES = (Project, ); }; }; + FEA8C3E9543FB2A316D5A8F89B13D411 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6B2A35CDD613A8EF9A125979FA8BE66F /* Quick-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 10758D9D5BC6F10C5764BF1CD9EAA6AC /* PBXContainerItemProxy */ = { + 1CEF6C436C395BAEC12DC7A29614E3DE /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 1321E318D10CFDC9F5B93A7952492CCD; - remoteInfo = Nimble; + remoteGlobalIDString = C82891EAB7293DBEE916B21F57E8474D; + remoteInfo = Quick; }; - 1F7255CD3EC7B45E06BEF72E241A8D61 /* PBXContainerItemProxy */ = { + 1F8DF02151D1ABC04FB0131E7AB73430 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = C89988484E3646B16ADC6498B8C03D48; - remoteInfo = Quick; + remoteGlobalIDString = 5855AF2F67E5FD5CFCE31548B29131A9; + remoteInfo = ExponentialBackOff; }; - 4B28CC6FC8D71B759594A3C2EFE8F3B0 /* PBXContainerItemProxy */ = { + 36CCDC18850F5E77C64AC2AC9D6012B5 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 75F38338F0F0E74EB34B01481C528E1B; - remoteInfo = ExponentialBackOff; + remoteGlobalIDString = 975690F47D860B117FB4B04B42AB69C9; + remoteInfo = AsyncSwift; }; - 9343943145DCED17AA5C9CA9E457FA5D /* PBXContainerItemProxy */ = { + 4DB487BCA7600D346A1BE932F3B6CF59 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 7F45F2F21482C3777494ACE42307212D; + remoteGlobalIDString = 975690F47D860B117FB4B04B42AB69C9; remoteInfo = AsyncSwift; }; - CEC781DCA62FB0BD6F7D088D893EB74F /* PBXContainerItemProxy */ = { + 5C90AF1B5A0F705968E23AD4943D5E0B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 7F45F2F21482C3777494ACE42307212D; + remoteGlobalIDString = 6F13695E06195A78EA8A95F8C7ED0D2F; + remoteInfo = Nimble; + }; + 74CEB37540F7F5D2695805AA8E5923C6 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 21B46E77392C199BE357EAC3C8B3CAB4; + remoteInfo = "Pods-ExponentialBackOff_Example"; + }; + 9364BE9EA8A051E54C1EEAE2999BB5C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 975690F47D860B117FB4B04B42AB69C9; remoteInfo = AsyncSwift; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0152C55CABE3E5E7E1BE282DAE681FCD /* ExponentialBackOff.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ExponentialBackOff.xcconfig; sourceTree = ""; }; - 0B7B289D9FF96D59B9835C95B1704EE0 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - 0C8BD7C720FE734B565407B11C0DA322 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 1011EE9D897CCC2E3862C120FEEAACDD /* Pods-ExponentialBackOff_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff_Tests-umbrella.h"; sourceTree = ""; }; - 10305A18C26C06F8AEA89673F37A4CA5 /* Pods-ExponentialBackOff_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Example-acknowledgements.plist"; sourceTree = ""; }; - 10CC1C1A3A754FE67B545151479D0499 /* Pods-ExponentialBackOff_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Example-resources.sh"; sourceTree = ""; }; - 141464B8426B43C0AFD120F196CB5954 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - 15B3DA24790C3E69B14BA6F34E8CE5F6 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - 184FC3CD22C62088613DE9012F80D124 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 1855C2E271A2D13CE36C4B5B106E6A83 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - 1A257A0418A6F96D0EED88FBDCE73180 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - 1A49F48528C25349FD50DEB57BFB24FD /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - 1A982A81CDA132A3AC6F11C02527448C /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; - 1B39E8E27CE79FFB28F5717EBA52474E /* AsyncSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-umbrella.h"; sourceTree = ""; }; - 1CC3EF09AF3A988539F7940B3C812AFE /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m; sourceTree = ""; }; - 1D58F1A041323DD70FB9446FA069D5B5 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; - 206F1C8D2A415585D40A165617043EAE /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - 212F5143D0E6A10B812E27113340C67E /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 23C19FB43F3E14845BADB41B70FC00CE /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 24A2410F9B727E2DEE01C36FC78861D7 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; - 2693462023BF12BE8C426BE8642D3125 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - 26C1416A60EC50D63B8D18DBAE59A1A1 /* Tools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = ""; }; - 2875DAE37ED7057A9119AB9CD61E7CB5 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - 291EC7073EF3F9972D4EB1D0FE36EB2B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 29E76CD31803C31EBD0518FDF27742A6 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - 2DA94359074A7C904B5D17685AF24603 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; - 3017275085004FD285AEF82EAB576F80 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 321A05DBBCBDDAC59B20BD0312063DB5 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 33C5F9B53D4651E8ABB7468246500016 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 352E2D34D466F5C3A40553CD52690170 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - 352EC3C68019412C78305360325040B0 /* CwlCatchBadInstruction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchBadInstruction.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h; sourceTree = ""; }; - 355E4D2199675C75CFA200321595EB72 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; - 3670B51CFD1009630D1D87F6D9C1898C /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 3798D7199BC48EC873B49D59D3837B64 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - 37BD7CDB5B7C78308AA0914FE8E45128 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 39493A7EB91FCA72336F05B13F13B705 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - 3959B075029ECBEED80A69D922B09FA2 /* BackOff.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackOff.swift; sourceTree = ""; }; - 3A5570F041A1E00822E40577D7F05F07 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 405D68A14F65B32CFC4E78E61BE052B7 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - 41F7AAA9E1BCA9CCB1BE367C8224F5F7 /* ExponentialBackOff.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = ExponentialBackOff.modulemap; sourceTree = ""; }; - 41F7F1880ED50D0CA763787A9D413CE0 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - 42A029A8A516B85056E454C8BE27FF88 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; - 45AC2D444024C04ED790F805DD17030E /* Pods-ExponentialBackOff_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Tests.release.xcconfig"; sourceTree = ""; }; - 4629E1720380B433A8BBEEA00C5CFBB5 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - 468094E5FFC081FBDDC82BCAAE7E6670 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; - 46D10DD13AF720C66CAB98DA1EB0BB9C /* Pods-ExponentialBackOff_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Example.release.xcconfig"; sourceTree = ""; }; - 4842F7D477BCEA93C793E543FC807122 /* Pods-ExponentialBackOff_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Example-frameworks.sh"; sourceTree = ""; }; - 48ABB6ABA2FC1005D5247E64A3B4AC9F /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 4AE968FB13E6C59B1C2C718359842209 /* Pods-ExponentialBackOff_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-ExponentialBackOff_Tests.modulemap"; sourceTree = ""; }; - 4B235D16BAF3A68866D48817094229C1 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - 500810ECD2FF5439186276CB41EEA2D9 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 51E23571200FF56897459F28DB4E91F0 /* BackOffAlgorithm.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackOffAlgorithm.swift; sourceTree = ""; }; - 59FB88AED4F4CEF998FCC87DF7244972 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 5E925B179588A020FF1D457256CDCD60 /* AsyncSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-prefix.pch"; sourceTree = ""; }; - 635BB7EC529CB5A8F5C337AF3D1AB06F /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; - 639D0817925DB830C39E87BAF62735E9 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 64EDDEFE354E05E90F87A54AA1512DFA /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - 67EDD5E108165933655C52E7CBC9A96D /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; - 6A3B123D9A376943528902537BA2E77C /* Pods_ExponentialBackOff_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ExponentialBackOff_Example.framework; path = "Pods-ExponentialBackOff_Example.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 6A5926524A8F619959432E476E918384 /* ExponentialBackOffInstance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ExponentialBackOffInstance.swift; sourceTree = ""; }; - 6AC2B6C737D92677583A7A03587786F6 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - 6B8E5D65FA727A4D30DA2985D47DAA62 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; - 6B94BC48066AA0F9659FA7D5B63FF7F4 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Nimble.modulemap; sourceTree = ""; }; - 6D6FF3E68264B0C36D21F8FC7B3A941C /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; - 6D80955241C1B213B750DF9F5C12347E /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - 6ECAFD6A68B04C5B6F535DAE4741AFB2 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; - 742C383481521A79CF41D97AC9521226 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - 781A6E60C7D466CDE85BBE952644B8D9 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; - 79A3B26A415D3611214D174FA1577768 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - 7A93044B62340566A28FB2770409CEBC /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; - 7AC5E9CD25D9C1D9D7566DDEBFACF924 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 7B271FBAD072277E3FF9C511A7BDD33C /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 7F8501CD8E27D522F5CD37C2CD66AB9F /* Pods-ExponentialBackOff_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff_Tests-acknowledgements.markdown"; sourceTree = ""; }; - 80383DB0E40570907BC336FD81260524 /* ExponentialBackOff-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ExponentialBackOff-umbrella.h"; sourceTree = ""; }; - 806CD9FA33E4FBEEEBBFA7CDF6266683 /* Async.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Async.framework; path = AsyncSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 81D946D71C525FC5BD16C4ABDCA6F6B9 /* BackOffState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = BackOffState.swift; sourceTree = ""; }; - 869706583CC2281388CFF7AA634F6CA4 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; - 88D80B674BDD09937CFE122610E03DEC /* Pods-ExponentialBackOff_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Tests-frameworks.sh"; sourceTree = ""; }; - 8A5747516A0A1FE46806679A6EAA5E73 /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h; sourceTree = ""; }; - 8A6F9E84C63CBC66EF2ECDFE101E1E4C /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - 8BC1C9B6C351AAB3C6EFBA156DBC18CB /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; - 8D61FB50109F40EC3EA425F9A23B51E7 /* Pods-ExponentialBackOff_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff_Tests-dummy.m"; sourceTree = ""; }; - 8DFB3AEA028A22F0756061ED19B9995B /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Quick.modulemap; sourceTree = ""; }; - 8E0BACD2C4F31AB219B29ECD302ADAD0 /* ExponentialBackOff-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ExponentialBackOff-dummy.m"; sourceTree = ""; }; - 91D7E6D7CCD128CC1FE5A7B89C197D05 /* Pods-ExponentialBackOff_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff_Example-umbrella.h"; sourceTree = ""; }; - 921B3E3E396F7AF6DDC0CD6A5A51FD43 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - 926AFF053CA8F9A5C8BCFAC7BFA85654 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - 92E5C8610278D49E288169732958C4A9 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 95CD1C5D6DCD7CDAC0142F8E9A8949E0 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 95D640CD8B3E763485B3C2DCD8AEE59D /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - 97DEE3DF1D9A91A519079D853BED1838 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - 98F391BD3C7E825E4F910BDF5728A548 /* AsyncSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = AsyncSwift.modulemap; sourceTree = ""; }; - 99CB5931D2B171AD49E7DCE7BE909B15 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; - 9A754FC47F1DD58D01A8746812A29852 /* Pods-ExponentialBackOff_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff_Example-dummy.m"; sourceTree = ""; }; - 9A9183A080EAF248FB6C91B58D295418 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - 9AF74F8E9D7900D6219586E1945D907A /* Pods-ExponentialBackOff_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Tests.debug.xcconfig"; sourceTree = ""; }; - 9B2C77B779BD9CFED9F7F731D2F7C7A3 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 9EF0C828D93701F36DA1040E684ACE0E /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; - A0542A07761B3EFA4BF09AB104C0B410 /* ExponentialBackOff-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ExponentialBackOff-prefix.pch"; sourceTree = ""; }; - A12824F6F5FFB0849B79E7E7D1AC8498 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - A2D1472D63C845AA6E321955CC577A6A /* Pods-ExponentialBackOff_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-ExponentialBackOff_Example.modulemap"; sourceTree = ""; }; - A36441EBFCB279BC2D51BA40D55C10B9 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - A36ACB5379A58C42C24619B2ED1453AD /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - A46D226A458723AEA5C3857349357289 /* Pods_ExponentialBackOff_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ExponentialBackOff_Tests.framework; path = "Pods-ExponentialBackOff_Tests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - A89425684E63258E873B7EFA062C25AC /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; - A8C8D527427CE7509CCE4FD027B5F04E /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; - A94C2926954AD7B619BFB1E7AC2A38CE /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; - AAE3388BB1AE4602E5F446FFEC2F24C0 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; - AAEAD4D6B3058847A8DA10B76E16FBA4 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - AB29A9B2C233F98C524C395FCB744598 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; - AB9ED0D403D5D92C55EBFE07E45523CE /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - ABF5D315A5B9E3FF24E4FE9411231ABD /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - AD1F81DF61A4F317C96BD896B53DE300 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Async.swift; sourceTree = ""; }; - AEBE779526CFF046DB844CC0B8C4396A /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; - AF8A3B3863B3573539419C70D5646B9F /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - AFB705E85F21D5A587AAA18A441B3C32 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - B14D69C7104AA2B0203B0B13085C3592 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - B1692309414CCA978A359633B0D58D70 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - B1AF2913BAB89914DE8641E7BFBB86DD /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - B1DB165EFF7255E110383C24B63FD680 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - B347D1556F7CEAEFAADC0B86350F59F7 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - BBF4188A1E4D012B0B42AE6ADFA7AD7E /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.h"; sourceTree = ""; }; - BC292B3A595C376991C6A6FC37BD0F3A /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; - BECF2E6B7124FD5FA972EC798996873F /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - C0CB81F86EB2620E24DD3AA686E705FB /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; - C3699A2C10206799D9B9A7727C39F141 /* ExponentialBackOff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ExponentialBackOff.framework; path = ExponentialBackOff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C6340E4C2CA4701382E3E87F2192F6D6 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - C8B006B9F6FC803E7655461B425A49F7 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; - C949ED43A2F56C48780CA0DC4BFCFF01 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - CB85F4EA53AA76AB9CA96FDC2FBDA244 /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; - CB9F5B6A82F4D6787A121211FE7813EA /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; - CCC25640612240E9356EE04909545B06 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - D2604883595DD69177D51E2AF3C7D7B8 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D40362A749DED46073575ECAF13EFCD6 /* Async.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Async.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - D44754517F2C07670B3226A8ABB8CF5B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - D4BCB3B03CE0A05B8EED110EEFC100A1 /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - D4F9B6D9D88533B8EE63133BA2EACC11 /* Pods-ExponentialBackOff_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff_Example-acknowledgements.markdown"; sourceTree = ""; }; - D5059744B8849B84AFA683ED5FFA30F7 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - D6890E19DD7C4B9762B18E1203D0827A /* Pods-ExponentialBackOff_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Tests-resources.sh"; sourceTree = ""; }; - D851BC3E6FBA87CFD502094BA3DCAE55 /* AsyncSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.xcconfig; sourceTree = ""; }; - DA45B4F1384FD5D39A772D3B97C68F71 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; - DA5ED83225E3A768A164EB925543E678 /* AsyncSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AsyncSwift-dummy.m"; sourceTree = ""; }; - DB35989FACD2EA301C5644B61D785BA6 /* ExponentialBackOff.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = ExponentialBackOff.h; sourceTree = ""; }; - DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - DE7C5269B6605E09A777D3DA830627D8 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - E120D4A41CEC28906782A11FEDB67F9C /* Pods-ExponentialBackOff_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Tests-acknowledgements.plist"; sourceTree = ""; }; - E2010CFF08E9071A11B5F8DB47124B6C /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - E4EFA20DCD550C4845752763701BFA86 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - E5FB957F07321E541AD68AC6CA5A4EEF /* ExponentialBackOff.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = ExponentialBackOff.swift; sourceTree = ""; }; - E68A32206A8493CADE643791E4ABE6DE /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - E8FCAEACB9A1629345ACDE2F07A1C699 /* Pods-ExponentialBackOff_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Example.debug.xcconfig"; sourceTree = ""; }; - EB76FF77DE88002EF4FBD99E2A040D6C /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.m"; sourceTree = ""; }; - EE42B380178497DC5E976313EC1AB328 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - F5EDEB3D8230B545E0362CAD2D6F73D9 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - F6C823FAE7A78C4FA4D787419EFA1C93 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h; sourceTree = ""; }; - FD0A30492255DBB6AEF0215A83A61958 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + 01DC30DDD1BD005761311BE45C0D8C32 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 030FF7D78FF3D866002B0AD90462F43A /* Nimble.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.debug.xcconfig; sourceTree = ""; }; + 052343D5C64AD820F947B94011A75DF1 /* Pods-ExponentialBackOff_Tests */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-ExponentialBackOff_Tests"; path = Pods_ExponentialBackOff_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 06F7D5BCA8016A65FC1F991A7CD34189 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 092B856DF8975269BCC9B956D638E7B4 /* Pods-ExponentialBackOff_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff_Example-dummy.m"; sourceTree = ""; }; + 0C4ECD9991C7577FD497EFDB50749D8E /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 0D631E9908483F9525A6B3F36F16CC61 /* Quick */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0DE393F0579522C1316B1772C54F797A /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + 177B6EC7273A8EC49BC0A1573671E31A /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 19D90C641C50D1FF869F539A42B396D2 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Async/Async.swift; sourceTree = ""; }; + 1A93D0FF5E51023B0E24F7744F3FB4A5 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + 1AE5638A2635571D31B99B2759A49F0E /* ExponentialBackOff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ExponentialBackOff.release.xcconfig; sourceTree = ""; }; + 1BD72E096DFBA44F3B31DC6540A02E83 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; name = Info.plist; path = ExponentialBackOff/ExponentialBackOff/Info.plist; sourceTree = ""; }; + 1DCD424C57D6BA27578675858D247887 /* AsyncSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AsyncSwift-dummy.m"; sourceTree = ""; }; + 1DFD77986001BB2D516CF302D5CA249B /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + 1EB1BD192C82C3B632DB0BC422E3CCE2 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + 227A9D7D1AF726C18BD8BE6849F21F71 /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; + 26ED8C59933FBC7EB7328379B133A2D7 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; + 26F10DDF82C6A18515676F39E155BD43 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; + 2975A2517C328EC996A1D9672979DA3C /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + 29995EB3CFDF343EA7DC28324B8C6FCF /* QuickObjCRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickObjCRuntime.h; path = Sources/QuickObjCRuntime/include/QuickObjCRuntime.h; sourceTree = ""; }; + 2A94452D00839E9F50E37C97B56E6425 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + 2CAD87AE48B10E491D1ABE7728CF539C /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickObjCRuntime/include/QuickSpecBase.h; sourceTree = ""; }; + 2DD602D9E3A0E02F765376D7B329B49D /* ExponentialBackOff-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "ExponentialBackOff-Info.plist"; sourceTree = ""; }; + 2FE35428005CDEF2E405C90983185109 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + 30447D41F9474F948164CC6255AF60AE /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + 313F99400FFC3AB47723221BE1D2832A /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + 31475A88A962ACCB1B844BFA9E8FBA59 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; + 34084C93EBCE9575AE15837CDE4520BD /* BackOffAlgorithm.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BackOffAlgorithm.swift; path = ExponentialBackOff/ExponentialBackOff/BackOffAlgorithm.swift; sourceTree = ""; }; + 344FA1EA94F60C0E0BC7D15C351DD2BD /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + 3618198BC2CF4690EFC181BA2182E7B6 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; + 36DBD97254D37CC59C88DA207F789FFB /* Pods-ExponentialBackOff_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Tests.debug.xcconfig"; sourceTree = ""; }; + 3C5596D07CAE5080650815D47B038B09 /* ExponentialBackOff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = ExponentialBackOff.debug.xcconfig; sourceTree = ""; }; + 3E7055B8E76B44F836ACE25D199E677D /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + 3EBD3D9E7E953062C304ED4F12AFE999 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; + 40B457CDB23F6403F2B87806DFE3BE5B /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + 42CBB8AA6FA00EDB41FE5EC1A430CE51 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + 4396C714C732AED9821F7AE1ED0CF0C4 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 46258A66F457543E39D7AE6018A66B3B /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + 474DA3851475E3ED41BD74029BA9D3EB /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + 47ED34C935751BB78ED6CA1C726A3A44 /* String+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+C99ExtendedIdentifier.swift"; path = "Sources/Quick/String+C99ExtendedIdentifier.swift"; sourceTree = ""; }; + 4A214194E4FF334262EEC5187BF5F845 /* ElementsEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementsEqual.swift; path = Sources/Nimble/Matchers/ElementsEqual.swift; sourceTree = ""; }; + 4A8160F94E644F2FCB8681C816D8B852 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + 4B54E6B59F87BC799FA418ACBA46FC37 /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; + 4C19A85FB26D7FA6C08DEF69C4B1DFF2 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; + 4CCC5B7D0521FF9B56CB783C4BF6A6BE /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; + 4D7AA82B13C87A0EA1CF223FA31D1035 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; + 4DA0ECBEA5C2AD07C2AEB6C132CB22B6 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; + 4E66DC1AF9696D8464554181190A96B4 /* ExponentialBackOff.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = ExponentialBackOff.modulemap; sourceTree = ""; }; + 4E7FC2D2AF821C6B469305D238E20B32 /* BeResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeResult.swift; path = Sources/Nimble/Matchers/BeResult.swift; sourceTree = ""; }; + 544CF918709539DE5DB60459DD45DC5F /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; + 56B16417997A4E9112135537DDC20D27 /* QCKConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QCKConfiguration.swift; path = Sources/Quick/Configuration/QCKConfiguration.swift; sourceTree = ""; }; + 57D16B235FE409ADE89051032606559D /* BeginWithPrefix.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWithPrefix.swift; path = Sources/Nimble/Matchers/BeginWithPrefix.swift; sourceTree = ""; }; + 57F35562339CC8B7158B8E5D847148AE /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Matchers/Async.swift; sourceTree = ""; }; + 59FE4E051D77B911DC33BB8F282478D8 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + 5B33B595D9818EE94454BE4477549FEF /* ExponentialBackOff */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = ExponentialBackOff; path = ExponentialBackOff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5CCCE11086CD762346C90BF3743D7D54 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; + 5E28A69636C8AA8A70A82AADD994B0EA /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 601E1A99A706F386660E55599BB2DE76 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + 6127C4CADBBA0A767780CBD542A87E8E /* ExponentialBackOffInstance.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExponentialBackOffInstance.swift; path = ExponentialBackOff/ExponentialBackOff/ExponentialBackOffInstance.swift; sourceTree = ""; }; + 62584C3B198D28D5F1A07B1CE621C34F /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + 65BA089199DE46A764CD31ADEDB79417 /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; + 663EB3CFF3FC9E355840A6BA1EDF17D4 /* AsyncSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = AsyncSwift.modulemap; sourceTree = ""; }; + 6739558328600573C53F1FB9D8989C1E /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; + 689DEC51C73942D5EE13F00CBF2BA6D9 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + 68B8EDC590A6A7696E19F9B8C3FD7DCC /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + 6946379166CBCD04F52D4678B48EC922 /* Random.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Random.swift; path = ExponentialBackOff/ExponentialBackOff/Random.swift; sourceTree = ""; }; + 6B2A35CDD613A8EF9A125979FA8BE66F /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + 6E492BED40AE5112C54DC9169ABB627D /* Pods-ExponentialBackOff_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Example.release.xcconfig"; sourceTree = ""; }; + 6FFAEDD8D800EF7F2AC0CC9D98E13619 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; + 70007C93BE379F504C38C86F5466E339 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; + 7005DF22D61B82C142ABAC5FAA751F36 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 70B2EF71C696CB60EB09B380CC072BA4 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 726DCB9C30890B7004651F59094B98DD /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; + 737BEDB2257CDE930098154515FAC34A /* AsyncSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-umbrella.h"; sourceTree = ""; }; + 74423F41B41DE26EFF94C6E4EAB09A7B /* Await.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Await.swift; path = Sources/Nimble/Utils/Await.swift; sourceTree = ""; }; + 7625BA37F61C82FA9DFC787E06AD352F /* ExponentialBackOff.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = ExponentialBackOff.h; path = ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.h; sourceTree = ""; }; + 76295451591B1AD4B6AB4DCB60AC49E9 /* Pods-ExponentialBackOff_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff_Tests-acknowledgements.markdown"; sourceTree = ""; }; + 77346E8B008D76D296331976F1E57315 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 773D5728C06E15CEE4317DAB54FC160C /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + 77B826D6B842A58E4454CA87364D9DE4 /* AsyncSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-prefix.pch"; sourceTree = ""; }; + 77CA72F0968D7BF97629B6D3F952C632 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + 77E154677392AE639B0C7095BC48F324 /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; + 7845FC8A1A031B346E2D06360FF506DC /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + 78C730D5E20BF1B2DD306BD557D0CB18 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + 7A565AF7B860B11C8294680BF0F68D1D /* Pods-ExponentialBackOff_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff_Example-acknowledgements.markdown"; sourceTree = ""; }; + 7B886EC0A76CAC77C778F54C5218F230 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 7ED92B3439BB7972C5D1EC9DC5AABC14 /* Pods-ExponentialBackOff_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Example-acknowledgements.plist"; sourceTree = ""; }; + 7F1823307F241F9620C060EF01249F0D /* Pods-ExponentialBackOff_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Example-frameworks.sh"; sourceTree = ""; }; + 826A6C2D418C00C1F74194B8C8FB73CE /* Pods-ExponentialBackOff_Tests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Tests-Info.plist"; sourceTree = ""; }; + 82C8A071061F8B5D75F25FC43A829EF9 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; + 8554D6BAA8EF320C8F3ED18EF51815C3 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 8569A5D2776E99A4F479C7253723D97B /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + 85D1DF3755A30D24A77FA0495C478D3E /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; + 8839C8794D89FCDAE68C4E11429C2621 /* README.md */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = net.daringfireball.markdown; path = README.md; sourceTree = ""; }; + 89082BE060905F0193D10CFCB87A806E /* AsyncSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.debug.xcconfig; sourceTree = ""; }; + 8AD7B560A03C405E894384AFC354BE3F /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + 8C285D9DBDB723E8832D4503E6320456 /* Nimble-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Nimble-Info.plist"; sourceTree = ""; }; + 8CF0DF47FDE1D0E1921C9489A7B84265 /* DispatchTimeInterval.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchTimeInterval.swift; path = Sources/Nimble/Utils/DispatchTimeInterval.swift; sourceTree = ""; }; + 8CFCFB7A0ACAF483F1F6369F43A9030E /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + 8EC8A3B0FA3BBBB534E54A5F4E07604C /* Quick.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.release.xcconfig; sourceTree = ""; }; + 928CE3619C3C2D9DA50DF5B20638156B /* ExponentialBackOff-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ExponentialBackOff-umbrella.h"; sourceTree = ""; }; + 93441EDD58A03C6DB8320D7D611C13CD /* Pods-ExponentialBackOff_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ExponentialBackOff_Example.modulemap"; sourceTree = ""; }; + 945A0969DE7C88B4874E02A990C96C0D /* Pods-ExponentialBackOff_Example-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Example-Info.plist"; sourceTree = ""; }; + 98DD750B670465773F63E9DCDA471C1A /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + 9B4ED2A44E78B3B3C7156E94C24CA1BD /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9DE8D59400003DAE36ADE6FAC16B9D44 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + A286A0B96DC9CCBEFA1B8E8AF8E8AAA0 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + A3A595A8C086FE4328745E66FA092F32 /* Pods-ExponentialBackOff_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff_Tests-umbrella.h"; sourceTree = ""; }; + A5D3BB4EE20C231FEFDFC21175861A37 /* AsyncSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.release.xcconfig; sourceTree = ""; }; + A64A63A208C713C70702F15EC5A4470D /* Pods-ExponentialBackOff_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Example.debug.xcconfig"; sourceTree = ""; }; + A66A31B067A8ACEBFB5D45F6689DB32D /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + A8199286098D1AD09F8C9E16F5855DB4 /* QuickTestObservation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestObservation.swift; path = Sources/Quick/QuickTestObservation.swift; sourceTree = ""; }; + AA90684431882E032604E591B40A8AA8 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + AB4F394FF3208C4708C9F6C072B0C4A6 /* Pods-ExponentialBackOff_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff_Tests.release.xcconfig"; sourceTree = ""; }; + AB9C9494576D5E03DB6141BA83B92AB6 /* QuickConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickConfiguration.swift; path = Sources/Quick/Configuration/QuickConfiguration.swift; sourceTree = ""; }; + AEC5DDB919E5D5645283534CC279D31F /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + B190F12D86D2E28593BB342BE3FA1C08 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + B57A7A203963D7730F7C00E4E88ABDAA /* Tools.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Tools.swift; path = ExponentialBackOff/ExponentialBackOff/Tools.swift; sourceTree = ""; }; + B7D7B55755447C9C94F9B062258F7EC6 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + BAE263041362D074978BB3B577DF0A05 /* Nimble */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + BBC0A5DA2D70B920E25234D39AB1E439 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + BBFBDED018AFFA26066C022E8F0CB5AF /* Pods-ExponentialBackOff_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ExponentialBackOff_Tests.modulemap"; sourceTree = ""; }; + C11BD0F396A245E3DACCE07673113BBD /* BackOff.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BackOff.swift; path = ExponentialBackOff/ExponentialBackOff/BackOff.swift; sourceTree = ""; }; + C18A855347F95BB321590C30EEC7A9D0 /* AsyncSwift */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = AsyncSwift; path = Async.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + C1C65F7F071609436F20F99ACB14339C /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + C52F9769595DC6FDE183C6755F2C4298 /* AsyncSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "AsyncSwift-Info.plist"; sourceTree = ""; }; + C7729D96F2F30F7DD8297C8636297753 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + CC96BEE14D6CF676073E7E1DF8054909 /* ExponentialBackOff.podspec */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; path = ExponentialBackOff.podspec; sourceTree = ""; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + CDD0A6DA5ACDFC3896BBAF20817925D6 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; + CEC0BC47C01C1F857FE22AC67A753253 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; + CF2B0C7A87F44D9B7CA7435B546FA859 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + CFD12A4DEA59F991E0F87EBD52A13BE7 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; + D0EECB6D3FB222B55272457240342A01 /* ExponentialBackOff.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExponentialBackOff.swift; path = ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.swift; sourceTree = ""; }; + D25AD7528B8E654E647354C63D04E8F7 /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; + D32632E3B045D7CFC75E1CFE0D81688A /* ExponentialBackOff-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "ExponentialBackOff-dummy.m"; sourceTree = ""; }; + D44836B16096A74E6E6C136B90B00EC1 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; + D53C6690E10FAB032AE89C9B79406D4B /* BeWithin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeWithin.swift; path = Sources/Nimble/Matchers/BeWithin.swift; sourceTree = ""; }; + D5F30DF2DF739CA089A63AD3F98484D7 /* Pods-ExponentialBackOff_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff_Tests-frameworks.sh"; sourceTree = ""; }; + D6BFE7635858534FEC382535A4152084 /* Equal+Tuple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Equal+Tuple.swift"; path = "Sources/Nimble/Matchers/Equal+Tuple.swift"; sourceTree = ""; }; + D7331B94D8FEF3000BDF5F60F89A0BB6 /* Quick-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Quick-Info.plist"; sourceTree = ""; }; + DB87C163E704B44912AF2C31E047E3AD /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + DB8B73A98509062D44D070C1858BDA48 /* Pods-ExponentialBackOff_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff_Tests-acknowledgements.plist"; sourceTree = ""; }; + DD79C5447AC5EF21FDDD9EAA28313DCF /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + DFE633FA4513A12DFCFD38A73C5799A1 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + E03F4CB3E2BED5903EBCC2EDBDABB5CB /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + E0E452D832665063FC2DE9E89EF36900 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + E2B444BFC047468593923E89D723F085 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + E2FAA544C4F21DA3E89BECC4F4761B70 /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; + E3419F257A3972FCFCF607AB726B27E5 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + E481CEA55D9237E4E48DE2F89F0A49EF /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + E50AB9C4A6EFA477F7B52677AEF5EA1B /* LICENSE */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = LICENSE; sourceTree = ""; }; + E5507E12F862CCF261F8E747944099A7 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; + E5FE134E07F4A407A35E2A9FA4F52C89 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + E68378B56CADA12EAB9EE92D340A0B24 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + E6F8E0EB38E497172E882785E6CB75AD /* Pods-ExponentialBackOff_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff_Tests-dummy.m"; sourceTree = ""; }; + E8AF972B1E51DAD2673BF5DD5B79ACBE /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; + EAF46085470AD62EF683C3400D7E840C /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickObjCRuntime/QuickSpecBase.m; sourceTree = ""; }; + EDD11053BD6C533DE3C55B989BF32FA0 /* Quick.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.debug.xcconfig; sourceTree = ""; }; + EED44A84E37FA72BC3378770C0F0F5E9 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; + F0A7F0796771506771E6A1BF24AD77CB /* Pods-ExponentialBackOff_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff_Example-umbrella.h"; sourceTree = ""; }; + F1D24F460178E59A48A66C1327CE4C3A /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; + F2836ABFFDF647C7F93DC1643135DA42 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + F2D35A1513203DD646431793E0519020 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; + F4969FF4F89197AB248F1FE5CA609AFD /* ExponentialBackOff-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "ExponentialBackOff-prefix.pch"; sourceTree = ""; }; + F6F7F4526ECC0CAA0F0B31BFEE3769EB /* Nimble.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.release.xcconfig; sourceTree = ""; }; + F7B58019046AA6CA4F5120E3DEC5B780 /* BackOffState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BackOffState.swift; path = ExponentialBackOff/ExponentialBackOff/BackOffState.swift; sourceTree = ""; }; + FA2BC3192CEB8E2C4F5EBEA20476FCE9 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + FBF15B5599E430FA1630161D66259FFD /* Pods-ExponentialBackOff_Example */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-ExponentialBackOff_Example"; path = Pods_ExponentialBackOff_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 0EA958193782FF2B0521D4F0C9B4C8CE /* Frameworks */ = { + 7C4B734280BC57544E39167A1708CD7D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - B9F6252176B0A89B111B917078E2C214 /* Foundation.framework in Frameworks */, + 82B9D1C1103E0663E9B97412CE47E4F9 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 49C4C1924F5C795C6BABF9FC958DA2C1 /* Frameworks */ = { + 7D8125D2B43EE7C8B52C25514FA3C010 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - F6F2103F1815820EF3039ABC742A5035 /* Async.framework in Frameworks */, - 27133DDA9676D7602C0D63308CDA29C3 /* Foundation.framework in Frameworks */, + 983DFB51B0C7F5F45101B582CFA753FE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - 525A3064902A1043F18D1C3733AD45BB /* Frameworks */ = { + AAC325BB3A871B192B7BDEBDFB60E9CE /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - FB2F5A8B175D3CF019388DA33CAE108F /* Foundation.framework in Frameworks */, + 309DFDD7DFF5A110397616277B8317E9 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - DBE2CE2F5ED086FC1DD44D4B176AEA5B /* Frameworks */ = { + CFA4920AC23B736F4A43132D8B2A7BD7 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 24EF979DB6A2B88464E07F5C5937EE14 /* Foundation.framework in Frameworks */, + 2539752F01773A27A85D444242FE528B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E24661E328CBA6B9CC6D5127E19825E9 /* Frameworks */ = { + DA8489B6D5E9C56DC3D6471AE4A67F6D /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1B44F3CDBC3B9C4D5337FB6E1BA4CD37 /* Foundation.framework in Frameworks */, + 604A73AD1D0E82356F2A073C53BC6517 /* Foundation.framework in Frameworks */, + EB892573E1CA332ED26DCC659406E79B /* XCTest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - F047627022ABDEE7B10F302C058F0A75 /* Frameworks */ = { + DD6C5AE0FCB56EC173421774C5CA73D3 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - A914F9B344A1154B64AE1826AE108DEE /* Foundation.framework in Frameworks */, - 3FC6F09CCC4A6CA2E735155F9132FDF6 /* XCTest.framework in Frameworks */, + 79A9ADCAE72B5F30CE882F79CDDDD47F /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 01F674DA07C2DFC9DC663927125F5CDF /* iOS */ = { + 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { isa = PBXGroup; children = ( - DBFC056B5BA76F6B4B621CF447A2B8E8 /* Foundation.framework */, - 500810ECD2FF5439186276CB41EEA2D9 /* XCTest.framework */, + 974814B39C0012DECD183BBB91B32103 /* iOS */, ); - name = iOS; + name = Frameworks; sourceTree = ""; }; - 05E7481C6B85A8427E3919C54C6F6BB2 /* Products */ = { + 1783639A3B5076A3981ADDBA4417FCF4 /* Pods */ = { isa = PBXGroup; children = ( - 806CD9FA33E4FBEEEBBFA7CDF6266683 /* Async.framework */, - C3699A2C10206799D9B9A7727C39F141 /* ExponentialBackOff.framework */, - C6340E4C2CA4701382E3E87F2192F6D6 /* Nimble.framework */, - 6A3B123D9A376943528902537BA2E77C /* Pods_ExponentialBackOff_Example.framework */, - A46D226A458723AEA5C3857349357289 /* Pods_ExponentialBackOff_Tests.framework */, - 48ABB6ABA2FC1005D5247E64A3B4AC9F /* Quick.framework */, + 8980010C9B4A2A986A7F8236E60EDD3D /* AsyncSwift */, + 292548A39253156339A23C3D6FDCD43E /* Nimble */, + 52CB2E6D0EEE45BEE990CD044039DC11 /* Quick */, ); - name = Products; + name = Pods; sourceTree = ""; }; - 3A9D3E0000317F942CD8CCD75D6CB65C /* Support Files */ = { + 292548A39253156339A23C3D6FDCD43E /* Nimble */ = { isa = PBXGroup; children = ( - C949ED43A2F56C48780CA0DC4BFCFF01 /* Info.plist */, - 8DFB3AEA028A22F0756061ED19B9995B /* Quick.modulemap */, - A94C2926954AD7B619BFB1E7AC2A38CE /* Quick.xcconfig */, - 15B3DA24790C3E69B14BA6F34E8CE5F6 /* Quick-dummy.m */, - FD0A30492255DBB6AEF0215A83A61958 /* Quick-prefix.pch */, - B347D1556F7CEAEFAADC0B86350F59F7 /* Quick-umbrella.h */, + B7D7B55755447C9C94F9B062258F7EC6 /* AdapterProtocols.swift */, + 01DC30DDD1BD005761311BE45C0D8C32 /* AllPass.swift */, + 1EB1BD192C82C3B632DB0BC422E3CCE2 /* AssertionDispatcher.swift */, + 4A8160F94E644F2FCB8681C816D8B852 /* AssertionRecorder.swift */, + 57F35562339CC8B7158B8E5D847148AE /* Async.swift */, + 74423F41B41DE26EFF94C6E4EAB09A7B /* Await.swift */, + F2836ABFFDF647C7F93DC1643135DA42 /* BeAKindOf.swift */, + FA2BC3192CEB8E2C4F5EBEA20476FCE9 /* BeAnInstanceOf.swift */, + 2FE35428005CDEF2E405C90983185109 /* BeCloseTo.swift */, + E68378B56CADA12EAB9EE92D340A0B24 /* BeEmpty.swift */, + 4396C714C732AED9821F7AE1ED0CF0C4 /* BeginWith.swift */, + 57D16B235FE409ADE89051032606559D /* BeginWithPrefix.swift */, + 77346E8B008D76D296331976F1E57315 /* BeGreaterThan.swift */, + 06F7D5BCA8016A65FC1F991A7CD34189 /* BeGreaterThanOrEqualTo.swift */, + E03F4CB3E2BED5903EBCC2EDBDABB5CB /* BeIdenticalTo.swift */, + 4C19A85FB26D7FA6C08DEF69C4B1DFF2 /* BeLessThan.swift */, + 8554D6BAA8EF320C8F3ED18EF51815C3 /* BeLessThanOrEqual.swift */, + 5E28A69636C8AA8A70A82AADD994B0EA /* BeLogical.swift */, + E0E452D832665063FC2DE9E89EF36900 /* BeNil.swift */, + 4E7FC2D2AF821C6B469305D238E20B32 /* BeResult.swift */, + 26F10DDF82C6A18515676F39E155BD43 /* BeVoid.swift */, + D53C6690E10FAB032AE89C9B79406D4B /* BeWithin.swift */, + 2975A2517C328EC996A1D9672979DA3C /* Contain.swift */, + 227A9D7D1AF726C18BD8BE6849F21F71 /* ContainElementSatisfying.swift */, + 42CBB8AA6FA00EDB41FE5EC1A430CE51 /* CwlBadInstructionException.swift */, + 474DA3851475E3ED41BD74029BA9D3EB /* CwlCatchBadInstruction.swift */, + F1D24F460178E59A48A66C1327CE4C3A /* CwlCatchException.h */, + 5CCCE11086CD762346C90BF3743D7D54 /* CwlCatchException.m */, + 59FE4E051D77B911DC33BB8F282478D8 /* CwlCatchException.swift */, + 0DE393F0579522C1316B1772C54F797A /* CwlDarwinDefinitions.swift */, + 77E154677392AE639B0C7095BC48F324 /* CwlMachBadInstructionHandler.h */, + 4B54E6B59F87BC799FA418ACBA46FC37 /* CwlMachBadInstructionHandler.m */, + 8CF0DF47FDE1D0E1921C9489A7B84265 /* DispatchTimeInterval.swift */, + EED44A84E37FA72BC3378770C0F0F5E9 /* DSL.h */, + 68B8EDC590A6A7696E19F9B8C3FD7DCC /* DSL.m */, + 4DA0ECBEA5C2AD07C2AEB6C132CB22B6 /* DSL.swift */, + 7005DF22D61B82C142ABAC5FAA751F36 /* DSL+Wait.swift */, + 4A214194E4FF334262EEC5187BF5F845 /* ElementsEqual.swift */, + 8AD7B560A03C405E894384AFC354BE3F /* EndWith.swift */, + BBC0A5DA2D70B920E25234D39AB1E439 /* Equal.swift */, + D6BFE7635858534FEC382535A4152084 /* Equal+Tuple.swift */, + 98DD750B670465773F63E9DCDA471C1A /* Errors.swift */, + 6739558328600573C53F1FB9D8989C1E /* Expectation.swift */, + 65BA089199DE46A764CD31ADEDB79417 /* ExpectationMessage.swift */, + 601E1A99A706F386660E55599BB2DE76 /* Expression.swift */, + A286A0B96DC9CCBEFA1B8E8AF8E8AAA0 /* FailureMessage.swift */, + A66A31B067A8ACEBFB5D45F6689DB32D /* HaveCount.swift */, + 26ED8C59933FBC7EB7328379B133A2D7 /* mach_excServer.c */, + E2FAA544C4F21DA3E89BECC4F4761B70 /* mach_excServer.h */, + 40B457CDB23F6403F2B87806DFE3BE5B /* Match.swift */, + E5507E12F862CCF261F8E747944099A7 /* MatcherProtocols.swift */, + E5FE134E07F4A407A35E2A9FA4F52C89 /* MatchError.swift */, + E3419F257A3972FCFCF607AB726B27E5 /* Nimble.h */, + 689DEC51C73942D5EE13F00CBF2BA6D9 /* NimbleEnvironment.swift */, + 8569A5D2776E99A4F479C7253723D97B /* NimbleXCTestHandler.swift */, + 3EBD3D9E7E953062C304ED4F12AFE999 /* NMBExceptionCapture.h */, + E2B444BFC047468593923E89D723F085 /* NMBExceptionCapture.m */, + DB87C163E704B44912AF2C31E047E3AD /* NMBExpectation.swift */, + F2D35A1513203DD646431793E0519020 /* NMBStringify.h */, + 77CA72F0968D7BF97629B6D3F952C632 /* NMBStringify.m */, + 4D7AA82B13C87A0EA1CF223FA31D1035 /* PostNotification.swift */, + D25AD7528B8E654E647354C63D04E8F7 /* Predicate.swift */, + CF2B0C7A87F44D9B7CA7435B546FA859 /* RaisesException.swift */, + 3618198BC2CF4690EFC181BA2182E7B6 /* SatisfyAllOf.swift */, + DFE633FA4513A12DFCFD38A73C5799A1 /* SatisfyAnyOf.swift */, + B190F12D86D2E28593BB342BE3FA1C08 /* SourceLocation.swift */, + 1A93D0FF5E51023B0E24F7744F3FB4A5 /* Stringers.swift */, + 9DE8D59400003DAE36ADE6FAC16B9D44 /* ThrowAssertion.swift */, + 313F99400FFC3AB47723221BE1D2832A /* ThrowError.swift */, + 82C8A071061F8B5D75F25FC43A829EF9 /* ToSucceed.swift */, + CFD12A4DEA59F991E0F87EBD52A13BE7 /* XCTestObservationCenter+Register.m */, + E9141189C688C929238ADE7AF6E14728 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Quick"; + path = Nimble; sourceTree = ""; }; - 3FF07D00BB9A978CDBB91FC0F8DF477A /* Development Pods */ = { + 2A2698DDD644C8481F52E75D60C79A99 /* Pods-ExponentialBackOff_Tests */ = { isa = PBXGroup; children = ( - 634F4477539F59D1FF3843B213747F3C /* ExponentialBackOff */, + BBFBDED018AFFA26066C022E8F0CB5AF /* Pods-ExponentialBackOff_Tests.modulemap */, + 76295451591B1AD4B6AB4DCB60AC49E9 /* Pods-ExponentialBackOff_Tests-acknowledgements.markdown */, + DB8B73A98509062D44D070C1858BDA48 /* Pods-ExponentialBackOff_Tests-acknowledgements.plist */, + E6F8E0EB38E497172E882785E6CB75AD /* Pods-ExponentialBackOff_Tests-dummy.m */, + D5F30DF2DF739CA089A63AD3F98484D7 /* Pods-ExponentialBackOff_Tests-frameworks.sh */, + 826A6C2D418C00C1F74194B8C8FB73CE /* Pods-ExponentialBackOff_Tests-Info.plist */, + A3A595A8C086FE4328745E66FA092F32 /* Pods-ExponentialBackOff_Tests-umbrella.h */, + 36DBD97254D37CC59C88DA207F789FFB /* Pods-ExponentialBackOff_Tests.debug.xcconfig */, + AB4F394FF3208C4708C9F6C072B0C4A6 /* Pods-ExponentialBackOff_Tests.release.xcconfig */, ); - name = "Development Pods"; + name = "Pods-ExponentialBackOff_Tests"; + path = "Target Support Files/Pods-ExponentialBackOff_Tests"; sourceTree = ""; }; - 623349CE4F33478BE414837E42005B06 /* Targets Support Files */ = { + 4D4638778022ACF0043AAB580D85AEFA /* ExponentialBackOff */ = { isa = PBXGroup; children = ( - CC154DAF1839F5F67DFB68396267B7ED /* Pods-ExponentialBackOff_Example */, - 64E4FC55C32048B1CE50A16DB81B7A71 /* Pods-ExponentialBackOff_Tests */, + C11BD0F396A245E3DACCE07673113BBD /* BackOff.swift */, + 34084C93EBCE9575AE15837CDE4520BD /* BackOffAlgorithm.swift */, + F7B58019046AA6CA4F5120E3DEC5B780 /* BackOffState.swift */, + 7625BA37F61C82FA9DFC787E06AD352F /* ExponentialBackOff.h */, + D0EECB6D3FB222B55272457240342A01 /* ExponentialBackOff.swift */, + 6127C4CADBBA0A767780CBD542A87E8E /* ExponentialBackOffInstance.swift */, + 1BD72E096DFBA44F3B31DC6540A02E83 /* Info.plist */, + 6946379166CBCD04F52D4678B48EC922 /* Random.swift */, + B57A7A203963D7730F7C00E4E88ABDAA /* Tools.swift */, + 61758FEEBE65EA75E183EB6E9C9F69F7 /* Pod */, + C0144861EC56E41FC5F2A2210CEA3C3F /* Support Files */, ); - name = "Targets Support Files"; + name = ExponentialBackOff; + path = ../..; sourceTree = ""; }; - 62C08758CB7651907A00DEEA099DF662 /* Quick */ = { + 52CB2E6D0EEE45BEE990CD044039DC11 /* Quick */ = { isa = PBXGroup; children = ( - 2875DAE37ED7057A9119AB9CD61E7CB5 /* Callsite.swift */, - DE7C5269B6605E09A777D3DA830627D8 /* Closures.swift */, - 352E2D34D466F5C3A40553CD52690170 /* Configuration.swift */, - 41F7F1880ED50D0CA763787A9D413CE0 /* DSL.swift */, - 29E76CD31803C31EBD0518FDF27742A6 /* ErrorUtility.swift */, - 3A5570F041A1E00822E40577D7F05F07 /* Example.swift */, - 0B7B289D9FF96D59B9835C95B1704EE0 /* ExampleGroup.swift */, - A36441EBFCB279BC2D51BA40D55C10B9 /* ExampleHooks.swift */, - 1A257A0418A6F96D0EED88FBDCE73180 /* ExampleMetadata.swift */, - A12824F6F5FFB0849B79E7E7D1AC8498 /* Filter.swift */, - 212F5143D0E6A10B812E27113340C67E /* HooksPhase.swift */, - 921B3E3E396F7AF6DDC0CD6A5A51FD43 /* NSBundle+CurrentTestBundle.swift */, - BBF4188A1E4D012B0B42AE6ADFA7AD7E /* NSString+QCKSelectorName.h */, - EB76FF77DE88002EF4FBD99E2A040D6C /* NSString+QCKSelectorName.m */, - 6ECAFD6A68B04C5B6F535DAE4741AFB2 /* QCKDSL.h */, - 7A93044B62340566A28FB2770409CEBC /* QCKDSL.m */, - 1A982A81CDA132A3AC6F11C02527448C /* Quick.h */, - 639D0817925DB830C39E87BAF62735E9 /* QuickConfiguration.h */, - 67EDD5E108165933655C52E7CBC9A96D /* QuickConfiguration.m */, - AF8A3B3863B3573539419C70D5646B9F /* QuickSelectedTestSuiteBuilder.swift */, - 24A2410F9B727E2DEE01C36FC78861D7 /* QuickSpec.h */, - 1D58F1A041323DD70FB9446FA069D5B5 /* QuickSpec.m */, - 405D68A14F65B32CFC4E78E61BE052B7 /* QuickTestSuite.swift */, - E4EFA20DCD550C4845752763701BFA86 /* SuiteHooks.swift */, - C8B006B9F6FC803E7655461B425A49F7 /* URL+FileName.swift */, - 6B8E5D65FA727A4D30DA2985D47DAA62 /* World.h */, - 7B271FBAD072277E3FF9C511A7BDD33C /* World.swift */, - 8BC1C9B6C351AAB3C6EFBA156DBC18CB /* World+DSL.h */, - BECF2E6B7124FD5FA972EC798996873F /* World+DSL.swift */, - D4BCB3B03CE0A05B8EED110EEFC100A1 /* XCTestSuite+QuickTestSuiteBuilder.m */, - 3A9D3E0000317F942CD8CCD75D6CB65C /* Support Files */, + CDD0A6DA5ACDFC3896BBAF20817925D6 /* Behavior.swift */, + 70B2EF71C696CB60EB09B380CC072BA4 /* Callsite.swift */, + 2A94452D00839E9F50E37C97B56E6425 /* Closures.swift */, + 9B4ED2A44E78B3B3C7156E94C24CA1BD /* DSL.swift */, + AA90684431882E032604E591B40A8AA8 /* ErrorUtility.swift */, + 4CCC5B7D0521FF9B56CB783C4BF6A6BE /* Example.swift */, + 30447D41F9474F948164CC6255AF60AE /* ExampleGroup.swift */, + 177B6EC7273A8EC49BC0A1573671E31A /* ExampleHooks.swift */, + E8AF972B1E51DAD2673BF5DD5B79ACBE /* ExampleMetadata.swift */, + 7B886EC0A76CAC77C778F54C5218F230 /* Filter.swift */, + D44836B16096A74E6E6C136B90B00EC1 /* HooksPhase.swift */, + AEC5DDB919E5D5645283534CC279D31F /* NSBundle+CurrentTestBundle.swift */, + 56B16417997A4E9112135537DDC20D27 /* QCKConfiguration.swift */, + 544CF918709539DE5DB60459DD45DC5F /* QCKDSL.h */, + 62584C3B198D28D5F1A07B1CE621C34F /* QCKDSL.m */, + 1DFD77986001BB2D516CF302D5CA249B /* Quick.h */, + 78C730D5E20BF1B2DD306BD557D0CB18 /* QuickConfiguration.h */, + C1C65F7F071609436F20F99ACB14339C /* QuickConfiguration.m */, + AB9C9494576D5E03DB6141BA83B92AB6 /* QuickConfiguration.swift */, + 29995EB3CFDF343EA7DC28324B8C6FCF /* QuickObjCRuntime.h */, + 773D5728C06E15CEE4317DAB54FC160C /* QuickSelectedTestSuiteBuilder.swift */, + 85D1DF3755A30D24A77FA0495C478D3E /* QuickSpec.h */, + DD79C5447AC5EF21FDDD9EAA28313DCF /* QuickSpec.m */, + 2CAD87AE48B10E491D1ABE7728CF539C /* QuickSpecBase.h */, + EAF46085470AD62EF683C3400D7E840C /* QuickSpecBase.m */, + A8199286098D1AD09F8C9E16F5855DB4 /* QuickTestObservation.swift */, + 7845FC8A1A031B346E2D06360FF506DC /* QuickTestSuite.swift */, + 47ED34C935751BB78ED6CA1C726A3A44 /* String+C99ExtendedIdentifier.swift */, + CEC0BC47C01C1F857FE22AC67A753253 /* SuiteHooks.swift */, + 70007C93BE379F504C38C86F5466E339 /* URL+FileName.swift */, + 3E7055B8E76B44F836ACE25D199E677D /* World.swift */, + C7729D96F2F30F7DD8297C8636297753 /* World+DSL.swift */, + 0C4ECD9991C7577FD497EFDB50749D8E /* XCTestSuite+QuickTestSuiteBuilder.m */, + 67987827388E492981B096A12B419138 /* Support Files */, ); - name = Quick; path = Quick; sourceTree = ""; }; - 634F4477539F59D1FF3843B213747F3C /* ExponentialBackOff */ = { + 61758FEEBE65EA75E183EB6E9C9F69F7 /* Pod */ = { isa = PBXGroup; children = ( - B3A56F8CD687BEADBE478E457E44F30A /* ExponentialBackOff */, - 82BB87B657A1E25F23AE327647F8F7B6 /* Support Files */, + CC96BEE14D6CF676073E7E1DF8054909 /* ExponentialBackOff.podspec */, + E50AB9C4A6EFA477F7B52677AEF5EA1B /* LICENSE */, + 8839C8794D89FCDAE68C4E11429C2621 /* README.md */, ); - name = ExponentialBackOff; - path = ../..; + name = Pod; sourceTree = ""; }; - 64E4FC55C32048B1CE50A16DB81B7A71 /* Pods-ExponentialBackOff_Tests */ = { + 67987827388E492981B096A12B419138 /* Support Files */ = { isa = PBXGroup; children = ( - 291EC7073EF3F9972D4EB1D0FE36EB2B /* Info.plist */, - 4AE968FB13E6C59B1C2C718359842209 /* Pods-ExponentialBackOff_Tests.modulemap */, - 7F8501CD8E27D522F5CD37C2CD66AB9F /* Pods-ExponentialBackOff_Tests-acknowledgements.markdown */, - E120D4A41CEC28906782A11FEDB67F9C /* Pods-ExponentialBackOff_Tests-acknowledgements.plist */, - 8D61FB50109F40EC3EA425F9A23B51E7 /* Pods-ExponentialBackOff_Tests-dummy.m */, - 88D80B674BDD09937CFE122610E03DEC /* Pods-ExponentialBackOff_Tests-frameworks.sh */, - D6890E19DD7C4B9762B18E1203D0827A /* Pods-ExponentialBackOff_Tests-resources.sh */, - 1011EE9D897CCC2E3862C120FEEAACDD /* Pods-ExponentialBackOff_Tests-umbrella.h */, - 9AF74F8E9D7900D6219586E1945D907A /* Pods-ExponentialBackOff_Tests.debug.xcconfig */, - 45AC2D444024C04ED790F805DD17030E /* Pods-ExponentialBackOff_Tests.release.xcconfig */, - ); - name = "Pods-ExponentialBackOff_Tests"; - path = "Target Support Files/Pods-ExponentialBackOff_Tests"; - sourceTree = ""; - }; - 653BB9304B9969F9E20EEDF212E35D85 /* Support Files */ = { - isa = PBXGroup; - children = ( - 98F391BD3C7E825E4F910BDF5728A548 /* AsyncSwift.modulemap */, - D851BC3E6FBA87CFD502094BA3DCAE55 /* AsyncSwift.xcconfig */, - DA5ED83225E3A768A164EB925543E678 /* AsyncSwift-dummy.m */, - 5E925B179588A020FF1D457256CDCD60 /* AsyncSwift-prefix.pch */, - 1B39E8E27CE79FFB28F5717EBA52474E /* AsyncSwift-umbrella.h */, - 37BD7CDB5B7C78308AA0914FE8E45128 /* Info.plist */, + 6FFAEDD8D800EF7F2AC0CC9D98E13619 /* Quick.modulemap */, + 6B2A35CDD613A8EF9A125979FA8BE66F /* Quick-dummy.m */, + D7331B94D8FEF3000BDF5F60F89A0BB6 /* Quick-Info.plist */, + 8CFCFB7A0ACAF483F1F6369F43A9030E /* Quick-prefix.pch */, + E481CEA55D9237E4E48DE2F89F0A49EF /* Quick-umbrella.h */, + EDD11053BD6C533DE3C55B989BF32FA0 /* Quick.debug.xcconfig */, + 8EC8A3B0FA3BBBB534E54A5F4E07604C /* Quick.release.xcconfig */, ); name = "Support Files"; - path = "../Target Support Files/AsyncSwift"; + path = "../Target Support Files/Quick"; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 7367E79F2BDDEA10275777D8CD92BC4A /* Development Pods */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - 3FF07D00BB9A978CDBB91FC0F8DF477A /* Development Pods */, - BF258FCF6F0CAE5BD17BC84EA89435EF /* Frameworks */, - 9B73F4983478D78AF2F9194B4F95D666 /* Pods */, - 05E7481C6B85A8427E3919C54C6F6BB2 /* Products */, - 623349CE4F33478BE414837E42005B06 /* Targets Support Files */, + 4D4638778022ACF0043AAB580D85AEFA /* ExponentialBackOff */, ); + name = "Development Pods"; sourceTree = ""; }; - 82BB87B657A1E25F23AE327647F8F7B6 /* Support Files */ = { + 8980010C9B4A2A986A7F8236E60EDD3D /* AsyncSwift */ = { isa = PBXGroup; children = ( - 41F7AAA9E1BCA9CCB1BE367C8224F5F7 /* ExponentialBackOff.modulemap */, - 0152C55CABE3E5E7E1BE282DAE681FCD /* ExponentialBackOff.xcconfig */, - 8E0BACD2C4F31AB219B29ECD302ADAD0 /* ExponentialBackOff-dummy.m */, - A0542A07761B3EFA4BF09AB104C0B410 /* ExponentialBackOff-prefix.pch */, - 80383DB0E40570907BC336FD81260524 /* ExponentialBackOff-umbrella.h */, - D44754517F2C07670B3226A8ABB8CF5B /* Info.plist */, + 19D90C641C50D1FF869F539A42B396D2 /* Async.swift */, + C0014FC3455735D5C97345B20294DD6A /* Support Files */, ); - name = "Support Files"; - path = "Example/Pods/Target Support Files/ExponentialBackOff"; + path = AsyncSwift; sourceTree = ""; }; - 983A452E9C2069BC41D52BB6B2DCFC98 /* AsyncSwift */ = { + 974814B39C0012DECD183BBB91B32103 /* iOS */ = { isa = PBXGroup; children = ( - AD1F81DF61A4F317C96BD896B53DE300 /* Async.swift */, - 653BB9304B9969F9E20EEDF212E35D85 /* Support Files */, + CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */, + 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */, ); - name = AsyncSwift; - path = AsyncSwift; + name = iOS; sourceTree = ""; }; - 9B73F4983478D78AF2F9194B4F95D666 /* Pods */ = { + BA19DC6CC4F4E3A644A873C8CF2185B1 /* Pods-ExponentialBackOff_Example */ = { isa = PBXGroup; children = ( - 983A452E9C2069BC41D52BB6B2DCFC98 /* AsyncSwift */, - E0E5D3D561D5E2DA7BFCB1579120B21B /* Nimble */, - 62C08758CB7651907A00DEEA099DF662 /* Quick */, + 93441EDD58A03C6DB8320D7D611C13CD /* Pods-ExponentialBackOff_Example.modulemap */, + 7A565AF7B860B11C8294680BF0F68D1D /* Pods-ExponentialBackOff_Example-acknowledgements.markdown */, + 7ED92B3439BB7972C5D1EC9DC5AABC14 /* Pods-ExponentialBackOff_Example-acknowledgements.plist */, + 092B856DF8975269BCC9B956D638E7B4 /* Pods-ExponentialBackOff_Example-dummy.m */, + 7F1823307F241F9620C060EF01249F0D /* Pods-ExponentialBackOff_Example-frameworks.sh */, + 945A0969DE7C88B4874E02A990C96C0D /* Pods-ExponentialBackOff_Example-Info.plist */, + F0A7F0796771506771E6A1BF24AD77CB /* Pods-ExponentialBackOff_Example-umbrella.h */, + A64A63A208C713C70702F15EC5A4470D /* Pods-ExponentialBackOff_Example.debug.xcconfig */, + 6E492BED40AE5112C54DC9169ABB627D /* Pods-ExponentialBackOff_Example.release.xcconfig */, ); - name = Pods; + name = "Pods-ExponentialBackOff_Example"; + path = "Target Support Files/Pods-ExponentialBackOff_Example"; sourceTree = ""; }; - A4C845A1DC4F4187F5DA6CE7EBE46150 /* Support Files */ = { + C0014FC3455735D5C97345B20294DD6A /* Support Files */ = { isa = PBXGroup; children = ( - AFB705E85F21D5A587AAA18A441B3C32 /* Info.plist */, - 6B94BC48066AA0F9659FA7D5B63FF7F4 /* Nimble.modulemap */, - 97DEE3DF1D9A91A519079D853BED1838 /* Nimble.xcconfig */, - 6D80955241C1B213B750DF9F5C12347E /* Nimble-dummy.m */, - 0C8BD7C720FE734B565407B11C0DA322 /* Nimble-prefix.pch */, - 3017275085004FD285AEF82EAB576F80 /* Nimble-umbrella.h */, + 663EB3CFF3FC9E355840A6BA1EDF17D4 /* AsyncSwift.modulemap */, + 1DCD424C57D6BA27578675858D247887 /* AsyncSwift-dummy.m */, + C52F9769595DC6FDE183C6755F2C4298 /* AsyncSwift-Info.plist */, + 77B826D6B842A58E4454CA87364D9DE4 /* AsyncSwift-prefix.pch */, + 737BEDB2257CDE930098154515FAC34A /* AsyncSwift-umbrella.h */, + 89082BE060905F0193D10CFCB87A806E /* AsyncSwift.debug.xcconfig */, + A5D3BB4EE20C231FEFDFC21175861A37 /* AsyncSwift.release.xcconfig */, ); name = "Support Files"; - path = "../Target Support Files/Nimble"; + path = "../Target Support Files/AsyncSwift"; sourceTree = ""; }; - B3A56F8CD687BEADBE478E457E44F30A /* ExponentialBackOff */ = { + C0144861EC56E41FC5F2A2210CEA3C3F /* Support Files */ = { isa = PBXGroup; children = ( - F8FEDDC1530451C6A0F55A91D2C5F727 /* ExponentialBackOff */, + 4E66DC1AF9696D8464554181190A96B4 /* ExponentialBackOff.modulemap */, + D32632E3B045D7CFC75E1CFE0D81688A /* ExponentialBackOff-dummy.m */, + 2DD602D9E3A0E02F765376D7B329B49D /* ExponentialBackOff-Info.plist */, + F4969FF4F89197AB248F1FE5CA609AFD /* ExponentialBackOff-prefix.pch */, + 928CE3619C3C2D9DA50DF5B20638156B /* ExponentialBackOff-umbrella.h */, + 3C5596D07CAE5080650815D47B038B09 /* ExponentialBackOff.debug.xcconfig */, + 1AE5638A2635571D31B99B2759A49F0E /* ExponentialBackOff.release.xcconfig */, ); - name = ExponentialBackOff; - path = ExponentialBackOff; + name = "Support Files"; + path = "Example/Pods/Target Support Files/ExponentialBackOff"; sourceTree = ""; }; - BF258FCF6F0CAE5BD17BC84EA89435EF /* Frameworks */ = { + CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( - D40362A749DED46073575ECAF13EFCD6 /* Async.framework */, - 01F674DA07C2DFC9DC663927125F5CDF /* iOS */, + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + 7367E79F2BDDEA10275777D8CD92BC4A /* Development Pods */, + 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, + 1783639A3B5076A3981ADDBA4417FCF4 /* Pods */, + F26111192B65859DB33251C7E9C88077 /* Products */, + D579301F9D295593D2DF41AE8F349D71 /* Targets Support Files */, ); - name = Frameworks; sourceTree = ""; }; - CC154DAF1839F5F67DFB68396267B7ED /* Pods-ExponentialBackOff_Example */ = { + D579301F9D295593D2DF41AE8F349D71 /* Targets Support Files */ = { isa = PBXGroup; children = ( - D2604883595DD69177D51E2AF3C7D7B8 /* Info.plist */, - A2D1472D63C845AA6E321955CC577A6A /* Pods-ExponentialBackOff_Example.modulemap */, - D4F9B6D9D88533B8EE63133BA2EACC11 /* Pods-ExponentialBackOff_Example-acknowledgements.markdown */, - 10305A18C26C06F8AEA89673F37A4CA5 /* Pods-ExponentialBackOff_Example-acknowledgements.plist */, - 9A754FC47F1DD58D01A8746812A29852 /* Pods-ExponentialBackOff_Example-dummy.m */, - 4842F7D477BCEA93C793E543FC807122 /* Pods-ExponentialBackOff_Example-frameworks.sh */, - 10CC1C1A3A754FE67B545151479D0499 /* Pods-ExponentialBackOff_Example-resources.sh */, - 91D7E6D7CCD128CC1FE5A7B89C197D05 /* Pods-ExponentialBackOff_Example-umbrella.h */, - E8FCAEACB9A1629345ACDE2F07A1C699 /* Pods-ExponentialBackOff_Example.debug.xcconfig */, - 46D10DD13AF720C66CAB98DA1EB0BB9C /* Pods-ExponentialBackOff_Example.release.xcconfig */, + BA19DC6CC4F4E3A644A873C8CF2185B1 /* Pods-ExponentialBackOff_Example */, + 2A2698DDD644C8481F52E75D60C79A99 /* Pods-ExponentialBackOff_Tests */, ); - name = "Pods-ExponentialBackOff_Example"; - path = "Target Support Files/Pods-ExponentialBackOff_Example"; + name = "Targets Support Files"; sourceTree = ""; }; - E0E5D3D561D5E2DA7BFCB1579120B21B /* Nimble */ = { + E9141189C688C929238ADE7AF6E14728 /* Support Files */ = { isa = PBXGroup; children = ( - 59FB88AED4F4CEF998FCC87DF7244972 /* AdapterProtocols.swift */, - 4B235D16BAF3A68866D48817094229C1 /* AllPass.swift */, - 2693462023BF12BE8C426BE8642D3125 /* AssertionDispatcher.swift */, - 1A49F48528C25349FD50DEB57BFB24FD /* AssertionRecorder.swift */, - AAE3388BB1AE4602E5F446FFEC2F24C0 /* Async.swift */, - 6D6FF3E68264B0C36D21F8FC7B3A941C /* AsyncMatcherWrapper.swift */, - 3798D7199BC48EC873B49D59D3837B64 /* BeAKindOf.swift */, - 42A029A8A516B85056E454C8BE27FF88 /* BeAnInstanceOf.swift */, - 95D640CD8B3E763485B3C2DCD8AEE59D /* BeCloseTo.swift */, - AAEAD4D6B3058847A8DA10B76E16FBA4 /* BeEmpty.swift */, - 1855C2E271A2D13CE36C4B5B106E6A83 /* BeginWith.swift */, - 926AFF053CA8F9A5C8BCFAC7BFA85654 /* BeGreaterThan.swift */, - 141464B8426B43C0AFD120F196CB5954 /* BeGreaterThanOrEqualTo.swift */, - 7AC5E9CD25D9C1D9D7566DDEBFACF924 /* BeIdenticalTo.swift */, - 9B2C77B779BD9CFED9F7F731D2F7C7A3 /* BeLessThan.swift */, - 4629E1720380B433A8BBEEA00C5CFBB5 /* BeLessThanOrEqual.swift */, - 6AC2B6C737D92677583A7A03587786F6 /* BeLogical.swift */, - 23C19FB43F3E14845BADB41B70FC00CE /* BeNil.swift */, - B1692309414CCA978A359633B0D58D70 /* BeVoid.swift */, - 64EDDEFE354E05E90F87A54AA1512DFA /* Contain.swift */, - 869706583CC2281388CFF7AA634F6CA4 /* CurrentTestCaseTracker.h */, - 2DA94359074A7C904B5D17685AF24603 /* CwlBadInstructionException.swift */, - 352EC3C68019412C78305360325040B0 /* CwlCatchBadInstruction.h */, - CB85F4EA53AA76AB9CA96FDC2FBDA244 /* CwlCatchBadInstruction.m */, - 468094E5FFC081FBDDC82BCAAE7E6670 /* CwlCatchBadInstruction.swift */, - F6C823FAE7A78C4FA4D787419EFA1C93 /* CwlCatchException.h */, - 1CC3EF09AF3A988539F7940B3C812AFE /* CwlCatchException.m */, - A8C8D527427CE7509CCE4FD027B5F04E /* CwlCatchException.swift */, - AB29A9B2C233F98C524C395FCB744598 /* CwlDarwinDefinitions.swift */, - 781A6E60C7D466CDE85BBE952644B8D9 /* DSL.h */, - C0CB81F86EB2620E24DD3AA686E705FB /* DSL.m */, - 3670B51CFD1009630D1D87F6D9C1898C /* DSL.swift */, - AB9ED0D403D5D92C55EBFE07E45523CE /* DSL+Wait.swift */, - 184FC3CD22C62088613DE9012F80D124 /* EndWith.swift */, - B1DB165EFF7255E110383C24B63FD680 /* Equal.swift */, - ABF5D315A5B9E3FF24E4FE9411231ABD /* Errors.swift */, - 92E5C8610278D49E288169732958C4A9 /* Expectation.swift */, - 33C5F9B53D4651E8ABB7468246500016 /* Expression.swift */, - 8A6F9E84C63CBC66EF2ECDFE101E1E4C /* FailureMessage.swift */, - D5059744B8849B84AFA683ED5FFA30F7 /* Functional.swift */, - 742C383481521A79CF41D97AC9521226 /* HaveCount.swift */, - 9EF0C828D93701F36DA1040E684ACE0E /* mach_excServer.c */, - 8A5747516A0A1FE46806679A6EAA5E73 /* mach_excServer.h */, - 39493A7EB91FCA72336F05B13F13B705 /* Match.swift */, - BC292B3A595C376991C6A6FC37BD0F3A /* MatcherFunc.swift */, - EE42B380178497DC5E976313EC1AB328 /* MatcherProtocols.swift */, - 99CB5931D2B171AD49E7DCE7BE909B15 /* MatchError.swift */, - 9A9183A080EAF248FB6C91B58D295418 /* Nimble.h */, - 79A3B26A415D3611214D174FA1577768 /* NimbleEnvironment.swift */, - E2010CFF08E9071A11B5F8DB47124B6C /* NimbleXCTestHandler.swift */, - 321A05DBBCBDDAC59B20BD0312063DB5 /* NMBExceptionCapture.h */, - 206F1C8D2A415585D40A165617043EAE /* NMBExceptionCapture.m */, - DA45B4F1384FD5D39A772D3B97C68F71 /* NMBExpectation.swift */, - CB9F5B6A82F4D6787A121211FE7813EA /* NMBObjCMatcher.swift */, - 635BB7EC529CB5A8F5C337AF3D1AB06F /* NMBStringify.h */, - 355E4D2199675C75CFA200321595EB72 /* NMBStringify.m */, - 95CD1C5D6DCD7CDAC0142F8E9A8949E0 /* PostNotification.swift */, - B14D69C7104AA2B0203B0B13085C3592 /* RaisesException.swift */, - E68A32206A8493CADE643791E4ABE6DE /* SatisfyAnyOf.swift */, - F5EDEB3D8230B545E0362CAD2D6F73D9 /* SourceLocation.swift */, - A36ACB5379A58C42C24619B2ED1453AD /* Stringers.swift */, - AEBE779526CFF046DB844CC0B8C4396A /* ThrowAssertion.swift */, - B1AF2913BAB89914DE8641E7BFBB86DD /* ThrowError.swift */, - CCC25640612240E9356EE04909545B06 /* XCTestObservationCenter+Register.m */, - A4C845A1DC4F4187F5DA6CE7EBE46150 /* Support Files */, + 726DCB9C30890B7004651F59094B98DD /* Nimble.modulemap */, + 31475A88A962ACCB1B844BFA9E8FBA59 /* Nimble-dummy.m */, + 8C285D9DBDB723E8832D4503E6320456 /* Nimble-Info.plist */, + 46258A66F457543E39D7AE6018A66B3B /* Nimble-prefix.pch */, + 344FA1EA94F60C0E0BC7D15C351DD2BD /* Nimble-umbrella.h */, + 030FF7D78FF3D866002B0AD90462F43A /* Nimble.debug.xcconfig */, + F6F7F4526ECC0CAA0F0B31BFEE3769EB /* Nimble.release.xcconfig */, ); - name = Nimble; - path = Nimble; + name = "Support Files"; + path = "../Target Support Files/Nimble"; sourceTree = ""; }; - F8FEDDC1530451C6A0F55A91D2C5F727 /* ExponentialBackOff */ = { + F26111192B65859DB33251C7E9C88077 /* Products */ = { isa = PBXGroup; children = ( - 3959B075029ECBEED80A69D922B09FA2 /* BackOff.swift */, - 51E23571200FF56897459F28DB4E91F0 /* BackOffAlgorithm.swift */, - 81D946D71C525FC5BD16C4ABDCA6F6B9 /* BackOffState.swift */, - DB35989FACD2EA301C5644B61D785BA6 /* ExponentialBackOff.h */, - E5FB957F07321E541AD68AC6CA5A4EEF /* ExponentialBackOff.swift */, - 6A5926524A8F619959432E476E918384 /* ExponentialBackOffInstance.swift */, - A89425684E63258E873B7EFA062C25AC /* Random.swift */, - 26C1416A60EC50D63B8D18DBAE59A1A1 /* Tools.swift */, + C18A855347F95BB321590C30EEC7A9D0 /* AsyncSwift */, + 5B33B595D9818EE94454BE4477549FEF /* ExponentialBackOff */, + BAE263041362D074978BB3B577DF0A05 /* Nimble */, + FBF15B5599E430FA1630161D66259FFD /* Pods-ExponentialBackOff_Example */, + 052343D5C64AD820F947B94011A75DF1 /* Pods-ExponentialBackOff_Tests */, + 0D631E9908483F9525A6B3F36F16CC61 /* Quick */, ); - name = ExponentialBackOff; - path = ExponentialBackOff; + name = Products; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 100EEEEB3AE48579EDB8F04F8644777A /* Headers */ = { + 09F10B534A424ACB5984329C29063D2C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 2ACC34FFA86F7C686D8B23C729CCE6E1 /* Pods-ExponentialBackOff_Example-umbrella.h in Headers */, + A5A97FBDC50F2EF8F0CE8C6B6BDD2A44 /* Pods-ExponentialBackOff_Tests-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2ACF6192E10A038A21EFA2156C9F7EA3 /* Headers */ = { + 2ECA8588289B7FD3CD8D5FC71DC87C4E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F693D0A9E0D05F815A85DC258E75AF8D /* CurrentTestCaseTracker.h in Headers */, - 65F5217D44A557FC16218DE5DE348C35 /* CwlCatchBadInstruction.h in Headers */, - 87DD62F200DAB5E1D701AB9F94D1D422 /* CwlCatchException.h in Headers */, - 0ECEEBC712D404AA6CF1E76A9284BFF9 /* DSL.h in Headers */, - B093484B1637B3D3AF65DF2232FDBADC /* mach_excServer.h in Headers */, - 76036D32625A56D480D84AA46961EF91 /* Nimble-umbrella.h in Headers */, - 469E9C3ED9FD6009F7C9AAF9E537E212 /* Nimble.h in Headers */, - 917949F596E1188261FC59214782C3D9 /* NMBExceptionCapture.h in Headers */, - 27B262F95D3CF9E3C74541A41929691C /* NMBStringify.h in Headers */, + EA4EC4B3853541FDC946239C036D12C9 /* CwlCatchException.h in Headers */, + E2EE2E7797C383576ACBFE4986179459 /* CwlMachBadInstructionHandler.h in Headers */, + FC4F734925BC0EDDCD7C10AFBF93C576 /* DSL.h in Headers */, + 19A8009537BCAD56435B2DDC620B29AA /* mach_excServer.h in Headers */, + 21F3408E9BD0BE7C7A9FFBF43B4F28A0 /* Nimble.h in Headers */, + C03116C765F1A8893559730965ECBAD8 /* Nimble-umbrella.h in Headers */, + 60A059AA3734D5D3F2F73D07C427F4C1 /* NMBExceptionCapture.h in Headers */, + 7190961540266108624E854866842A81 /* NMBStringify.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6580A2370D99B35CB4A45882238D2A94 /* Headers */ = { + 423BFE18F693A2BCE97C950273436960 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 574705A0CCFE1EEF17C0A9B35C1E7E9B /* Pods-ExponentialBackOff_Tests-umbrella.h in Headers */, + AEC066EC3752C35F72B7BCF9693F1DE1 /* Pods-ExponentialBackOff_Example-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 74D0EA0F0E4362FCED5D5A61EA7B1F8B /* Headers */ = { + 719A4977866C3F8B3B6944686025A1C0 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 878A7EB83560F9B2703D36D186F6EC32 /* AsyncSwift-umbrella.h in Headers */, + A51C1467A9FF4131B57163C326F08E59 /* ExponentialBackOff.h in Headers */, + 8275BDF98C2D72134C12F6337A368E69 /* ExponentialBackOff-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - A21CCAE80B95A75F4A5352DF64A7655D /* Headers */ = { + B3143F399B353337CC2E4B3A4EA6B5D5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 870EC62EEF4C28367539D803C0663C7D /* NSString+QCKSelectorName.h in Headers */, - 0FB0D2EE8B53C04B1529DC6F59BBE908 /* QCKDSL.h in Headers */, - 95230742FE57D3B368280516A9CED7D6 /* Quick-umbrella.h in Headers */, - E223EA6BA4D38FDABFF1F2C429C760CE /* Quick.h in Headers */, - C272D1A1F8DA8D556CB2EC5D5C5F8428 /* QuickConfiguration.h in Headers */, - C221D6CE5229B6348A11B19914777FE4 /* QuickSpec.h in Headers */, - 5BA758E97639BABA7951E8B4787BF587 /* World+DSL.h in Headers */, - 23E26265D83D18DF9A1586C509062020 /* World.h in Headers */, + 38D43865105801806AB59B26F42602E7 /* AsyncSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - D58E0F81CB0D2DEE35F7F4CB27BA49A3 /* Headers */ = { + EF56162795BEE38037C39740F2E15F4B /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 6011CE3488C6310EB4C661E26CC59860 /* ExponentialBackOff-umbrella.h in Headers */, - 5E042396F1CB7F0187FDD519EB8F89B4 /* ExponentialBackOff.h in Headers */, + 612581CCD8346C696A80E6BC09D24C1F /* QCKDSL.h in Headers */, + E1CD0FEF6BA86FA9C28038C818E2514A /* Quick.h in Headers */, + C96B370E9B3442878448F8FFFDC98C7A /* Quick-umbrella.h in Headers */, + 6A47C53473FBCF2FF5C85069FBD4CA8D /* QuickConfiguration.h in Headers */, + FE67CE5AE4DFFE6B850FA43334EEBDC0 /* QuickObjCRuntime.h in Headers */, + D8B8FCEC597824B40986C8F4F7B50899 /* QuickSpec.h in Headers */, + 32995147DC30DF5022DD66C0470BFDE9 /* QuickSpecBase.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */ = { + 21B46E77392C199BE357EAC3C8B3CAB4 /* Pods-ExponentialBackOff_Example */ = { isa = PBXNativeTarget; - buildConfigurationList = B1DBAFB75A3AF98C8C6B0863BDC7A2E3 /* Build configuration list for PBXNativeTarget "Nimble" */; + buildConfigurationList = 5C451021F92E7B23E365F7938333B6E7 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Example" */; buildPhases = ( - 3C4AABA28564F6F29FE8E3F38226690A /* Sources */, - DBE2CE2F5ED086FC1DD44D4B176AEA5B /* Frameworks */, - 2ACF6192E10A038A21EFA2156C9F7EA3 /* Headers */, + 423BFE18F693A2BCE97C950273436960 /* Headers */, + B9D592D33A79363485B85CA0118D2743 /* Sources */, + 7C4B734280BC57544E39167A1708CD7D /* Frameworks */, + 67127AD7CC29453C982EB6112D769F8D /* Resources */, ); buildRules = ( ); dependencies = ( + AA27CBCBD3BC74997AD5171ED650A21A /* PBXTargetDependency */, + 7A305F4C56222A744968CFB742FB8633 /* PBXTargetDependency */, ); - name = Nimble; - productName = Nimble; - productReference = C6340E4C2CA4701382E3E87F2192F6D6 /* Nimble.framework */; + name = "Pods-ExponentialBackOff_Example"; + productName = Pods_ExponentialBackOff_Example; + productReference = FBF15B5599E430FA1630161D66259FFD /* Pods-ExponentialBackOff_Example */; productType = "com.apple.product-type.framework"; }; - 382469EFC01381D44F40DC2E4A75FED0 /* Pods-ExponentialBackOff_Example */ = { + 494EFE7C30D8964792430D2FE69037B4 /* Pods-ExponentialBackOff_Tests */ = { isa = PBXNativeTarget; - buildConfigurationList = E1A09911F357AF7DB98B489A51AAFA4A /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Example" */; + buildConfigurationList = B7C30B8258E377118E42AC56055DB302 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Tests" */; buildPhases = ( - 6784561F67F3233A539A60E4D392B0E6 /* Sources */, - 0EA958193782FF2B0521D4F0C9B4C8CE /* Frameworks */, - 100EEEEB3AE48579EDB8F04F8644777A /* Headers */, + 09F10B534A424ACB5984329C29063D2C /* Headers */, + D057D0F63AEE9971E2E3B400B487EB06 /* Sources */, + AAC325BB3A871B192B7BDEBDFB60E9CE /* Frameworks */, + B80AB85B9E8A659D48267BB01641C0F9 /* Resources */, ); buildRules = ( ); dependencies = ( - 69EB9DC9DFCC6D2494AE37AD2D24FEA6 /* PBXTargetDependency */, - D186F9512DEEFDFD126F092A87387C3C /* PBXTargetDependency */, + 1C0D2D6DB0871AD71C6F307E1A30DD6A /* PBXTargetDependency */, + 87CB607C26AD7C6D6556694E327E2349 /* PBXTargetDependency */, + 027778E3C87725601B9E1775DD0DA757 /* PBXTargetDependency */, + 117CBFCD68C08817CE73A088E4BDFC47 /* PBXTargetDependency */, ); - name = "Pods-ExponentialBackOff_Example"; - productName = "Pods-ExponentialBackOff_Example"; - productReference = 6A3B123D9A376943528902537BA2E77C /* Pods_ExponentialBackOff_Example.framework */; + name = "Pods-ExponentialBackOff_Tests"; + productName = Pods_ExponentialBackOff_Tests; + productReference = 052343D5C64AD820F947B94011A75DF1 /* Pods-ExponentialBackOff_Tests */; productType = "com.apple.product-type.framework"; }; - 75F38338F0F0E74EB34B01481C528E1B /* ExponentialBackOff */ = { + 5855AF2F67E5FD5CFCE31548B29131A9 /* ExponentialBackOff */ = { isa = PBXNativeTarget; - buildConfigurationList = 6B5E0AC577956783248ED3F6BB95746A /* Build configuration list for PBXNativeTarget "ExponentialBackOff" */; + buildConfigurationList = 61677ABE397F5B9B345E036437EF9DF2 /* Build configuration list for PBXNativeTarget "ExponentialBackOff" */; buildPhases = ( - 8310AB79C64475FF4E770D937248E0DD /* Sources */, - 49C4C1924F5C795C6BABF9FC958DA2C1 /* Frameworks */, - D58E0F81CB0D2DEE35F7F4CB27BA49A3 /* Headers */, + 719A4977866C3F8B3B6944686025A1C0 /* Headers */, + DB2A7F67434A9D6EB2B5EF31A7C43159 /* Sources */, + CFA4920AC23B736F4A43132D8B2A7BD7 /* Frameworks */, + 5A586123058DC609182B7229D7F34D19 /* Resources */, ); buildRules = ( ); dependencies = ( - ADC604CF2F817AB234D71596E15E718D /* PBXTargetDependency */, + 5D6FD3AEAC8767F4629C60D8DCF9807D /* PBXTargetDependency */, ); name = ExponentialBackOff; productName = ExponentialBackOff; - productReference = C3699A2C10206799D9B9A7727C39F141 /* ExponentialBackOff.framework */; + productReference = 5B33B595D9818EE94454BE4477549FEF /* ExponentialBackOff */; productType = "com.apple.product-type.framework"; }; - 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */ = { + 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */ = { isa = PBXNativeTarget; - buildConfigurationList = CDB54977543F768C7A6C9DB874B679CC /* Build configuration list for PBXNativeTarget "AsyncSwift" */; + buildConfigurationList = 84E3C08133057626870418A290649C7E /* Build configuration list for PBXNativeTarget "Nimble" */; buildPhases = ( - F600B02DB5C78F3567ED539B846A8E1D /* Sources */, - E24661E328CBA6B9CC6D5127E19825E9 /* Frameworks */, - 74D0EA0F0E4362FCED5D5A61EA7B1F8B /* Headers */, + 2ECA8588289B7FD3CD8D5FC71DC87C4E /* Headers */, + 7EB80E67F560CFEE04CAB2D2B4502824 /* Sources */, + DD6C5AE0FCB56EC173421774C5CA73D3 /* Frameworks */, + C8C24821D185E1A194A59A3A3BCB60CA /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = AsyncSwift; - productName = AsyncSwift; - productReference = 806CD9FA33E4FBEEEBBFA7CDF6266683 /* Async.framework */; + name = Nimble; + productName = Nimble; + productReference = BAE263041362D074978BB3B577DF0A05 /* Nimble */; productType = "com.apple.product-type.framework"; }; - C89988484E3646B16ADC6498B8C03D48 /* Quick */ = { + 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 4BE27F479F4C811639B43875146D90CE /* Build configuration list for PBXNativeTarget "Quick" */; + buildConfigurationList = D14B9DD13F1B7CBE0AF51EC1CC4206FE /* Build configuration list for PBXNativeTarget "AsyncSwift" */; buildPhases = ( - 06AA342D8D21FDEC0F900A41DE91E094 /* Sources */, - F047627022ABDEE7B10F302C058F0A75 /* Frameworks */, - A21CCAE80B95A75F4A5352DF64A7655D /* Headers */, + B3143F399B353337CC2E4B3A4EA6B5D5 /* Headers */, + 854C351F7D1505255357469A77000B99 /* Sources */, + 7D8125D2B43EE7C8B52C25514FA3C010 /* Frameworks */, + 1423867A601FF7CCBE775ADD006416A0 /* Resources */, ); buildRules = ( ); dependencies = ( ); - name = Quick; - productName = Quick; - productReference = 48ABB6ABA2FC1005D5247E64A3B4AC9F /* Quick.framework */; + name = AsyncSwift; + productName = Async; + productReference = C18A855347F95BB321590C30EEC7A9D0 /* AsyncSwift */; productType = "com.apple.product-type.framework"; }; - D195D8C2544C8D7981C9BFC6FE83A61F /* Pods-ExponentialBackOff_Tests */ = { + C82891EAB7293DBEE916B21F57E8474D /* Quick */ = { isa = PBXNativeTarget; - buildConfigurationList = 3CF3732E1F12D60CEC624D516F0D1F64 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Tests" */; + buildConfigurationList = 1D467AF12BCFD8263C61085D135659C3 /* Build configuration list for PBXNativeTarget "Quick" */; buildPhases = ( - 6592DFA7B56C640B3C0053D4CD7C23CC /* Sources */, - 525A3064902A1043F18D1C3733AD45BB /* Frameworks */, - 6580A2370D99B35CB4A45882238D2A94 /* Headers */, + EF56162795BEE38037C39740F2E15F4B /* Headers */, + C802F10129A4770EE61F067F767E7A8B /* Sources */, + DA8489B6D5E9C56DC3D6471AE4A67F6D /* Frameworks */, + 78B22DE6F38E020E338DC52F9D195A52 /* Resources */, ); buildRules = ( ); dependencies = ( - 8F727C88697267A253016A9AA8221D8F /* PBXTargetDependency */, - 71D8A2634F7AD25DEC41D2802BB0B30D /* PBXTargetDependency */, ); - name = "Pods-ExponentialBackOff_Tests"; - productName = "Pods-ExponentialBackOff_Tests"; - productReference = A46D226A458723AEA5C3857349357289 /* Pods_ExponentialBackOff_Tests.framework */; + name = Quick; + productName = Quick; + productReference = 0D631E9908483F9525A6B3F36F16CC61 /* Quick */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1240; }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 05E7481C6B85A8427E3919C54C6F6BB2 /* Products */; + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = F26111192B65859DB33251C7E9C88077 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */, - 75F38338F0F0E74EB34B01481C528E1B /* ExponentialBackOff */, - 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */, - 382469EFC01381D44F40DC2E4A75FED0 /* Pods-ExponentialBackOff_Example */, - D195D8C2544C8D7981C9BFC6FE83A61F /* Pods-ExponentialBackOff_Tests */, - C89988484E3646B16ADC6498B8C03D48 /* Quick */, + 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */, + 5855AF2F67E5FD5CFCE31548B29131A9 /* ExponentialBackOff */, + 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */, + 21B46E77392C199BE357EAC3C8B3CAB4 /* Pods-ExponentialBackOff_Example */, + 494EFE7C30D8964792430D2FE69037B4 /* Pods-ExponentialBackOff_Tests */, + C82891EAB7293DBEE916B21F57E8474D /* Quick */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 1423867A601FF7CCBE775ADD006416A0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5A586123058DC609182B7229D7F34D19 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 67127AD7CC29453C982EB6112D769F8D /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 78B22DE6F38E020E338DC52F9D195A52 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B80AB85B9E8A659D48267BB01641C0F9 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C8C24821D185E1A194A59A3A3BCB60CA /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ - 06AA342D8D21FDEC0F900A41DE91E094 /* Sources */ = { + 7EB80E67F560CFEE04CAB2D2B4502824 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 9137587BDE48B101A5A29B4106454BBD /* Callsite.swift in Sources */, - C00F6B1E17B983FE6541D06A742A049E /* Closures.swift in Sources */, - 953083A0E80C4FBDB46980C1906051C8 /* Configuration.swift in Sources */, - 8E07E4F1AD04B3F0290A58EAEB0D4F23 /* DSL.swift in Sources */, - BDB10E62B0A604DE4F145F25477912FA /* ErrorUtility.swift in Sources */, - 3AED1D58A76E3C2296D15E0797DA54B7 /* Example.swift in Sources */, - 373E70BFC35DD641FE30A48EF3FD45E5 /* ExampleGroup.swift in Sources */, - C5C6B79CCF87168CB73561C11EECDAF9 /* ExampleHooks.swift in Sources */, - BC813029EE97962144603C6DDE8647C0 /* ExampleMetadata.swift in Sources */, - FC409927BF977D84485B211DFC648E26 /* Filter.swift in Sources */, - 1DAA15460589958F4633E73E56F682A8 /* HooksPhase.swift in Sources */, - 83AEAE21B1146E541C0899B5B9A07D82 /* NSBundle+CurrentTestBundle.swift in Sources */, - D5C184C9D0B401C7FB2693BAAB89E857 /* NSString+QCKSelectorName.m in Sources */, - 39F04E7462B4D56D3B1BF233B05130C7 /* QCKDSL.m in Sources */, - 807F78D9BB76966418364A108660B7A1 /* Quick-dummy.m in Sources */, - F6813F25F43A35035BAEDD857CF4290D /* QuickConfiguration.m in Sources */, - 4B9FA79D99AAB9582FA3183232551A12 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 0D5BC39A2A178E473FF8AA3B9DC776C5 /* QuickSpec.m in Sources */, - F606C6DD77B6B85FED2A8F7F59686682 /* QuickTestSuite.swift in Sources */, - A360B3E8F34200519B16292F2F2EDC07 /* SuiteHooks.swift in Sources */, - 501916B3B4F333CFDB4CEA49C86E66DA /* URL+FileName.swift in Sources */, - BC56374E1B6568CDD3F4AAEDEC7295A2 /* World+DSL.swift in Sources */, - 4272D41819B8C6F9980A5DE9AA34B2A8 /* World.swift in Sources */, - CCE59792905DF457AD40DF4E19525708 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + 088A5A88342D60B6FCFAEADBF0749220 /* AdapterProtocols.swift in Sources */, + 0650AF0DB8DE333CE5D99D704E29AC02 /* AllPass.swift in Sources */, + AC0278DBE6921D2AA8CA82CBE8805202 /* AssertionDispatcher.swift in Sources */, + 8F5593DFFFCAC3D618365EC2590A3E31 /* AssertionRecorder.swift in Sources */, + A0F1DDBCD61B35967DED6A8F6A69B9A5 /* Async.swift in Sources */, + 58CAB839E63D7D4575D3DEDF8C98EDD9 /* Await.swift in Sources */, + AC1B0A94D98FF6A485E56165BDAAFB8F /* BeAKindOf.swift in Sources */, + 981F6B1579CE5D0BDB6E936DFC0B24F1 /* BeAnInstanceOf.swift in Sources */, + 7DF5C2582E1C9DE5BC6BF84C0AF1337B /* BeCloseTo.swift in Sources */, + D6F1A9AFE522D73CB8BDF851FF6F7ACC /* BeEmpty.swift in Sources */, + 6F4F5989C108EB29AB735E9CAF4B6E0A /* BeginWith.swift in Sources */, + 9AB3D03BC12D48113C0AFB7E687A274D /* BeginWithPrefix.swift in Sources */, + F94ED0C040D8EFE1B1227A464F81E92E /* BeGreaterThan.swift in Sources */, + 40D9B846E5A8AF781C0A0C41FED0E0F8 /* BeGreaterThanOrEqualTo.swift in Sources */, + C7DB9FB7C8378ADC0DBC744F9359C0C9 /* BeIdenticalTo.swift in Sources */, + B93F3526A95D7F43EEBFEE5E453E4795 /* BeLessThan.swift in Sources */, + 01236C984BBB2918575C35713E2E08B4 /* BeLessThanOrEqual.swift in Sources */, + BF62525E5628A9F7604BA8479691318C /* BeLogical.swift in Sources */, + 3ABDA920FDD838A534E55347FF35ACCC /* BeNil.swift in Sources */, + 4DFD4AE1B1C12F59014A9C1FE8F7AE47 /* BeResult.swift in Sources */, + 2223D9864ED3F01713DA2180EF7190B9 /* BeVoid.swift in Sources */, + F9A961CFA0E2BD3C6A94E282069AD80E /* BeWithin.swift in Sources */, + ACAA345A1CCAFA1F4EE69B3C25D62558 /* Contain.swift in Sources */, + 0E398EF6297FFF6CC9BC74421BF1712D /* ContainElementSatisfying.swift in Sources */, + 4EC19A4F9EE9863B3CF7BDB7607FE96B /* CwlBadInstructionException.swift in Sources */, + DD130331C3820B0A4A655D6422167410 /* CwlCatchBadInstruction.swift in Sources */, + 994DAB83E925F5BF28B00DFD0F9795CB /* CwlCatchException.m in Sources */, + 3FA8E6AEBD8687BF75B467C33ADF0045 /* CwlCatchException.swift in Sources */, + CA32F74C00C2448397720AB161360835 /* CwlDarwinDefinitions.swift in Sources */, + BD3ABAC28025564DCF2E6C12009435DF /* CwlMachBadInstructionHandler.m in Sources */, + F8211C89835CD4106BCC584D260CF7C8 /* DispatchTimeInterval.swift in Sources */, + 1C469C17A0E35E4508F74FEB1EDA586C /* DSL.m in Sources */, + F1D91144B0B756BA7723E0AE68ED6605 /* DSL.swift in Sources */, + 6D2F9F1DC6C1DE1C73F4382904B9C97C /* DSL+Wait.swift in Sources */, + 289B613DD13E58EA28C0DFAF4358BA68 /* ElementsEqual.swift in Sources */, + 8A9FE00A3D26CFEDEF3503C93FEFC954 /* EndWith.swift in Sources */, + 2357EB01C617A8A015615080DBB012D6 /* Equal.swift in Sources */, + 92DE6AC67462F0A507D3187892D4FA8A /* Equal+Tuple.swift in Sources */, + 86037D5CAD49EC09A2B944ADBF561059 /* Errors.swift in Sources */, + AFB4F603FD0F5C407CB8920F6A5BA7A1 /* Expectation.swift in Sources */, + A017E1A4E1C0AA61CDB6F1E8382D3384 /* ExpectationMessage.swift in Sources */, + 61F1ADB6BE662783C1A01C2C1720A9BE /* Expression.swift in Sources */, + 993ED0D1D74DDFAF99D4108636EFFA64 /* FailureMessage.swift in Sources */, + 233AB756F67ABBD886C54BF9F12403DF /* HaveCount.swift in Sources */, + 86F84DE049A0E2CADAC8344E20D070BE /* mach_excServer.c in Sources */, + C5DF891232B50DB810099403734CFCEE /* Match.swift in Sources */, + 1B5648DECACC2C478440DD19516ADCC5 /* MatcherProtocols.swift in Sources */, + 4DB106EF5D81F121EA58D82401C5DD1C /* MatchError.swift in Sources */, + 3B5E796F1BFBB87AAB31305D6FCE160E /* Nimble-dummy.m in Sources */, + 80DB7C67B0D7A32BF885B5CD17C745A1 /* NimbleEnvironment.swift in Sources */, + 6F796B7E3AA428C9D8E88F0F2269664F /* NimbleXCTestHandler.swift in Sources */, + A487451E3CC40D7F9549FA292435273B /* NMBExceptionCapture.m in Sources */, + 707245706183C9814604FBE34CD83152 /* NMBExpectation.swift in Sources */, + 88380C6AB029E423E69827B204BFF18A /* NMBStringify.m in Sources */, + 654580360E6694D7F7CE85CE5390DA79 /* PostNotification.swift in Sources */, + 9C75931ADE8431B4C3C4AE2D59E70977 /* Predicate.swift in Sources */, + 51BAE003E7BD972B4F6EB54CFB7E1BF0 /* RaisesException.swift in Sources */, + 28D6E884D7AB6CF2B4BFF328D2537D22 /* SatisfyAllOf.swift in Sources */, + 057C1964EBAFCBC649F8012723CDADF5 /* SatisfyAnyOf.swift in Sources */, + 3E97A584E7FDD55A6AC072DB23043FCC /* SourceLocation.swift in Sources */, + 3CFE6D672FEFBE8A9D10D5723FB88BF2 /* Stringers.swift in Sources */, + E5ACC239A1C2E515D4939ACECD147445 /* ThrowAssertion.swift in Sources */, + 4A457767C9968D139BD8AAD877DFC117 /* ThrowError.swift in Sources */, + 5258586AADBC8482EFAFB4B591A17E03 /* ToSucceed.swift in Sources */, + 09D4B856CFEA59F4E16AB91D1F06D50C /* XCTestObservationCenter+Register.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 3C4AABA28564F6F29FE8E3F38226690A /* Sources */ = { + 854C351F7D1505255357469A77000B99 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 047A68C646E00EB6D7D4D7343B801D09 /* AdapterProtocols.swift in Sources */, - DCEE854E62441E78FED15CC994497F61 /* AllPass.swift in Sources */, - 74FD712F3B503891B6BD9E5CD287E481 /* AssertionDispatcher.swift in Sources */, - F9E05A63D447B51E008B89731192FE7F /* AssertionRecorder.swift in Sources */, - AC29CC89E22273BF0D0DC2C841B7524C /* Async.swift in Sources */, - 551440A0F92574039C1D2EB39227D6B8 /* AsyncMatcherWrapper.swift in Sources */, - F60D221B548716DF35193FC2CF244676 /* BeAKindOf.swift in Sources */, - A448F837592E21D9387322E8DA0DD93F /* BeAnInstanceOf.swift in Sources */, - 9544A4EEC2A8448743ECA9981F88B60F /* BeCloseTo.swift in Sources */, - 9AF235C16362BA00BFBF12147907E953 /* BeEmpty.swift in Sources */, - AB255C27EF10E742C6567775022F49D5 /* BeginWith.swift in Sources */, - 07722FBCF6B380961B9D2832D5883F45 /* BeGreaterThan.swift in Sources */, - 1C50F54510D5C2B2AD84D7B74A6EDEBB /* BeGreaterThanOrEqualTo.swift in Sources */, - A33F1754198E8E8CCC7087F6176FFDC8 /* BeIdenticalTo.swift in Sources */, - 6E397D9FB11A47E48D70287D734B12B2 /* BeLessThan.swift in Sources */, - FAB4ECE0C5039D99BB7173880670871D /* BeLessThanOrEqual.swift in Sources */, - 0AEC20AACF9B10846830274E3B2AA6FD /* BeLogical.swift in Sources */, - 599669823A2EED2928C77F301F6B0515 /* BeNil.swift in Sources */, - 78F3DE174B4F8D368EF8EEFD7EE62087 /* BeVoid.swift in Sources */, - 8507F4BF7437EB40A3626EDCC68BFF6D /* Contain.swift in Sources */, - 737E19F3254F5929263982C29237C0BA /* CwlBadInstructionException.swift in Sources */, - 3915DBB4731CB17B255A7FE86E240B6E /* CwlCatchBadInstruction.m in Sources */, - 6CDBA48C3A8621E4EE1DAFFE240F0D82 /* CwlCatchBadInstruction.swift in Sources */, - 947162383483B6391F8CDF38249BFBD2 /* CwlCatchException.m in Sources */, - F4A1B7A059AAA6727EB70E58E09332A4 /* CwlCatchException.swift in Sources */, - BB10A2D0B1EE5B1BA811354116F83E3F /* CwlDarwinDefinitions.swift in Sources */, - 86FFB76B2EDCF4AE79CC4C0BD8A0FE9A /* DSL+Wait.swift in Sources */, - 1C7CA1FAFBF8B865596C739FEA39CDEE /* DSL.m in Sources */, - 17261E344C2027602431A636759AC7F2 /* DSL.swift in Sources */, - 8654571F855691C23B7B8E61B2141944 /* EndWith.swift in Sources */, - BF3AF1D2B46E09E2B3DCC824E6C1F5AF /* Equal.swift in Sources */, - 7F6750C7B1847733370B18C4CBFE32DF /* Errors.swift in Sources */, - CB7558CCDD935C9E82BBF454022ED1D3 /* Expectation.swift in Sources */, - 8015239010C1D642F14C105F8FF8E035 /* Expression.swift in Sources */, - 7D6269A3CFE53C28DAA6B92E8FC017A7 /* FailureMessage.swift in Sources */, - FCFFEB587281358CFF05A65ED9E94C12 /* Functional.swift in Sources */, - CE3FA6AE0944D4AE737F0E57CFF4A615 /* HaveCount.swift in Sources */, - 50B80F12A9BAE302F07F6CF94752F462 /* mach_excServer.c in Sources */, - A91166D0A5E8F1D5D5377622C381C045 /* Match.swift in Sources */, - B9BD565DAB07F8E2288A960A1D3EFAC1 /* MatcherFunc.swift in Sources */, - 23E2E1E02FE79EE1E1688CBBAA777297 /* MatcherProtocols.swift in Sources */, - CE4CEF6328E255B380E2B2692B351CF8 /* MatchError.swift in Sources */, - 9E95D6E15DBE9B0FC92AAF60D42D1464 /* Nimble-dummy.m in Sources */, - F9D61EB5EEB799105913685722FF4C9C /* NimbleEnvironment.swift in Sources */, - E5CCEF0B83F8272D10671C01AAE4FFA0 /* NimbleXCTestHandler.swift in Sources */, - DC32331BE565888E694E1321BB1D80F5 /* NMBExceptionCapture.m in Sources */, - 8C30EAD5FFD28B387099B41C74657A67 /* NMBExpectation.swift in Sources */, - AC0B24EF198E3BEDFCC9F25D7B8EEDAB /* NMBObjCMatcher.swift in Sources */, - 127CD37052B8E0BC645D83D4664F59D4 /* NMBStringify.m in Sources */, - EBA52C16F42E42A1824D87C284F4A60C /* PostNotification.swift in Sources */, - 4F3F103945CC52D0A3B8A891BB0E21C4 /* RaisesException.swift in Sources */, - 62744EF299751FB49B5FCD81D8C8FFF7 /* SatisfyAnyOf.swift in Sources */, - 234BFC45ACAC4A8FB945EA17B6A74B0B /* SourceLocation.swift in Sources */, - 9BEBD1791C233763A8DC13080BFB99C9 /* Stringers.swift in Sources */, - 110A640A9BE45841BA938B4C29EF5446 /* ThrowAssertion.swift in Sources */, - 22C1DE74D494C10BBE727F239A68447D /* ThrowError.swift in Sources */, - D88575ED37BC462E8130CDBEFE9EA308 /* XCTestObservationCenter+Register.m in Sources */, + 723FE76A3C21BB17463C76C2E3C6CE0B /* Async.swift in Sources */, + 2FA2F8885BD01627142AC2DBA9D8E894 /* AsyncSwift-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6592DFA7B56C640B3C0053D4CD7C23CC /* Sources */ = { + B9D592D33A79363485B85CA0118D2743 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3C3FB4EC8347D1FFE551514E32A50218 /* Pods-ExponentialBackOff_Tests-dummy.m in Sources */, + 1E8F68F9665D4F98E5D1AE28F58DD03E /* Pods-ExponentialBackOff_Example-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6784561F67F3233A539A60E4D392B0E6 /* Sources */ = { + C802F10129A4770EE61F067F767E7A8B /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E15E6B5455484FB1CD2C8741FCD9C778 /* Pods-ExponentialBackOff_Example-dummy.m in Sources */, + 3E1105B44CCBDA9EC8C6C96EACCCC28F /* Behavior.swift in Sources */, + C8539F1BDF052B57BDB129D3D4B07364 /* Callsite.swift in Sources */, + 5448447D317610CE0DF66B87CF6F1094 /* Closures.swift in Sources */, + 154A42D3BBF847E3C2C7A6BB4EFAEE84 /* DSL.swift in Sources */, + 35C095305E5FB8CF40BB6C6A7F02E678 /* ErrorUtility.swift in Sources */, + 80428B0834B1272AB4E96E00D3FAA081 /* Example.swift in Sources */, + 2D6DB63EBCA201CFABA3012CD1C360BD /* ExampleGroup.swift in Sources */, + 0F776B26BC641CB895C2E7D961C71152 /* ExampleHooks.swift in Sources */, + C85E1092F4DAACDD63FB8E8B0E144095 /* ExampleMetadata.swift in Sources */, + 9B4B84C8A58733E87C1F30CDE34F3BEE /* Filter.swift in Sources */, + A327A211C8B71069F32FAE5F5B3807C4 /* HooksPhase.swift in Sources */, + 42BC3C3CBE7E5484F09BAD3204DE521D /* NSBundle+CurrentTestBundle.swift in Sources */, + 2C85A44748A3F58CE8C0AE291B9EDDFB /* QCKConfiguration.swift in Sources */, + DA9B61878019B5428B614BDDB5948F01 /* QCKDSL.m in Sources */, + FEA8C3E9543FB2A316D5A8F89B13D411 /* Quick-dummy.m in Sources */, + 207866DD86EDE603026D5AEDAF5ABE44 /* QuickConfiguration.m in Sources */, + 87535E5C51E9F6B7B1517FEA95033D1C /* QuickConfiguration.swift in Sources */, + 9B981E6DB0846F597838D6995E3F2EAC /* QuickSelectedTestSuiteBuilder.swift in Sources */, + 6C1386A39405BDA544D5BEE2C9155AB1 /* QuickSpec.m in Sources */, + 3B59EB43186F324A79D05C3201369283 /* QuickSpecBase.m in Sources */, + AD022386EA01CE480072E4C2E261BEC6 /* QuickTestObservation.swift in Sources */, + C20BFECB0A04FE439AE243D89E687B8A /* QuickTestSuite.swift in Sources */, + 498D0CEF04FDF36BE2B89A67015FF3A0 /* String+C99ExtendedIdentifier.swift in Sources */, + 8EFA132322053E7D8A1F9F380B5D8935 /* SuiteHooks.swift in Sources */, + 5DE534ADC468F5FFC43371CE7138923F /* URL+FileName.swift in Sources */, + F591765960EECDBB53CB4E5329290A4B /* World.swift in Sources */, + 0BAC760A19A0F7BAD74264AA4DDDD679 /* World+DSL.swift in Sources */, + A357C8E38B58FA37B8E1A6103D4E9A0A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 8310AB79C64475FF4E770D937248E0DD /* Sources */ = { + D057D0F63AEE9971E2E3B400B487EB06 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 5A3DA430E9193D2B2EA5B70C77EAF29E /* BackOff.swift in Sources */, - 1765D51C3C51DDB29680E5B4F5E3A7D3 /* BackOffAlgorithm.swift in Sources */, - DDD6090EA577DEEB6CFF7891089A19BF /* BackOffState.swift in Sources */, - 0A218456970EDD313C0515D863A1BA71 /* ExponentialBackOff-dummy.m in Sources */, - 6A7C4216E234750863A2117E3172EB1B /* ExponentialBackOff.swift in Sources */, - 01B42E78BE990DA78204A99D8A6AA23C /* ExponentialBackOffInstance.swift in Sources */, - 25126A944C2B70A9B5F669EA82984186 /* Random.swift in Sources */, - 48B84CE8E07E951FB20466EDB146601F /* Tools.swift in Sources */, + 16DB8678649F0D286B1785ABD6852F79 /* Pods-ExponentialBackOff_Tests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F600B02DB5C78F3567ED539B846A8E1D /* Sources */ = { + DB2A7F67434A9D6EB2B5EF31A7C43159 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - FD4742F9C1D1C5E526745B6E8A5D0ED2 /* Async.swift in Sources */, - 8F899DAC4387338E4ADE9423D869CA5C /* AsyncSwift-dummy.m in Sources */, + 5EB8F48CE35984BAA5B73CB513F53650 /* BackOff.swift in Sources */, + 8053ABE3D273A84BE66DFE35667E7534 /* BackOffAlgorithm.swift in Sources */, + 00B4ED147B8F26FAB5B300D958EA1B87 /* BackOffState.swift in Sources */, + DDBF65AA3D1EC44DFB9943393D9639D1 /* ExponentialBackOff.swift in Sources */, + 99E8D5AB6B9BC309C60A29C32269B398 /* ExponentialBackOff-dummy.m in Sources */, + CE1C9D9F020DA8AAEBE4A77C3E0B660E /* ExponentialBackOffInstance.swift in Sources */, + 35169D1FF4D58B58BA133F2C1644C8F4 /* Random.swift in Sources */, + 83E6E2EAD18016A08CF5F80E74BC1D95 /* Tools.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 69EB9DC9DFCC6D2494AE37AD2D24FEA6 /* PBXTargetDependency */ = { + 027778E3C87725601B9E1775DD0DA757 /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = AsyncSwift; - target = 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */; - targetProxy = CEC781DCA62FB0BD6F7D088D893EB74F /* PBXContainerItemProxy */; + name = "Pods-ExponentialBackOff_Example"; + target = 21B46E77392C199BE357EAC3C8B3CAB4 /* Pods-ExponentialBackOff_Example */; + targetProxy = 74CEB37540F7F5D2695805AA8E5923C6 /* PBXContainerItemProxy */; }; - 71D8A2634F7AD25DEC41D2802BB0B30D /* PBXTargetDependency */ = { + 117CBFCD68C08817CE73A088E4BDFC47 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Quick; - target = C89988484E3646B16ADC6498B8C03D48 /* Quick */; - targetProxy = 1F7255CD3EC7B45E06BEF72E241A8D61 /* PBXContainerItemProxy */; + target = C82891EAB7293DBEE916B21F57E8474D /* Quick */; + targetProxy = 1CEF6C436C395BAEC12DC7A29614E3DE /* PBXContainerItemProxy */; }; - 8F727C88697267A253016A9AA8221D8F /* PBXTargetDependency */ = { + 1C0D2D6DB0871AD71C6F307E1A30DD6A /* PBXTargetDependency */ = { isa = PBXTargetDependency; - name = Nimble; - target = 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */; - targetProxy = 10758D9D5BC6F10C5764BF1CD9EAA6AC /* PBXContainerItemProxy */; + name = AsyncSwift; + target = 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */; + targetProxy = 4DB487BCA7600D346A1BE932F3B6CF59 /* PBXContainerItemProxy */; }; - ADC604CF2F817AB234D71596E15E718D /* PBXTargetDependency */ = { + 5D6FD3AEAC8767F4629C60D8DCF9807D /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = AsyncSwift; - target = 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */; - targetProxy = 9343943145DCED17AA5C9CA9E457FA5D /* PBXContainerItemProxy */; + target = 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */; + targetProxy = 9364BE9EA8A051E54C1EEAE2999BB5C7 /* PBXContainerItemProxy */; }; - D186F9512DEEFDFD126F092A87387C3C /* PBXTargetDependency */ = { + 7A305F4C56222A744968CFB742FB8633 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = ExponentialBackOff; - target = 75F38338F0F0E74EB34B01481C528E1B /* ExponentialBackOff */; - targetProxy = 4B28CC6FC8D71B759594A3C2EFE8F3B0 /* PBXContainerItemProxy */; + target = 5855AF2F67E5FD5CFCE31548B29131A9 /* ExponentialBackOff */; + targetProxy = 1F8DF02151D1ABC04FB0131E7AB73430 /* PBXContainerItemProxy */; + }; + 87CB607C26AD7C6D6556694E327E2349 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Nimble; + target = 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */; + targetProxy = 5C90AF1B5A0F705968E23AD4943D5E0B /* PBXContainerItemProxy */; + }; + AA27CBCBD3BC74997AD5171ED650A21A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = AsyncSwift; + target = 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */; + targetProxy = 36CCDC18850F5E77C64AC2AC9D6012B5 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 04020B9E0797A7C9CA7A101EA9312572 /* Release */ = { + 07C46060F2C5A0004700C19FCCE2BDCB /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 97DEE3DF1D9A91A519079D853BED1838 /* Nimble.xcconfig */; + baseConfigurationReference = 36DBD97254D37CC59C88DA207F789FFB /* Pods-ExponentialBackOff_Tests.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nimble; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; + }; + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; }; - 10231BB4F56679C1F31862469FE16218 /* Release */ = { + 2F6D0EAAA7EE1A39F9857DFD1A310467 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D851BC3E6FBA87CFD502094BA3DCAE55 /* AsyncSwift.xcconfig */; + baseConfigurationReference = 89082BE060905F0193D10CFCB87A806E /* AsyncSwift.debug.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/AsyncSwift/Info.plist"; + INFOPLIST_FILE = "Target Support Files/AsyncSwift/AsyncSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_MODULE_NAME = Async; PRODUCT_NAME = Async; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 10BC7060A678E00DB94A8994515F2562 /* Debug */ = { + 5BD7DF7AE52C363EF4A7DF144DD5F931 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D851BC3E6FBA87CFD502094BA3DCAE55 /* AsyncSwift.xcconfig */; + baseConfigurationReference = 030FF7D78FF3D866002B0AD90462F43A /* Nimble.debug.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/AsyncSwift/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Async; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */ = { + 633E1A8BF2598701D9C9EC983D154937 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6E492BED40AE5112C54DC9169ABB627D /* Pods-ExponentialBackOff_Example.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + ENABLE_NS_ASSERTIONS = NO; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", + "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; - name = Debug; + name = Release; }; - 691BAF4B21960605474E8FC0C8600C84 /* Release */ = { + 6809FAEE5EE2D5BC5FC1E12AAF3285DE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 45AC2D444024C04ED790F805DD17030E /* Pods-ExponentialBackOff_Tests.release.xcconfig */; + baseConfigurationReference = 3C5596D07CAE5080650815D47B038B09 /* ExponentialBackOff.debug.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/ExponentialBackOff/ExponentialBackOff-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff_Tests; + MODULEMAP_FILE = "Target Support Files/ExponentialBackOff/ExponentialBackOff.modulemap"; + PRODUCT_MODULE_NAME = ExponentialBackOff; + PRODUCT_NAME = ExponentialBackOff; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 7305B8AD7D602B2CA853E78DB6FF54B4 /* Debug */ = { + 744CC593A4EA9C8033CEB0DC0AECAE21 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E8FCAEACB9A1629345ACDE2F07A1C699 /* Pods-ExponentialBackOff_Example.debug.xcconfig */; + baseConfigurationReference = A64A63A208C713C70702F15EC5A4470D /* Pods-ExponentialBackOff_Example.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff_Example; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 8F8949A6EB3413B8DA6E5BDB8B2AA2AF /* Release */ = { + 7E02862B36C4C3E2A4061EA864A1D82A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A94C2926954AD7B619BFB1E7AC2A38CE /* Quick.xcconfig */; + baseConfigurationReference = EDD11053BD6C533DE3C55B989BF32FA0 /* Quick.debug.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_MODULE_NAME = Quick; PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - B6DB4D41784964C26C7DD663AFA3E7DB /* Debug */ = { + 9B5C4399FACC4AE242221C8D19BA1C59 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0152C55CABE3E5E7E1BE282DAE681FCD /* ExponentialBackOff.xcconfig */; + baseConfigurationReference = 1AE5638A2635571D31B99B2759A49F0E /* ExponentialBackOff.release.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ExponentialBackOff/Info.plist"; + INFOPLIST_FILE = "Target Support Files/ExponentialBackOff/ExponentialBackOff-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/ExponentialBackOff/ExponentialBackOff.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = ExponentialBackOff; PRODUCT_NAME = ExponentialBackOff; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; - }; - B7324857C38B065FEB1EEE3105C2367A /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; - ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_RELEASE=1", - "$(inherited)", - ); - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; - }; name = Release; }; - B9C569BB69B21076FCD231287BB4BDD6 /* Release */ = { + 9DA3ACA00D9FA4D817CBEE88E4649ECC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 0152C55CABE3E5E7E1BE282DAE681FCD /* ExponentialBackOff.xcconfig */; + baseConfigurationReference = A5D3BB4EE20C231FEFDFC21175861A37 /* AsyncSwift.release.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/ExponentialBackOff/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/AsyncSwift/AsyncSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/ExponentialBackOff/ExponentialBackOff.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = ExponentialBackOff; + MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; + PRODUCT_MODULE_NAME = Async; + PRODUCT_NAME = Async; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - BA19CD39D522677EF1BEDB71E8EC76D5 /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 9AF74F8E9D7900D6219586E1945D907A /* Pods-ExponentialBackOff_Tests.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff_Tests; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - D7B9076A9C78E18A8605B3758EEE0B71 /* Debug */ = { + A5BA22D4099F2DB7899F68DF2A6484DC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 97DEE3DF1D9A91A519079D853BED1838 /* Nimble.xcconfig */; + baseConfigurationReference = F6F7F4526ECC0CAA0F0B31BFEE3769EB /* Nimble.release.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = Nimble; PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - FA2B509A26BEE69F2F75CE83406E2ED2 /* Release */ = { + C467A4596552FEFFAFE12DCD72DB9DFE /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 46D10DD13AF720C66CAB98DA1EB0BB9C /* Pods-ExponentialBackOff_Example.release.xcconfig */; + baseConfigurationReference = AB4F394FF3208C4708C9F6C072B0C4A6 /* Pods-ExponentialBackOff_Tests.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; + MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff_Example; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - FFEB21DFFAA761E51CC7FB6A40DE8670 /* Debug */ = { + C7F58B5218183E8949843CF69C1CE9A5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = A94C2926954AD7B619BFB1E7AC2A38CE /* Quick.xcconfig */; + baseConfigurationReference = 8EC8A3B0FA3BBBB534E54A5F4E07604C /* Quick.release.xcconfig */; buildSettings = { + ARCHS = "$(ARCHS_STANDARD_64_BIT)"; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 9.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = Quick; PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 1D467AF12BCFD8263C61085D135659C3 /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - 59B042A655B7C20CBAB90E385BF4E4C7 /* Debug */, - B7324857C38B065FEB1EEE3105C2367A /* Release */, + 7E02862B36C4C3E2A4061EA864A1D82A /* Debug */, + C7F58B5218183E8949843CF69C1CE9A5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 3CF3732E1F12D60CEC624D516F0D1F64 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Tests" */ = { + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - BA19CD39D522677EF1BEDB71E8EC76D5 /* Debug */, - 691BAF4B21960605474E8FC0C8600C84 /* Release */, + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */, + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4BE27F479F4C811639B43875146D90CE /* Build configuration list for PBXNativeTarget "Quick" */ = { + 5C451021F92E7B23E365F7938333B6E7 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - FFEB21DFFAA761E51CC7FB6A40DE8670 /* Debug */, - 8F8949A6EB3413B8DA6E5BDB8B2AA2AF /* Release */, + 744CC593A4EA9C8033CEB0DC0AECAE21 /* Debug */, + 633E1A8BF2598701D9C9EC983D154937 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6B5E0AC577956783248ED3F6BB95746A /* Build configuration list for PBXNativeTarget "ExponentialBackOff" */ = { + 61677ABE397F5B9B345E036437EF9DF2 /* Build configuration list for PBXNativeTarget "ExponentialBackOff" */ = { isa = XCConfigurationList; buildConfigurations = ( - B6DB4D41784964C26C7DD663AFA3E7DB /* Debug */, - B9C569BB69B21076FCD231287BB4BDD6 /* Release */, + 6809FAEE5EE2D5BC5FC1E12AAF3285DE /* Debug */, + 9B5C4399FACC4AE242221C8D19BA1C59 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B1DBAFB75A3AF98C8C6B0863BDC7A2E3 /* Build configuration list for PBXNativeTarget "Nimble" */ = { + 84E3C08133057626870418A290649C7E /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - D7B9076A9C78E18A8605B3758EEE0B71 /* Debug */, - 04020B9E0797A7C9CA7A101EA9312572 /* Release */, + 5BD7DF7AE52C363EF4A7DF144DD5F931 /* Debug */, + A5BA22D4099F2DB7899F68DF2A6484DC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - CDB54977543F768C7A6C9DB874B679CC /* Build configuration list for PBXNativeTarget "AsyncSwift" */ = { + B7C30B8258E377118E42AC56055DB302 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 10BC7060A678E00DB94A8994515F2562 /* Debug */, - 10231BB4F56679C1F31862469FE16218 /* Release */, + 07C46060F2C5A0004700C19FCCE2BDCB /* Debug */, + C467A4596552FEFFAFE12DCD72DB9DFE /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - E1A09911F357AF7DB98B489A51AAFA4A /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff_Example" */ = { + D14B9DD13F1B7CBE0AF51EC1CC4206FE /* Build configuration list for PBXNativeTarget "AsyncSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7305B8AD7D602B2CA853E78DB6FF54B4 /* Debug */, - FA2B509A26BEE69F2F75CE83406E2ED2 /* Release */, + 2F6D0EAAA7EE1A39F9857DFD1A310467 /* Debug */, + 9DA3ACA00D9FA4D817CBEE88E4649ECC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; } diff --git a/Example/Pods/Quick/README.md b/Example/Pods/Quick/README.md index 637a989..98dbdec 100644 --- a/Example/Pods/Quick/README.md +++ b/Example/Pods/Quick/README.md @@ -1,6 +1,9 @@ ![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) -[![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) +[![Build Status](https://github.com/Quick/Quick/actions/workflows/ci-xcode.yml/badge.svg)](https://github.com/Quick/Quick/actions/workflows/ci-xcode.yml) +[![CocoaPods](https://img.shields.io/cocoapods/v/Quick.svg)](https://cocoapods.org/pods/Quick) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Quick.svg)](https://cocoapods.org/pods/Quick) Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). @@ -41,7 +44,9 @@ Certain versions of Quick and Nimble only support certain versions of Swift. Dep |Swift version |Quick version |Nimble version | |:--------------------|:---------------|:--------------| -|Swift 3 |v0.10.0 or later|v5.0.0 or later| +|Swift 5.2 |v3.0.0 or later |v9.0.0 or later| +|Swift 4.2 / Swift 5 |v1.3.2 or later |v7.3.2 or later| +|Swift 3 / Swift 4 |v1.0.0 or later |v5.0.0 or later| |Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 | ## Documentation @@ -53,23 +58,23 @@ All documentation can be found in the [Documentation folder](./Documentation), i use_frameworks! -def testing_pods - pod 'Quick' - pod 'Nimble' -end +target "MyApp" do + # Normal libraries -target 'MyTests' do - testing_pods -end + abstract_target 'Tests' do + inherit! :search_paths + target "MyAppTests" + target "MyAppUITests" -target 'MyUITests' do - testing_pods + pod 'Quick' + pod 'Nimble' + end end ``` ## Projects using Quick -Many apps use both Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. +Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). diff --git a/Example/Pods/Quick/Sources/Quick/Behavior.swift b/Example/Pods/Quick/Sources/Quick/Behavior.swift new file mode 100644 index 0000000..7a25a36 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Behavior.swift @@ -0,0 +1,19 @@ +/// 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. +open class Behavior { + + /** + Override this variable if you want to provide custom name for this example group. + */ + open class var name: String { return String(describing: self) } + + /** + Override this method in your behavior to define a set of reusable examples. + + This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + + - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. + */ + open class func spec(_ aContext: @escaping () -> Context) {} +} diff --git a/Example/Pods/Quick/Sources/Quick/Callsite.swift b/Example/Pods/Quick/Sources/Quick/Callsite.swift index e617bc7..33e732c 100644 --- a/Example/Pods/Quick/Sources/Quick/Callsite.swift +++ b/Example/Pods/Quick/Sources/Quick/Callsite.swift @@ -1,30 +1,52 @@ import Foundation +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +public class _CallsiteBase: NSObject {} +#else +public class _CallsiteBase: NSObject {} +// swiftlint:enable type_name +#endif + +// Ideally we would always use `StaticString` as the type for tracking the file name +// in which an example is defined, for consistency with `assert` etc. from the +// stdlib, and because recent versions of the XCTest overlay require `StaticString` +// when calling `XCTFail`. Under the Objective-C runtime (i.e. building on macOS), we +// have to use `String` instead because StaticString can't be generated from Objective-C +#if SWIFT_PACKAGE +public typealias FileString = StaticString +#else +public typealias FileString = String +#endif + /** An object encapsulating the file and line number at which a particular example is defined. */ -final public class Callsite: NSObject { +final public class Callsite: _CallsiteBase { /** The absolute path of the file in which an example is defined. */ - public let file: String + public let file: FileString /** The line number on which an example is defined. */ public let line: UInt - internal init(file: String, line: UInt) { + internal init(file: FileString, line: UInt) { self.file = file self.line = line } } -/** - Returns a boolean indicating whether two Callsite objects are equal. - If two callsites are in the same file and on the same line, they must be equal. -*/ -public func == (lhs: Callsite, rhs: Callsite) -> Bool { - return lhs.file == rhs.file && lhs.line == rhs.line +extension Callsite { + /** + Returns a boolean indicating whether two Callsite objects are equal. + If two callsites are in the same file and on the same line, they must be equal. + */ + @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { + return String(describing: lhs.file) == String(describing: rhs.file) && lhs.line == rhs.line + } } diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift similarity index 65% rename from Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift rename to Example/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift index 99c1c93..35735a2 100644 --- a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ b/Example/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift @@ -1,10 +1,10 @@ import Foundation /** - A closure that temporarily exposes a Configuration object within + A closure that temporarily exposes a QCKConfiguration object within the scope of the closure. */ -public typealias QuickConfigurer = (_ configuration: Configuration) -> () +public typealias QuickConfigurer = (_ configuration: QCKConfiguration) -> Void /** A closure that, given metadata about an example, returns a boolean value @@ -16,23 +16,27 @@ public typealias ExampleFilter = (_ example: Example) -> Bool A configuration encapsulates various options you can use to configure Quick's behavior. */ -final public class Configuration: NSObject { +final public class QCKConfiguration: NSObject { internal let exampleHooks = ExampleHooks() internal let suiteHooks = SuiteHooks() - internal var exclusionFilters: [ExampleFilter] = [ { example in - if let pending = example.filterFlags[Filter.pending] { - return pending - } else { - return false - } - }] - internal var inclusionFilters: [ExampleFilter] = [ { example in - if let focused = example.filterFlags[Filter.focused] { - return focused - } else { - return false - } - }] + internal var exclusionFilters: [ExampleFilter] = [ + { example in // swiftlint:disable:this opening_brace + if let pending = example.filterFlags[Filter.pending] { + return pending + } else { + return false + } + }, + ] + internal var inclusionFilters: [ExampleFilter] = [ + { example in // swiftlint:disable:this opening_brace + if let focused = example.filterFlags[Filter.focused] { + return focused + } else { + return false + } + }, + ] /** Run all examples if none match the configured filters. True by default. @@ -68,11 +72,11 @@ final public class Configuration: NSObject { } /** - Identical to Quick.Configuration.beforeEach, except the closure is + Identical to Quick.QCKConfiguration.beforeEach, except the closure is provided with metadata on the example that the closure is being run prior to. */ -#if _runtime(_ObjC) +#if canImport(Darwin) @objc(beforeEachWithMetadata:) public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) @@ -88,13 +92,13 @@ final public class Configuration: NSObject { given closure before each example that is run. The closure passed to this method is executed before each example Quick runs, globally across the test suite. You may call this method multiple - times across mulitple +[QuickConfigure configure:] methods in order + times across multiple +[QuickConfigure configure:] methods in order to define several closures to run before each example. Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which beforeEach closures are evaluated - either. Mulitple beforeEach defined on a single configuration, however, + either. Multiple beforeEach defined on a single configuration, however, will be executed in the order they're defined. - parameter closure: The closure to be executed before each example @@ -105,11 +109,11 @@ final public class Configuration: NSObject { } /** - Identical to Quick.Configuration.afterEach, except the closure + Identical to Quick.QCKConfiguration.afterEach, except the closure is provided with metadata on the example that the closure is being run after. */ -#if _runtime(_ObjC) +#if canImport(Darwin) @objc(afterEachWithMetadata:) public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) @@ -125,13 +129,13 @@ final public class Configuration: NSObject { given closure after each example that is run. The closure passed to this method is executed after each example Quick runs, globally across the test suite. You may call this method multiple - times across mulitple +[QuickConfigure configure:] methods in order + times across multiple +[QuickConfigure configure:] methods in order to define several closures to run after each example. Note that, since Quick makes no guarantee as to the order in which +[QuickConfiguration configure:] methods are evaluated, there is no guarantee as to the order in which afterEach closures are evaluated - either. Mulitple afterEach defined on a single configuration, however, + either. Multiple afterEach defined on a single configuration, however, will be executed in the order they're defined. - parameter closure: The closure to be executed before each example @@ -141,6 +145,35 @@ final public class Configuration: NSObject { exampleHooks.appendAfter(closure) } + /** + Like Quick.DSL.aroundEach, this configures Quick to wrap each example + with the given closure. The closure passed to this method will wrap + all examples globally across the test suite. You may call this method + multiple times across multiple +[QuickConfigure configure:] methods in + order to define several closures to wrap all examples. + + Note that, since Quick makes no guarantee as to the order in which + +[QuickConfiguration configure:] methods are evaluated, there is no + guarantee as to the order in which aroundEach closures are evaluated. + However, aroundEach does always guarantee proper nesting of operations: + cleanup within aroundEach closures will always happen in the reverse order + of setup. + + - parameter closure: The closure to be executed before each example + in the test suite. + */ + public func aroundEach(_ closure: @escaping AroundExampleClosure) { + exampleHooks.appendAround(closure) + } + + /** + Identical to Quick.QCKConfiguration.aroundEach, except the closure receives + metadata about the example that the closure wraps. + */ + public func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + exampleHooks.appendAround(closure) + } + /** Like Quick.DSL.beforeSuite, this configures Quick to execute the given closure prior to any and all examples that are run. diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift new file mode 100644 index 0000000..6cc4481 --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift @@ -0,0 +1,79 @@ +import Foundation +import XCTest + +#if SWIFT_PACKAGE + +open class QuickConfiguration: NSObject { + open class func configure(_ configuration: QCKConfiguration) {} +} + +#endif + +extension QuickConfiguration { + #if !canImport(Darwin) + private static var configurationSubclasses: [QuickConfiguration.Type] = [] + #endif + + /// Finds all direct subclasses of QuickConfiguration and passes them to the block provided. + /// The classes are iterated over in the order that objc_getClassList returns them. + /// + /// - parameter block: A block that takes a QuickConfiguration.Type. + /// This block will be executed once for each subclass of QuickConfiguration. + private static func enumerateSubclasses(_ block: (QuickConfiguration.Type) -> Void) { + #if canImport(Darwin) + let classesCount = objc_getClassList(nil, 0) + + guard classesCount > 0 else { + return + } + + let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) + defer { free(classes) } + + let autoreleasingClasses = AutoreleasingUnsafeMutablePointer(classes) + objc_getClassList(autoreleasingClasses, classesCount) + + var configurationSubclasses: [QuickConfiguration.Type] = [] + for index in 0.. ()) { - World.sharedWorld.sharedExamples(name, closure: { (NSDictionary) in closure() }) +public func sharedExamples(_ name: String, closure: @escaping () -> Void) { + World.sharedWorld.sharedExamples(name) { _ in closure() } } /** @@ -63,17 +65,16 @@ public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosu - parameter description: An arbitrary string describing the example group. - parameter closure: A closure that can contain other examples. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. */ -public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { - World.sharedWorld.describe(description, flags: flags, closure: closure) +public func describe(_ description: String, closure: () -> Void) { + World.sharedWorld.describe(description, closure: closure) } /** Defines an example group. Equivalent to `describe`. */ -public func context(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { - World.sharedWorld.context(description, flags: flags, closure: closure) +public func context(_ description: String, closure: () -> Void) { + World.sharedWorld.context(description, closure: closure) } /** @@ -116,19 +117,62 @@ public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { World.sharedWorld.afterEach(closure: closure) } +/** + Defines a closure to that wraps each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + + The closure you pass to aroundEach receives a callback as its argument, which + it MUST call exactly one for the example to run properly: + + aroundEach { runExample in + doSomeSetup() + runExample() + doSomeCleanup() + } + + This callback is particularly useful for test decartions that can’t split + into a separate beforeEach and afterEach. For example, running each example + in its own autorelease pool requires aroundEach: + + aroundEach { runExample in + autoreleasepool { + runExample() + } + checkObjectsNoLongerRetained() + } + + You can also use aroundEach to guarantee proper nesting of setup and cleanup + operations in situations where their relative order matters. + + An example group may contain an unlimited number of aroundEach callbacks. + They will nest inside each other, with the first declared in the group + nested at the outermost level. + + - parameter closure: The closure that wraps around each example. +*/ +public func aroundEach(_ closure: @escaping AroundExampleClosure) { + World.sharedWorld.aroundEach(closure) +} + +/** + Identical to Quick.DSL.aroundEach, except the closure receives metadata + about the example that the closure wraps. +*/ +public func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + World.sharedWorld.aroundEach(closure) +} + /** Defines an example. Examples use assertions to demonstrate how code should behave. These are like "tests" in XCTest. - parameter description: An arbitrary string describing what the example is meant to specify. - parameter closure: A closure that can contain assertions. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - parameter file: The absolute path to the file containing the example. A sensible default is provided. - parameter line: The line containing the example. A sensible default is provided. */ -public func it(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { - World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) +public func it(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.it(description, file: file, line: line, closure: closure) } /** @@ -138,13 +182,11 @@ public func it(_ description: String, flags: FilterFlags = [:], file: String = # - parameter name: The name of the shared examples group to be executed. This must be identical to the name of a shared examples group defined using `sharedExamples`. If there are no shared examples that match the name given, an exception is thrown and the test suite will crash. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - parameter line: The line containing the current example group. A sensible default is provided. */ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { - itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) +public func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { + itBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) } /** @@ -158,13 +200,25 @@ public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String examples that match the name given, an exception is thrown and the test suite will crash. - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the shared examples with extra information on the subject of the example. - - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. - Empty by default. - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - parameter line: The line containing the current example group. A sensible default is provided. */ -public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) +public func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) +} + +/** + Inserts the examples defined using a `Behavior` into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. + + - parameter behavior: The type of `Behavior` class defining the example group to be executed. + - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. + */ +public func itBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.itBehavesLike(behavior, context: context, file: file, line: line) } /** @@ -174,7 +228,7 @@ public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String - parameter description: An arbitrary string describing the example or example group. - parameter closure: A closure that will not be evaluated. */ -public func pending(_ description: String, closure: () -> ()) { +public func pending(_ description: String, closure: () -> Void) { World.sharedWorld.pending(description, closure: closure) } @@ -182,46 +236,76 @@ public func pending(_ description: String, closure: () -> ()) { Use this to quickly mark a `describe` closure as pending. This disables all examples within the closure. */ -public func xdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { - World.sharedWorld.xdescribe(description, flags: flags, closure: closure) +public func xdescribe(_ description: String, closure: () -> Void) { + World.sharedWorld.xdescribe(description, closure: closure) } /** Use this to quickly mark a `context` closure as pending. This disables all examples within the closure. */ -public func xcontext(_ description: String, flags: FilterFlags, closure: () -> ()) { - xdescribe(description, flags: flags, closure: closure) +public func xcontext(_ description: String, closure: () -> Void) { + xdescribe(description, closure: closure) } /** Use this to quickly mark an `it` closure as pending. This disables the example and ensures the code within the closure is never run. */ -public func xit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { - World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) +public func xit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.xit(description, file: file, line: line, closure: closure) } +/** + Use this to quickly mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. +*/ +public func xitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.xitBehavesLike(behavior, context: context, file: file, line: line) +} /** Use this to quickly focus a `describe` closure, focusing the examples in the closure. If any examples in the test suite are focused, only those examples are executed. This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. */ -public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { - World.sharedWorld.fdescribe(description, flags: flags, closure: closure) +public func fdescribe(_ description: String, closure: () -> Void) { + World.sharedWorld.fdescribe(description, closure: closure) } /** Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. */ -public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { - fdescribe(description, flags: flags, closure: closure) +public func fcontext(_ description: String, closure: () -> Void) { + fdescribe(description, closure: closure) } /** Use this to quickly focus an `it` closure, focusing the example. If any examples in the test suite are focused, only those examples are executed. */ -public func fit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> ()) { - World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) +public func fit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.fit(description, file: file, line: line, closure: closure) } + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { + fitBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) +} + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) +} + +/** + Use this to quickly focus on `itBehavesLike` closure. + */ +public func fitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.fitBehavesLike(behavior, context: context, file: file, line: line) +} + +// swiftlint:enable line_length diff --git a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift index ab35341..be7e684 100644 --- a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -18,11 +18,12 @@ extension World { registerSharedExample(name, closure: closure) } - internal func describe(_ description: String, flags: FilterFlags, closure: () -> ()) { + internal func describe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { guard currentExampleMetadata == nil else { - raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") + raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'.") } guard currentExampleGroup != nil else { + // swiftlint:disable:next line_length raiseError("Error: example group was not created by its parent QuickSpec spec. Check that describe() or context() was used in QuickSpec.spec() and not a more general context (i.e. an XCTestCase test)") } let group = ExampleGroup(description: description, flags: flags) @@ -30,33 +31,29 @@ extension World { performWithCurrentExampleGroup(group, closure: closure) } - internal func context(_ description: String, flags: FilterFlags, closure: () -> ()) { + internal func context(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { guard currentExampleMetadata == nil else { - raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'. ") + raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'.") } self.describe(description, flags: flags, closure: closure) } - internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.describe(description, flags: focusedFlags, closure: closure) + internal func fdescribe(_ description: String, closure: () -> Void) { + self.describe(description, flags: [Filter.focused: true], closure: closure) } - internal func xdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.describe(description, flags: pendingFlags, closure: closure) + internal func xdescribe(_ description: String, closure: () -> Void) { + self.describe(description, flags: [Filter.pending: true], closure: closure) } internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { guard currentExampleMetadata == nil else { - raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'. ") + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") } currentExampleGroup.hooks.appendBefore(closure) } -#if _runtime(_ObjC) +#if canImport(Darwin) @objc(beforeEachWithMetadata:) internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) @@ -69,12 +66,12 @@ extension World { internal func afterEach(_ closure: @escaping AfterExampleClosure) { guard currentExampleMetadata == nil else { - raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'. ") + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") } currentExampleGroup.hooks.appendAfter(closure) } -#if _runtime(_ObjC) +#if canImport(Darwin) @objc(afterEachWithMetadata:) internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) @@ -85,36 +82,54 @@ extension World { } #endif - internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { + internal func aroundEach(_ closure: @escaping AroundExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendAround(closure) + } + +#if canImport(Darwin) + @objc(aroundEachWithMetadata:) + internal func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendAround(closure) + } +#else + internal func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + currentExampleGroup.hooks.appendAround(closure) + } +#endif + + @nonobjc + internal func it(_ description: String, flags: FilterFlags = [:], file: FileString, line: UInt, closure: @escaping () throws -> Void) { if beforesCurrentlyExecuting { - raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") + raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'.") } if aftersCurrentlyExecuting { - raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'. ") + raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'.") } guard currentExampleMetadata == nil else { - raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'. ") + raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'.") } let callsite = Callsite(file: file, line: line) let example = Example(description: description, callsite: callsite, flags: flags, closure: closure) currentExampleGroup.appendExample(example) } - internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { - var focusedFlags = flags - focusedFlags[Filter.focused] = true - self.it(description, flags: focusedFlags, file: file, line: line, closure: closure) + @nonobjc + internal func fit(_ description: String, file: FileString, line: UInt, closure: @escaping () throws -> Void) { + self.it(description, flags: [Filter.focused: true], file: file, line: line, closure: closure) } - internal func xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { - var pendingFlags = flags - pendingFlags[Filter.pending] = true - self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) + @nonobjc + internal func xit(_ description: String, file: FileString, line: UInt, closure: @escaping () throws -> Void) { + self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) } - internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + @nonobjc + internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags = [:], file: FileString, line: UInt) { guard currentExampleMetadata == nil else { - raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") + raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'.") } let callsite = Callsite(file: file, line: line) let closure = World.sharedWorld.sharedExample(name) @@ -131,29 +146,75 @@ extension World { } } -#if _runtime(_ObjC) - @objc(itWithDescription:flags:file:line:closure:) - private func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { - it(description, flags: flags, file: file, line: line, closure: closure) + @nonobjc + internal func fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { + self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: [Filter.focused: true], file: file, line: line) + } + + @nonobjc + internal func xitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { + self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: [Filter.pending: true], file: file, line: line) + } + + internal func itBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags = [:], file: FileString, line: UInt) { + guard currentExampleMetadata == nil else { + raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'.") + } + let callsite = Callsite(file: file, line: line) + let closure = behavior.spec + let group = ExampleGroup(description: behavior.name, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group) { + closure(context) + } + + group.walkDownExamples { (example: Example) in + example.isSharedExample = true + example.callsite = callsite + } + } + + internal func fitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, file: FileString, line: UInt) { + self.itBehavesLike(behavior, context: context, flags: [Filter.focused: true], file: file, line: line) + } + + internal func xitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, file: FileString, line: UInt) { + self.itBehavesLike(behavior, context: context, flags: [Filter.pending: true], file: file, line: line) + } + +#if canImport(Darwin) && !SWIFT_PACKAGE + @objc(itWithDescription:file:line:closure:) + internal func objc_it(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { + it(description, file: file, line: line, closure: closure) + } + + @objc(fitWithDescription:file:line:closure:) + internal func objc_fit(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { + fit(description, file: file, line: line, closure: closure) + } + + @objc(xitWithDescription:file:line:closure:) + internal func objc_xit(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { + xit(description, file: file, line: line, closure: closure) } - @objc(fitWithDescription:flags:file:line:closure:) - private func objc_fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { - fit(description, flags: flags, file: file, line: line, closure: closure) + @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:file:line:) + internal func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { + itBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) } - @objc(xitWithDescription:flags:file:line:closure:) - private func objc_xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { - xit(description, flags: flags, file: file, line: line, closure: closure) + @objc(fitBehavesLikeSharedExampleNamed:sharedExampleContext:file:line:) + internal func objc_fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { + fitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) } - @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - private func objc_itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { - itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) + @objc(xitBehavesLikeSharedExampleNamed:sharedExampleContext:file:line:) + internal func objc_xitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { + xitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) } #endif - internal func pending(_ description: String, closure: () -> ()) { + internal func pending(_ description: String, closure: () -> Void) { print("Pending: \(description)") } diff --git a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift index 8405a81..f13f43a 100644 --- a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift @@ -1,7 +1,7 @@ import Foundation internal func raiseError(_ message: String) -> Never { -#if _runtime(_ObjC) +#if canImport(Darwin) NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() #endif diff --git a/Example/Pods/Quick/Sources/Quick/Example.swift b/Example/Pods/Quick/Sources/Quick/Example.swift index 07bc529..42160b1 100644 --- a/Example/Pods/Quick/Sources/Quick/Example.swift +++ b/Example/Pods/Quick/Sources/Quick/Example.swift @@ -1,12 +1,20 @@ import Foundation +import XCTest -private var numberOfExamplesRun = 0 +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +public class _ExampleBase: NSObject {} +#else +public class _ExampleBase: NSObject {} +// swiftlint:enable type_name +#endif /** Examples, defined with the `it` function, use assertions to demonstrate how code should behave. These are like "tests" in XCTest. */ -final public class Example: NSObject { +final public class Example: _ExampleBase { /** A boolean indicating whether the example is a shared example; i.e.: whether it is an example defined with `itBehavesLike`. @@ -23,10 +31,10 @@ final public class Example: NSObject { weak internal var group: ExampleGroup? private let internalDescription: String - private let closure: () -> () + private let closure: () throws -> Void private let flags: FilterFlags - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> ()) { + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () throws -> Void) { self.internalDescription = description self.closure = closure self.callsite = callsite @@ -54,35 +62,68 @@ final public class Example: NSObject { Executes the example closure, as well as all before and after closures defined in the its surrounding example groups. */ - public func run() { + public func run() { // swiftlint:disable:this function_body_length let world = World.sharedWorld - if numberOfExamplesRun == 0 { + if world.numberOfExamplesRun == 0 { world.suiteHooks.executeBefores() } - let exampleMetadata = ExampleMetadata(example: self, exampleIndex: numberOfExamplesRun) + let exampleMetadata = ExampleMetadata(example: self, exampleIndex: world.numberOfExamplesRun) world.currentExampleMetadata = exampleMetadata + defer { + world.currentExampleMetadata = nil + } - world.exampleHooks.executeBefores(exampleMetadata) group!.phase = .beforesExecuting - for before in group!.befores { - before(exampleMetadata) - } - group!.phase = .beforesFinished - closure() + let runExample = { [closure, name, callsite] in + self.group!.phase = .beforesFinished + + do { + try closure() + } catch { + let description = "Test \(name) threw unexpected error: \(error.localizedDescription)" + #if SWIFT_PACKAGE + let file = callsite.file.description + #else + let file = callsite.file + #endif + + // XCTIssue is unavailable (not implemented yet) on swift-corelibs-xctest (for non-Apple platforms) + #if canImport(Darwin) + let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue( + type: .thrownError, + compactDescription: description, + sourceCodeContext: sourceCodeContext + ) + QuickSpec.current.record(issue) + #else + QuickSpec.current.recordFailure( + withDescription: description, + inFile: file, + atLine: Int(callsite.line), + expected: false + ) + #endif + } + + self.group!.phase = .aftersExecuting + } - group!.phase = .aftersExecuting - for after in group!.afters { - after(exampleMetadata) + let allWrappers = group!.wrappers + world.exampleHooks.wrappers + let wrappedExample = allWrappers.reduce(runExample) { closure, wrapper in + return { wrapper(exampleMetadata, closure) } } + wrappedExample() + group!.phase = .aftersFinished - world.exampleHooks.executeAfters(exampleMetadata) - numberOfExamplesRun += 1 + world.numberOfExamplesRun += 1 - if !world.isRunningAdditionalSuites && numberOfExamplesRun >= world.includedExampleCount { + if !world.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { world.suiteHooks.executeAfters() } } @@ -102,10 +143,12 @@ final public class Example: NSObject { } } -/** - Returns a boolean indicating whether two Example objects are equal. - If two examples are defined at the exact same callsite, they must be equal. -*/ -public func == (lhs: Example, rhs: Example) -> Bool { - return lhs.callsite == rhs.callsite +extension Example { + /** + Returns a boolean indicating whether two Example objects are equal. + If two examples are defined at the exact same callsite, they must be equal. + */ + @nonobjc public static func == (lhs: Example, rhs: Example) -> Bool { + return lhs.callsite == rhs.callsite + } } diff --git a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift index 79f24ca..d18bcf7 100644 --- a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -31,26 +31,29 @@ final public class ExampleGroup: NSObject { Returns a list of examples that belong to this example group, or to any of its descendant example groups. */ + #if canImport(Darwin) + @objc public var examples: [Example] { - var examples = childExamples - for group in childGroups { - examples.append(contentsOf: group.examples) - } - return examples + return childExamples + childGroups.flatMap { $0.examples } + } + #else + public var examples: [Example] { + return childExamples + childGroups.flatMap { $0.examples } } + #endif internal var name: String? { - if let parent = parent { - guard let name = parent.name else { return description } - return "\(name), \(description)" - } else { + guard let parent = parent else { return isInternalRootExampleGroup ? nil : description } + + guard let name = parent.name else { return description } + return "\(name), \(description)" } internal var filterFlags: FilterFlags { var aggregateFlags = flags - walkUp() { (group: ExampleGroup) -> () in + walkUp { group in for (key, value) in group.flags { aggregateFlags[key] = value } @@ -58,23 +61,15 @@ final public class ExampleGroup: NSObject { return aggregateFlags } - internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reversed()) - walkUp() { (group: ExampleGroup) -> () in - closures.append(contentsOf: Array(group.hooks.befores.reversed())) - } - return Array(closures.reversed()) - } - - internal var afters: [AfterExampleWithMetadataClosure] { - var closures = hooks.afters - walkUp() { (group: ExampleGroup) -> () in - closures.append(contentsOf: group.hooks.afters) + internal var wrappers: [AroundExampleWithMetadataClosure] { + var closures = Array(hooks.wrappers.reversed()) + walkUp { group in + closures.append(contentsOf: group.hooks.wrappers.reversed()) } return closures } - internal func walkDownExamples(_ callback: (_ example: Example) -> ()) { + internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { for example in childExamples { callback(example) } @@ -93,7 +88,7 @@ final public class ExampleGroup: NSObject { childExamples.append(example) } - private func walkUp(_ callback: (_ group: ExampleGroup) -> ()) { + private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { var group = self while let parent = group.parent { callback(parent) diff --git a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift index e7510f7..a8f0d77 100644 --- a/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ b/Example/Pods/Quick/Sources/Quick/ExampleMetadata.swift @@ -1,11 +1,20 @@ import Foundation +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +public class _ExampleMetadataBase: NSObject {} +#else +public class _ExampleMetadataBase: NSObject {} +// swiftlint:enable type_name +#endif + /** A class that encapsulates information about an example, including the index at which the example was executed, as well as the example itself. */ -final public class ExampleMetadata: NSObject { +final public class ExampleMetadata: _ExampleMetadataBase { /** The example for which this metadata was collected. */ diff --git a/Example/Pods/Quick/Sources/Quick/Filter.swift b/Example/Pods/Quick/Sources/Quick/Filter.swift index d452efe..a250631 100644 --- a/Example/Pods/Quick/Sources/Quick/Filter.swift +++ b/Example/Pods/Quick/Sources/Quick/Filter.swift @@ -1,23 +1,32 @@ import Foundation +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +internal class _FilterBase: NSObject {} +#else +internal class _FilterBase: NSObject {} +// swiftlint:enable type_name +#endif + /** A mapping of string keys to booleans that can be used to filter examples or example groups. For example, a "focused" example would have the flags [Focused: true]. */ -public typealias FilterFlags = [String: Bool] +internal typealias FilterFlags = [String: Bool] /** A namespace for filter flag keys, defined primarily to make the keys available in Objective-C. */ -final public class Filter: NSObject { +final internal class Filter: _FilterBase { /** Example and example groups with [Focused: true] are included in test runs, excluding all other examples without this flag. Use this to only run one or two tests that you're currently focusing on. */ - public class var focused: String { + internal class var focused: String { return "focused" } @@ -25,7 +34,7 @@ final public class Filter: NSObject { Example and example groups with [Pending: true] are excluded from test runs. Use this to temporarily suspend examples that you know do not pass yet. */ - public class var pending: String { + internal class var pending: String { return "pending" } } diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift index a241b33..e70194d 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -3,13 +3,13 @@ /** A closure executed before an example is run. */ -public typealias BeforeExampleClosure = () -> () +public typealias BeforeExampleClosure = () -> Void /** A closure executed before an example is run. The closure is given example metadata, which contains information about the example that is about to be run. */ -public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> () +public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void /** A closure executed after an example is run. @@ -22,12 +22,25 @@ public typealias AfterExampleClosure = BeforeExampleClosure */ public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure +/** + A closure which wraps an example. The closure must call runExample() exactly once. +*/ +public typealias AroundExampleClosure = (_ runExample: @escaping () -> Void) -> Void + +/** + A closure which wraps an example. The closure is given example metadata, + which contains information about the example that the wrapper will run. + The closure must call runExample() exactly once. +*/ +public typealias AroundExampleWithMetadataClosure = + (_ exampleMetadata: ExampleMetadata, _ runExample: @escaping () -> Void) -> Void + // MARK: Suite Hooks /** A closure executed before any examples are run. */ -public typealias BeforeSuiteClosure = () -> () +public typealias BeforeSuiteClosure = () -> Void /** A closure executed after all examples have finished running. diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift index 565287b..51f004b 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -2,41 +2,48 @@ A container for closures to be executed before and after each example. */ final internal class ExampleHooks { - internal var befores: [BeforeExampleWithMetadataClosure] = [] - internal var afters: [AfterExampleWithMetadataClosure] = [] + internal var wrappers: [AroundExampleWithMetadataClosure] = [] internal var phase: HooksPhase = .nothingExecuted internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { - befores.append(closure) + wrappers.append { exampleMetadata, runExample in + closure(exampleMetadata) + runExample() + } } internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { - befores.append { (exampleMetadata: ExampleMetadata) in closure() } + wrappers.append { _, runExample in + closure() + runExample() + } } internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { - afters.append(closure) + wrappers.prepend { exampleMetadata, runExample in + runExample() + closure(exampleMetadata) + } } internal func appendAfter(_ closure: @escaping AfterExampleClosure) { - afters.append { (exampleMetadata: ExampleMetadata) in closure() } - } - - internal func executeBefores(_ exampleMetadata: ExampleMetadata) { - phase = .beforesExecuting - for before in befores { - before(exampleMetadata) + wrappers.prepend { _, runExample in + runExample() + closure() } + } - phase = .beforesFinished + internal func appendAround(_ closure: @escaping AroundExampleWithMetadataClosure) { + wrappers.append(closure) } - internal func executeAfters(_ exampleMetadata: ExampleMetadata) { - phase = .aftersExecuting - for after in afters { - after(exampleMetadata) - } + internal func appendAround(_ closure: @escaping AroundExampleClosure) { + wrappers.append { _, runExample in closure(runExample) } + } +} - phase = .aftersFinished +extension Array { + mutating func prepend(_ element: Element) { + insert(element, at: 0) } } diff --git a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift index 730843e..f5596cc 100644 --- a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift @@ -1,4 +1,4 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +#if canImport(Darwin) import Foundation @@ -11,6 +11,15 @@ extension Bundle { return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } } + /** + Return the module name of the bundle. + Uses the bundle filename and transform it to match Xcode's transformation. + Module name has to be a valid "C99 extended identifier". + */ + internal var moduleName: String { + let fileName = bundleURL.fileName + return fileName.c99ExtendedIdentifier + } } #endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift index ec2e308..5326d25 100644 --- a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift @@ -1,4 +1,4 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +#if canImport(Darwin) import Foundation /** @@ -12,6 +12,11 @@ internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { */ let testCaseClass: AnyClass! + /** + The test name to filter by, if there is one. + */ + let testName: String? + /** For Objective-C classes, returns the class name. For Swift classes without, an explicit Objective-C name, returns a module-namespaced class name @@ -32,22 +37,33 @@ internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { If no test bundle can be found, or the test case class can't be found, initialization fails and returns `nil`. */ - init?(forTestCaseWithName name: String) { + init?(forTestCaseWithName name: String, testName: String?) { guard let testCaseClass = testCaseClassForTestCaseWithName(name) else { self.testCaseClass = nil return nil } self.testCaseClass = testCaseClass + self.testName = testNameForTestCaseName(name, testName: testName) } /** Returns a `QuickTestSuite` that runs the associated test case class. */ func buildTestSuite() -> QuickTestSuite { - return QuickTestSuite(forTestCaseClass: testCaseClass) + let suite = QuickTestSuite(forTestCaseClass: testCaseClass) + + if let testName = testName { + let filteredSuite = QuickTestSuite(name: suite.name) + // test names are in the format "-[ClassName testName]" + for test in suite.tests.filter({ $0.name == testName }) { + filteredSuite.addTest(test) + } + return filteredSuite + } else { + return suite + } } - } /** @@ -57,19 +73,18 @@ internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { Returns `nil` if a bundle or test case class cannot be found. */ private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { - func extractClassName(_ name: String) -> String? { - return name.components(separatedBy: "/").first - } - - guard let className = extractClassName(name) else { return nil } guard let bundle = Bundle.currentTestBundle else { return nil } - if let testCaseClass = bundle.classNamed(className) { return testCaseClass } + if let testCaseClass = bundle.classNamed(name) { return testCaseClass } - let bundleFileName = bundle.bundleURL.fileName - let moduleName = bundleFileName.replacingOccurrences(of: " ", with: "_") + let moduleName = bundle.moduleName + + return NSClassFromString("\(moduleName).\(name)") +} - return NSClassFromString("\(moduleName).\(className)") +private func testNameForTestCaseName(_ testCaseName: String, testName: String?) -> String? { + guard let testName = testName else { return nil } + return "-[\(testCaseName) \(testName)]" } #endif diff --git a/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift b/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift new file mode 100644 index 0000000..8bfc95b --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/QuickTestObservation.swift @@ -0,0 +1,79 @@ +#if !SWIFT_PACKAGE + +import Foundation +import XCTest + +/// A dummy protocol for calling the internal `+[QuickSpec buildExamplesIfNeeded]` method +/// which is defined in Objective-C from Swift. +@objc internal protocol _QuickSpecInternal { + static func buildExamplesIfNeeded() +} + +@objc internal final class QuickTestObservation: NSObject, XCTestObservation { + @objc(sharedInstance) + static let shared = QuickTestObservation() + + private var didBuildAllExamples = false + + // Quick hooks into this event to compile example groups for each QuickSpec subclasses. + // + // If an exception occurs when compiling examples, report it to the user. Chances are they + // included an expectation outside of a "it", "describe", or "context" block. + func testBundleWillStart(_ testBundle: Bundle) { + buildAllExamplesIfNeeded() + } + + @objc func buildAllExamplesIfNeeded() { + guard !didBuildAllExamples else { return } + didBuildAllExamples = true + + QuickSpec.enumerateSubclasses { specClass in + // This relies on `_QuickSpecInternal`. + (specClass as AnyClass).buildExamplesIfNeeded() + } + } +} + +// swiftlint:disable:next todo +// TODO: Unify this with QuickConfiguration's equivalent +extension QuickSpec { + internal static func enumerateSubclasses( + subclasses: [QuickSpec.Type]? = nil, + _ block: (QuickSpec.Type) -> Void + ) { + let subjects: [QuickSpec.Type] + if let subclasses = subclasses { + subjects = subclasses + } else { + let classesCount = objc_getClassList(nil, 0) + + guard classesCount > 0 else { + return + } + + let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) + defer { free(classes) } + + let autoreleasingClasses = AutoreleasingUnsafeMutablePointer(classes) + objc_getClassList(autoreleasingClasses, classesCount) + + var specSubclasses: [QuickSpec.Type] = [] + for index in 0.. = Set() /** - Construct a test suite for a specific, selected subset of test cases (rather + Construct a test suite for a specific, selected subset of tests and test cases (rather than the default, which as all test cases). If this method is called multiple times for the same test case class, e.g.. - FooSpec/testFoo - FooSpec/testBar + FooSpec, testBar + FooSpec, testBar It is expected that the first call should return a valid test suite, and all subsequent calls should return `nil`. + + - Parameter name: The name of the `XCTastCase`/`QuickSpec` subclass. + - Parameter testName: The name of the individual test to run (if specified). + - Returns: A valid test case (if tests were added to the test suite to run), or nil (if tests were not added to the test suite to run) */ - public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { - guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } + @objc + public static func selectedTestSuite(forTestCaseWithName name: String, testName: String?) -> QuickTestSuite? { + guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name, testName: testName) else { return nil } - if builtTestSuites.contains(builder.testSuiteClassName) { - return nil - } else { - builtTestSuites.insert(builder.testSuiteClassName) + let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) + if inserted { return builder.buildTestSuite() + } else { + return nil } } - } #endif diff --git a/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift b/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift new file mode 100644 index 0000000..db2fc9d --- /dev/null +++ b/Example/Pods/Quick/Sources/Quick/String+C99ExtendedIdentifier.swift @@ -0,0 +1,46 @@ +#if canImport(Darwin) +import Foundation + +extension String { + private static var invalidCharacters: CharacterSet = { + var invalidCharacters = CharacterSet() + + let invalidCharacterSets: [CharacterSet] = [ + .whitespacesAndNewlines, + .illegalCharacters, + .controlCharacters, + .punctuationCharacters, + .nonBaseCharacters, + .symbols, + ] + + for invalidSet in invalidCharacterSets { + invalidCharacters.formUnion(invalidSet) + } + + return invalidCharacters + }() + + internal var c99ExtendedIdentifier: String { + let validComponents = components(separatedBy: String.invalidCharacters) + let result = validComponents.joined(separator: "_") + + return result.isEmpty ? "_" : result + } +} + +/// Extension methods or properties for NSObject subclasses are invisible from +/// the Objective-C runtime on static linking unless the consumers add `-ObjC` +/// linker flag, so let's make a wrapper class to mitigate that situation. +/// +/// See: https://github.com/Quick/Quick/issues/785 and https://github.com/Quick/Quick/pull/803 +@objc +class QCKObjCStringUtils: NSObject { + override private init() {} + + @objc + static func c99ExtendedIdentifier(from string: String) -> String { + return string.c99ExtendedIdentifier + } +} +#endif diff --git a/Example/Pods/Quick/Sources/Quick/World.swift b/Example/Pods/Quick/Sources/Quick/World.swift index 487902e..c14e871 100644 --- a/Example/Pods/Quick/Sources/Quick/World.swift +++ b/Example/Pods/Quick/Sources/Quick/World.swift @@ -4,13 +4,22 @@ import Foundation A closure that, when evaluated, returns a dictionary of key-value pairs that can be accessed from within a group of shared examples. */ -public typealias SharedExampleContext = () -> (NSDictionary) +public typealias SharedExampleContext = () -> [String: Any] /** A closure that is used to define a group of shared examples. This closure may contain any number of example and example groups. */ -public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () +public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void + +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +internal class _WorldBase: NSObject {} +#else +internal class _WorldBase: NSObject {} +// swiftlint:enable type_name +#endif /** A collection of state Quick builds up in order to work its magic. @@ -23,7 +32,7 @@ public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () You may configure how Quick behaves by calling the -[World configure:] method from within an overridden +[QuickConfiguration configure:] method. */ -final internal class World: NSObject { +final internal class World: _WorldBase { /** The example group that is currently being run. The DSL requires that this group is correctly set in order to build a @@ -39,12 +48,14 @@ final internal class World: NSObject { internal var currentExampleMetadata: ExampleMetadata? + internal var numberOfExamplesRun = 0 + /** A flag that indicates whether additional test suites are being run within this test suite. This is only true within the context of Quick functional tests. */ -#if _runtime(_ObjC) +#if canImport(Darwin) // Convention of generating Objective-C selector has been changed on Swift 3 @objc(isRunningAdditionalSuites) internal var isRunningAdditionalSuites = false @@ -52,10 +63,11 @@ final internal class World: NSObject { internal var isRunningAdditionalSuites = false #endif - private var specs: Dictionary = [:] + private var specs: [String: ExampleGroup] = [:] private var sharedExamples: [String: SharedExampleClosure] = [:] - private let configuration = Configuration() - private var isConfigurationFinalized = false + private let configuration = QCKConfiguration() + + internal private(set) var isConfigurationFinalized = false internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } @@ -63,12 +75,22 @@ final internal class World: NSObject { // MARK: Singleton Constructor private override init() {} - static let sharedWorld = World() + + static private(set) var sharedWorld = World() + + static func anotherWorld(block: (World) -> T) -> T { + let previous = sharedWorld + defer { sharedWorld = previous } + + let newWorld = World() + sharedWorld = newWorld + return block(newWorld) + } // MARK: Public Interface /** - Exposes the World's Configuration object within the scope of the closure + Exposes the World's QCKConfiguration object within the scope of the closure so that it may be configured. This method must not be called outside of an overridden +[QuickConfiguration configure:] method. @@ -76,8 +98,11 @@ final internal class World: NSObject { be mutated to change Quick's behavior. */ internal func configure(_ closure: QuickConfigurer) { - assert(!isConfigurationFinalized, - "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method.") + assert( + !isConfigurationFinalized, + // swiftlint:disable:next line_length + "Quick cannot be configured outside of a +[QuickConfiguration configure:] method. You should not call -[World configure:] directly. Instead, subclass QuickConfiguration and override the +[QuickConfiguration configure:] method." + ) closure(configuration) } @@ -89,6 +114,17 @@ final internal class World: NSObject { isConfigurationFinalized = true } + /** + Returns `true` if the root example group for the given spec class has been already initialized. + + - parameter specClass: The QuickSpec class for which is checked for the existing root example group. + - returns: Whether the root example group for the given spec class has been already initialized or not. + */ + internal func isRootExampleGroupInitialized(forSpecClass specClass: QuickSpec.Type) -> Bool { + let name = String(describing: specClass) + return specs.keys.contains(name) + } + /** Returns an internally constructed root example group for the given QuickSpec class. @@ -104,11 +140,11 @@ final internal class World: NSObject { it("is at the top level") {} } - - parameter cls: The QuickSpec class for which to retrieve the root example group. + - parameter specClass: The QuickSpec class for which to retrieve the root example group. - returns: The root example group for the class. */ - internal func rootExampleGroupForSpecClass(_ cls: AnyClass) -> ExampleGroup { - let name = String(describing: cls) + internal func rootExampleGroup(forSpecClass specClass: QuickSpec.Type) -> ExampleGroup { + let name = String(describing: specClass) if let group = specs[name] { return group @@ -132,24 +168,17 @@ final internal class World: NSObject { - parameter specClass: The QuickSpec subclass for which examples are to be returned. - returns: A list of examples to be run as test invocations. */ - internal func examples(_ specClass: AnyClass) -> [Example] { + internal func examples(forSpecClass specClass: QuickSpec.Type) -> [Example] { // 1. Grab all included examples. let included = includedExamples // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. - let spec = rootExampleGroupForSpecClass(specClass).examples.filter { included.contains($0) } + let spec = rootExampleGroup(forSpecClass: specClass).examples.filter { included.contains($0) } // 3. Remove all excluded examples. return spec.filter { example in - !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example) } + !self.configuration.exclusionFilters.contains { $0(example) } } } -#if _runtime(_ObjC) - @objc(examplesForSpecClass:) - private func objc_examples(_ specClass: AnyClass) -> [Example] { - return examples(specClass) - } -#endif - // MARK: Internal internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { @@ -166,6 +195,8 @@ final internal class World: NSObject { return includedExamples.count } + internal lazy var cachedIncludedExampleCount: Int = self.includedExampleCount + internal var beforesCurrentlyExecuting: Bool { let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting @@ -208,11 +239,15 @@ final internal class World: NSObject { private var includedExamples: [Example] { let all = allExamples let included = all.filter { example in - return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example) } + return self.configuration.inclusionFilters.contains { $0(example) } } if included.isEmpty && configuration.runAllWhenEverythingFiltered { - return all + let exceptExcluded = all.filter { example in + return !self.configuration.exclusionFilters.contains { $0(example) } + } + + return exceptExcluded } else { return included } diff --git a/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m b/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m new file mode 100644 index 0000000..e452e65 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjCRuntime/QuickSpecBase.m @@ -0,0 +1,38 @@ +#import "QuickSpecBase.h" + +#pragma mark - _QuickSpecBase + +@implementation _QuickSpecBase + +- (instancetype)init { + self = [super initWithInvocation: nil]; + return self; +} + +/** + Invocations for each test method in the test case. QuickSpec overrides this method to define a + new method for each example defined in +[QuickSpec spec]. + + @return An array of invocations that execute the newly defined example methods. + */ ++ (NSArray *)testInvocations { + NSArray *selectors = [self _qck_testMethodSelectors]; + NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:selectors.count]; + + for (NSString *selectorString in selectors) { + SEL selector = NSSelectorFromString(selectorString); + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + + [invocations addObject:invocation]; + } + + return invocations; +} + ++ (NSArray *)_qck_testMethodSelectors { + return @[]; +} + +@end diff --git a/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickObjCRuntime.h b/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickObjCRuntime.h new file mode 100644 index 0000000..65d7a31 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickObjCRuntime.h @@ -0,0 +1,5 @@ +#if __has_include("QuickSpecBase.h") +#import "QuickSpecBase.h" +#else +#import +#endif diff --git a/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h b/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h new file mode 100644 index 0000000..2ee00e7 --- /dev/null +++ b/Example/Pods/Quick/Sources/QuickObjCRuntime/include/QuickSpecBase.h @@ -0,0 +1,7 @@ +#import +#import + +@interface _QuickSpecBase : XCTestCase ++ (NSArray *)_qck_testMethodSelectors; +- (instancetype)init NS_DESIGNATED_INITIALIZER; +@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h index 5646199..dbd0d80 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h @@ -1,6 +1,6 @@ #import -@class Configuration; +@class QCKConfiguration; /** Subclass QuickConfiguration and override the +[QuickConfiguration configure:] @@ -23,8 +23,8 @@ @param configuration A mutable object that is used to configure how Quick behaves on a framework level. For details on all the options, see the - documentation in Configuration.swift. + documentation in QCKConfiguration.swift. */ -+ (void)configure:(Configuration *)configuration; ++ (void)configure:(QCKConfiguration *)configuration; @end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m index 937b818..b6bd155 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m @@ -1,36 +1,11 @@ #import "QuickConfiguration.h" -#import "World.h" #import -typedef void (^QCKClassEnumerationBlock)(Class klass); - -/** - Finds all direct subclasses of the given class and passes them to the block provided. - The classes are iterated over in the order that objc_getClassList returns them. - - @param klass The base class to find subclasses of. - @param block A block that takes a Class. This block will be executed once for each subclass of klass. - */ -void qck_enumerateSubclasses(Class klass, QCKClassEnumerationBlock block) { - Class *classes = NULL; - int classesCount = objc_getClassList(NULL, 0); - - if (classesCount > 0) { - classes = (Class *)calloc(sizeof(Class), classesCount); - classesCount = objc_getClassList(classes, classesCount); - - Class subclass, superclass; - for(int i = 0; i < classesCount; i++) { - subclass = classes[i]; - superclass = class_getSuperclass(subclass); - if (superclass == klass && block) { - block(subclass); - } - } - - free(classes); - } -} +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif @implementation QuickConfiguration @@ -60,24 +35,13 @@ - (instancetype)init { + (void)initialize { // Only enumerate over the subclasses of QuickConfiguration, not any of its subclasses. if ([self class] == [QuickConfiguration class]) { - - // Only enumerate over subclasses once, even if +[QuickConfiguration initialize] - // were to be called several times. This is necessary because +[QuickSpec initialize] - // manually calls +[QuickConfiguration initialize]. - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - qck_enumerateSubclasses([QuickConfiguration class], ^(__unsafe_unretained Class klass) { - [[World sharedWorld] configure:^(Configuration *configuration) { - [klass configure:configuration]; - }]; - }); - [[World sharedWorld] finalizeConfiguration]; - }); + World *world = [World sharedWorld]; + [self configureSubclassesIfNeededWithWorld:world]; } } #pragma mark - Public Interface -+ (void)configure:(Configuration *)configuration { } ++ (void)configure:(QCKConfiguration *)configuration { } @end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h index c5f3152..d3e3f64 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h @@ -49,6 +49,8 @@ typedef NSDictionary *(^QCKDSLSharedExampleContext)(void); typedef void (^QCKDSLSharedExampleBlock)(QCKDSLSharedExampleContext); typedef void (^QCKDSLEmptyBlock)(void); typedef void (^QCKDSLExampleMetadataBlock)(ExampleMetadata *exampleMetadata); +typedef void (^QCKDSLAroundExampleBlock)(QCKDSLEmptyBlock runExample); +typedef void (^QCKDSLAroundExampleMetadataBlock)(ExampleMetadata *exampleMetadata, QCKDSLEmptyBlock runExample); #define QUICK_EXPORT FOUNDATION_EXPORT @@ -61,6 +63,8 @@ QUICK_EXPORT void qck_beforeEach(QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure); QUICK_EXPORT void qck_afterEach(QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure); +QUICK_EXPORT void qck_aroundEach(QCKDSLAroundExampleBlock closure); +QUICK_EXPORT void qck_aroundEachWithMetadata(QCKDSLAroundExampleMetadataBlock closure); QUICK_EXPORT void qck_pending(NSString *description, QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); @@ -169,6 +173,51 @@ static inline void afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { qck_afterEachWithMetadata(closure); } +/** + Defines a closure to that wraps each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + + The closure you pass to aroundEach receives a callback as its argument, which + it MUST call exactly one for the example to run properly: + + aroundEach(^(QCKDSLEmptyBlock runExample) { + [self doSomeSetup]; + runExample(); + [self doSomeCleanup]; + }); + + This callback is particularly useful for test decartions that can’t split + into a separate beforeEach and afterEach. For example, running each example + in its own autorelease pool requires aroundEach: + + aroundEach(^(QCKDSLEmptyBlock runExample) { + @autoreleasepool { + runExample(); + } + [self checkObjectsNoLongerRetained]; + }); + + You can also use aroundEach to guarantee proper nesting of setup and cleanup + operations in situations where their relative order matters. + + An example group may contain an unlimited number of aroundEach callbacks. + They will nest inside each other, with the first declared in the group + nested at the outermost level. + + - parameter closure: The closure that wraps around each example. +*/ +static inline void aroundEach(QCKDSLAroundExampleBlock closure) { + qck_aroundEach(closure); +} + +/** + Identical to Quick.DSL.aroundEach, except the closure receives metadata + about the example that the closure wraps. + */ +static inline void aroundEachWithMetadata(QCKDSLAroundExampleMetadataBlock closure) { + qck_aroundEachWithMetadata(closure); +} + /** Defines an example or example group that should not be executed. Use `pending` to temporarily disable examples or groups that should not be run yet. @@ -220,15 +269,19 @@ static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { #define fitBehavesLike qck_fitBehavesLike #endif -#define qck_it qck_it_builder(@{}, @(__FILE__), __LINE__) -#define qck_xit qck_it_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fit qck_it_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) -#define qck_itBehavesLike qck_itBehavesLike_builder(@{}, @(__FILE__), __LINE__) -#define qck_xitBehavesLike qck_itBehavesLike_builder(@{Filter.pending: @YES}, @(__FILE__), __LINE__) -#define qck_fitBehavesLike qck_itBehavesLike_builder(@{Filter.focused: @YES}, @(__FILE__), __LINE__) +#define qck_it qck_it_builder(@(__FILE__), __LINE__) +#define qck_xit qck_xit_builder(@(__FILE__), __LINE__) +#define qck_fit qck_fit_builder(@(__FILE__), __LINE__) +#define qck_itBehavesLike qck_itBehavesLike_builder(@(__FILE__), __LINE__) +#define qck_xitBehavesLike qck_xitBehavesLike_builder(@(__FILE__), __LINE__) +#define qck_fitBehavesLike qck_fitBehavesLike_builder(@(__FILE__), __LINE__) typedef void (^QCKItBlock)(NSString *description, QCKDSLEmptyBlock closure); typedef void (^QCKItBehavesLikeBlock)(NSString *description, QCKDSLSharedExampleContext context); -QUICK_EXPORT QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBlock qck_it_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBlock qck_xit_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBlock qck_fit_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBehavesLikeBlock qck_xitBehavesLike_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line); diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m index 10e8a3d..9285265 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m @@ -1,6 +1,10 @@ #import "QCKDSL.h" -#import "World.h" -#import "World+DSL.h" + +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif void qck_beforeSuite(QCKDSLEmptyBlock closure) { [[World sharedWorld] beforeSuite:closure]; @@ -38,32 +42,74 @@ void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { [[World sharedWorld] afterEachWithMetadata:closure]; } -QCKItBlock qck_it_builder(NSDictionary *flags, NSString *file, NSUInteger line) { +void qck_aroundEach(QCKDSLAroundExampleBlock closure) { + [[World sharedWorld] aroundEach:closure]; +} + +void qck_aroundEachWithMetadata(QCKDSLAroundExampleMetadataBlock closure) { + [[World sharedWorld] aroundEachWithMetadata:closure]; +} + +QCKItBlock qck_it_builder(NSString *file, NSUInteger line) { return ^(NSString *description, QCKDSLEmptyBlock closure) { [[World sharedWorld] itWithDescription:description - flags:flags file:file line:line closure:closure]; }; } -QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSDictionary *flags, NSString *file, NSUInteger line) { +QCKItBlock qck_xit_builder(NSString *file, NSUInteger line) { + return ^(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] xitWithDescription:description + file:file + line:line + closure:closure]; + }; +} + +QCKItBlock qck_fit_builder(NSString *file, NSUInteger line) { + return ^(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] fitWithDescription:description + file:file + line:line + closure:closure]; + }; +} + +QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSString *file, NSUInteger line) { return ^(NSString *name, QCKDSLSharedExampleContext context) { [[World sharedWorld] itBehavesLikeSharedExampleNamed:name sharedExampleContext:context - flags:flags file:file line:line]; }; } +QCKItBehavesLikeBlock qck_xitBehavesLike_builder(NSString *file, NSUInteger line) { + return ^(NSString *name, QCKDSLSharedExampleContext context) { + [[World sharedWorld] xitBehavesLikeSharedExampleNamed:name + sharedExampleContext:context + file:file + line:line]; + }; +} + +QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line) { + return ^(NSString *name, QCKDSLSharedExampleContext context) { + [[World sharedWorld] fitBehavesLikeSharedExampleNamed:name + sharedExampleContext:context + file:file + line:line]; + }; +} + void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { [[World sharedWorld] pending:description closure:closure]; } void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] xdescribe:description flags:@{} closure:closure]; + [[World sharedWorld] xdescribe:description closure:closure]; } void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { @@ -71,7 +117,7 @@ void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { } void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] fdescribe:description flags:@{} closure:closure]; + [[World sharedWorld] fdescribe:description closure:closure]; } void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure) { diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h deleted file mode 100644 index a3b8524..0000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h +++ /dev/null @@ -1,20 +0,0 @@ -#import - -@interface World (SWIFT_EXTENSION(Quick)) -- (void)beforeSuite:(void (^ __nonnull)(void))closure; -- (void)afterSuite:(void (^ __nonnull)(void))closure; -- (void)sharedExamples:(NSString * __nonnull)name closure:(void (^ __nonnull)(NSDictionary * __nonnull (^ __nonnull)(void)))closure; -- (void)describe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; -- (void)context:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; -- (void)fdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; -- (void)xdescribe:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags closure:(void (^ __nonnull)(void))closure; -- (void)beforeEach:(void (^ __nonnull)(void))closure; -- (void)beforeEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; -- (void)afterEach:(void (^ __nonnull)(void))closure; -- (void)afterEachWithMetadata:(void (^ __nonnull)(ExampleMetadata * __nonnull))closure; -- (void)itWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; -- (void)fitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; -- (void)xitWithDescription:(NSString * __nonnull)description flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line closure:(void (^ __nonnull)(void))closure; -- (void)itBehavesLikeSharedExampleNamed:(NSString * __nonnull)name sharedExampleContext:(NSDictionary * __nonnull (^ __nonnull)(void))sharedExampleContext flags:(NSDictionary * __nonnull)flags file:(NSString * __nonnull)file line:(NSUInteger)line; -- (void)pending:(NSString * __nonnull)description closure:(void (^ __nonnull)(void))closure; -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h b/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h deleted file mode 100644 index 2da524e..0000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h +++ /dev/null @@ -1,17 +0,0 @@ -#import - -/** - QuickSpec converts example names into test methods. - Those test methods need valid selector names, which means no whitespace, - control characters, etc. This category gives NSString objects an easy way - to replace those illegal characters with underscores. - */ -@interface NSString (QCKSelectorName) - -/** - Returns a string with underscores in place of all characters that cannot - be included in a selector (SEL) name. - */ -@property (nonatomic, readonly) NSString *qck_selectorName; - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m b/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m deleted file mode 100644 index d374be6..0000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "NSString+QCKSelectorName.h" - -@implementation NSString (QCKSelectorName) - -- (NSString *)qck_selectorName { - static NSMutableCharacterSet *invalidCharacters = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - invalidCharacters = [NSMutableCharacterSet new]; - - NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceCharacterSet]; - NSCharacterSet *newlineCharacterSet = [NSCharacterSet newlineCharacterSet]; - NSCharacterSet *illegalCharacterSet = [NSCharacterSet illegalCharacterSet]; - NSCharacterSet *controlCharacterSet = [NSCharacterSet controlCharacterSet]; - NSCharacterSet *punctuationCharacterSet = [NSCharacterSet punctuationCharacterSet]; - NSCharacterSet *nonBaseCharacterSet = [NSCharacterSet nonBaseCharacterSet]; - NSCharacterSet *symbolCharacterSet = [NSCharacterSet symbolCharacterSet]; - - [invalidCharacters formUnionWithCharacterSet:whitespaceCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:newlineCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:illegalCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:controlCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:punctuationCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:nonBaseCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:symbolCharacterSet]; - }); - - NSArray *validComponents = [self componentsSeparatedByCharactersInSet:invalidCharacters]; - - NSString *result = [validComponents componentsJoinedByString:@"_"]; - - return ([result length] == 0 - ? @"_" - : result); -} - -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h index 87dad10..f97097b 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h @@ -6,6 +6,6 @@ FOUNDATION_EXPORT double QuickVersionNumber; //! Project version string for Quick. FOUNDATION_EXPORT const unsigned char QuickVersionString[]; -#import "QuickSpec.h" -#import "QCKDSL.h" -#import "QuickConfiguration.h" +#import +#import +#import diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h index 105a97e..ccf006e 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h @@ -47,4 +47,10 @@ */ - (void)spec; +/** + Returns the currently executing spec. Use in specs that require XCTestCase + methods, e.g. expectationWithDescription. +*/ +@property (class, nonatomic, readonly) QuickSpec *current; + @end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m index ea64934..2d6b1fc 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m @@ -1,12 +1,13 @@ #import "QuickSpec.h" #import "QuickConfiguration.h" -#import "NSString+QCKSelectorName.h" -#import "World.h" -#import -static QuickSpec *currentSpec = nil; +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif -const void * const QCKExampleKey = &QCKExampleKey; +static QuickSpec *currentSpec = nil; @interface QuickSpec () @property (nonatomic, strong) Example *example; @@ -16,39 +17,6 @@ @implementation QuickSpec #pragma mark - XCTestCase Overrides -/** - The runtime sends initialize to each class in a program just before the class, or any class - that inherits from it, is sent its first message from within the program. QuickSpec hooks into - this event to compile the example groups for this spec subclass. - - If an exception occurs when compiling the examples, report it to the user. Chances are they - included an expectation outside of a "it", "describe", or "context" block. - */ -+ (void)initialize { - [QuickConfiguration initialize]; - - World *world = [World sharedWorld]; - [world performWithCurrentExampleGroup:[world rootExampleGroupForSpecClass:self] closure:^{ - QuickSpec *spec = [self new]; - - @try { - [spec spec]; - } - @catch (NSException *exception) { - [NSException raise:NSInternalInconsistencyException - format:@"An exception occurred when building Quick's example groups.\n" - @"Some possible reasons this might happen include:\n\n" - @"- An 'expect(...).to' expectation was evaluated outside of " - @"an 'it', 'context', or 'describe' block\n" - @"- 'sharedExamples' was called twice with the same name\n" - @"- 'itBehavesLike' was called with a name that is not registered as a shared example\n\n" - @"Here's the original exception: '%@', reason: '%@', userInfo: '%@'", - exception.name, exception.reason, exception.userInfo]; - } - [self testInvocations]; - }]; -} - /** Invocations for each test method in the test case. QuickSpec overrides this method to define a new method for each example defined in +[QuickSpec spec]. @@ -56,6 +24,10 @@ + (void)initialize { @return An array of invocations that execute the newly defined example methods. */ + (NSArray *)testInvocations { + // Xcode 13.3 hack, see this issue for more info: https://github.com/Quick/Quick/issues/1123 + // In case of fix in later versions next line can be removed + [[QuickTestObservation sharedInstance] buildAllExamplesIfNeeded]; + NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:[examples count]]; @@ -63,30 +35,63 @@ + (NSArray *)testInvocations { for (Example *example in examples) { SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; - NSInvocation *invocation = [self invocationForInstanceMethodWithSelector:selector - example:example]; + + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + [invocations addObject:invocation]; } return invocations; } -/** - XCTest sets the invocation for the current test case instance using this setter. - QuickSpec hooks into this event to give the test case a reference to the current example. - It will need this reference to correctly report its name to XCTest. - */ -- (void)setInvocation:(NSInvocation *)invocation { - self.example = objc_getAssociatedObject(invocation, QCKExampleKey); - [super setInvocation:invocation]; -} - #pragma mark - Public Interface - (void)spec { } ++ (QuickSpec*) current { + return currentSpec; +} + #pragma mark - Internal Methods +/** + Runs the `spec` method and builds the examples for this class. + + It's safe to call this method multiple times. If the examples for the class have been built, invocation + of this method has no effect. + */ ++ (void)buildExamplesIfNeeded { + [QuickConfiguration class]; + World *world = [World sharedWorld]; + + if ([world isRootExampleGroupInitializedForSpecClass:[self class]]) { + // The examples for this subclass have been already built. Skipping. + return; + } + + ExampleGroup *rootExampleGroup = [world rootExampleGroupForSpecClass:[self class]]; + [world performWithCurrentExampleGroup:rootExampleGroup closure:^{ + QuickSpec *spec = [self new]; + + @try { + [spec spec]; + } + @catch (NSException *exception) { + [NSException raise:NSInternalInconsistencyException + format:@"An exception occurred when building Quick's example groups.\n" + @"Some possible reasons this might happen include:\n\n" + @"- An 'expect(...).to' expectation was evaluated outside of " + @"an 'it', 'context', or 'describe' block\n" + @"- 'sharedExamples' was called twice with the same name\n" + @"- 'itBehavesLike' was called with a name that is not registered as a shared example\n\n" + @"Here's the original exception: '%@', reason: '%@', userInfo: '%@'", + exception.name, exception.reason, exception.userInfo]; + } + }]; +} + /** QuickSpec uses this method to dynamically define a new instance method for the given example. The instance method runs the example, catching any exceptions. @@ -105,21 +110,14 @@ - (void)spec { } */ + (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ + self.example = example; currentSpec = self; [example run]; }); - NSCharacterSet *characterSet = [NSCharacterSet alphanumericCharacterSet]; - NSMutableString *sanitizedFileName = [NSMutableString string]; - for (NSUInteger i = 0; i < example.callsite.file.length; i++) { - unichar ch = [example.callsite.file characterAtIndex:i]; - if ([characterSet characterIsMember:ch]) { - [sanitizedFileName appendFormat:@"%c", ch]; - } - } - const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(id), @encode(id), @encode(SEL)] UTF8String]; - - NSString *originalName = example.name.qck_selectorName; + const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; + + NSString *originalName = [QCKObjCStringUtils c99ExtendedIdentifierFrom:example.name]; NSString *selectorName = originalName; NSUInteger i = 2; @@ -135,36 +133,39 @@ + (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMuta return selector; } -+ (NSInvocation *)invocationForInstanceMethodWithSelector:(SEL)selector - example:(Example *)example { - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - objc_setAssociatedObject(invocation, - QCKExampleKey, - example, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); - return invocation; -} - /** This method is used to record failures, whether they represent example expectations that were not met, or exceptions raised during test setup and teardown. By default, the failure will be reported as an XCTest failure, and the example will be highlighted in Xcode. */ -- (void)recordFailureWithDescription:(NSString *)description - inFile:(NSString *)filePath - atLine:(NSUInteger)lineNumber - expected:(BOOL)expected { +- (void)recordIssue:(XCTIssue *)issue { + if (self != [QuickSpec current]) { + [[QuickSpec current] recordIssue:issue]; + return; + } + if (self.example.isSharedExample) { - filePath = self.example.callsite.file; - lineNumber = self.example.callsite.line; + XCTSourceCodeLocation *location = [[XCTSourceCodeLocation alloc] initWithFilePath:self.example.callsite.file + lineNumber:self.example.callsite.line]; + XCTSourceCodeContext *sourceCodeContext = [[XCTSourceCodeContext alloc] initWithLocation:location]; + XCTIssue *newIssue = [[XCTIssue alloc] initWithType:issue.type + compactDescription:issue.compactDescription + detailedDescription:issue.detailedDescription + sourceCodeContext:sourceCodeContext + associatedError:issue.associatedError + attachments:issue.attachments]; + [super recordIssue:newIssue]; + } else { + [super recordIssue:issue]; } - [currentSpec.testRun recordFailureWithDescription:description - inFile:filePath - atLine:lineNumber - expected:expected]; } @end + +#pragma mark - Test Observation + +__attribute__((constructor)) +static void registerQuickTestObservation(void) { + [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:[QuickTestObservation sharedInstance]]; +} diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/World.h b/Example/Pods/Quick/Sources/QuickObjectiveC/World.h deleted file mode 100644 index e638cf6..0000000 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/World.h +++ /dev/null @@ -1,18 +0,0 @@ -#import - -@class ExampleGroup; -@class ExampleMetadata; - -SWIFT_CLASS("_TtC5Quick5World") -@interface World - -@property (nonatomic) ExampleGroup * __nullable currentExampleGroup; -@property (nonatomic) ExampleMetadata * __nullable currentExampleMetadata; -@property (nonatomic) BOOL isRunningAdditionalSuites; -+ (World * __nonnull)sharedWorld; -- (void)configure:(void (^ __nonnull)(Configuration * __nonnull))closure; -- (void)finalizeConfiguration; -- (ExampleGroup * __nonnull)rootExampleGroupForSpecClass:(Class __nonnull)cls; -- (NSArray * __nonnull)examplesForSpecClass:(Class __nonnull)specClass; -- (void)performWithCurrentExampleGroup:(ExampleGroup * __nonnull)group closure:(void (^ __nonnull)(void))closure; -@end diff --git a/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m index e49939e..021ab75 100644 --- a/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m +++ b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m @@ -1,6 +1,11 @@ #import #import + +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else #import +#endif @interface XCTestSuite (QuickTestSuiteBuilder) @end @@ -34,7 +39,8 @@ + (void)load { FooSpec/testBar */ + (nullable instancetype)qck_hooked_testSuiteForTestCaseWithName:(nonnull NSString *)name { - return [QuickTestSuite selectedTestSuiteForTestCaseWithName:name]; + NSArray *components = [name componentsSeparatedByString:@"/"]; + return [QuickTestSuite selectedTestSuiteForTestCaseWithName:[components firstObject] testName:[components count] > 1 ? [components lastObject] : nil]; } @end diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/Info.plist b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist similarity index 96% rename from ExponentialBackOff/Pods/Target Support Files/AsyncSwift/Info.plist rename to Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist index bdac57c..7f71fff 100644 --- a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/Info.plist +++ b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.0.1 + 2.1.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch +++ b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h index c475681..b2f2057 100644 --- a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h +++ b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig new file mode 100644 index 0000000..cd5cb9b --- /dev/null +++ b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig @@ -0,0 +1,13 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/AsyncSwift +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig new file mode 100644 index 0000000..cd5cb9b --- /dev/null +++ b/Example/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig @@ -0,0 +1,13 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/AsyncSwift +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-Info.plist b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-Info.plist new file mode 100644 index 0000000..2a9158a --- /dev/null +++ b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch +++ b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-umbrella.h b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-umbrella.h index 8383470..7482e4c 100644 --- a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-umbrella.h +++ b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif #import "ExponentialBackOff.h" diff --git a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.debug.xcconfig b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.debug.xcconfig new file mode 100644 index 0000000..2701e08 --- /dev/null +++ b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.debug.xcconfig @@ -0,0 +1,15 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "Async" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.release.xcconfig b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.release.xcconfig new file mode 100644 index 0000000..2701e08 --- /dev/null +++ b/Example/Pods/Target Support Files/ExponentialBackOff/ExponentialBackOff.release.xcconfig @@ -0,0 +1,15 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "Async" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/../.. +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist b/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist new file mode 100644 index 0000000..a451985 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 10.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch +++ b/Example/Pods/Target Support Files/Nimble/Nimble-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h index 773c023..15ed932 100644 --- a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -1,14 +1,22 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif -#import "CwlCatchException.h" -#import "CwlCatchBadInstruction.h" -#import "mach_excServer.h" #import "Nimble.h" #import "DSL.h" #import "NMBExceptionCapture.h" #import "NMBStringify.h" +#import "CwlCatchException.h" +#import "CwlMachBadInstructionHandler.h" +#import "mach_excServer.h" FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig b/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig new file mode 100644 index 0000000..32f7768 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig @@ -0,0 +1,21 @@ +APPLICATION_EXTENSION_API_ONLY = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble +DEFINES_MODULE = YES +ENABLE_BITCODE = NO +ENABLE_TESTING_SEARCH_PATHS = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" +SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig b/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig new file mode 100644 index 0000000..32f7768 --- /dev/null +++ b/Example/Pods/Target Support Files/Nimble/Nimble.release.xcconfig @@ -0,0 +1,21 @@ +APPLICATION_EXTENSION_API_ONLY = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble +DEFINES_MODULE = YES +ENABLE_BITCODE = NO +ENABLE_TESTING_SEARCH_PATHS = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" +SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Info.plist b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-Info.plist similarity index 100% rename from ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Info.plist rename to Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-Info.plist diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh index 145a857..3ab4f89 100755 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-frameworks.sh @@ -1,11 +1,32 @@ #!/bin/sh set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +BCSYMBOLMAP_DIR="BCSymbolMaps" + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -19,19 +40,34 @@ install_framework() local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" + echo "Symlinked..." + source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then + # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied + find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do + echo "Installing $f" + install_bcsymbolmap "$f" "$destination" + rm "$f" + done + rmdir "${source}/${BCSYMBOLMAP_DIR}" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device @@ -45,7 +81,7 @@ install_framework() # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" @@ -53,41 +89,100 @@ install_framework() done fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + warn_missing_arch=${2:-true} + if [ -r "$source" ]; then + # Copy the dSYM into the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local basename + basename="$(basename -s .dSYM "$source")" + binary_name="$(ls "$source/Contents/Resources/DWARF")" + binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" + + # Strip invalid architectures from the dSYM. + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" "$warn_missing_arch" + fi + if [[ $STRIP_BINARY_RETVAL == 0 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + mkdir -p "${DWARF_DSYM_FOLDER_PATH}" + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" + fi fi } +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + warn_missing_arch=${2:-true} + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + if [[ "$warn_missing_arch" == "true" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + fi + STRIP_BINARY_RETVAL=1 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=0 } +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/AsyncSwift/Async.framework" - install_framework "$BUILT_PRODUCTS_DIR/ExponentialBackOff/ExponentialBackOff.framework" + install_framework "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework" + install_framework "${BUILT_PRODUCTS_DIR}/ExponentialBackOff/ExponentialBackOff.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/AsyncSwift/Async.framework" - install_framework "$BUILT_PRODUCTS_DIR/ExponentialBackOff/ExponentialBackOff.framework" + install_framework "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework" + install_framework "${BUILT_PRODUCTS_DIR}/ExponentialBackOff/ExponentialBackOff.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-umbrella.h b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-umbrella.h index f40e5d8..a48e2fd 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.debug.xcconfig b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.debug.xcconfig index ded40b8..01837f0 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.debug.xcconfig @@ -1,11 +1,15 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff/ExponentialBackOff.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff/ExponentialBackOff.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "Async" -framework "ExponentialBackOff" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.release.xcconfig b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.release.xcconfig index ded40b8..01837f0 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Example/Pods-ExponentialBackOff_Example.release.xcconfig @@ -1,11 +1,15 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff/ExponentialBackOff.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff/ExponentialBackOff.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "Async" -framework "ExponentialBackOff" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-Info.plist b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.markdown b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.markdown index 5444c67..f3493c7 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.markdown +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.markdown @@ -1,6 +1,30 @@ # Acknowledgements This application makes use of the following third party libraries: +## AsyncSwift + +The MIT License (MIT) + +Copyright (c) 2014 Tobias Due Munk + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + ## Nimble Apache License @@ -191,7 +215,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.plist b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.plist index 3051e9b..b90e65f 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.plist +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-acknowledgements.plist @@ -12,6 +12,36 @@ Type PSGroupSpecifier + + FooterText + The MIT License (MIT) + +Copyright (c) 2014 Tobias Due Munk + +Permission is hereby granted, free of charge, to any person obtaining a copy of +this software and associated documentation files (the "Software"), to deal in +the Software without restriction, including without limitation the rights to +use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of +the Software, and to permit persons to whom the Software is furnished to do so, +subject to the following conditions: + +The above copyright notice and this permission notice shall be included in all +copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS +FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR +COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER +IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN +CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. + + License + MIT + Title + AsyncSwift + Type + PSGroupSpecifier + FooterText Apache License @@ -202,7 +232,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh index 3e8d2e4..1f27477 100755 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-frameworks.sh @@ -1,11 +1,32 @@ #!/bin/sh set -e +set -u +set -o pipefail + +function on_error { + echo "$(realpath -mq "${0}"):$1: error: Unexpected failure" +} +trap 'on_error $LINENO' ERR + +if [ -z ${FRAMEWORKS_FOLDER_PATH+x} ]; then + # If FRAMEWORKS_FOLDER_PATH is not set, then there's nowhere for us to copy + # frameworks to, so exit 0 (signalling the script phase was successful). + exit 0 +fi echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" +COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +BCSYMBOLMAP_DIR="BCSymbolMaps" + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -19,19 +40,34 @@ install_framework() local destination="${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" if [ -L "${source}" ]; then - echo "Symlinked..." - source="$(readlink "${source}")" + echo "Symlinked..." + source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then + # Locate and install any .bcsymbolmaps if present, and remove them from the .framework before the framework is copied + find "${source}/${BCSYMBOLMAP_DIR}" -name "*.bcsymbolmap"|while read f; do + echo "Installing $f" + install_bcsymbolmap "$f" "$destination" + rm "$f" + done + rmdir "${source}/${BCSYMBOLMAP_DIR}" + fi + + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" binary="${destination}/${basename}.framework/${basename}" + if ! [ -r "$binary" ]; then binary="${destination}/${basename}" + elif [ -L "${binary}" ]; then + echo "Destination binary is symlinked..." + dirname="$(dirname "${binary}")" + binary="${dirname}/$(readlink "${binary}")" fi # Strip invalid architectures so "fat" simulator / device frameworks work on device @@ -45,7 +81,7 @@ install_framework() # Embed linked Swift runtime libraries. No longer necessary as of Xcode 7. if [ "${XCODE_VERSION_MAJOR}" -lt 7 ]; then local swift_runtime_libs - swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u && exit ${PIPESTATUS[0]}) + swift_runtime_libs=$(xcrun otool -LX "$binary" | grep --color=never @rpath/libswift | sed -E s/@rpath\\/\(.+dylib\).*/\\1/g | uniq -u) for lib in $swift_runtime_libs; do echo "rsync -auv \"${SWIFT_STDLIB_PATH}/${lib}\" \"${destination}\"" rsync -auv "${SWIFT_STDLIB_PATH}/${lib}" "${destination}" @@ -53,41 +89,102 @@ install_framework() done fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + warn_missing_arch=${2:-true} + if [ -r "$source" ]; then + # Copy the dSYM into the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" -# Signs a framework with the provided identity -code_sign_if_enabled() { - if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then - # Use the current code_sign_identitiy - echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local basename + basename="$(basename -s .dSYM "$source")" + binary_name="$(ls "$source/Contents/Resources/DWARF")" + binary="${DERIVED_FILES_DIR}/${basename}.dSYM/Contents/Resources/DWARF/${binary_name}" + + # Strip invalid architectures from the dSYM. + if [[ "$(file "$binary")" == *"Mach-O "*"dSYM companion"* ]]; then + strip_invalid_archs "$binary" "$warn_missing_arch" + fi + if [[ $STRIP_BINARY_RETVAL == 0 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --links --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + mkdir -p "${DWARF_DSYM_FOLDER_PATH}" + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.dSYM" + fi fi } +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + warn_missing_arch=${2:-true} + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + if [[ "$warn_missing_arch" == "true" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + fi + STRIP_BINARY_RETVAL=1 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place - lipo -remove "$arch" -output "$binary" "$binary" || exit 1 + lipo -remove "$arch" -output "$binary" "$binary" stripped="$stripped $arch" fi done if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=0 } +# Copies the bcsymbolmap files of a vendored framework +install_bcsymbolmap() { + local bcsymbolmap_path="$1" + local destination="${BUILT_PRODUCTS_DIR}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${bcsymbolmap_path}" "${destination}" +} + +# Signs a framework with the provided identity +code_sign_if_enabled() { + if [ -n "${EXPANDED_CODE_SIGN_IDENTITY:-}" -a "${CODE_SIGNING_REQUIRED:-}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then + # Use the current code_sign_identity + echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS:-} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" + fi +} if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/AsyncSwift/Async.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-umbrella.h b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-umbrella.h index 4caf88b..a56a5f4 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-umbrella.h +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.debug.xcconfig b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.debug.xcconfig index 652dac3..90938d1 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.debug.xcconfig +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.debug.xcconfig @@ -1,11 +1,15 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff/ExponentialBackOff.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff/ExponentialBackOff.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "Async" -framework "ExponentialBackOff" -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.release.xcconfig b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.release.xcconfig index 652dac3..90938d1 100644 --- a/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.release.xcconfig +++ b/Example/Pods/Target Support Files/Pods-ExponentialBackOff_Tests/Pods-ExponentialBackOff_Tests.release.xcconfig @@ -1,11 +1,15 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/ExponentialBackOff/ExponentialBackOff.framework/Headers" -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/ExponentialBackOff/ExponentialBackOff.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "Async" -framework "ExponentialBackOff" -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Quick/Quick-Info.plist b/Example/Pods/Target Support Files/Quick/Quick-Info.plist new file mode 100644 index 0000000..8d87a1a --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 5.0.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch b/Example/Pods/Target Support Files/Quick/Quick-prefix.pch index aa992a4..beb2a24 100644 --- a/Example/Pods/Target Support Files/Quick/Quick-prefix.pch +++ b/Example/Pods/Target Support Files/Quick/Quick-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h index c0a657c..1de6bf3 100644 --- a/Example/Pods/Target Support Files/Quick/Quick-umbrella.h +++ b/Example/Pods/Target Support Files/Quick/Quick-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif #import "QuickConfiguration.h" diff --git a/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig b/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig new file mode 100644 index 0000000..ddea45d --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick.debug.xcconfig @@ -0,0 +1,21 @@ +APPLICATION_EXTENSION_API_ONLY = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick +DEFINES_MODULE = YES +ENABLE_BITCODE = NO +ENABLE_TESTING_SEARCH_PATHS = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" +SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig b/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig new file mode 100644 index 0000000..ddea45d --- /dev/null +++ b/Example/Pods/Target Support Files/Quick/Quick.release.xcconfig @@ -0,0 +1,21 @@ +APPLICATION_EXTENSION_API_ONLY = YES +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick +DEFINES_MODULE = YES +ENABLE_BITCODE = NO +ENABLE_TESTING_SEARCH_PATHS = YES +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" +SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index fd04ded..8be76e0 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -9,7 +9,7 @@ class TableOfContentsSpec: QuickSpec { var exponentialBackOff: ExponentialBackOffInstance! - var timeOut: TimeInterval! + var timeOut: DispatchTimeInterval! override func spec() { beforeEach { @@ -17,8 +17,9 @@ class TableOfContentsSpec: QuickSpec { builder.maxElapsedTimeMillis = 1500 builder.maxIntervalMillis = 500 self.exponentialBackOff = ExponentialBackOffInstance(builder: builder) - - self.timeOut = (TimeInterval(builder.maxIntervalMillis) + TimeInterval(builder.maxIntervalMillis)) * 2 + let timeInterval = (TimeInterval(builder.maxIntervalMillis) + TimeInterval(builder.maxIntervalMillis)) * 2 + let roundedTimeInterval = Int(timeInterval.rounded()) + self.timeOut = DispatchTimeInterval.milliseconds(roundedTimeInterval) } describe("Testing the exponential backoff algorithm") { diff --git a/ExponentialBackOff.podspec b/ExponentialBackOff.podspec index 2f196e3..4a583d6 100644 --- a/ExponentialBackOff.podspec +++ b/ExponentialBackOff.podspec @@ -8,7 +8,7 @@ Pod::Spec.new do |s| s.name = "ExponentialBackOff" - s.version = "1.1.1" + s.version = "1.2.0" s.summary = "A framework which implements the ExponentialBackOff algorithm which is usefull for Networking." # This description is used to generate tags and improve search results. @@ -33,9 +33,9 @@ You also have the option to implement your own algorithm without worrying about # s.ios.platform = :ios, '8.0' # s.osx.platform = :osx, '10.10' - s.osx.deployment_target = "10.10" - s.ios.deployment_target = "8.0" - s.tvos.deployment_target = "9.0" + s.osx.deployment_target = "10.15" + s.ios.deployment_target = "12.0" + s.tvos.deployment_target = "12.0" # s.watchos.deployment_target = "2.0" s.requires_arc = true @@ -47,5 +47,6 @@ You also have the option to implement your own algorithm without worrying about # s.public_header_files = 'Pod/Classes/**/*.h' # s.frameworks = 'UIKit', 'MapKit' # s.dependency 'AFNetworking', '~> 2.3' - s.dependency 'AsyncSwift', '~> 2.0' + s.dependency 'AsyncSwift' + s.swift_version = '5.0' end diff --git a/ExponentialBackOff/ExponentialBackOff.xcodeproj/project.pbxproj b/ExponentialBackOff/ExponentialBackOff.xcodeproj/project.pbxproj index bd6512f..a2d33c7 100644 --- a/ExponentialBackOff/ExponentialBackOff.xcodeproj/project.pbxproj +++ b/ExponentialBackOff/ExponentialBackOff.xcodeproj/project.pbxproj @@ -7,7 +7,6 @@ objects = { /* Begin PBXBuildFile section */ - 0E6BF1731E33C5390096F26F /* Info.plist in Resources */ = {isa = PBXBuildFile; fileRef = 0E6BF1721E33C5390096F26F /* Info.plist */; }; 0EF4AEC01C8A59550021C8DC /* ExponentialBackOff.h in Headers */ = {isa = PBXBuildFile; fileRef = 0EF4AEBF1C8A59550021C8DC /* ExponentialBackOff.h */; settings = {ATTRIBUTES = (Public, ); }; }; 0EF4AECC1C8A59EA0021C8DC /* BackOff.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF4AEC71C8A59EA0021C8DC /* BackOff.swift */; }; 0EF4AECD1C8A59EA0021C8DC /* BackOffAlgorithm.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF4AEC81C8A59EA0021C8DC /* BackOffAlgorithm.swift */; }; @@ -16,7 +15,7 @@ 0EF4AED01C8A59EA0021C8DC /* ExponentialBackOffInstance.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF4AECB1C8A59EA0021C8DC /* ExponentialBackOffInstance.swift */; }; 0EF4AED21C8A5FF60021C8DC /* Random.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF4AED11C8A5FF60021C8DC /* Random.swift */; }; 0EF4AED41C8A61540021C8DC /* Tools.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0EF4AED31C8A61540021C8DC /* Tools.swift */; }; - 7E90E8BF4D9CFFA7EF554759 /* Pods_ExponentialBackOff.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7D40BA1F9B44BA82C4241BED /* Pods_ExponentialBackOff.framework */; }; + D96A61E95C5B96E4D67C0709 /* Pods_ExponentialBackOff.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 0EF6081D36F16623970DFBB6 /* Pods_ExponentialBackOff.framework */; }; /* End PBXBuildFile section */ /* Begin PBXFileReference section */ @@ -30,9 +29,9 @@ 0EF4AECB1C8A59EA0021C8DC /* ExponentialBackOffInstance.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExponentialBackOffInstance.swift; sourceTree = ""; }; 0EF4AED11C8A5FF60021C8DC /* Random.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Random.swift; sourceTree = ""; }; 0EF4AED31C8A61540021C8DC /* Tools.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Tools.swift; sourceTree = ""; }; - 3B00FF2EF4860DE4F6CB6D99 /* Pods-ExponentialBackOff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponentialBackOff.debug.xcconfig"; path = "Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig"; sourceTree = ""; }; - 7D40BA1F9B44BA82C4241BED /* Pods_ExponentialBackOff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponentialBackOff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 8B761C30BA1A997C4F3B00FF /* Pods-ExponentialBackOff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponentialBackOff.release.xcconfig"; path = "Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig"; sourceTree = ""; }; + 0EF6081D36F16623970DFBB6 /* Pods_ExponentialBackOff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponentialBackOff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 41B8EACB28C69AF8BBCB5805 /* Pods-ExponentialBackOff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponentialBackOff.debug.xcconfig"; path = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig"; sourceTree = ""; }; + 9ADC4C9BD5081F6856B79DC4 /* Pods-ExponentialBackOff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-ExponentialBackOff.release.xcconfig"; path = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -40,20 +39,29 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 7E90E8BF4D9CFFA7EF554759 /* Pods_ExponentialBackOff.framework in Frameworks */, + D96A61E95C5B96E4D67C0709 /* Pods_ExponentialBackOff.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 0ABCE0898FE43276A3079DA1 /* Pods */ = { + isa = PBXGroup; + children = ( + 41B8EACB28C69AF8BBCB5805 /* Pods-ExponentialBackOff.debug.xcconfig */, + 9ADC4C9BD5081F6856B79DC4 /* Pods-ExponentialBackOff.release.xcconfig */, + ); + path = Pods; + sourceTree = ""; + }; 0EF4AEB21C8A59550021C8DC = { isa = PBXGroup; children = ( 0EF4AEBE1C8A59550021C8DC /* ExponentialBackOff */, 0EF4AEBD1C8A59550021C8DC /* Products */, - DA948AE7F6A20BE250805D47 /* Pods */, - DDC857AA745ACF64294FD2BB /* Frameworks */, + 0ABCE0898FE43276A3079DA1 /* Pods */, + 58B8B38B8E55E240E35E4461 /* Frameworks */, ); sourceTree = ""; }; @@ -81,19 +89,10 @@ path = ExponentialBackOff; sourceTree = ""; }; - DA948AE7F6A20BE250805D47 /* Pods */ = { + 58B8B38B8E55E240E35E4461 /* Frameworks */ = { isa = PBXGroup; children = ( - 3B00FF2EF4860DE4F6CB6D99 /* Pods-ExponentialBackOff.debug.xcconfig */, - 8B761C30BA1A997C4F3B00FF /* Pods-ExponentialBackOff.release.xcconfig */, - ); - name = Pods; - sourceTree = ""; - }; - DDC857AA745ACF64294FD2BB /* Frameworks */ = { - isa = PBXGroup; - children = ( - 7D40BA1F9B44BA82C4241BED /* Pods_ExponentialBackOff.framework */, + 0EF6081D36F16623970DFBB6 /* Pods_ExponentialBackOff.framework */, ); name = Frameworks; sourceTree = ""; @@ -116,12 +115,11 @@ isa = PBXNativeTarget; buildConfigurationList = 0EF4AEC41C8A59550021C8DC /* Build configuration list for PBXNativeTarget "ExponentialBackOff" */; buildPhases = ( - C9902437E60BA2BC6ACE0E14 /* [CP] Check Pods Manifest.lock */, + 54AB10BA4F898CCBA4D3FC8F /* [CP] Check Pods Manifest.lock */, 0EF4AEB71C8A59550021C8DC /* Sources */, 0EF4AEB81C8A59550021C8DC /* Frameworks */, 0EF4AEB91C8A59550021C8DC /* Headers */, 0EF4AEBA1C8A59550021C8DC /* Resources */, - C205A8A84E3E28FCAE362C21 /* [CP] Copy Pods Resources */, ); buildRules = ( ); @@ -138,7 +136,7 @@ 0EF4AEB31C8A59550021C8DC /* Project object */ = { isa = PBXProject; attributes = { - LastUpgradeCheck = 0720; + LastUpgradeCheck = 1400; ORGANIZATIONNAME = "KW Technologies"; TargetAttributes = { 0EF4AEBB1C8A59550021C8DC = { @@ -152,6 +150,7 @@ developmentRegion = English; hasScannedForEncodings = 0; knownRegions = ( + English, en, ); mainGroup = 0EF4AEB21C8A59550021C8DC; @@ -169,41 +168,32 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0E6BF1731E33C5390096F26F /* Info.plist in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - C205A8A84E3E28FCAE362C21 /* [CP] Copy Pods Resources */ = { + 54AB10BA4F898CCBA4D3FC8F /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( ); - inputPaths = ( - ); - name = "[CP] Copy Pods Resources"; - outputPaths = ( - ); - runOnlyForDeploymentPostprocessing = 0; - shellPath = /bin/sh; - shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-resources.sh\"\n"; - showEnvVarsInLog = 0; - }; - C9902437E60BA2BC6ACE0E14 /* [CP] Check Pods Manifest.lock */ = { - isa = PBXShellScriptBuildPhase; - buildActionMask = 2147483647; - files = ( + inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; + outputFileListPaths = ( + ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-ExponentialBackOff-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; /* End PBXShellScriptBuildPhase section */ @@ -230,17 +220,29 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -263,12 +265,13 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = YES; ONLY_ACTIVE_ARCH = YES; PRODUCT_NAME = ExponentialBackOff; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -279,17 +282,29 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; @@ -306,10 +321,12 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = ExponentialBackOff; SDKROOT = iphoneos; + SWIFT_COMPILATION_MODE = wholemodule; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -319,7 +336,7 @@ }; 0EF4AEC51C8A59550021C8DC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3B00FF2EF4860DE4F6CB6D99 /* Pods-ExponentialBackOff.debug.xcconfig */; + baseConfigurationReference = 41B8EACB28C69AF8BBCB5805 /* Pods-ExponentialBackOff.debug.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; @@ -328,18 +345,19 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ExponentialBackOff/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.kwstudios.ExponentialBackOff; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Debug; }; 0EF4AEC61C8A59550021C8DC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8B761C30BA1A997C4F3B00FF /* Pods-ExponentialBackOff.release.xcconfig */; + baseConfigurationReference = 9ADC4C9BD5081F6856B79DC4 /* Pods-ExponentialBackOff.release.xcconfig */; buildSettings = { CLANG_ENABLE_MODULES = YES; DEFINES_MODULE = YES; @@ -348,11 +366,12 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = ExponentialBackOff/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = org.kwstudios.ExponentialBackOff; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_VERSION = 5.0; }; name = Release; }; diff --git a/ExponentialBackOff/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist b/ExponentialBackOff/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist new file mode 100644 index 0000000..18d9810 --- /dev/null +++ b/ExponentialBackOff/ExponentialBackOff.xcworkspace/xcshareddata/IDEWorkspaceChecks.plist @@ -0,0 +1,8 @@ + + + + + IDEDidComputeMac32BitWarning + + + diff --git a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.h b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.h index 6ef1d37..c1b15f1 100644 --- a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.h +++ b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.h @@ -6,7 +6,7 @@ // Copyright © 2016 KW Technologies. All rights reserved. // -//#import +#import //! Project version number for ExponentialBackOff. FOUNDATION_EXPORT double ExponentialBackOffVersionNumber; diff --git a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.swift b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.swift index e594705..4c16ca0 100644 --- a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.swift +++ b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOff.swift @@ -11,7 +11,7 @@ import Async public class ExponentialBackOff { - open static let sharedInstance = ExponentialBackOff() + public static let sharedInstance = ExponentialBackOff() fileprivate init() { } diff --git a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOffInstance.swift b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOffInstance.swift index 44f8250..529daf8 100644 --- a/ExponentialBackOff/ExponentialBackOff/ExponentialBackOffInstance.swift +++ b/ExponentialBackOff/ExponentialBackOff/ExponentialBackOffInstance.swift @@ -16,27 +16,27 @@ open class ExponentialBackOffInstance: BackOffAlgorithm { /** The initial interval value in milliseconds. */ - open let initialIntervalMillis: Int + public let initialIntervalMillis: Int /** The maximum elapsed time after which the BackOff stops executing in milliseconds. */ - open let maxElapsedTimeMillis: Int + public let maxElapsedTimeMillis: Int /** The maximum back off time in milliseconds. */ - open let maxIntervalMillis: Int + public let maxIntervalMillis: Int /** The multiplier value. */ - open let multiplier: Double + public let multiplier: Double /** The randomization factor. */ - open let randomizationFactor: Double + public let randomizationFactor: Double /** The number of attempts to run the BackOffAlgorithm successfully diff --git a/ExponentialBackOff/Podfile b/ExponentialBackOff/Podfile index 825a4fb..4bcd310 100644 --- a/ExponentialBackOff/Podfile +++ b/ExponentialBackOff/Podfile @@ -1,9 +1,9 @@ # Uncomment this line to define a global platform for your project -platform :ios, '8.0' +platform :ios, '12.0' # Uncomment this line if you're using Swift use_frameworks! target 'ExponentialBackOff' do - pod 'AsyncSwift', '~> 2.0' + pod 'AsyncSwift', :git => 'https://github.com/duemunk/Async.git' end diff --git a/ExponentialBackOff/Podfile.lock b/ExponentialBackOff/Podfile.lock index 22a859d..e928217 100644 --- a/ExponentialBackOff/Podfile.lock +++ b/ExponentialBackOff/Podfile.lock @@ -1,12 +1,21 @@ PODS: - - AsyncSwift (2.0.1) + - AsyncSwift (2.1.0) DEPENDENCIES: - - AsyncSwift (~> 2.0) + - AsyncSwift (from `https://github.com/duemunk/Async.git`) + +EXTERNAL SOURCES: + AsyncSwift: + :git: https://github.com/duemunk/Async.git + +CHECKOUT OPTIONS: + AsyncSwift: + :commit: 5d488316afdcecd4fb25f8ae04f21f8f4c54ca02 + :git: https://github.com/duemunk/Async.git SPEC CHECKSUMS: - AsyncSwift: 632138e42ead868b53c745fcde9bf733ce1527ad + AsyncSwift: 5fcad486b2fab40dc37e9b0418903375a63a5d3c -PODFILE CHECKSUM: 41cb9110fa5cb464348e5e2724aa37b811dcec2b +PODFILE CHECKSUM: 89871751ee4a80a465b945d84a473f3a735e7819 -COCOAPODS: 1.1.1 +COCOAPODS: 1.11.3 diff --git a/ExponentialBackOff/Pods/AsyncSwift/README.md b/ExponentialBackOff/Pods/AsyncSwift/README.md index cda074a..9148e5d 100644 --- a/ExponentialBackOff/Pods/AsyncSwift/README.md +++ b/ExponentialBackOff/Pods/AsyncSwift/README.md @@ -1,5 +1,5 @@ # Async -[![](http://img.shields.io/badge/OS%20X-10.10%2B-blue.svg)]() [![](http://img.shields.io/badge/iOS-8.0%2B-blue.svg)]() [![](http://img.shields.io/badge/tvOS-9.0%2B-blue.svg)]() [![](http://img.shields.io/badge/watchOS-2.0%2B-blue.svg)]() [![](http://img.shields.io/badge/Swift-3.0-blue.svg)]() [![](https://travis-ci.org/duemunk/Async.svg)](https://travis-ci.org/duemunk/Async) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg)](https://github.com/CocoaPods/CocoaPods) [![](http://img.shields.io/badge/operator_overload-nope-green.svg)](https://gist.github.com/duemunk/61e45932dbb1a2ca0954) +[![](http://img.shields.io/badge/OS%20X-10.10%2B-blue.svg)]() [![](http://img.shields.io/badge/iOS-8.0%2B-blue.svg)]() [![](http://img.shields.io/badge/tvOS-9.0%2B-blue.svg)]() [![](http://img.shields.io/badge/watchOS-2.0%2B-blue.svg)]() [![](http://img.shields.io/badge/Swift-5.1-blue.svg)]() [![](https://travis-ci.org/duemunk/Async.svg)](https://travis-ci.org/duemunk/Async) [![Carthage compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg)](https://github.com/Carthage/Carthage) [![CocoaPods compatible](https://img.shields.io/badge/CocoaPods-compatible-4BC51D.svg)](https://github.com/CocoaPods/CocoaPods) [![](http://img.shields.io/badge/operator_overload-nope-green.svg)](https://gist.github.com/duemunk/61e45932dbb1a2ca0954) @@ -8,9 +8,9 @@ Now more than syntactic sugar for asynchronous dispatches in Grand Central Dispa **Async** sugar looks like this: ```swift Async.userInitiated { - return 10 + 10 }.background { - return "Score: \($0)" + "Score: \($0)" }.main { label.text = $0 } @@ -43,6 +43,15 @@ print("Both asynchronous blocks are complete") ``` ### Install +#### Swift Package Manager +##### Add To Your Project In Xcode 11: +File > Swift Packages > Add Package Dependency +##### Add As A Dependency In Package.swift: +```swift +dependencies: [ + .package(url: "https://github.com/duemunk/Async", from: "2.1.0"), +], +``` #### CocoaPods ```ruby use_frameworks! diff --git a/ExponentialBackOff/Pods/AsyncSwift/Sources/Async.swift b/ExponentialBackOff/Pods/AsyncSwift/Sources/Async/Async.swift similarity index 88% rename from ExponentialBackOff/Pods/AsyncSwift/Sources/Async.swift rename to ExponentialBackOff/Pods/AsyncSwift/Sources/Async/Async.swift index 65c0a5d..fdf4f16 100644 --- a/ExponentialBackOff/Pods/AsyncSwift/Sources/Async.swift +++ b/ExponentialBackOff/Pods/AsyncSwift/Sources/Async/Async.swift @@ -133,9 +133,8 @@ public struct AsyncBlock { private let input: Reference? private let output_: Reference - public var output: Out? { - return output_.value - } + + public var output: Out? { output_.value } /** Private init that takes a `@convention(block) () -> Swift.Void` @@ -161,8 +160,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func main(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return AsyncBlock.async(after: seconds, block: block, queue: .main) + public static func main(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + AsyncBlock.async(after: seconds, block: block, queue: .main) } /** @@ -177,8 +176,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func userInteractive(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return AsyncBlock.async(after: seconds, block: block, queue: .userInteractive) + public static func userInteractive(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + AsyncBlock.async(after: seconds, block: block, queue: .userInteractive) } /** @@ -193,8 +192,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func userInitiated(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .userInitiated) + public static func userInitiated(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .userInitiated) } /** @@ -209,8 +208,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func utility(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .utility) + public static func utility(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .utility) } /** @@ -225,8 +224,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func background(after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .background) + public static func background(after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .background) } /** @@ -241,8 +240,8 @@ public struct AsyncBlock { - SeeAlso: Has parity with non-static method */ @discardableResult - public static func custom(queue: DispatchQueue, after seconds: Double? = nil, _ block: @escaping (Void) -> O) -> AsyncBlock { - return Async.async(after: seconds, block: block, queue: .custom(queue: queue)) + public static func custom(queue: DispatchQueue, after seconds: Double? = nil, _ block: @escaping () -> O) -> AsyncBlock { + Async.async(after: seconds, block: block, queue: .custom(queue: queue)) } @@ -258,7 +257,7 @@ public struct AsyncBlock { - returns: An `Async` struct which encapsulates the `@convention(block) () -> Swift.Void` */ - private static func async(after seconds: Double? = nil, block: @escaping (Void) -> O, queue: GCD) -> AsyncBlock { + private static func async(after seconds: Double? = nil, block: @escaping () -> O, queue: GCD) -> AsyncBlock { let reference = Reference() let block = DispatchWorkItem(block: { reference.value = block() @@ -291,7 +290,7 @@ public struct AsyncBlock { */ @discardableResult public func main(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .main) + chain(after: seconds, block: chainingBlock, queue: .main) } /** @@ -307,7 +306,7 @@ public struct AsyncBlock { */ @discardableResult public func userInteractive(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .userInteractive) + chain(after: seconds, block: chainingBlock, queue: .userInteractive) } /** @@ -323,7 +322,7 @@ public struct AsyncBlock { */ @discardableResult public func userInitiated(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .userInitiated) + chain(after: seconds, block: chainingBlock, queue: .userInitiated) } /** @@ -339,7 +338,7 @@ public struct AsyncBlock { */ @discardableResult public func utility(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .utility) + chain(after: seconds, block: chainingBlock, queue: .utility) } /** @@ -355,7 +354,7 @@ public struct AsyncBlock { */ @discardableResult public func background(after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .background) + chain(after: seconds, block: chainingBlock, queue: .background) } /** @@ -371,7 +370,7 @@ public struct AsyncBlock { */ @discardableResult public func custom(queue: DispatchQueue, after seconds: Double? = nil, _ chainingBlock: @escaping (Out) -> O) -> AsyncBlock { - return chain(after: seconds, block: chainingBlock, queue: .custom(queue: queue)) + chain(after: seconds, block: chainingBlock, queue: .custom(queue: queue)) } // MARK: - Instance methods @@ -593,15 +592,12 @@ public struct AsyncGroup { /** Private property to internally on to a `dispatch_group_t` */ - private var group: DispatchGroup + private let group = DispatchGroup() /** Private init that takes a `dispatch_group_t` */ - public init() { - group = DispatchGroup() - } - + public init() {} /** Convenience for `dispatch_group_async()` @@ -717,6 +713,19 @@ public struct AsyncGroup { } } +/** +Each QoSClassDescription's case contains a description for qos_class_t or DispatchQoS.QoSClass cases + */ +private enum QoSClassDescription: String { + case main = "Main" + case userInteractive = "User Interactive" + case userInitiated = "User Initiated" + case `default` = "Default" + case utility = "Utility" + case background = "Background" + case unspecified = "Unspecified" + case unknown = "Unknown" +} // MARK: - Extension for `qos_class_t` @@ -729,18 +738,18 @@ public extension qos_class_t { Description of the `qos_class_t`. E.g. "Main", "User Interactive", etc. for the given Quality of Service class. */ var description: String { - get { - switch self { - case qos_class_main(): return "Main" - case DispatchQoS.QoSClass.userInteractive.rawValue: return "User Interactive" - case DispatchQoS.QoSClass.userInitiated.rawValue: return "User Initiated" - case DispatchQoS.QoSClass.default.rawValue: return "Default" - case DispatchQoS.QoSClass.utility.rawValue: return "Utility" - case DispatchQoS.QoSClass.background.rawValue: return "Background" - case DispatchQoS.QoSClass.unspecified.rawValue: return "Unspecified" - default: return "Unknown" - } + let result: QoSClassDescription + switch self { + case qos_class_main(): result = .main + case DispatchQoS.QoSClass.userInteractive.rawValue: result = .userInteractive + case DispatchQoS.QoSClass.userInitiated.rawValue: result = .userInitiated + case DispatchQoS.QoSClass.default.rawValue: result = .default + case DispatchQoS.QoSClass.utility.rawValue: result = .utility + case DispatchQoS.QoSClass.background.rawValue: result = .background + case DispatchQoS.QoSClass.unspecified.rawValue: result = .unspecified + default: result = .unknown } + return result.rawValue } } @@ -753,16 +762,17 @@ public extension qos_class_t { public extension DispatchQoS.QoSClass { var description: String { - get { - switch self { - case DispatchQoS.QoSClass(rawValue: qos_class_main())!: return "Main" - case .userInteractive: return "User Interactive" - case .userInitiated: return "User Initiated" - case .default: return "Default" - case .utility: return "Utility" - case .background: return "Background" - case .unspecified: return "Unspecified" - } + let result: QoSClassDescription + switch self { + case DispatchQoS.QoSClass(rawValue: qos_class_main())!: result = .main + case .userInteractive: result = .userInteractive + case .userInitiated: result = .userInitiated + case .default: result = .default + case .utility: result = .utility + case .background: result = .background + case .unspecified: result = .unspecified + @unknown default: result = .unknown } + return result.rawValue } } diff --git a/ExponentialBackOff/Pods/Local Podspecs/AsyncSwift.podspec.json b/ExponentialBackOff/Pods/Local Podspecs/AsyncSwift.podspec.json new file mode 100644 index 0000000..ddeba76 --- /dev/null +++ b/ExponentialBackOff/Pods/Local Podspecs/AsyncSwift.podspec.json @@ -0,0 +1,32 @@ +{ + "name": "AsyncSwift", + "version": "2.1.0", + "summary": "Syntactic sugar in Swift for asynchronous dispatches in Grand Central Dispatch", + "homepage": "https://github.com/duemunk/Async", + "license": { + "type": "MIT" + }, + "authors": { + "Tobias Due Munk": "tobias@developmunk.dk" + }, + "platforms": { + "osx": "10.10", + "ios": "8.0", + "tvos": "9.0", + "watchos": "3.0" + }, + "source": { + "git": "https://github.com/duemunk/Async.git", + "tag": "2.0.5" + }, + "source_files": "Sources/**/*.swift", + "requires_arc": true, + "module_name": "Async", + "swift_versions": [ + "4.0", + "4.2", + "5.0", + "5.1" + ], + "swift_version": "5.1" +} diff --git a/ExponentialBackOff/Pods/Manifest.lock b/ExponentialBackOff/Pods/Manifest.lock index 22a859d..e928217 100644 --- a/ExponentialBackOff/Pods/Manifest.lock +++ b/ExponentialBackOff/Pods/Manifest.lock @@ -1,12 +1,21 @@ PODS: - - AsyncSwift (2.0.1) + - AsyncSwift (2.1.0) DEPENDENCIES: - - AsyncSwift (~> 2.0) + - AsyncSwift (from `https://github.com/duemunk/Async.git`) + +EXTERNAL SOURCES: + AsyncSwift: + :git: https://github.com/duemunk/Async.git + +CHECKOUT OPTIONS: + AsyncSwift: + :commit: 5d488316afdcecd4fb25f8ae04f21f8f4c54ca02 + :git: https://github.com/duemunk/Async.git SPEC CHECKSUMS: - AsyncSwift: 632138e42ead868b53c745fcde9bf733ce1527ad + AsyncSwift: 5fcad486b2fab40dc37e9b0418903375a63a5d3c -PODFILE CHECKSUM: 41cb9110fa5cb464348e5e2724aa37b811dcec2b +PODFILE CHECKSUM: 89871751ee4a80a465b945d84a473f3a735e7819 -COCOAPODS: 1.1.1 +COCOAPODS: 1.11.3 diff --git a/ExponentialBackOff/Pods/Pods.xcodeproj/project.pbxproj b/ExponentialBackOff/Pods/Pods.xcodeproj/project.pbxproj index fa71b84..d78c0b0 100644 --- a/ExponentialBackOff/Pods/Pods.xcodeproj/project.pbxproj +++ b/ExponentialBackOff/Pods/Pods.xcodeproj/project.pbxproj @@ -7,489 +7,545 @@ objects = { /* Begin PBXBuildFile section */ - 184937148DAB00FCB0E8BCBD3223BB13 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - 1B44F3CDBC3B9C4D5337FB6E1BA4CD37 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */; }; - 878A7EB83560F9B2703D36D186F6EC32 /* AsyncSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3AD3E2D77F776661A24B2D8ECC583573 /* AsyncSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8F899DAC4387338E4ADE9423D869CA5C /* AsyncSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 44E529034E66A6825989E48912DE7839 /* AsyncSwift-dummy.m */; }; - D659CC21153FBB015EEC85DB6AC6BCAF /* Pods-ExponentialBackOff-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1972A79260DD736E3A4D517090D2A20A /* Pods-ExponentialBackOff-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E26E4C1401EFE86B0DEB86CB558C4728 /* Pods-ExponentialBackOff-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 82740B73113E80AF836CE72166882847 /* Pods-ExponentialBackOff-dummy.m */; }; - FD4742F9C1D1C5E526745B6E8A5D0ED2 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5F50AF5D6221977EC24043E8AF3FA268 /* Async.swift */; }; + 2D1DEF4509FCE14E4BAE545C935E5DAF /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + 2FA2F8885BD01627142AC2DBA9D8E894 /* AsyncSwift-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 537306D0E13C82281FB2485FFDDAFB72 /* AsyncSwift-dummy.m */; }; + 38D43865105801806AB59B26F42602E7 /* AsyncSwift-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DB1A565C292826DEC0BE970678F3A91C /* AsyncSwift-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6C559866EAACC1F1C57EF5E62B6EA71E /* Pods-ExponentialBackOff-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3F44384ED941E3CF8CDF3C85F7B55C63 /* Pods-ExponentialBackOff-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 723FE76A3C21BB17463C76C2E3C6CE0B /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B62EE7D160AD6FB305DB1EB9141B407 /* Async.swift */; }; + 983DFB51B0C7F5F45101B582CFA753FE /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */; }; + CB8DAD0FB912D9C7409E78776847FF71 /* Pods-ExponentialBackOff-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = B279B900C135F61A31AA62E96023E228 /* Pods-ExponentialBackOff-dummy.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 577EA425FC5C25DD0F595DF33A2AD2A0 /* PBXContainerItemProxy */ = { + 635CA511263368F3FC1BDE28DA56E3F9 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; - containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; - remoteGlobalIDString = 7F45F2F21482C3777494ACE42307212D; + remoteGlobalIDString = 975690F47D860B117FB4B04B42AB69C9; remoteInfo = AsyncSwift; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 0149990490A6E0E744C1144D48E8CCAD /* Pods-ExponentialBackOff-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff-acknowledgements.markdown"; sourceTree = ""; }; - 0C9507655DC21F4814EC9926B972A682 /* AsyncSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-prefix.pch"; sourceTree = ""; }; - 1972A79260DD736E3A4D517090D2A20A /* Pods-ExponentialBackOff-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff-umbrella.h"; sourceTree = ""; }; - 3AD3E2D77F776661A24B2D8ECC583573 /* AsyncSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-umbrella.h"; sourceTree = ""; }; - 44E529034E66A6825989E48912DE7839 /* AsyncSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AsyncSwift-dummy.m"; sourceTree = ""; }; - 45E106F70858EFA692301458FCA392FC /* Pods_ExponentialBackOff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_ExponentialBackOff.framework; path = "Pods-ExponentialBackOff.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5133B317883BC6580C8725CBBADEC512 /* Pods-ExponentialBackOff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff.release.xcconfig"; sourceTree = ""; }; - 5D028BCB66ACC8DCAF439B3638657ABB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5F0762F7AFAFC4A3E5658ED585F462A5 /* Pods-ExponentialBackOff-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-ExponentialBackOff-resources.sh"; sourceTree = ""; }; - 5F50AF5D6221977EC24043E8AF3FA268 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Async.swift; sourceTree = ""; }; - 79C396C3ECAE8B734A9C8C4FDA336AC7 /* Async.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Async.framework; path = AsyncSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 817EFF97470CAF48CCB4AB604A2233FF /* Pods-ExponentialBackOff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff.debug.xcconfig"; sourceTree = ""; }; - 82740B73113E80AF836CE72166882847 /* Pods-ExponentialBackOff-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff-dummy.m"; sourceTree = ""; }; - 8C0FE576396BE9662726EE302865FDAF /* Pods-ExponentialBackOff-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff-acknowledgements.plist"; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - B1EAFD099B7217A951880BFF80699C4C /* AsyncSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = AsyncSwift.modulemap; sourceTree = ""; }; - B95AEC042E252E856E6D24B1FD60C11F /* Pods-ExponentialBackOff.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-ExponentialBackOff.modulemap"; sourceTree = ""; }; - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - D85F570E808806BE938016930B7173F0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - E27DFF6D238AE04EB06C76D963DCD7AB /* AsyncSwift.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.xcconfig; sourceTree = ""; }; + 18EF7D1A019F68960C4AE0020A08AE4E /* Pods-ExponentialBackOff.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-ExponentialBackOff.modulemap"; sourceTree = ""; }; + 21787BC75955ECB906A7E31BCAA02528 /* Pods-ExponentialBackOff-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff-acknowledgements.plist"; sourceTree = ""; }; + 36711643C22F1FE3A088103282F76BE3 /* Pods-ExponentialBackOff-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-ExponentialBackOff-acknowledgements.markdown"; sourceTree = ""; }; + 36CAFE54D33DEA0434BA039FF69F4392 /* AsyncSwift.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.release.xcconfig; sourceTree = ""; }; + 3F44384ED941E3CF8CDF3C85F7B55C63 /* Pods-ExponentialBackOff-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-ExponentialBackOff-umbrella.h"; sourceTree = ""; }; + 537306D0E13C82281FB2485FFDDAFB72 /* AsyncSwift-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "AsyncSwift-dummy.m"; sourceTree = ""; }; + 6FB9B1835D146922EFFC754A655EDDCC /* Pods-ExponentialBackOff.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff.release.xcconfig"; sourceTree = ""; }; + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 8E27337474BA0B6439DEE2F0B30B6430 /* Pods_ExponentialBackOff.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_ExponentialBackOff.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 95EB6130AE18DB036A261444E594E79E /* AsyncSwift.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = AsyncSwift.modulemap; sourceTree = ""; }; + 9B62EE7D160AD6FB305DB1EB9141B407 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Async/Async.swift; sourceTree = ""; }; + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9F9C038254BA17FBC15C511E8787082A /* AsyncSwift-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "AsyncSwift-Info.plist"; sourceTree = ""; }; + B279B900C135F61A31AA62E96023E228 /* Pods-ExponentialBackOff-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-ExponentialBackOff-dummy.m"; sourceTree = ""; }; + B2C63EC01EBC8000EB7354BB3ED1BBDC /* Pods-ExponentialBackOff.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-ExponentialBackOff.debug.xcconfig"; sourceTree = ""; }; + C18A855347F95BB321590C30EEC7A9D0 /* Async.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Async.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + DB1A565C292826DEC0BE970678F3A91C /* AsyncSwift-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-umbrella.h"; sourceTree = ""; }; + DEEB9FBEEC62BFE006ABF96C8AC796EA /* AsyncSwift-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "AsyncSwift-prefix.pch"; sourceTree = ""; }; + E7DB01BD4E199E2C80AC041D80DF879E /* Pods-ExponentialBackOff-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-ExponentialBackOff-Info.plist"; sourceTree = ""; }; + F27752B380838C15B17CE615C2FD52D3 /* AsyncSwift.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = AsyncSwift.debug.xcconfig; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ - 14E21E825727DA0A150055F3778E7C95 /* Frameworks */ = { + 7D8125D2B43EE7C8B52C25514FA3C010 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 184937148DAB00FCB0E8BCBD3223BB13 /* Foundation.framework in Frameworks */, + 983DFB51B0C7F5F45101B582CFA753FE /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - E24661E328CBA6B9CC6D5127E19825E9 /* Frameworks */ = { + B034CB662C17BD8F85E91FF57670AF0A /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 1B44F3CDBC3B9C4D5337FB6E1BA4CD37 /* Foundation.framework in Frameworks */, + 2D1DEF4509FCE14E4BAE545C935E5DAF /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 0763CE4A268A7D21A9F880D8163ADA6C /* Pods-ExponentialBackOff */ = { + 36BC822F66999F3847FDF9C33ACEE733 /* Targets Support Files */ = { isa = PBXGroup; children = ( - 5D028BCB66ACC8DCAF439B3638657ABB /* Info.plist */, - B95AEC042E252E856E6D24B1FD60C11F /* Pods-ExponentialBackOff.modulemap */, - 0149990490A6E0E744C1144D48E8CCAD /* Pods-ExponentialBackOff-acknowledgements.markdown */, - 8C0FE576396BE9662726EE302865FDAF /* Pods-ExponentialBackOff-acknowledgements.plist */, - 82740B73113E80AF836CE72166882847 /* Pods-ExponentialBackOff-dummy.m */, - 5F0762F7AFAFC4A3E5658ED585F462A5 /* Pods-ExponentialBackOff-resources.sh */, - 1972A79260DD736E3A4D517090D2A20A /* Pods-ExponentialBackOff-umbrella.h */, - 817EFF97470CAF48CCB4AB604A2233FF /* Pods-ExponentialBackOff.debug.xcconfig */, - 5133B317883BC6580C8725CBBADEC512 /* Pods-ExponentialBackOff.release.xcconfig */, + 9B8A1057E42F434DEE4BF6A4F7B21B4F /* Pods-ExponentialBackOff */, ); - name = "Pods-ExponentialBackOff"; - path = "Target Support Files/Pods-ExponentialBackOff"; + name = "Targets Support Files"; sourceTree = ""; }; - 32A0936898DD16900B98FBB0076E235D /* Pods */ = { + 4EAF031B843B671747EE8DDEEF9D03FB /* Support Files */ = { isa = PBXGroup; children = ( - 4F3A64A5954E5750F395C60A092D9360 /* AsyncSwift */, + 95EB6130AE18DB036A261444E594E79E /* AsyncSwift.modulemap */, + 537306D0E13C82281FB2485FFDDAFB72 /* AsyncSwift-dummy.m */, + 9F9C038254BA17FBC15C511E8787082A /* AsyncSwift-Info.plist */, + DEEB9FBEEC62BFE006ABF96C8AC796EA /* AsyncSwift-prefix.pch */, + DB1A565C292826DEC0BE970678F3A91C /* AsyncSwift-umbrella.h */, + F27752B380838C15B17CE615C2FD52D3 /* AsyncSwift.debug.xcconfig */, + 36CAFE54D33DEA0434BA039FF69F4392 /* AsyncSwift.release.xcconfig */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/AsyncSwift"; sourceTree = ""; }; - 4F3A64A5954E5750F395C60A092D9360 /* AsyncSwift */ = { + 52A2A81AB21B822B382BA85933511BD2 /* AsyncSwift */ = { isa = PBXGroup; children = ( - 5F50AF5D6221977EC24043E8AF3FA268 /* Async.swift */, - 520F8A8282A512227B39EFB131A9A284 /* Support Files */, + 9B62EE7D160AD6FB305DB1EB9141B407 /* Async.swift */, + 4EAF031B843B671747EE8DDEEF9D03FB /* Support Files */, ); - name = AsyncSwift; path = AsyncSwift; sourceTree = ""; }; - 520F8A8282A512227B39EFB131A9A284 /* Support Files */ = { + 578452D2E740E91742655AC8F1636D1F /* iOS */ = { isa = PBXGroup; children = ( - B1EAFD099B7217A951880BFF80699C4C /* AsyncSwift.modulemap */, - E27DFF6D238AE04EB06C76D963DCD7AB /* AsyncSwift.xcconfig */, - 44E529034E66A6825989E48912DE7839 /* AsyncSwift-dummy.m */, - 0C9507655DC21F4814EC9926B972A682 /* AsyncSwift-prefix.pch */, - 3AD3E2D77F776661A24B2D8ECC583573 /* AsyncSwift-umbrella.h */, - D85F570E808806BE938016930B7173F0 /* Info.plist */, + 73010CC983E3809BECEE5348DA1BB8C6 /* Foundation.framework */, ); - name = "Support Files"; - path = "../Target Support Files/AsyncSwift"; + name = iOS; sourceTree = ""; }; - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */ = { + 5D2725B2010F122D675184E80D54978F /* Pods */ = { isa = PBXGroup; children = ( - CBB3DE36805AF21409EC968A9691732F /* Foundation.framework */, + 52A2A81AB21B822B382BA85933511BD2 /* AsyncSwift */, ); - name = iOS; + name = Pods; sourceTree = ""; }; - 7DB346D0F39D3F0E887471402A8071AB = { + 85C3906E91C5D1EFD7CB89C11EE27010 /* Products */ = { isa = PBXGroup; children = ( - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */, - 32A0936898DD16900B98FBB0076E235D /* Pods */, - 924188A9116C96ED91016619A7D90280 /* Products */, - D85E419E1F233C5E6AF0B60C4C5AFF79 /* Targets Support Files */, + C18A855347F95BB321590C30EEC7A9D0 /* Async.framework */, + 8E27337474BA0B6439DEE2F0B30B6430 /* Pods_ExponentialBackOff.framework */, ); + name = Products; sourceTree = ""; }; - 924188A9116C96ED91016619A7D90280 /* Products */ = { + 9B8A1057E42F434DEE4BF6A4F7B21B4F /* Pods-ExponentialBackOff */ = { isa = PBXGroup; children = ( - 79C396C3ECAE8B734A9C8C4FDA336AC7 /* Async.framework */, - 45E106F70858EFA692301458FCA392FC /* Pods_ExponentialBackOff.framework */, + 18EF7D1A019F68960C4AE0020A08AE4E /* Pods-ExponentialBackOff.modulemap */, + 36711643C22F1FE3A088103282F76BE3 /* Pods-ExponentialBackOff-acknowledgements.markdown */, + 21787BC75955ECB906A7E31BCAA02528 /* Pods-ExponentialBackOff-acknowledgements.plist */, + B279B900C135F61A31AA62E96023E228 /* Pods-ExponentialBackOff-dummy.m */, + E7DB01BD4E199E2C80AC041D80DF879E /* Pods-ExponentialBackOff-Info.plist */, + 3F44384ED941E3CF8CDF3C85F7B55C63 /* Pods-ExponentialBackOff-umbrella.h */, + B2C63EC01EBC8000EB7354BB3ED1BBDC /* Pods-ExponentialBackOff.debug.xcconfig */, + 6FB9B1835D146922EFFC754A655EDDCC /* Pods-ExponentialBackOff.release.xcconfig */, ); - name = Products; + name = "Pods-ExponentialBackOff"; + path = "Target Support Files/Pods-ExponentialBackOff"; sourceTree = ""; }; - BC3CA7F9E30CC8F7E2DD044DD34432FC /* Frameworks */ = { + CF1408CF629C7361332E53B88F7BD30C = { isa = PBXGroup; children = ( - 7531C8F8DE19F1AA3C8A7AC97A91DC29 /* iOS */, + 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */, + 5D2725B2010F122D675184E80D54978F /* Pods */, + 85C3906E91C5D1EFD7CB89C11EE27010 /* Products */, + 36BC822F66999F3847FDF9C33ACEE733 /* Targets Support Files */, ); - name = Frameworks; sourceTree = ""; }; - D85E419E1F233C5E6AF0B60C4C5AFF79 /* Targets Support Files */ = { + D210D550F4EA176C3123ED886F8F87F5 /* Frameworks */ = { isa = PBXGroup; children = ( - 0763CE4A268A7D21A9F880D8163ADA6C /* Pods-ExponentialBackOff */, + 578452D2E740E91742655AC8F1636D1F /* iOS */, ); - name = "Targets Support Files"; + name = Frameworks; sourceTree = ""; }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 74D0EA0F0E4362FCED5D5A61EA7B1F8B /* Headers */ = { + B3143F399B353337CC2E4B3A4EA6B5D5 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 878A7EB83560F9B2703D36D186F6EC32 /* AsyncSwift-umbrella.h in Headers */, + 38D43865105801806AB59B26F42602E7 /* AsyncSwift-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - DE83EEBEAB28226E36845A6910156AAA /* Headers */ = { + E02A29E563C33163A2465A4E6A907054 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - D659CC21153FBB015EEC85DB6AC6BCAF /* Pods-ExponentialBackOff-umbrella.h in Headers */, + 6C559866EAACC1F1C57EF5E62B6EA71E /* Pods-ExponentialBackOff-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */ = { + 6040F45AE79BA599F1237309B1CDA8A5 /* Pods-ExponentialBackOff */ = { isa = PBXNativeTarget; - buildConfigurationList = CDB54977543F768C7A6C9DB874B679CC /* Build configuration list for PBXNativeTarget "AsyncSwift" */; + buildConfigurationList = B8AD72272CA096136C9EFD4820714A71 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff" */; buildPhases = ( - F600B02DB5C78F3567ED539B846A8E1D /* Sources */, - E24661E328CBA6B9CC6D5127E19825E9 /* Frameworks */, - 74D0EA0F0E4362FCED5D5A61EA7B1F8B /* Headers */, + E02A29E563C33163A2465A4E6A907054 /* Headers */, + 901C634FF71C125207F8CA1BF0311566 /* Sources */, + B034CB662C17BD8F85E91FF57670AF0A /* Frameworks */, + D34A61C5D6D1AA5F408F00C16A195C7E /* Resources */, ); buildRules = ( ); dependencies = ( + 51BD771735C6ED2ADB5456305356BB77 /* PBXTargetDependency */, ); - name = AsyncSwift; - productName = AsyncSwift; - productReference = 79C396C3ECAE8B734A9C8C4FDA336AC7 /* Async.framework */; + name = "Pods-ExponentialBackOff"; + productName = Pods_ExponentialBackOff; + productReference = 8E27337474BA0B6439DEE2F0B30B6430 /* Pods_ExponentialBackOff.framework */; productType = "com.apple.product-type.framework"; }; - 84F813ED5C1465C60E3A838F0B53F35B /* Pods-ExponentialBackOff */ = { + 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */ = { isa = PBXNativeTarget; - buildConfigurationList = 50B78F41368ED2F959F498D7EF6B6BDA /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff" */; + buildConfigurationList = D14B9DD13F1B7CBE0AF51EC1CC4206FE /* Build configuration list for PBXNativeTarget "AsyncSwift" */; buildPhases = ( - 2CC2B23127A55681AF70ADFEC00C1D6F /* Sources */, - 14E21E825727DA0A150055F3778E7C95 /* Frameworks */, - DE83EEBEAB28226E36845A6910156AAA /* Headers */, + B3143F399B353337CC2E4B3A4EA6B5D5 /* Headers */, + 854C351F7D1505255357469A77000B99 /* Sources */, + 7D8125D2B43EE7C8B52C25514FA3C010 /* Frameworks */, + 1423867A601FF7CCBE775ADD006416A0 /* Resources */, ); buildRules = ( ); dependencies = ( - 4985AA48C2D1DB88AFCD68E58DC5DC90 /* PBXTargetDependency */, ); - name = "Pods-ExponentialBackOff"; - productName = "Pods-ExponentialBackOff"; - productReference = 45E106F70858EFA692301458FCA392FC /* Pods_ExponentialBackOff.framework */; + name = AsyncSwift; + productName = Async; + productReference = C18A855347F95BB321590C30EEC7A9D0 /* Async.framework */; productType = "com.apple.product-type.framework"; }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ - D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { + BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 1240; + LastUpgradeCheck = 1400; }; - buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; + buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; + developmentRegion = en; hasScannedForEncodings = 0; knownRegions = ( + Base, en, ); - mainGroup = 7DB346D0F39D3F0E887471402A8071AB; - productRefGroup = 924188A9116C96ED91016619A7D90280 /* Products */; + mainGroup = CF1408CF629C7361332E53B88F7BD30C; + productRefGroup = 85C3906E91C5D1EFD7CB89C11EE27010 /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( - 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */, - 84F813ED5C1465C60E3A838F0B53F35B /* Pods-ExponentialBackOff */, + 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */, + 6040F45AE79BA599F1237309B1CDA8A5 /* Pods-ExponentialBackOff */, ); }; /* End PBXProject section */ +/* Begin PBXResourcesBuildPhase section */ + 1423867A601FF7CCBE775ADD006416A0 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D34A61C5D6D1AA5F408F00C16A195C7E /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + /* Begin PBXSourcesBuildPhase section */ - 2CC2B23127A55681AF70ADFEC00C1D6F /* Sources */ = { + 854C351F7D1505255357469A77000B99 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - E26E4C1401EFE86B0DEB86CB558C4728 /* Pods-ExponentialBackOff-dummy.m in Sources */, + 723FE76A3C21BB17463C76C2E3C6CE0B /* Async.swift in Sources */, + 2FA2F8885BD01627142AC2DBA9D8E894 /* AsyncSwift-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F600B02DB5C78F3567ED539B846A8E1D /* Sources */ = { + 901C634FF71C125207F8CA1BF0311566 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - FD4742F9C1D1C5E526745B6E8A5D0ED2 /* Async.swift in Sources */, - 8F899DAC4387338E4ADE9423D869CA5C /* AsyncSwift-dummy.m in Sources */, + CB8DAD0FB912D9C7409E78776847FF71 /* Pods-ExponentialBackOff-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXSourcesBuildPhase section */ /* Begin PBXTargetDependency section */ - 4985AA48C2D1DB88AFCD68E58DC5DC90 /* PBXTargetDependency */ = { + 51BD771735C6ED2ADB5456305356BB77 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = AsyncSwift; - target = 7F45F2F21482C3777494ACE42307212D /* AsyncSwift */; - targetProxy = 577EA425FC5C25DD0F595DF33A2AD2A0 /* PBXContainerItemProxy */; + target = 975690F47D860B117FB4B04B42AB69C9 /* AsyncSwift */; + targetProxy = 635CA511263368F3FC1BDE28DA56E3F9 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */ = { + 0774BC53E3A27AF02AD9F5B0F6779945 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 6FB9B1835D146922EFFC754A655EDDCC /* Pods-ExponentialBackOff.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; + GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; GCC_OPTIMIZATION_LEVEL = 0; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_DEBUG=1", "DEBUG=1", "$(inherited)", ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; + MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; }; name = Debug; }; - 10231BB4F56679C1F31862469FE16218 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = E27DFF6D238AE04EB06C76D963DCD7AB /* AsyncSwift.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/AsyncSwift/Info.plist"; - INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Async; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 10BC7060A678E00DB94A8994515F2562 /* Debug */ = { + 2F6D0EAAA7EE1A39F9857DFD1A310467 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E27DFF6D238AE04EB06C76D963DCD7AB /* AsyncSwift.xcconfig */; + baseConfigurationReference = F27752B380838C15B17CE615C2FD52D3 /* AsyncSwift.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/AsyncSwift/Info.plist"; + INFOPLIST_FILE = "Target Support Files/AsyncSwift/AsyncSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_MODULE_NAME = Async; PRODUCT_NAME = Async; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 44CDBB6D11DE06DB64D6268622BDC47E /* Release */ = { + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = YES; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEAD_CODE_STRIPPING = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + MTL_ENABLE_DEBUG_INFO = NO; + MTL_FAST_MATH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; STRIP_INSTALLED_PRODUCT = NO; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 5.0; SYMROOT = "${SRCROOT}/../build"; - VALIDATE_PRODUCT = YES; }; name = Release; }; - BC1EB2AE4425538EEDC607425D7FCD51 /* Release */ = { + 9DA3ACA00D9FA4D817CBEE88E4649ECC /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5133B317883BC6580C8725CBBADEC512 /* Pods-ExponentialBackOff.release.xcconfig */; + baseConfigurationReference = 36CAFE54D33DEA0434BA039FF69F4392 /* AsyncSwift.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/AsyncSwift/AsyncSwift-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/AsyncSwift/AsyncSwift-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff; + MODULEMAP_FILE = "Target Support Files/AsyncSwift/AsyncSwift.modulemap"; + PRODUCT_MODULE_NAME = Async; + PRODUCT_NAME = Async; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.1; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - FBB583917B8F9C2F09CDE7C177EC7964 /* Debug */ = { + CCC3D35771863B75CA47A3562916C62C /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 817EFF97470CAF48CCB4AB604A2233FF /* Pods-ExponentialBackOff.debug.xcconfig */; + baseConfigurationReference = B2C63EC01EBC8000EB7354BB3ED1BBDC /* Pods-ExponentialBackOff.debug.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; MACH_O_TYPE = staticlib; MODULEMAP_FILE = "Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_ExponentialBackOff; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -499,34 +555,34 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { + 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 015A368F878AC3E2CEAE21DDE8026304 /* Debug */, - 44CDBB6D11DE06DB64D6268622BDC47E /* Release */, + 2B9E26EAE2CD392AD762421F663075A1 /* Debug */, + 63FAF33E1C55B71A5F5A8B3CC8749F99 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 50B78F41368ED2F959F498D7EF6B6BDA /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff" */ = { + B8AD72272CA096136C9EFD4820714A71 /* Build configuration list for PBXNativeTarget "Pods-ExponentialBackOff" */ = { isa = XCConfigurationList; buildConfigurations = ( - FBB583917B8F9C2F09CDE7C177EC7964 /* Debug */, - BC1EB2AE4425538EEDC607425D7FCD51 /* Release */, + CCC3D35771863B75CA47A3562916C62C /* Debug */, + 0774BC53E3A27AF02AD9F5B0F6779945 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - CDB54977543F768C7A6C9DB874B679CC /* Build configuration list for PBXNativeTarget "AsyncSwift" */ = { + D14B9DD13F1B7CBE0AF51EC1CC4206FE /* Build configuration list for PBXNativeTarget "AsyncSwift" */ = { isa = XCConfigurationList; buildConfigurations = ( - 10BC7060A678E00DB94A8994515F2562 /* Debug */, - 10231BB4F56679C1F31862469FE16218 /* Release */, + 2F6D0EAAA7EE1A39F9857DFD1A310467 /* Debug */, + 9DA3ACA00D9FA4D817CBEE88E4649ECC /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; /* End XCConfigurationList section */ }; - rootObject = D41D8CD98F00B204E9800998ECF8427E /* Project object */; + rootObject = BFDFE7DC352907FC980B868725387E98 /* Project object */; } diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist new file mode 100644 index 0000000..7f71fff --- /dev/null +++ b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.1.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch index aa992a4..beb2a24 100644 --- a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch +++ b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h index c475681..b2f2057 100644 --- a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h +++ b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig new file mode 100644 index 0000000..cd5cb9b --- /dev/null +++ b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.debug.xcconfig @@ -0,0 +1,13 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/AsyncSwift +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig new file mode 100644 index 0000000..cd5cb9b --- /dev/null +++ b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.release.xcconfig @@ -0,0 +1,13 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/AsyncSwift +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.xcconfig b/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.xcconfig deleted file mode 100644 index d2275d5..0000000 --- a/ExponentialBackOff/Pods/Target Support Files/AsyncSwift/AsyncSwift.xcconfig +++ /dev/null @@ -1,9 +0,0 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/AsyncSwift -GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) -PODS_ROOT = ${SRCROOT} -PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} -SKIP_INSTALL = YES diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-Info.plist b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-Info.plist new file mode 100644 index 0000000..2243fe6 --- /dev/null +++ b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + en + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 1.0.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-resources.sh b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-resources.sh deleted file mode 100755 index 25e9d37..0000000 --- a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-resources.sh +++ /dev/null @@ -1,96 +0,0 @@ -#!/bin/sh -set -e - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - -RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt -> "$RESOURCES_TO_COPY" - -XCASSET_FILES=() - -case "${TARGETED_DEVICE_FAMILY}" in - 1,2) - TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" - ;; - 1) - TARGET_DEVICE_ARGS="--target-device iphone" - ;; - 2) - TARGET_DEVICE_ARGS="--target-device ipad" - ;; - *) - TARGET_DEVICE_ARGS="--target-device mac" - ;; -esac - -install_resource() -{ - if [[ "$1" = /* ]] ; then - RESOURCE_PATH="$1" - else - RESOURCE_PATH="${PODS_ROOT}/$1" - fi - if [[ ! -e "$RESOURCE_PATH" ]] ; then - cat << EOM -error: Resource "$RESOURCE_PATH" not found. Run 'pod install' to update the copy resources script. -EOM - exit 1 - fi - case $RESOURCE_PATH in - *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" - ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} - ;; - *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - ;; - *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" - ;; - *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" - xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" - ;; - *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" - xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" - ;; - *.xcassets) - ABSOLUTE_XCASSET_FILE="$RESOURCE_PATH" - XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") - ;; - *) - echo "$RESOURCE_PATH" - echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" - ;; - esac -} - -mkdir -p "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -if [[ "${ACTION}" == "install" ]] && [[ "${SKIP_INSTALL}" == "NO" ]]; then - mkdir -p "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" - rsync -avr --copy-links --no-relative --exclude '*/.svn/*' --files-from="$RESOURCES_TO_COPY" / "${INSTALL_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi -rm -f "$RESOURCES_TO_COPY" - -if [[ -n "${WRAPPER_EXTENSION}" ]] && [ "`xcrun --find actool`" ] && [ -n "$XCASSET_FILES" ] -then - # Find all other xcassets (this unfortunately includes those of path pods and other targets). - OTHER_XCASSETS=$(find "$PWD" -iname "*.xcassets" -type d) - while read line; do - if [[ $line != "${PODS_ROOT}*" ]]; then - XCASSET_FILES+=("$line") - fi - done <<<"$OTHER_XCASSETS" - - printf "%s\0" "${XCASSET_FILES[@]}" | xargs -0 xcrun actool --output-format human-readable-text --notices --warnings --platform "${PLATFORM_NAME}" --minimum-deployment-target "${!DEPLOYMENT_TARGET_SETTING_NAME}" ${TARGET_DEVICE_ARGS} --compress-pngs --compile "${BUILT_PRODUCTS_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}" -fi diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-umbrella.h b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-umbrella.h index 0ffc549..81a7cde 100644 --- a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-umbrella.h +++ b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig index 74fe7ef..04e86bf 100644 --- a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig +++ b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.debug.xcconfig @@ -1,10 +1,14 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "Async" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig index 74fe7ef..04e86bf 100644 --- a/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig +++ b/ExponentialBackOff/Pods/Target Support Files/Pods-ExponentialBackOff/Pods-ExponentialBackOff.release.xcconfig @@ -1,10 +1,14 @@ -ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO -FRAMEWORK_SEARCH_PATHS = $(inherited) "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift" +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/AsyncSwift/Async.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/AsyncSwift/Async.framework/Headers" +LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift '@executable_path/Frameworks' '@loader_path/Frameworks' '@executable_path/../../Frameworks' +LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -framework "Async" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/README.md b/README.md index c5757bc..d855637 100644 --- a/README.md +++ b/README.md @@ -141,9 +141,12 @@ To run the example project, clone the repo, and run `pod install` from the Examp ## Requirements -- iOS 8.0+ / Mac OS X 10.9+ -- Xcode 7.2+ -- [AsyncSwift](https://github.com/duemunk/Async) 1.7+ (Cocoapods will install all dependencies automatically) +- iOS 12.0+ / Mac OS X 10.15+ +- Xcode 13.4+ +- [AsyncSwift](https://github.com/duemunk/Async) 2.1.0+ (Cocoapods will install all dependencies automatically) + +## Note: +- Since AsyncSwift is not updated to 2.1.0 in cocoapods trunk. Need to manually point to AsyncSwift to source GitHub URL ## Author