From 53ba52278d0dbf66adb568878abce9a4c2e3464d Mon Sep 17 00:00:00 2001 From: Brad Smith Date: Sun, 2 Oct 2016 02:35:24 -0400 Subject: [PATCH 1/2] Update README.md Updated README with usage instructions --- README.md | 45 ++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 40 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index 00e346b..994d498 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,10 @@ [![License](https://img.shields.io/cocoapods/l/MapSnap.svg?style=flat)](http://cocoapods.org/pods/MapSnap) [![Platform](https://img.shields.io/cocoapods/p/MapSnap.svg?style=flat)](http://cocoapods.org/pods/MapSnap) -## Example - -To run the example project, clone the repo, and run `pod install` from the Example directory first. - ## Requirements +MapSnap requires at least iOS 8 and Swift 2.3 + ## Installation MapSnap is available through [CocoaPods](http://cocoapods.org). To install @@ -20,9 +18,46 @@ it, simply add the following line to your Podfile: pod "MapSnap" ``` +## Usage + +`UIImageView` extensions to generate, cache, and set a map image based on a `CLLocationCoordinate2D` + +```swift +let mapImageView = UIImageView(frame: .zero) +let latitude = 42.3601 +let longitude = 71.0589 +let coordinate = CLLocationCoordinate2D(latitude: latitude, longitude: longitude) +mapImageView.setMapImageWithCoordinate(coordinate) +``` + +Optionally specify: +* image size +* placeholder image to use while the map image is asynchronously generated + +```swift +let size = CGSizeMake(width: UIScreen.mainScreen().bounds.width, height: 200.0) +let placeholderImage = UIImage(named: "my_placeholder_image") +mapImageView.setMapImageWithCoordinate(coordinate, size: size, placeholderImage: placeholderImage) +``` + +`MapSnapManager` may be used directly to generate and cache map images. The default image size is customizable and has a default value of: + +```swift +public var defaultImageSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 150.0) +``` + +The default cache used is [PINCache](https://github.com/pinterest/PINCache), but you can subsitute it with anything that conforms to the `MapSnapCache` protocol: + +```swift +public protocol MapSnapCache { + func objectForKey(key: String) -> AnyObject? + func setObject(object: NSCoding, forKey: String) +} +``` + ## Author -Brad Smith, bradley.d.smith11@gmail.com +Brad Smith, [@bsmithers11](https://twitter.com/bsmithers11) ## License From 0213b716a20413046603fb091de31bcb1dd1abb6 Mon Sep 17 00:00:00 2001 From: Ashley Streb Date: Wed, 16 Nov 2016 13:34:31 -0500 Subject: [PATCH 2/2] Convert to Swift 3 --- Example/MapSnap.xcodeproj/project.pbxproj | 16 +- .../xcschemes/MapSnap-Example.xcscheme | 2 +- Example/MapSnap/AppDelegate.swift | 12 +- Example/Podfile | 6 +- Example/Podfile.lock | 16 +- Example/Pods/Manifest.lock | 16 +- Example/Pods/Nimble/README.md | 179 ++- .../CwlCatchException/CwlCatchException.h | 30 + .../CwlCatchException/CwlCatchException.m | 35 + .../CwlCatchException/CwlCatchException.swift | 32 + .../CwlBadInstructionException.swift | 76 + .../CwlCatchBadInstruction.h | 61 + .../CwlCatchBadInstruction.m | 50 + .../CwlCatchBadInstruction.swift | 194 +++ .../CwlDarwinDefinitions.swift | 63 + .../CwlPreconditionTesting/mach_excServer.c | 537 ++++++++ .../CwlPreconditionTesting/mach_excServer.h | 298 ++++ .../Nimble/Adapters/AdapterProtocols.swift | 2 +- .../Nimble/Adapters/AssertionDispatcher.swift | 2 +- .../Nimble/Adapters/AssertionRecorder.swift | 8 +- .../NMBExpectation.swift} | 12 +- .../NMBObjCMatcher.swift} | 34 +- .../Nimble/Adapters/NimbleEnvironment.swift | 19 +- .../Nimble/Adapters/NimbleXCTestHandler.swift | 16 +- .../Pods/Nimble/Sources/Nimble/DSL+Wait.swift | 67 +- Example/Pods/Nimble/Sources/Nimble/DSL.swift | 30 +- .../Nimble/Sources/Nimble/Expectation.swift | 25 +- .../Nimble/Sources/Nimble/Expression.swift | 8 +- .../Sources/Nimble/FailureMessage.swift | 23 +- .../Sources/Nimble/Matchers/AllPass.swift | 86 +- .../AsyncMatcherWrapper.swift | 64 +- .../Sources/Nimble/Matchers/BeAKindOf.swift | 12 +- .../Nimble/Matchers/BeAnInstanceOf.swift | 14 +- .../Sources/Nimble/Matchers/BeCloseTo.swift | 44 +- .../Sources/Nimble/Matchers/BeEmpty.swift | 10 +- .../Nimble/Matchers/BeGreaterThan.swift | 13 +- .../Matchers/BeGreaterThanOrEqualTo.swift | 13 +- .../Nimble/Matchers/BeIdenticalTo.swift | 24 +- .../Sources/Nimble/Matchers/BeLessThan.swift | 15 +- .../Nimble/Matchers/BeLessThanOrEqual.swift | 13 +- .../Sources/Nimble/Matchers/BeLogical.swift | 122 +- .../Sources/Nimble/Matchers/BeginWith.swift | 28 +- .../Sources/Nimble/Matchers/Contain.swift | 30 +- .../Sources/Nimble/Matchers/EndWith.swift | 28 +- .../Sources/Nimble/Matchers/Equal.swift | 26 +- .../Sources/Nimble/Matchers/HaveCount.swift | 23 +- .../Sources/Nimble/Matchers/Match.swift | 10 +- .../Sources/Nimble/Matchers/MatchError.swift | 26 + .../{Wrappers => Matchers}/MatcherFunc.swift | 40 +- .../Nimble/Matchers/MatcherProtocols.swift | 100 +- .../Nimble/Matchers/PostNotification.swift | 64 +- .../Nimble/Matchers/RaisesException.swift | 29 +- .../Nimble/Matchers/SatisfyAnyOf.swift | 18 +- .../Nimble/Matchers/ThrowAssertion.swift | 55 + .../Sources/Nimble/Matchers/ThrowError.swift | 144 +- Example/Pods/Nimble/Sources/Nimble/Nimble.h | 10 +- .../Nimble/Sources/Nimble/Utils/Async.swift | 157 +-- .../Nimble/Sources/Nimble/Utils/Errors.swift | 142 ++ .../Nimble/Utils/ExceptionCapture.swift | 31 - .../Sources/Nimble/Utils/Functional.swift | 4 +- .../Sources/Nimble/Utils/Stringers.swift | 229 +++- Example/Pods/Nimble/Sources/Nimble/objc/DSL.h | 145 -- .../Sources/Nimble/objc/NMBExceptionCapture.h | 11 - .../CurrentTestCaseTracker.h} | 9 - .../Nimble/Sources/NimbleObjectiveC/DSL.h | 377 +++++ .../{Nimble/objc => NimbleObjectiveC}/DSL.m | 22 +- .../NimbleObjectiveC/NMBExceptionCapture.h | 11 + .../NMBExceptionCapture.m | 10 +- .../Sources/NimbleObjectiveC/NMBStringify.h | 18 + .../Sources/NimbleObjectiveC/NMBStringify.m | 6 + .../XCTestObservationCenter+Register.m | 78 ++ Example/Pods/Pods.xcodeproj/project.pbxproj | 1221 +++++++++-------- .../contents.xcworkspacedata | 7 + Example/Pods/Quick/README.md | 10 +- .../Quick/Configuration/Configuration.swift | 24 +- .../Pods/Quick/Sources/Quick/DSL/DSL.swift | 40 +- .../Quick/Sources/Quick/DSL/World+DSL.swift | 44 +- .../Quick/Sources/Quick/ErrorUtility.swift | 4 +- .../Pods/Quick/Sources/Quick/Example.swift | 20 +- .../Quick/Sources/Quick/ExampleGroup.swift | 30 +- .../Quick/Sources/Quick/Hooks/Closures.swift | 2 +- .../Sources/Quick/Hooks/ExampleHooks.swift | 26 +- .../Sources/Quick/Hooks/HooksPhase.swift | 12 +- .../Sources/Quick/Hooks/SuiteHooks.swift | 14 +- .../Quick/NSBundle+CurrentTestBundle.swift | 10 +- .../Quick/QuickSelectedTestSuiteBuilder.swift | 11 +- .../Quick/Sources/Quick/String+FileName.swift | 2 +- Example/Pods/Quick/Sources/Quick/World.swift | 50 +- .../Configuration/QuickConfiguration.h | 0 .../Configuration/QuickConfiguration.m | 0 .../{Quick => QuickObjectiveC}/DSL/QCKDSL.h | 0 .../{Quick => QuickObjectiveC}/DSL/QCKDSL.m | 0 .../DSL/World+DSL.h | 0 .../NSString+QCKSelectorName.h | 0 .../NSString+QCKSelectorName.m | 0 .../{Quick => QuickObjectiveC}/Quick.h | 0 .../{Quick => QuickObjectiveC}/QuickSpec.h | 0 .../{Quick => QuickObjectiveC}/QuickSpec.m | 0 .../{Quick => QuickObjectiveC}/World.h | 0 .../XCTestSuite+QuickTestSuiteBuilder.m | 0 .../Target Support Files/Nimble/Info.plist | 2 +- .../Nimble/Nimble-umbrella.h | 4 + .../Target Support Files/Quick/Info.plist | 2 +- Example/Tests/Tests.swift | 5 +- .../Classes/MKMapSnapshotter+MapSnap.swift | 18 +- MapSnap/Classes/MapSnapCache.swift | 4 +- MapSnap/Classes/MapSnapManager.swift | 36 +- MapSnap/Classes/UIImageView+MapSnap.swift | 12 +- 108 files changed, 4024 insertions(+), 1766 deletions(-) create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c create mode 100644 Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h rename Example/Pods/Nimble/Sources/Nimble/{ObjCExpectation.swift => Adapters/NMBExpectation.swift} (87%) rename Example/Pods/Nimble/Sources/Nimble/{Wrappers/ObjCMatcher.swift => Adapters/NMBObjCMatcher.swift} (55%) rename Example/Pods/Nimble/Sources/Nimble/{Wrappers => Matchers}/AsyncMatcherWrapper.swift (68%) create mode 100644 Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift rename Example/Pods/Nimble/Sources/Nimble/{Wrappers => Matchers}/MatcherFunc.swift (54%) create mode 100644 Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift create mode 100644 Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift delete mode 100644 Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift delete mode 100644 Example/Pods/Nimble/Sources/Nimble/objc/DSL.h delete mode 100644 Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h rename Example/Pods/Nimble/Sources/{Nimble/objc/CurrentTestCaseTracker.m => NimbleObjectiveC/CurrentTestCaseTracker.h} (53%) create mode 100644 Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h rename Example/Pods/Nimble/Sources/{Nimble/objc => NimbleObjectiveC}/DSL.m (83%) create mode 100644 Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h rename Example/Pods/Nimble/Sources/{Nimble/objc => NimbleObjectiveC}/NMBExceptionCapture.m (60%) create mode 100644 Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h create mode 100644 Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m create mode 100644 Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m create mode 100644 Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/Configuration/QuickConfiguration.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/Configuration/QuickConfiguration.m (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/QCKDSL.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/QCKDSL.m (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/DSL/World+DSL.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/NSString+QCKSelectorName.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/NSString+QCKSelectorName.m (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/Quick.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/QuickSpec.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/QuickSpec.m (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/World.h (100%) rename Example/Pods/Quick/Sources/{Quick => QuickObjectiveC}/XCTestSuite+QuickTestSuiteBuilder.m (100%) diff --git a/Example/MapSnap.xcodeproj/project.pbxproj b/Example/MapSnap.xcodeproj/project.pbxproj index ebcc062..682fde2 100644 --- a/Example/MapSnap.xcodeproj/project.pbxproj +++ b/Example/MapSnap.xcodeproj/project.pbxproj @@ -210,16 +210,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0800; + LastUpgradeCheck = 0810; ORGANIZATIONNAME = CocoaPods; TargetAttributes = { 607FACCF1AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; }; 607FACE41AFB9204008FA782 = { CreatedOnToolsVersion = 6.3.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0810; TestTargetID = 607FACCF1AFB9204008FA782; }; }; @@ -448,6 +448,7 @@ ONLY_ACTIVE_ARCH = YES; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0.1; }; name = Debug; }; @@ -487,6 +488,7 @@ MTL_ENABLE_DEBUG_INFO = NO; SDKROOT = iphoneos; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 3.0.1; VALIDATE_PRODUCT = YES; }; name = Release; @@ -502,7 +504,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -517,7 +519,7 @@ MODULE_NAME = ExampleApp; PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.demo.$(PRODUCT_NAME:rfc1034identifier)"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; }; name = Release; }; @@ -538,7 +540,7 @@ 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 = 2.3; + SWIFT_VERSION = 3.0; }; name = Debug; }; @@ -555,7 +557,7 @@ 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 = 2.3; + SWIFT_VERSION = 3.0; }; name = Release; }; diff --git a/Example/MapSnap.xcodeproj/xcshareddata/xcschemes/MapSnap-Example.xcscheme b/Example/MapSnap.xcodeproj/xcshareddata/xcschemes/MapSnap-Example.xcscheme index a456cd1..7e4e394 100644 --- a/Example/MapSnap.xcodeproj/xcshareddata/xcschemes/MapSnap-Example.xcscheme +++ b/Example/MapSnap.xcodeproj/xcshareddata/xcschemes/MapSnap-Example.xcscheme @@ -1,6 +1,6 @@ Bool { + func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplicationLaunchOptionsKey: Any]?) -> Bool { // Override point for customization after application launch. return true } - func applicationWillResignActive(application: UIApplication) { + func applicationWillResignActive(_ application: UIApplication) { // Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. // Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. } - func applicationDidEnterBackground(application: UIApplication) { + func applicationDidEnterBackground(_ application: UIApplication) { // Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. // If your application supports background execution, this method is called instead of applicationWillTerminate: when the user quits. } - func applicationWillEnterForeground(application: UIApplication) { + func applicationWillEnterForeground(_ application: UIApplication) { // Called as part of the transition from the background to the inactive state; here you can undo many of the changes made on entering the background. } - func applicationDidBecomeActive(application: UIApplication) { + func applicationDidBecomeActive(_ application: UIApplication) { // Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. } - func applicationWillTerminate(application: UIApplication) { + func applicationWillTerminate(_ application: UIApplication) { // Called when the application is about to terminate. Save data if appropriate. See also applicationDidEnterBackground:. } diff --git a/Example/Podfile b/Example/Podfile index 63ac37e..c86af2e 100644 --- a/Example/Podfile +++ b/Example/Podfile @@ -6,15 +6,15 @@ target 'MapSnap_Example' do target 'MapSnap_Tests' do inherit! :search_paths - pod 'Quick', '~> 0.8' - pod 'Nimble', '~> 3.0' + pod 'Quick', '~> 0.10' + pod 'Nimble', '~> 5.1.1' end end post_install do |installer| installer.pods_project.targets.each do |target| target.build_configurations.each do |config| - config.build_settings['SWIFT_VERSION'] = '2.3' + config.build_settings['SWIFT_VERSION'] = '3.0' end end end diff --git a/Example/Podfile.lock b/Example/Podfile.lock index 63b5df1..cc368fe 100644 --- a/Example/Podfile.lock +++ b/Example/Podfile.lock @@ -1,25 +1,25 @@ PODS: - MapSnap (0.1.0): - PINCache (~> 2.3) - - Nimble (3.2.0) + - Nimble (5.1.1) - PINCache (2.3) - - Quick (0.9.3) + - Quick (0.10.0) DEPENDENCIES: - MapSnap (from `../`) - - Nimble (~> 3.0) - - Quick (~> 0.8) + - Nimble (~> 5.1.1) + - Quick (~> 0.10) EXTERNAL SOURCES: MapSnap: - :path: "../" + :path: ../ SPEC CHECKSUMS: MapSnap: 95862bbf764c067e5533e01bca467b448ccbdce6 - Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d + Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 PINCache: ce36ed282031b92fc7733ffe831f474ff80fddc2 - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa -PODFILE CHECKSUM: fd6053cdbf8b9eae0532cfd1e8e45ce413c0286d +PODFILE CHECKSUM: 1afe916f58936e29aa44002f1f3994bbc3239342 COCOAPODS: 1.0.1 diff --git a/Example/Pods/Manifest.lock b/Example/Pods/Manifest.lock index 63b5df1..cc368fe 100644 --- a/Example/Pods/Manifest.lock +++ b/Example/Pods/Manifest.lock @@ -1,25 +1,25 @@ PODS: - MapSnap (0.1.0): - PINCache (~> 2.3) - - Nimble (3.2.0) + - Nimble (5.1.1) - PINCache (2.3) - - Quick (0.9.3) + - Quick (0.10.0) DEPENDENCIES: - MapSnap (from `../`) - - Nimble (~> 3.0) - - Quick (~> 0.8) + - Nimble (~> 5.1.1) + - Quick (~> 0.10) EXTERNAL SOURCES: MapSnap: - :path: "../" + :path: ../ SPEC CHECKSUMS: MapSnap: 95862bbf764c067e5533e01bca467b448ccbdce6 - Nimble: 703854335d181df169bbca9c97117b5cf8c47c1d + Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 PINCache: ce36ed282031b92fc7733ffe831f474ff80fddc2 - Quick: 13a2a2b19a5d8e3ed4fd0c36ee46597fd77ebf71 + Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa -PODFILE CHECKSUM: fd6053cdbf8b9eae0532cfd1e8e45ce413c0286d +PODFILE CHECKSUM: 1afe916f58936e29aa44002f1f3994bbc3239342 COCOAPODS: 1.0.1 diff --git a/Example/Pods/Nimble/README.md b/Example/Pods/Nimble/README.md index e6f9e9f..684255e 100644 --- a/Example/Pods/Nimble/README.md +++ b/Example/Pods/Nimble/README.md @@ -6,7 +6,6 @@ or Objective-C expressions. Inspired by ```swift // Swift - expect(1 + 1).to(equal(2)) expect(1.2).to(beCloseTo(1.1, within: 0.1)) expect(3) > 2 @@ -37,12 +36,14 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Comparisons](#comparisons) - [Types/Classes](#typesclasses) - [Truthiness](#truthiness) + - [Swift Assertions](#swift-assertions) - [Swift Error Handling](#swift-error-handling) - [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) - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) - [Writing Your Own Matchers](#writing-your-own-matchers) - [Lazy Evaluation](#lazy-evaluation) @@ -328,6 +329,9 @@ cases, use the `timeout` parameter: // Waits three seconds for ocean to contain "starfish": expect(ocean).toEventually(contain("starfish"), timeout: 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) ``` ```objc @@ -394,10 +398,10 @@ the default timeout and poll interval values. This can be done as follows: // Swift // Increase the global timeout to 5 seconds: -Nimble.Defaults.AsyncTimeout = 5 +Nimble.AsyncDefaults.Timeout = 5 // Slow the polling interval to 0.1 seconds: -Nimble.Defaults.AsyncPollInterval = 0.1 +Nimble.AsyncDefaults.PollInterval = 0.1 ``` ## Objective-C Support @@ -406,7 +410,8 @@ Nimble has full support for Objective-C. However, there are two things to keep in mind when using Nimble in Objective-C: 1. All parameters passed to the `expect` function, as well as matcher - functions like `equal`, must be Objective-C objects: + functions like `equal`, must be Objective-C objects or can be converted into + an `NSObject` equivalent: ```objc // Objective-C @@ -415,6 +420,17 @@ to keep in mind when using Nimble in Objective-C: expect(@(1 + 1)).to(equal(@2)); expect(@"Hello world").to(contain(@"world")); + + // Boxed as NSNumber * + expect(2).to(equal(2)); + expect(1.2).to(beLessThan(2.0)); + expect(true).to(beTruthy()); + + // Boxed as NSString * + expect("Hello world").to(equal("Hello world")); + + // Boxed as NSRange + expect(NSMakeRange(1, 10)).to(equal(NSMakeRange(1, 10))); ``` 2. To make an expectation on an expression that does not return a value, @@ -427,6 +443,28 @@ to keep in mind when using Nimble in Objective-C: expectAction(^{ [exception raise]; }).to(raiseException()); ``` +The following types are currently converted to an `NSObject` type: + + - **C Numeric types** are converted to `NSNumber *` + - `NSRange` is converted to `NSValue *` + - `char *` is converted to `NSString *` + +For the following matchers: + +- `equal` +- `beGreaterThan` +- `beGreaterThanOrEqual` +- `beLessThan` +- `beLessThanOrEqual` +- `beCloseTo` +- `beTrue` +- `beFalse` +- `beTruthy` +- `beFalsy` +- `haveCount` + +If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). + ## Disabling Objective-C Shorthand Nimble provides a shorthand for expressing expectations using the @@ -492,6 +530,9 @@ 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. + + ```objc // Objective-C @@ -646,13 +687,13 @@ expect(dolphin).to(beAKindOf([Mammal class])); // 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 BooleanType 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: expect(actual).to(beFalsy()) -// Passes if actual is only false (not nil or an object conforming to BooleanType 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: @@ -665,19 +706,52 @@ expect(actual).to(beNil()) // 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 BooleanType 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: expect(actual).to(beFalsy()); -// Passes if actual is only false (not nil or an object conforming to BooleanType 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: expect(actual).to(beNil()); ``` +## Swift Assertions + +If you're using Swift, you can use the `throwAssertion` matcher to check if an assertion is thrown (e.g. `fatalError()`). This is made possible by [@mattgallagher](https://github.com/mattgallagher)'s [CwlPreconditionTesting](https://github.com/mattgallagher/CwlPreconditionTesting) library. + +```swift +// Swift + +// Passes if somethingThatThrows() throws an assertion, such as calling fatalError() or precondition fails: +expect { () -> Void in fatalError() }.to(throwAssertion()) +expect { precondition(false) }.to(throwAssertion()) + +// Passes if throwing a 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: +var reachedPoint1 = false +var reachedPoint2 = false +expect { + reachedPoint1 = true + precondition(false, "condition message") + reachedPoint2 = true +}.to(throwAssertion()) + +expect(reachedPoint1) == true +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. @@ -685,11 +759,11 @@ If you're using Swift 2.0+, you can use the `throwError` matcher to check if an ```swift // Swift -// Passes if somethingThatThrows() throws an ErrorType: +// Passes if somethingThatThrows() throws an ErrorProtocol: expect{ try somethingThatThrows() }.to(throwError()) // Passes if somethingThatThrows() throws an error with a given domain: -expect{ try somethingThatThrows() }.to(throwError { (error: ErrorType) in +expect{ try somethingThatThrows() }.to(throwError { (error: ErrorProtocol) in expect(error._domain).to(equal(NSCocoaErrorDomain)) }) @@ -697,7 +771,24 @@ expect{ try somethingThatThrows() }.to(throwError { (error: ErrorType) in expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) // Passes if somethingThatThrows() throws an error with a given type: -expect{ try somethingThatThrows() }.to(throwError(errorType: MyError.self)) +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. + +```swift +// Swift + +let actual: ErrorProtocol = … + +// Passes if actual contains any error value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum)) + +// Passes if actual contains the Timeout value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.Timeout)) + +// Passes if actual contains an NSError equal to the given one: +expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) ``` Note: This feature is only available in Swift. @@ -878,7 +969,7 @@ 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 SequenceType, e.g. an array, a set or a custom seqence type. +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. @@ -886,6 +977,8 @@ uses another matcher is available here. ## Verify collection count ```swift +// Swift + // passes if actual collection's count is equal to expected expect(actual).to(haveCount(expected)) @@ -894,6 +987,8 @@ expect(actual).notTo(haveCount(expected)) ``` ```objc +// Objective-C + // passes if actual collection's count is equal to expected expect(actual).to(haveCount(expected)) @@ -901,10 +996,34 @@ expect(actual).to(haveCount(expected)) expect(actual).notTo(haveCount(expected)) ``` -For Swift the actual value must be a `CollectionType` such as array, dictionary or set. +For Swift the actual value must be a `Collection` such as 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. +## Foundation + +### Verifying a Notification was posted + +```swift +// Swift +let testNotification = Notification(name: "Foo", object: nil) + +// passes if the closure in expect { ... } posts a notification to the default +// notification center. +expect { + NotificationCenter.default.postNotification(testNotification) +}.to(postNotifications(equal([testNotification])) + +// 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)) +``` + +> This matcher is only available in Swift. + ## Matching a value to any of a group of matchers ```swift @@ -928,10 +1047,10 @@ expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) expect(@6).to(satisfyAnyOf(equal(@2), equal(@3), equal(@4), equal(@5), equal(@6), equal(@7))) ``` -Note: This matcher allows you to chain any number of matchers together. This provides flexibility, - but if you find yourself chaining many matchers together in one test, consider whether you - could instead refactor that single test into multiple, more precisely focused tests for - better coverage. +Note: This matcher allows you to chain any number of matchers together. This provides flexibility, + but if you find yourself chaining many matchers together in one test, consider whether you + could instead refactor that single test into multiple, more precisely focused tests for + better coverage. # Writing Your Own Matchers @@ -944,7 +1063,11 @@ value and return a `MatcherFunc` closure. Take `equal`, for example: public func equal(expectedValue: T?) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(expectedValue)>" - return actualExpression.evaluate() == expectedValue + if let actualValue = try actualExpression.evaluate() { + return actualValue == expectedValue + } else { + return false + } } } ``` @@ -966,7 +1089,7 @@ 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/Nimble/Matchers) +[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) to see how Nimble's built-in set of matchers are implemented. You can also check out the tips below. @@ -1111,11 +1234,11 @@ automatically generate expected value failure messages when they're nil. ```swift -public func beginWith(startingElement: T) -> NonNilMatcherFunc { +public func beginWith(startingElement: T) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingElement)>" if let actualValue = actualExpression.evaluate() { - var actualGenerator = actualValue.generate() + var actualGenerator = actualValue.makeIterator() return actualGenerator.next() == startingElement } return false @@ -1138,15 +1261,15 @@ extension NMBObjCMatcher { > 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 - README](https://github.com/Quick/Quick#how-to-install-quick). + Documentation](https://github.com/Quick/Quick/blob/master/Documentation/en-us/InstallingQuick.md). Nimble can currently be installed in one of two ways: using CocoaPods, or with git submodules. ## Installing Nimble as a Submodule -To use Nimble as a submodule to test your iOS or OS X applications, follow these -4 easy steps: +To use Nimble as a submodule to test your macOS, iOS or tvOS applications, follow +these 4 easy steps: 1. Clone the Nimble repository 2. Add Nimble.xcodeproj to the Xcode workspace for your project @@ -1160,9 +1283,9 @@ install just Nimble. ## Installing Nimble via CocoaPods -To use Nimble in CocoaPods to test your iOS or OS X applications, add Nimble to -your podfile and add the ```use_frameworks!``` line to enable Swift support for -CocoaPods. +To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift +support for CocoaPods. ```ruby platform :ios, '8.0' @@ -1173,7 +1296,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do use_frameworks! - pod 'Nimble', '~> 3.1.0' + pod 'Nimble', '~> 5.0.0' 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 new file mode 100644 index 0000000..6ec6a29 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h @@ -0,0 +1,30 @@ +// +// 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 new file mode 100644 index 0000000..4f9772c --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m @@ -0,0 +1,35 @@ +// +// 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 new file mode 100644 index 0000000..b44a232 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift @@ -0,0 +1,32 @@ +// +// 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 new file mode 100644 index 0000000..2fa67c9 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift @@ -0,0 +1,76 @@ +// +// 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 new file mode 100644 index 0000000..0333ed2 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h @@ -0,0 +1,61 @@ +// +// 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 new file mode 100644 index 0000000..22c1377 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m @@ -0,0 +1,50 @@ +// +// 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 new file mode 100644 index 0000000..ab460b3 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift @@ -0,0 +1,194 @@ +// +// 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 new file mode 100644 index 0000000..12a6b9f --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift @@ -0,0 +1,63 @@ +// +// 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 new file mode 100644 index 0000000..2334538 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c @@ -0,0 +1,537 @@ +/* + * 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 new file mode 100644 index 0000000..766ba11 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h @@ -0,0 +1,298 @@ +#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 306d4ce..2e58fdf 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AdapterProtocols.swift @@ -2,7 +2,7 @@ import Foundation /// Protocol for the assertion handler that Nimble uses for all expectations. public protocol AssertionHandler { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) } /// Global backing interface for assertions that Nimble creates. diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift index 09caf2a..2e30f61 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift @@ -12,7 +12,7 @@ public class AssertionDispatcher: AssertionHandler { self.handlers = handlers } - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { for handler in handlers { handler.assert(assertion, message: message, location: location) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift index a1615a7..7d0bab2 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -28,7 +28,7 @@ public class AssertionRecorder : AssertionHandler { public init() {} - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { assertions.append( AssertionRecord( success: assertion, @@ -43,7 +43,7 @@ public class AssertionRecorder : AssertionHandler { /// Once the closure finishes, then the original Nimble assertion handler is restored. /// /// @see AssertionHandler -public func withAssertionHandler(tempAssertionHandler: AssertionHandler, closure: () throws -> Void) { +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: @escaping () throws -> Void) { let environment = NimbleEnvironment.activeInstance let oldRecorder = environment.assertionHandler let capturer = NMBExceptionCapture(handler: nil, finally: ({ @@ -65,7 +65,7 @@ public func withAssertionHandler(tempAssertionHandler: AssertionHandler, closure /// assertion handler when this is true. Defaults to false. /// /// @see gatherFailingExpectations -public func gatherExpectations(silently silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { +public func gatherExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler let recorder = AssertionRecorder() let handlers: [AssertionHandler] @@ -92,7 +92,7 @@ public func gatherExpectations(silently silently: Bool = false, closure: () -> V /// /// @see gatherExpectations /// @see raiseException source for an example use case. -public func gatherFailingExpectations(silently silently: Bool = false, closure: () -> Void) -> [AssertionRecord] { +public func gatherFailingExpectations(silently: Bool = false, closure: @escaping () -> Void) -> [AssertionRecord] { let assertions = gatherExpectations(silently: silently, closure: closure) return assertions.filter { assertion in !assertion.success diff --git a/Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift similarity index 87% rename from Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift rename to Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift index 3f18d06..47d4eed 100644 --- a/Example/Pods/Nimble/Sources/Nimble/ObjCExpectation.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -5,14 +5,14 @@ import Foundation internal struct ObjCMatcherWrapper : Matcher { let matcher: NMBMatcher - func matches(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + 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 { + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { return matcher.doesNotMatch( ({ try! actualExpression.evaluate() }), failureMessage: failureMessage, @@ -26,9 +26,9 @@ public class NMBExpectation : NSObject { internal var _negative: Bool internal let _file: FileString internal let _line: UInt - internal var _timeout: NSTimeInterval = 1.0 + internal var _timeout: TimeInterval = 1.0 - public init(actualBlock: () -> NSObject!, negative: Bool, file: FileString, line: UInt) { + public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { self._actualBlock = actualBlock self._negative = negative self._file = file @@ -41,7 +41,7 @@ public class NMBExpectation : NSObject { } } - public var withTimeout: (NSTimeInterval) -> NMBExpectation { + public var withTimeout: (TimeInterval) -> NMBExpectation { return ({ timeout in self._timeout = timeout return self }) @@ -123,7 +123,7 @@ public class NMBExpectation : NSObject { public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } - public class func failWithMessage(message: String, file: FileString, line: UInt) { + public class func failWithMessage(_ message: String, file: FileString, line: UInt) { fail(message, location: SourceLocation(file: file, line: line)) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift similarity index 55% rename from Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift rename to Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift index 9f31d42..c609f69 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/ObjCMatcher.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift @@ -2,43 +2,43 @@ import Foundation #if _runtime(_ObjC) -public typealias MatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage) -> Bool -public typealias FullMatcherBlock = (actualExpression: Expression, failureMessage: FailureMessage, shouldNotMatch: Bool) -> Bool +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: MatcherBlock, notMatcher: MatcherBlock) { + public init(canMatchNil: Bool, matcher: @escaping MatcherBlock, notMatcher: @escaping MatcherBlock) { self.canMatchNil = canMatchNil self._match = matcher self._doesNotMatch = notMatcher } - public convenience init(matcher: MatcherBlock) { + public convenience init(matcher: @escaping MatcherBlock) { self.init(canMatchNil: true, matcher: matcher) } - public convenience init(canMatchNil: Bool, matcher: MatcherBlock) { + public convenience init(canMatchNil: Bool, matcher: @escaping MatcherBlock) { self.init(canMatchNil: canMatchNil, matcher: matcher, notMatcher: ({ actualExpression, failureMessage in - return !matcher(actualExpression: actualExpression, failureMessage: failureMessage) + return !matcher(actualExpression, failureMessage) })) } - public convenience init(matcher: FullMatcherBlock) { + public convenience init(matcher: @escaping FullMatcherBlock) { self.init(canMatchNil: true, matcher: matcher) } - public convenience init(canMatchNil: Bool, matcher: FullMatcherBlock) { + public convenience init(canMatchNil: Bool, matcher: @escaping FullMatcherBlock) { self.init(canMatchNil: canMatchNil, matcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: false) + return matcher(actualExpression, failureMessage, false) }), notMatcher: ({ actualExpression, failureMessage in - return matcher(actualExpression: actualExpression, failureMessage: failureMessage, shouldNotMatch: true) + return matcher(actualExpression, failureMessage, true) })) } - private func canMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + private func canMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { do { if !canMatchNil { if try actualExpression.evaluate() == nil { @@ -53,11 +53,11 @@ public class NMBObjCMatcher : NSObject, NMBMatcher { return true } - public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let expr = Expression(expression: actualBlock, location: location) let result = _match( - actualExpression: expr, - failureMessage: failureMessage) + expr, + failureMessage) if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { return result } else { @@ -65,11 +65,11 @@ public class NMBObjCMatcher : NSObject, NMBMatcher { } } - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let expr = Expression(expression: actualBlock, location: location) let result = _doesNotMatch( - actualExpression: expr, - failureMessage: failureMessage) + expr, + failureMessage) if self.canMatch(Expression(expression: actualBlock, location: location), failureMessage: failureMessage) { return result } else { diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift index 27cdac9..a55cb27 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -1,3 +1,4 @@ +import Dispatch import Foundation /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this @@ -5,7 +6,7 @@ import Foundation internal class NimbleEnvironment { static var activeInstance: NimbleEnvironment { get { - let env = NSThread.currentThread().threadDictionary["NimbleEnvironment"] + let env = Thread.current.threadDictionary["NimbleEnvironment"] if let env = env as? NimbleEnvironment { return env } else { @@ -15,7 +16,7 @@ internal class NimbleEnvironment { } } set { - NSThread.currentThread().threadDictionary["NimbleEnvironment"] = newValue + Thread.current.threadDictionary["NimbleEnvironment"] = newValue } } @@ -25,14 +26,20 @@ internal class NimbleEnvironment { set { NimbleAssertionHandler = newValue } } -#if _runtime(_ObjC) + var suppressTVOSAssertionWarning: Bool = false var awaiter: Awaiter init() { + let timeoutQueue: DispatchQueue + if #available(OSX 10.10, *) { + timeoutQueue = DispatchQueue.global(qos: .userInitiated) + } else { + timeoutQueue = DispatchQueue.global(priority: .high) + } + awaiter = Awaiter( waitLock: AssertionWaitLock(), - asyncQueue: dispatch_get_main_queue(), - timeoutQueue: dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_HIGH, 0)) + asyncQueue: .main, + timeoutQueue: timeoutQueue) } -#endif } diff --git a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 7d84f45..1aba8bc 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -4,7 +4,7 @@ import XCTest /// Default handler for Nimble. This assertion handler passes failures along to /// XCTest. public class NimbleXCTestHandler : AssertionHandler { - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { recordFailure("\(message.stringValue)\n", location: location) } @@ -14,7 +14,7 @@ public class NimbleXCTestHandler : AssertionHandler { /// Alternative handler for Nimble. This assertion handler passes failures along /// to XCTest by attempting to reduce the failure message size. public class NimbleShortXCTestHandler: AssertionHandler { - public func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { let msg: String if let actual = message.actualValue { @@ -30,7 +30,7 @@ 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 { - func assert(assertion: Bool, message: FailureMessage, location: SourceLocation) { + func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") } } @@ -42,11 +42,11 @@ class NimbleXCTestUnavailableHandler : AssertionHandler { private(set) var currentTestCase: XCTestCase? - @objc func testCaseWillStart(testCase: XCTestCase) { + @objc func testCaseWillStart(_ testCase: XCTestCase) { currentTestCase = testCase } - @objc func testCaseDidFinish(testCase: XCTestCase) { + @objc func testCaseDidFinish(_ testCase: XCTestCase) { currentTestCase = nil } } @@ -62,14 +62,14 @@ func isXCTestAvailable() -> Bool { #endif } -private func recordFailure(message: String, location: SourceLocation) { +private func recordFailure(_ message: String, location: SourceLocation) { #if _runtime(_ObjC) if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - testCase.recordFailureWithDescription(message, inFile: location.file, atLine: location.line, expected: true) + testCase.recordFailure(withDescription: message, inFile: location.file, atLine: location.line, expected: true) } 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)" - NSException(name: NSInternalInconsistencyException, reason: msg, userInfo: nil).raise() + NSException(name: .internalInconsistencyException, reason: msg, userInfo: nil).raise() } #else XCTFail("\(message)\n", file: location.file, line: location.line) diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift index 63495c2..619b6dc 100644 --- a/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ b/Example/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -1,10 +1,10 @@ +import Dispatch import Foundation -#if _runtime(_ObjC) private enum ErrorResult { - case Exception(NSException) - case Error(ErrorType) - case None + case exception(NSException) + case error(Error) + case none } /// Only classes, protocols, methods, properties, and subscript declarations can be @@ -12,71 +12,77 @@ private enum ErrorResult { /// asynchronous waiting logic so that it may be called from Objective-C and Swift. internal class NMBWait: NSObject { internal class func until( - timeout timeout: NSTimeInterval, - file: FileString = __FILE__, - line: UInt = __LINE__, - action: (() -> Void) -> Void) -> Void { - return throwableUntil(timeout: timeout, file: file, line: line) { (done: () -> Void) throws -> Void in - action() { done() } + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) -> Void { + return throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) } } // Using a throwable closure makes this method not objc compatible. internal class func throwableUntil( - timeout timeout: NSTimeInterval, - file: FileString = __FILE__, - line: UInt = __LINE__, - action: (() -> Void) throws -> Void) -> Void { + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) throws -> Void) -> Void { let awaiter = NimbleEnvironment.activeInstance.awaiter let leeway = timeout / 2.0 - let result = awaiter.performBlock { (done: (ErrorResult) -> Void) throws -> Void in - dispatch_async(dispatch_get_main_queue()) { + let result = awaiter.performBlock { (done: @escaping (ErrorResult) -> Void) throws -> Void in + DispatchQueue.main.async { let capture = NMBExceptionCapture( handler: ({ exception in - done(.Exception(exception)) + done(.exception(exception)) }), finally: ({ }) ) capture.tryBlock { do { try action() { - done(.None) + done(.none) } } catch let e { - done(.Error(e)) + done(.error(e)) } } } }.timeout(timeout, forcefullyAbortTimeout: leeway).wait("waitUntil(...)", file: file, line: line) switch result { - case .Incomplete: internalError("Reached .Incomplete state for waitUntil(...).") - case .BlockedRunLoop: + case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") + case .blockedRunLoop: fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), file: file, line: line) - case .TimedOut: + case .timedOut: let pluralize = (timeout == 1 ? "" : "s") fail("Waited more than \(timeout) second\(pluralize)", file: file, line: line) - case let .RaisedException(exception): + case let .raisedException(exception): fail("Unexpected exception raised: \(exception)") - case let .ErrorThrown(error): + case let .errorThrown(error): fail("Unexpected error thrown: \(error)") - case .Completed(.Exception(let exception)): + case .completed(.exception(let exception)): fail("Unexpected exception raised: \(exception)") - case .Completed(.Error(let error)): + case .completed(.error(let error)): fail("Unexpected error thrown: \(error)") - case .Completed(.None): // success + case .completed(.none): // success break } } + #if _runtime(_ObjC) @objc(untilFile:line:action:) - internal class func until(file: FileString = __FILE__, line: UInt = __LINE__, action: (() -> Void) -> Void) -> Void { + 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 (() -> Void) -> Void) -> Void { + until(timeout: 1, file: file, line: line, action: action) + } + #endif } -internal func blockedRunLoopErrorMessageFor(fnName: String, leeway: NSTimeInterval) -> String { +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." } @@ -87,7 +93,6 @@ internal func blockedRunLoopErrorMessageFor(fnName: String, leeway: NSTimeInterv /// /// 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 timeout: NSTimeInterval = 1, file: FileString = __FILE__, line: UInt = __LINE__, action: (() -> Void) -> Void) -> Void { +public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) -> Void { NMBWait.until(timeout: timeout, file: file, line: line, action: action) } -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/DSL.swift b/Example/Pods/Nimble/Sources/Nimble/DSL.swift index 4bfb702..7ebd684 100644 --- a/Example/Pods/Nimble/Sources/Nimble/DSL.swift +++ b/Example/Pods/Nimble/Sources/Nimble/DSL.swift @@ -1,8 +1,7 @@ import Foundation /// Make an expectation on a given actual value. The value given is lazily evaluated. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(@autoclosure(escaping) expression: () throws -> T?, file: FileString = __FILE__, line: UInt = __LINE__) -> Expectation { +public func expect(_ expression: @autoclosure @escaping () throws -> T?, file: FileString = #file, line: UInt = #line) -> Expectation { return Expectation( expression: Expression( expression: expression, @@ -11,8 +10,7 @@ public func expect(@autoclosure(escaping) expression: () throws -> T?, file: } /// Make an expectation on a given actual value. The closure is lazily invoked. -@warn_unused_result(message="Follow 'expect(…)' with '.to(…)', '.toNot(…)', 'toEventually(…)', '==', etc.") -public func expect(file: FileString = __FILE__, line: UInt = __LINE__, expression: () throws -> T?) -> Expectation { +public func expect(_ file: FileString = #file, line: UInt = #line, expression: @escaping () throws -> T?) -> Expectation { return Expectation( expression: Expression( expression: expression, @@ -21,33 +19,33 @@ public func expect(file: FileString = __FILE__, line: UInt = __LINE__, expres } /// Always fails the test with a message and a specified location. -public func fail(message: String, location: SourceLocation) { +public func fail(_ message: String, location: SourceLocation) { let handler = NimbleEnvironment.activeInstance.assertionHandler handler.assert(false, message: FailureMessage(stringValue: message), location: location) } /// Always fails the test with a message. -public func fail(message: String, file: FileString = __FILE__, line: UInt = __LINE__) { +public func fail(_ message: String, file: FileString = #file, line: UInt = #line) { fail(message, location: SourceLocation(file: file, line: line)) } /// Always fails the test. -public func fail(file: FileString = __FILE__, line: UInt = __LINE__) { +public func fail(_ file: FileString = #file, line: UInt = #line) { fail("fail() always fails", file: file, line: line) } /// Like Swift's precondition(), but raises NSExceptions instead of sigaborts internal func nimblePrecondition( - @autoclosure expr: () -> Bool, - @autoclosure _ name: () -> String, - @autoclosure _ message: () -> String, - file: StaticString = __FILE__, - line: UInt = __LINE__) -> Bool { + _ 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: name(), + name: NSExceptionName(name()), reason: message(), userInfo: nil) e.raise() @@ -55,14 +53,12 @@ internal func nimblePrecondition( preconditionFailure("\(name()) - \(message())", file: file, line: line) #endif } - return result } -@noreturn -internal func internalError(msg: String, file: FileString = __FILE__, line: UInt = __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." ) -} \ No newline at end of file +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift index 520902d..16d7c3b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Expectation.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -1,6 +1,8 @@ import Foundation -internal func expressionMatches(expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) { +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 @@ -16,7 +18,9 @@ internal func expressionMatches(express } } -internal func expressionDoesNotMatch(expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) { +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 @@ -33,21 +37,26 @@ internal func expressionDoesNotMatch(ex } public struct Expectation { - let expression: Expression - public func verify(pass: Bool, _ message: FailureMessage) { + public let 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) { + 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) verify(pass, msg) } /// Tests the actual value using a matcher to not match. - public func toNot(matcher: U, description: String? = nil) { + 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) verify(pass, msg) } @@ -55,7 +64,9 @@ public struct Expectation { /// Tests the actual value using a matcher to not match. /// /// Alias to toNot(). - public func notTo(matcher: U, description: String? = nil) { + public func notTo(_ matcher: U, description: String? = nil) + where U: Matcher, U.ValueType == T + { toNot(matcher, description: description) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Expression.swift b/Example/Pods/Nimble/Sources/Nimble/Expression.swift index f64ee24..8ba53e4 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Expression.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Expression.swift @@ -2,7 +2,7 @@ import Foundation // Memoizes the given closure, only calling the passed // closure once; even if repeat calls to the returned closure -internal func memoizedClosure(closure: () throws -> T) -> (Bool) throws -> T { +internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { var cache: T? return ({ withoutCaching in if (withoutCaching || cache == nil) { @@ -40,7 +40,7 @@ public struct Expression { /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(expression: () throws -> T?, location: SourceLocation, isClosure: Bool = true) { + public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { self._expression = memoizedClosure(expression) self.location = location self._withoutCaching = false @@ -61,7 +61,7 @@ public struct Expression { /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(memoizedExpression: (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { + public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { self._expression = memoizedExpression self.location = location self._withoutCaching = withoutCaching @@ -76,7 +76,7 @@ public struct Expression { /// /// @param block The block that can cast the current Expression value to a /// new type. - public func cast(block: (T?) throws -> U?) -> Expression { + public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { return Expression(expression: ({ try block(self.evaluate()) }), location: self.location, isClosure: self.isClosure) } diff --git a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift index 4d23bc8..2d245e5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ b/Example/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -9,6 +9,10 @@ public class FailureMessage: NSObject { public var to: String = "to" public var postfixMessage: String = "match" public var postfixActual: String = "" + /// 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 stringValue: String { @@ -33,11 +37,12 @@ public class FailureMessage: NSObject { _stringValueOverride = stringValue } - internal func stripNewlines(str: String) -> String { - var lines: [String] = NSString(string: str).componentsSeparatedByString("\n") as [String] - let whitespace = NSCharacterSet.whitespaceAndNewlineCharacterSet() - lines = lines.map { line in NSString(string: line).stringByTrimmingCharactersInSet(whitespace) } - return lines.joinWithSeparator("") + internal func stripNewlines(_ str: String) -> String { + let whitespaces = CharacterSet.whitespacesAndNewlines + return str + .components(separatedBy: "\n") + .map { line in line.trimmingCharacters(in: whitespaces) } + .joined(separator: "") } internal func computeStringValue() -> String { @@ -46,11 +51,15 @@ public class FailureMessage: NSObject { value = "\(expected) \(to) \(postfixMessage), got \(actualValue)\(postfixActual)" } value = stripNewlines(value) - + + if let extendedMessage = extendedMessage { + value += "\n\(stripNewlines(extendedMessage))" + } + if let userDescription = userDescription { return "\(userDescription)\n\(value)" } return value } -} \ No newline at end of file +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift index d67714b..3a9258d 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -1,55 +1,63 @@ import Foundation -public func allPass - (passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return allPass("pass a condition", passFunc) +public func allPass + (_ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc + where U: Sequence, U.Iterator.Element == T +{ + return allPass("pass a condition", passFunc) } -public func allPass - (passName: String, _ passFunc: (T?) -> Bool) -> NonNilMatcherFunc { - return createAllPassMatcher() { - expression, failureMessage in - failureMessage.postfixMessage = passName - return passFunc(try expression.evaluate()) - } +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 - (matcher: V) -> NonNilMatcherFunc { - return createAllPassMatcher() { - try matcher.matches($0, failureMessage: $1) - } +public func allPass + (_ matcher: V) -> NonNilMatcherFunc + where U: Sequence, V: Matcher, U.Iterator.Element == V.ValueType +{ + return createAllPassMatcher() { + try matcher.matches($0, failureMessage: $1) + } } -private func createAllPassMatcher - (elementEvaluator:(Expression, FailureMessage) throws -> Bool) -> NonNilMatcherFunc { - 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 - } +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 } - - return true + failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" + } else { + failureMessage.postfixMessage = "all pass (use beNil() to match nils)" + return false } + + return true + } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func allPassMatcher(matcher: NMBObjCMatcher) -> NMBObjCMatcher { + public class func allPassMatcher(_ matcher: NMBObjCMatcher) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() @@ -57,8 +65,8 @@ extension NMBObjCMatcher { var collectionIsUsable = true if let value = actualValue as? NSFastEnumeration { - let generator = NSFastGenerator(value) - while let obj:AnyObject = generator.next() { + let generator = NSFastEnumerationIterator(value) + while let obj = generator.next() { if let nsObject = obj as? NSObject { nsObjects.append(nsObject) } else { diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift similarity index 68% rename from Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift rename to Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift index 3df6eb6..6b89c76 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift @@ -1,24 +1,26 @@ import Foundation -#if _runtime(_ObjC) - +/// 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: NSTimeInterval = 1 - public static var PollInterval: NSTimeInterval = 0.01 + public static var Timeout: TimeInterval = 1 + public static var PollInterval: TimeInterval = 0.01 } -internal struct AsyncMatcherWrapper: Matcher { +internal struct AsyncMatcherWrapper: Matcher + where U: Matcher, U.ValueType == T +{ let fullMatcher: U - let timeoutInterval: NSTimeInterval - let pollInterval: NSTimeInterval + let timeoutInterval: TimeInterval + let pollInterval: TimeInterval - init(fullMatcher: U, timeoutInterval: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval) { + 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 { + func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { let uncachedExpression = actualExpression.withoutCaching() let fnName = "expect(...).toEventually(...)" let result = pollBlock( @@ -30,23 +32,23 @@ internal struct AsyncMatcherWrapper: Ma try self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) } switch (result) { - case let .Completed(isSuccessful): return isSuccessful - case .TimedOut: return false - case let .ErrorThrown(error): + 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): + case let .raisedException(exception): failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" return false - case .BlockedRunLoop: + case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." return false - case .Incomplete: - internalError("Reached .Incomplete state for toEventually(...).") + case .incomplete: + internalError("Reached .incomplete state for toEventually(...).") } } - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { let uncachedExpression = actualExpression.withoutCaching() let result = pollBlock( pollInterval: pollInterval, @@ -57,19 +59,19 @@ internal struct AsyncMatcherWrapper: Ma try self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) } switch (result) { - case let .Completed(isSuccessful): return isSuccessful - case .TimedOut: return false - case let .ErrorThrown(error): + 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): + case let .raisedException(exception): failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" return false - case .BlockedRunLoop: + case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." return false - case .Incomplete: - internalError("Reached .Incomplete state for toEventuallyNot(...).") + case .incomplete: + internalError("Reached .incomplete state for toEventuallyNot(...).") } } } @@ -84,7 +86,9 @@ extension Expectation { /// @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: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + 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, @@ -107,7 +111,9 @@ extension Expectation { /// @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: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + 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, @@ -132,9 +138,9 @@ extension Expectation { /// @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: NSTimeInterval = AsyncDefaults.Timeout, pollInterval: NSTimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + 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) } } - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift index d1f3737..99b8f8f 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -3,7 +3,7 @@ import Foundation #if _runtime(_ObjC) // A Nimble matcher that catches attempts to use beAKindOf with non Objective-C types -public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { +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." @@ -14,21 +14,21 @@ public func beAKindOf(expectedClass: Any) -> NonNilMatcherFunc { /// 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 { +public func beAKindOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" + failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" } else { failureMessage.actualValue = "" } - failureMessage.postfixMessage = "be a kind of \(classAsString(expectedClass))" - return instance != nil && instance!.isKindOfClass(expectedClass) + failureMessage.postfixMessage = "be a kind of \(String(describing: expectedClass))" + return instance != nil && instance!.isKind(of: expectedClass) } } extension NMBObjCMatcher { - public class func beAKindOfMatcher(expected: AnyClass) -> NMBMatcher { + public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! beAKindOf(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift index 32477dd..2298c78 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -1,7 +1,7 @@ import Foundation // A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types -public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { +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." @@ -12,26 +12,26 @@ public func beAnInstanceOf(expectedClass: Any) -> NonNilMatcherFunc { /// 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 { +public func beAnInstanceOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(classAsString(validInstance.dynamicType)) instance>" + failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" } else { failureMessage.actualValue = "" } - failureMessage.postfixMessage = "be an instance of \(classAsString(expectedClass))" + failureMessage.postfixMessage = "be an instance of \(String(describing: expectedClass))" #if _runtime(_ObjC) - return instance != nil && instance!.isMemberOfClass(expectedClass) + return instance != nil && instance!.isMember(of: expectedClass) #else - return instance != nil && instance!.dynamicType == expectedClass + return instance != nil && type(of: instance!) == expectedClass #endif } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beAnInstanceOfMatcher(expected: AnyClass) -> NMBMatcher { + public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! beAnInstanceOf(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift index bcab1c9..48e9895 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -1,17 +1,10 @@ -#if os(Linux) -import Glibc -#endif import Foundation internal let DefaultDelta = 0.0001 -internal func isCloseTo(actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { +internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - if actualValue != nil { - failureMessage.actualValue = "<\(stringify(actualValue!))>" - } else { - failureMessage.actualValue = "" - } + failureMessage.actualValue = "<\(stringify(actualValue))>" return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta } @@ -19,7 +12,7 @@ internal func isCloseTo(actualValue: NMBDoubleConvertible?, expectedValue: NMBDo /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(expectedValue: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { +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) } @@ -29,7 +22,7 @@ public func beCloseTo(expectedValue: Double, within delta: Double = DefaultDelta /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { +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) } @@ -44,7 +37,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { _delta = within } - public func matches(actualExpression: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -53,7 +46,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { return try! matcher.matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(actualExpression: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -70,13 +63,13 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { } extension NMBObjCMatcher { - public class func beCloseToMatcher(expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { + public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { return NMBObjCBeCloseToMatcher(expected: expected, within: within) } } #endif -public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDelta) -> NonNilMatcherFunc <[Double]> { +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() { @@ -85,7 +78,7 @@ public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDe if actual.count != expectedValues.count { return false } else { - for (index, actualItem) in actual.enumerate() { + for (index, actualItem) in actual.enumerated() { if fabs(actualItem - expectedValues[index]) > delta { return false } @@ -99,30 +92,31 @@ public func beCloseTo(expectedValues: [Double], within delta: Double = DefaultDe // MARK: - Operators -infix operator ≈ { - associativity none - precedence 130 -} +infix operator ≈ : ComparisonPrecedence public func ≈(lhs: Expectation<[Double]>, rhs: [Double]) { lhs.to(beCloseTo(rhs)) } -public func ≈(lhs: Expectation, rhs: Double) { +public func ≈(lhs: Expectation, rhs: NMBDoubleConvertible) { lhs.to(beCloseTo(rhs)) } -public func ≈(lhs: Expectation, rhs: (expected: Double, delta: Double)) { +public func ≈(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) } -public func ==(lhs: Expectation, rhs: (expected: Double, delta: Double)) { +public func ==(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, 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 // unexpectantly -infix operator ± { precedence 170 } -public func ±(lhs: Double, rhs: Double) -> (expected: Double, delta: Double) { +precedencegroup PlusMinusOperatorPrecedence { + higherThan: BitwiseShiftPrecedence +} + +infix operator ± : PlusMinusOperatorPrecedence +public func ±(lhs: NMBDoubleConvertible, rhs: Double) -> (expected: NMBDoubleConvertible, 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 bc1bb9f..19df0d2 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -3,14 +3,14 @@ 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() -> NonNilMatcherFunc { +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!.generate() + var generator = actualSeq!.makeIterator() return generator.next() == nil } } @@ -36,7 +36,7 @@ public func beEmpty() -> NonNilMatcherFunc { } // Without specific overrides, beEmpty() is ambiguous for NSDictionary, NSArray, -// etc, since they conform to SequenceType as well as NMBCollection. +// etc, since they conform to Sequence as well as NMBCollection. /// 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. @@ -82,8 +82,8 @@ extension NMBObjCMatcher { let expr = Expression(expression: ({ value as String }), location: location) return try! beEmpty().matches(expr, failureMessage: failureMessage) } else if let actualValue = actualValue { - failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSDictionaries, NSHashTables, and NSStrings)" - failureMessage.actualValue = "\(classAsString(actualValue.dynamicType)) type" + failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" + failureMessage.actualValue = "\(String(describing: type(of: actualValue))) type" } return false } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift index 0f24ab5..1345199 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -2,19 +2,22 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: T?) -> NonNilMatcherFunc { +public func beGreaterThan(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() > expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual > expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { +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) == NSComparisonResult.OrderedDescending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending return matches } } @@ -29,7 +32,7 @@ public func >(lhs: Expectation, rhs: NMBComparable?) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beGreaterThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beGreaterThan(expected).matches(expr, failureMessage: failureMessage) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift index c89ff07..2949fce 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -2,21 +2,24 @@ 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 { +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() - return actualValue >= expectedValue + if let actual = actualValue, let expected = expectedValue { + return actual >= expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +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() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedAscending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending return matches } } @@ -31,7 +34,7 @@ public func >=(lhs: Expectation, rhs: T) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beGreaterThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beGreaterThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift index a369501..ca3357b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -3,19 +3,27 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. -public func beIdenticalTo(expected: AnyObject?) -> NonNilMatcherFunc { +public func beIdenticalTo(_ expected: Any?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in - let actual = try actualExpression.evaluate() + #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))" - return actual === expected && actual !== nil + #if os(Linux) + return actual === (expected as? AnyObject) && actual !== nil + #else + return actual === (expected as AnyObject?) && actual !== nil + #endif } } -public func ===(lhs: Expectation, rhs: AnyObject?) { +public func ===(lhs: Expectation, rhs: Any?) { lhs.to(beIdenticalTo(rhs)) } -public func !==(lhs: Expectation, rhs: AnyObject?) { +public func !==(lhs: Expectation, rhs: Any?) { lhs.toNot(beIdenticalTo(rhs)) } @@ -23,15 +31,15 @@ public func !==(lhs: Expectation, rhs: AnyObject?) { /// as the expected instance. /// /// Alias for "beIdenticalTo". -public func be(expected: AnyObject?) -> NonNilMatcherFunc { +public func be(_ expected: Any?) -> NonNilMatcherFunc { return beIdenticalTo(expected) } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beIdenticalToMatcher(expected: NSObject?) -> NMBObjCMatcher { + public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let aExpr = actualExpression.cast { $0 as AnyObject? } + let aExpr = actualExpression.cast { $0 as Any? } return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift index ea4725b..fbcd7c7 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -1,19 +1,22 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: T?) -> NonNilMatcherFunc { +public func beLessThan(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" - return try actualExpression.evaluate() < expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual < expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(expectedValue: NMBComparable?) -> NonNilMatcherFunc { +public func beLessThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == NSComparisonResult.OrderedAscending + let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending return matches } } @@ -28,9 +31,9 @@ public func <(lhs: Expectation, rhs: NMBComparable?) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beLessThanMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { $0 as! NMBComparable? } + let expr = actualExpression.cast { $0 as? NMBComparable } return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift index a24cf8c..a0cd2f0 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -2,20 +2,23 @@ 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 { +public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" - return try actualExpression.evaluate() <= expectedValue + if let actual = try actualExpression.evaluate(), let expected = expectedValue { + return actual <= expected + } + return false } } /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(expectedValue: T?) -> NonNilMatcherFunc { +public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - return actualValue != nil && actualValue!.NMB_compare(expectedValue) != NSComparisonResult.OrderedDescending + return actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedDescending } } @@ -29,7 +32,7 @@ public func <=(lhs: Expectation, rhs: T) { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beLessThanOrEqualToMatcher(expected: NMBComparable?) -> NMBObjCMatcher { + public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beLessThanOrEqualTo(expected).matches(expr, failureMessage: failureMessage) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift index cabf583..49272a3 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -1,15 +1,81 @@ import Foundation -internal func matcherWithFailureMessage(matcher: M, postprocessor: (FailureMessage) -> Void) -> FullMatcherFunc { - return FullMatcherFunc { actualExpression, failureMessage, isNegation in - let pass: Bool - if isNegation { - pass = try matcher.doesNotMatch(actualExpression, failureMessage: failureMessage) - } else { - pass = try matcher.matches(actualExpression, failureMessage: failureMessage) - } - postprocessor(failureMessage) - return pass +extension Int8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int8Value + } +} + +extension UInt8: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint8Value + } +} + +extension Int16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int16Value + } +} + +extension UInt16: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint16Value + } +} + +extension Int32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int32Value + } +} + +extension UInt32: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint32Value + } +} + +extension Int64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).int64Value + } +} + +extension UInt64: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uint64Value + } +} + +extension Float: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).floatValue + } +} + +extension Double: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).doubleValue + } +} + +extension Int: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).intValue + } +} + +extension UInt: ExpressibleByBooleanLiteral { + public init(booleanLiteral value: Bool) { + self = NSNumber(value: value).uintValue + } +} + +internal func matcherWithFailureMessage(_ matcher: NonNilMatcherFunc, postprocessor: @escaping (FailureMessage) -> Void) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + defer { postprocessor(failureMessage) } + return try matcher.matcher(actualExpression, failureMessage) } } @@ -17,7 +83,7 @@ internal func matcherWithFailureMessage(ma /// A Nimble matcher that succeeds when the actual value is exactly true. /// This matcher will not match against nils. -public func beTrue() -> FullMatcherFunc { +public func beTrue() -> NonNilMatcherFunc { return matcherWithFailureMessage(equal(true)) { failureMessage in failureMessage.postfixMessage = "be true" } @@ -25,7 +91,7 @@ public func beTrue() -> FullMatcherFunc { /// A Nimble matcher that succeeds when the actual value is exactly false. /// This matcher will not match against nils. -public func beFalse() -> FullMatcherFunc { +public func beFalse() -> NonNilMatcherFunc { return matcherWithFailureMessage(equal(false)) { failureMessage in failureMessage.postfixMessage = "be false" } @@ -34,14 +100,20 @@ public func beFalse() -> FullMatcherFunc { // MARK: beTruthy() / beFalsy() /// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> MatcherFunc { +public func beTruthy() -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be truthy" let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue == true + // 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 } @@ -49,14 +121,20 @@ public func beTruthy() -> MatcherFunc { /// A Nimble matcher that succeeds when the actual value is logically false. /// This matcher will match against nils. -public func beFalsy() -> MatcherFunc { +public func beFalsy() -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "be falsy" let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { - if let actualValue = actualValue as? BooleanType { - return actualValue.boolValue != true + // 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 } @@ -66,28 +144,28 @@ public func beFalsy() -> MatcherFunc { extension NMBObjCMatcher { public class func beTruthyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTruthy().matches(expr, failureMessage: failureMessage) } } public class func beFalsyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as BooleanType? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalsy().matches(expr, failureMessage: failureMessage) } } public class func beTrueMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTrue().matches(expr, failureMessage: failureMessage) } } public class func beFalseMatcher() -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in - let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false as Bool? } + let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalse().matches(expr, failureMessage: failureMessage) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift index 0b5e0e1..ef6c603 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -3,11 +3,13 @@ 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 { +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.generate() + var actualGenerator = actualValue.makeIterator() return actualGenerator.next() == startingElement } return false @@ -16,22 +18,30 @@ public func beginWith NonNilMatcherFunc { +public func beginWith(_ startingElement: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "begin with <\(startingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(startingElement) == 0 + guard let collection = try actualExpression.evaluate() else { return false } + guard collection.count > 0 else { return false } + #if os(Linux) + guard let collectionValue = collection.object(at: 0) as? NSObject else { + return false + } + #else + let collectionValue = collection.object(at: 0) as AnyObject + #endif + return 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 { +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.rangeOfString(startingSubstring) - return range != nil && range!.startIndex == actual.startIndex + let range = actual.range(of: startingSubstring) + return range != nil && range!.lowerBound == actual.startIndex } return false } @@ -39,7 +49,7 @@ public func beginWith(startingSubstring: String) -> NonNilMatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func beginWithMatcher(expected: AnyObject) -> 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 { diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift index bdac2d5..4400d30 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -1,11 +1,15 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(items: T...) -> NonNilMatcherFunc { +public func contain(_ items: T...) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return contain(items) } -private func contain(items: [T]) -> NonNilMatcherFunc { +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() { @@ -18,16 +22,16 @@ private func contain NonNilMatcherFunc { +public func contain(_ substrings: String...) -> NonNilMatcherFunc { return contain(substrings) } -private func contain(substrings: [String]) -> NonNilMatcherFunc { +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.rangeOfString($0) + let range = actual.range(of: $0) return range != nil && !range!.isEmpty } } @@ -36,38 +40,38 @@ private func contain(substrings: [String]) -> NonNilMatcherFunc { } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(substrings: NSString...) -> NonNilMatcherFunc { +public func contain(_ substrings: NSString...) -> NonNilMatcherFunc { return contain(substrings) } -private func contain(substrings: [NSString]) -> NonNilMatcherFunc { +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.rangeOfString($0.description).length != 0 } + return substrings.all { actual.range(of: $0.description).length != 0 } } return false } } /// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(items: AnyObject?...) -> NonNilMatcherFunc { +public func contain(_ items: Any?...) -> NonNilMatcherFunc { return contain(items) } -private func contain(items: [AnyObject?]) -> NonNilMatcherFunc { +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.containsObject(item!) + return item != nil && actual.contains(item!) } } } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func containMatcher(expected: [NSObject]) -> NMBObjCMatcher { + public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() @@ -75,7 +79,7 @@ extension NMBObjCMatcher { 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: [AnyObject?] = expected.map({ $0 as AnyObject? }) + let expectedOptionals: [Any?] = expected.map({ $0 as Any? }) return try! contain(expectedOptionals).matches(expr, failureMessage: failureMessage) } else if let value = actualValue as? NSString { let expr = Expression(expression: ({ value as String }), location: location) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift index ff2bd9e..b96e96c 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -3,12 +3,14 @@ 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 { +public func endWith(_ endingElement: T) -> NonNilMatcherFunc + where S.Iterator.Element == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" if let actualValue = try actualExpression.evaluate() { - var actualGenerator = actualValue.generate() + var actualGenerator = actualValue.makeIterator() var lastItem: T? var item: T? repeat { @@ -24,11 +26,20 @@ public func endWith NonNilMatcherFunc { +public func endWith(_ endingElement: Any) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" - let collection = try actualExpression.evaluate() - return collection != nil && collection!.indexOfObject(endingElement) == collection!.count - 1 + guard let collection = try actualExpression.evaluate() else { return false } + guard collection.count > 0 else { return false } + #if os(Linux) + guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { + return false + } + #else + let collectionValue = collection.object(at: collection.count - 1) as AnyObject + #endif + + return collectionValue.isEqual(endingElement) } } @@ -36,12 +47,11 @@ public func endWith(endingElement: AnyObject) -> NonNilMatcherFunc NonNilMatcherFunc { +public func endWith(_ endingSubstring: String) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingSubstring)>" if let collection = try actualExpression.evaluate() { - let range = collection.rangeOfString(endingSubstring) - return range != nil && range!.endIndex == collection.endIndex + return collection.hasSuffix(endingSubstring) } return false } @@ -49,7 +59,7 @@ public func endWith(endingSubstring: String) -> NonNilMatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func endWithMatcher(expected: AnyObject) -> 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 { diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift index 6373d8c..53579e0 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -4,7 +4,7 @@ import Foundation /// 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 { +public func equal(_ expectedValue: T?) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -23,7 +23,7 @@ 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]> { +public func equal(_ expectedValue: [T: C]?) -> NonNilMatcherFunc<[T: C]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -39,7 +39,7 @@ public func equal(expectedValue: [T: C]?) -> NonNilM /// 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]> { +public func equal(_ expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() @@ -54,7 +54,7 @@ public func equal(expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { } /// A Nimble matcher allowing comparison of collection with optional type -public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { +public func equal(_ expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" if let actualValue = try actualExpression.evaluate() { @@ -62,7 +62,7 @@ public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> return false } - for (index, item) in actualValue.enumerate() { + for (index, item) in actualValue.enumerated() { let otherItem = expectedValue[index] if item == nil && otherItem == nil { continue @@ -85,22 +85,22 @@ public func equal(expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> } /// 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) +public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { + return 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> { +public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc> { return equal(expectedValue, stringify: { if let set = $0 { - return stringify(Array(set).sort { $0 < $1 }) + return stringify(Array(set).sorted { $0 < $1 }) } else { return "nil" } }) } -private func equal(expectedValue: Set?, stringify: Set? -> String) -> NonNilMatcherFunc> { +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> NonNilMatcherFunc> { return NonNilMatcherFunc { actualExpression, failureMessage in failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" @@ -112,12 +112,12 @@ private func equal(expectedValue: Set?, stringify: Set? -> String) -> N return true } - let missing = expectedValue.subtract(actualValue) + let missing = expectedValue.subtracting(actualValue) if missing.count > 0 { failureMessage.postfixActual += ", missing <\(stringify(missing))>" } - let extra = actualValue.subtract(expectedValue) + let extra = actualValue.subtracting(expectedValue) if extra.count > 0 { failureMessage.postfixActual += ", extra <\(stringify(extra))>" } @@ -172,7 +172,7 @@ public func !=(lhs: Expectation<[T: C]>, rhs: [T: C] #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func equalMatcher(expected: NSObject) -> NMBMatcher { + public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in return try! equal(expected).matches(actualExpression, failureMessage: failureMessage) } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift index 7a66d2a..5b24af2 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -1,13 +1,19 @@ import Foundation -/// A Nimble matcher that succeeds when the actual CollectionType's count equals +// 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. +// The representation of the collection content is provided in a new line as an `extendedMessage`. + +/// A Nimble matcher that succeeds when the actual Collection's count equals /// the expected value -public func haveCount(expectedValue: T.Index.Distance) -> NonNilMatcherFunc { +public func haveCount(_ expectedValue: T.IndexDistance) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" return result } else { return false @@ -17,12 +23,13 @@ public func haveCount(expectedValue: T.Index.Distance) -> Non /// A Nimble matcher that succeeds when the actual collection's count equals /// the expected value -public func haveCount(expectedValue: Int) -> MatcherFunc { +public func haveCount(_ expectedValue: Int) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" + failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" + failureMessage.extendedMessage = "Actual Value: \(stringify(actualValue))" return result } else { return false @@ -32,16 +39,16 @@ public func haveCount(expectedValue: Int) -> MatcherFunc { #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func haveCountMatcher(expected: NSNumber) -> NMBObjCMatcher { + public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() if let value = actualValue as? NMBCollection { let expr = Expression(expression: ({ value as NMBCollection}), location: location) - return try! haveCount(expected.integerValue).matches(expr, failureMessage: failureMessage) + 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 = "\(classAsString(actualValue.dynamicType))" + failureMessage.actualValue = "\(String(describing: type(of: actualValue)))" } return false } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift index 586e616..3ad5fb5 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -1,16 +1,14 @@ import Foundation -#if _runtime(_ObjC) - /// A Nimble matcher that succeeds when the actual string satisfies the regular expression /// described by the expected string. -public func match(expectedValue: String?) -> NonNilMatcherFunc { +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.rangeOfString(regexp, options: .RegularExpressionSearch) != nil + return actual.range(of: regexp, options: .regularExpression) != nil } } @@ -18,8 +16,10 @@ public func match(expectedValue: String?) -> NonNilMatcherFunc { } } +#if _runtime(_ObjC) + extension NMBObjCMatcher { - public class func matchMatcher(expected: NSString) -> NMBMatcher { + public class func matchMatcher(_ expected: NSString) -> NMBMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = actualExpression.cast { $0 as? String } return try! match(expected.description).matches(actual, failureMessage: failureMessage) diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift new file mode 100644 index 0000000..2092cb6 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -0,0 +1,26 @@ +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 comparision by _domain and _code. +public func matchError(_ error: T) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + let actualError: Error? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) + return errorMatchesNonNilFieldsOrClosure(actualError, error: error) + } +} + +/// 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() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) + return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift similarity index 54% rename from Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift rename to Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift index ff9c2ee..02d3245 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Wrappers/MatcherFunc.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift @@ -1,29 +1,3 @@ -/// A convenience API to build matchers that allow full control over -/// to() and toNot() match cases. -/// -/// The final bool argument in the closure is if the match is for negation. -/// -/// 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 FullMatcherFunc: Matcher { - public let matcher: (Expression, FailureMessage, Bool) throws -> Bool - - public init(_ matcher: (Expression, FailureMessage, Bool) throws -> Bool) { - self.matcher = matcher - } - - public func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage, false) - } - - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { - return try matcher(actualExpression, failureMessage, true) - } -} - /// A convenience API to build matchers that don't need special negation /// behavior. The toNot() behavior is the negation of to(). /// @@ -38,15 +12,15 @@ public struct FullMatcherFunc: Matcher { public struct MatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool - public init(_ 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 { + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { return try matcher(actualExpression, failureMessage) } - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { return try !matcher(actualExpression, failureMessage) } } @@ -65,11 +39,11 @@ public struct MatcherFunc: Matcher { public struct NonNilMatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool - public init(_ 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 { + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { let pass = try matcher(actualExpression, failureMessage) if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { return false @@ -77,7 +51,7 @@ public struct NonNilMatcherFunc: Matcher { return pass } - public func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { let pass = try !matcher(actualExpression, failureMessage) if try attachNilErrorIfNeeded(actualExpression, failureMessage: failureMessage) { return false @@ -85,7 +59,7 @@ public struct NonNilMatcherFunc: Matcher { return pass } - internal func attachNilErrorIfNeeded(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + internal func attachNilErrorIfNeeded(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { if try actualExpression.evaluate() == nil { failureMessage.postfixActual = " (use beNil() to match nils)" return true diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift index dd2e8b4..ac1eb9d 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -1,30 +1,36 @@ import Foundation +// `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. +#if _runtime(_ObjC) + import CoreGraphics +#endif /// Implement this protocol to implement a custom matcher for Swift public protocol Matcher { - typealias ValueType - func matches(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool - func doesNotMatch(actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool + 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: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool - func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool + 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 { - func containsObject(object: AnyObject!) -> Bool + @objc(containsObject:) + func contains(_ anObject: Any) -> Bool } -extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet +// 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 containsObject(object: AnyObject) -> Bool + func contains(_ anObject: Any) -> Bool } #endif @@ -46,87 +52,77 @@ public protocol NMBCollection { #endif 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 { - func indexOfObject(object: AnyObject!) -> Int + @objc(objectAtIndex:) + func object(at index: Int) -> Any } #else public protocol NMBOrderedCollection : NMBCollection { - func indexOfObject(object: AnyObject) -> Int + func object(at index: Int) -> Any } #endif extension NSArray : NMBOrderedCollection {} -#if _runtime(_ObjC) -/// Protocol for types to support beCloseTo() matcher -@objc public protocol NMBDoubleConvertible { - var doubleValue: CDouble { get } -} -#else public protocol NMBDoubleConvertible { var doubleValue: CDouble { get } } extension Double : NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return self - } + return self } } extension Float : NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return CDouble(self) - } + return CDouble(self) + } +} + +extension CGFloat: NMBDoubleConvertible { + public var doubleValue: CDouble { + return CDouble(self) } } -#endif extension NSNumber : NMBDoubleConvertible { } -private let dateFormatter: NSDateFormatter = { - let formatter = NSDateFormatter() +private let dateFormatter: DateFormatter = { + let formatter = DateFormatter() formatter.dateFormat = "yyyy-MM-dd HH:mm:ss.SSSS" - formatter.locale = NSLocale(localeIdentifier: "en_US_POSIX") + formatter.locale = Locale(identifier: "en_US_POSIX") return formatter }() -#if _runtime(_ObjC) +extension Date: NMBDoubleConvertible { + public var doubleValue: CDouble { + return self.timeIntervalSinceReferenceDate + } +} + extension NSDate: NMBDoubleConvertible { public var doubleValue: CDouble { - get { - return self.timeIntervalSinceReferenceDate - } + return self.timeIntervalSinceReferenceDate } } -#endif +extension Date: TestOutputStringConvertible { + public var testDescription: String { + return dateFormatter.string(from: self) + } +} -extension NMBDoubleConvertible { - public var stringRepresentation: String { - get { - if let date = self as? NSDate { - return dateFormatter.stringFromDate(date) - } - - if let debugStringConvertible = self as? CustomDebugStringConvertible { - return debugStringConvertible.debugDescription - } - - if let stringConvertible = self as? CustomStringConvertible { - return stringConvertible.description - } - - return "" - } +extension NSDate: TestOutputStringConvertible { + public var testDescription: String { + return dateFormatter.string(from: Date(timeIntervalSinceReferenceDate: self.timeIntervalSinceReferenceDate)) } } @@ -136,22 +132,22 @@ extension NMBDoubleConvertible { /// Types that conform to Swift's Comparable protocol will work implicitly too #if _runtime(_ObjC) @objc public protocol NMBComparable { - func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult + 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!) -> NSComparisonResult + func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult } #endif extension NSNumber : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! NSNumber) } } extension NSString : NMBComparable { - public func NMB_compare(otherObject: NMBComparable!) -> NSComparisonResult { + public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! String) } } diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift index 0191f88..84b9d49 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -1,23 +1,23 @@ import Foundation internal class NotificationCollector { - private(set) var observedNotifications: [NSNotification] - private let notificationCenter: NSNotificationCenter + private(set) var observedNotifications: [Notification] + private let notificationCenter: NotificationCenter #if _runtime(_ObjC) private var token: AnyObject? #else private var token: NSObjectProtocol? #endif - required init(notificationCenter: NSNotificationCenter) { + required init(notificationCenter: NotificationCenter) { self.notificationCenter = notificationCenter self.observedNotifications = [] } func startObserving() { - self.token = self.notificationCenter.addObserverForName(nil, object: nil, queue: nil) { + self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil) { // linux-swift gets confused by .append(n) - [weak self] n in self?.observedNotifications += [n] + [weak self] n in self?.observedNotifications.append(n) } } @@ -36,31 +36,35 @@ internal class NotificationCollector { private let mainThread = pthread_self() -public func postNotifications( - notificationsMatcher: T, - fromNotificationCenter center: NSNotificationCenter = NSNotificationCenter.defaultCenter()) - -> MatcherFunc { - let _ = mainThread // Force lazy-loading of this value - let collector = NotificationCollector(notificationCenter: center) - collector.startObserving() - var once: Bool = false - return MatcherFunc { actualExpression, failureMessage in - let collectorNotificationsExpression = Expression(memoizedExpression: { _ in - return collector.observedNotifications - }, location: actualExpression.location, withoutCaching: true) +let notificationCenterDefault = NotificationCenter.default - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") - if !once { - once = true - try actualExpression.evaluate() - } +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) + collector.startObserving() + var once: Bool = false + return MatcherFunc { actualExpression, failureMessage in + let collectorNotificationsExpression = Expression(memoizedExpression: { _ in + return collector.observedNotifications + }, location: actualExpression.location, withoutCaching: true) - let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) - if collector.observedNotifications.isEmpty { - failureMessage.actualValue = "no notifications" - } else { - failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" - } - return match + assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") + if !once { + once = true + _ = try actualExpression.evaluate() + } + + let match = try notificationsMatcher.matches(collectorNotificationsExpression, failureMessage: failureMessage) + if collector.observedNotifications.isEmpty { + failureMessage.actualValue = "no notifications" + } else { + failureMessage.actualValue = "<\(stringify(collector.observedNotifications))>" } -} \ No newline at end of file + return match + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift index ff6b74a..09e28c7 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -13,7 +13,7 @@ import Foundation /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. public func raiseException( - named named: String? = nil, + named: String? = nil, reason: String? = nil, userInfo: NSDictionary? = nil, closure: ((NSException) -> Void)? = nil) -> MatcherFunc { @@ -25,7 +25,7 @@ public func raiseException( }), finally: nil) capture.tryBlock { - try! actualExpression.evaluate() + _ = try! actualExpression.evaluate() return } @@ -35,7 +35,7 @@ public func raiseException( } internal func setFailureMessageForException( - failureMessage: FailureMessage, + _ failureMessage: FailureMessage, exception: NSException?, named: String?, reason: String?, @@ -60,14 +60,14 @@ internal func setFailureMessageForException( } if let exception = exception { - failureMessage.actualValue = "\(classAsString(exception.dynamicType)) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" + failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" } else { failureMessage.actualValue = "no exception" } } internal func exceptionMatchesNonNilFieldsOrClosure( - exception: NSException?, + _ exception: NSException?, named: String?, reason: String?, userInfo: NSDictionary?, @@ -77,13 +77,14 @@ internal func exceptionMatchesNonNilFieldsOrClosure( if let exception = exception { matches = true - if named != nil && exception.name != named { + if let named = named, exception.name.rawValue != named { matches = false } if reason != nil && exception.reason != reason { matches = false } - if userInfo != nil && exception.userInfo != userInfo { + if let userInfo = userInfo, let exceptionUserInfo = exception.userInfo, + (exceptionUserInfo as NSDictionary) != userInfo { matches = false } if let closure = closure { @@ -113,8 +114,8 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { _block = block } - public func matches(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { - let block: () -> Any? = ({ actualBlock(); return nil }) + 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( @@ -125,11 +126,11 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { ).matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(actualBlock: () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { return !matches(actualBlock, failureMessage: failureMessage, location: location) } - public var named: (name: String) -> NMBObjCRaiseExceptionMatcher { + public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { return ({ name in return NMBObjCRaiseExceptionMatcher( name: name, @@ -140,7 +141,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var reason: (reason: String?) -> NMBObjCRaiseExceptionMatcher { + public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { return ({ reason in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -151,7 +152,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var userInfo: (userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { + public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { return ({ userInfo in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -162,7 +163,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var satisfyingBlock: (block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { + public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { return ({ block in return NMBObjCRaiseExceptionMatcher( name: self._name, diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift index ddeddde..b24b3ec 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -2,11 +2,15 @@ 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 { +public func satisfyAnyOf(_ matchers: U...) -> NonNilMatcherFunc + where U: Matcher, U.ValueType == T +{ return satisfyAnyOf(matchers) } -internal func satisfyAnyOf(matchers: [U]) -> NonNilMatcherFunc { +internal func satisfyAnyOf(_ matchers: [U]) -> NonNilMatcherFunc + where U: Matcher, U.ValueType == T +{ return NonNilMatcherFunc { actualExpression, failureMessage in let postfixMessages = NSMutableArray() var matches = false @@ -14,10 +18,10 @@ internal func satisfyAnyOf(matchers: [U] if try matcher.matches(actualExpression, failureMessage: failureMessage) { matches = true } - postfixMessages.addObject(NSString(string: "{\(failureMessage.postfixMessage)}")) + postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) } - failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoinedByString(", or ") + failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") if let actualValue = try actualExpression.evaluate() { failureMessage.actualValue = "\(actualValue)" } @@ -30,17 +34,13 @@ public func ||(left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> No return satisfyAnyOf(left, right) } -public func ||(left: FullMatcherFunc, right: FullMatcherFunc) -> NonNilMatcherFunc { - return satisfyAnyOf(left, right) -} - public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherFunc { return satisfyAnyOf(left, right) } #if _runtime(_ObjC) extension NMBObjCMatcher { - public class func satisfyAnyOfMatcher(matchers: [NMBObjCMatcher]) -> 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" diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift new file mode 100644 index 0000000..67f9cf6 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -0,0 +1,55 @@ +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 + + let caughtException: BadInstructionException? = catchBadInstruction { + #if os(tvOS) + 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' " + + "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + + "'Debug Executable'. If you've already done that, suppress this warning " + + "by setting `NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true`. " + + "This is required because the standard methods of catching assertions " + + "(mach APIs) are unavailable for tvOS. Instead, the same mechanism the " + + "debugger uses is the fallback method for tvOS." + ) + print() + NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true + } + #endif + do { + try actualExpression.evaluate() + } catch let error { + succeeded = false + failureMessage.postfixMessage += "; threw error instead <\(error)>" + } + } + + if !succeeded { + return false + } + + if caughtException == nil { + return false + } + + 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") + #endif + } +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift index c12e31c..8c9b91b 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -11,15 +11,15 @@ import Foundation /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func throwError( - error: T? = nil, +public func throwError( + _ error: T? = nil, errorType: T.Type? = nil, closure: ((T) -> Void)? = nil) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in - var actualError: ErrorType? + var actualError: Error? do { - try actualExpression.evaluate() + _ = try actualExpression.evaluate() } catch let catchedError { actualError = catchedError } @@ -29,107 +29,20 @@ public func throwError( } } -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - error: T?, - errorType: T.Type? = nil, - closure: ((T) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let error = error { - if let error = error as? CustomDebugStringConvertible { - failureMessage.postfixMessage += " <\(error.debugDescription)>" - } else { - failureMessage.postfixMessage += " <\(error)>" - } - } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" - } - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } - if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - return actualError._domain == expectedError._domain - && actualError._code == expectedError._code -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - if let actualError = actualError as? T { - return actualError == expectedError - } - return false -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - error: T?, - errorType: T.Type?, - closure: ((T) -> Void)?) -> 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 && closure != nil { - // The closure expects another ErrorType as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - let assertions = gatherExpectations { - expect(actualError is T).to(equal(true)) - } - precondition(assertions.map { $0.message }.count > 0) - matches = false - } - } - - return matches -} - - /// 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 ErrorType in the closure. +/// values of the existential type `Error` in the closure. /// /// The closure only gets called when an error was thrown. public func throwError( - closure closure: ((ErrorType) -> Void)? = nil) -> MatcherFunc { + closure: ((Error) -> Void)? = nil) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in - var actualError: ErrorType? + var actualError: Error? do { - try actualExpression.evaluate() + _ = try actualExpression.evaluate() } catch let catchedError { actualError = catchedError } @@ -138,44 +51,3 @@ public func throwError( return errorMatchesNonNilFieldsOrClosure(actualError, closure: closure) } } - -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } else { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - closure: ((ErrorType) -> 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 - } - } - } - - return matches -} diff --git a/Example/Pods/Nimble/Sources/Nimble/Nimble.h b/Example/Pods/Nimble/Sources/Nimble/Nimble.h index 296760c..790d16d 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Nimble.h +++ b/Example/Pods/Nimble/Sources/Nimble/Nimble.h @@ -1,6 +1,14 @@ #import #import "NMBExceptionCapture.h" +#import "NMBStringify.h" #import "DSL.h" +#import "CwlCatchException.h" +#import "CwlCatchBadInstruction.h" + +#if !TARGET_OS_TV + #import "mach_excServer.h" +#endif + FOUNDATION_EXPORT double NimbleVersionNumber; -FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; \ No newline at end of file +FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift index 2a86749..c902692 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Async.swift @@ -1,10 +1,13 @@ +import CoreFoundation +import Dispatch import Foundation -#if _runtime(_ObjC) -import Dispatch +#if !_runtime(_ObjC) + import CDispatch +#endif -private let timeoutLeeway: UInt64 = NSEC_PER_MSEC -private let pollLeeway: UInt64 = NSEC_PER_MSEC +private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) +private let pollLeeway = DispatchTimeInterval.milliseconds(1) /// Stores debugging information about callers internal struct WaitingInfo: CustomStringConvertible { @@ -18,7 +21,7 @@ internal struct WaitingInfo: CustomStringConvertible { } internal protocol WaitLock { - func acquireWaitingLock(fnName: String, file: FileString, line: UInt) + func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) func releaseWaitingLock() func isWaitingLocked() -> Bool } @@ -27,10 +30,15 @@ internal class AssertionWaitLock: WaitLock { private var currentWaiter: WaitingInfo? = nil init() { } - func acquireWaitingLock(fnName: String, file: FileString, line: UInt) { + 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 nimblePrecondition( - NSThread.isMainThread(), + isMainThread, "InvalidNimbleAPIUsage", "\(fnName) can only run on the main thread." ) @@ -56,32 +64,32 @@ internal class AssertionWaitLock: WaitLock { internal enum AwaitResult { /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) - case Incomplete + case incomplete /// TimedOut indicates the result reached its defined timeout limit before returning - case TimedOut + case timedOut /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger /// the timeout code. /// /// This may also mean the async code waiting upon may have never actually ran within the /// required time because other timers & sources are running on the main run loop. - case BlockedRunLoop + case blockedRunLoop /// The async block successfully executed and returned a given result - case Completed(T) + case completed(T) /// When a Swift Error is thrown - case ErrorThrown(ErrorType) + case errorThrown(Error) /// When an Objective-C Exception is raised - case RaisedException(NSException) + case raisedException(NSException) func isIncomplete() -> Bool { switch self { - case .Incomplete: return true + case .incomplete: return true default: return false } } func isCompleted() -> Bool { switch self { - case .Completed(_): return true + case .completed(_): return true default: return false } } @@ -90,11 +98,11 @@ 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 { - private(set) internal var asyncResult: AwaitResult = .Incomplete - private var signal: dispatch_semaphore_t + private(set) internal var asyncResult: AwaitResult = .incomplete + private var signal: DispatchSemaphore init() { - signal = dispatch_semaphore_create(1) + signal = DispatchSemaphore(value: 1) } /// Resolves the promise with the given result if it has not been resolved. Repeated calls to @@ -102,8 +110,8 @@ internal class AwaitPromise { /// /// @returns a Bool that indicates if the async result was accepted or rejected because another /// value was recieved first. - func resolveResult(result: AwaitResult) -> Bool { - if dispatch_semaphore_wait(signal, DISPATCH_TIME_NOW) == 0 { + func resolveResult(_ result: AwaitResult) -> Bool { + if signal.wait(timeout: .now()) == .success { self.asyncResult = result return true } else { @@ -113,8 +121,8 @@ internal class AwaitPromise { } internal struct AwaitTrigger { - let timeoutSource: dispatch_source_t - let actionSource: dispatch_source_t? + let timeoutSource: DispatchSourceTimer + let actionSource: DispatchSourceTimer? let start: () throws -> Void } @@ -139,7 +147,7 @@ internal class AwaitPromiseBuilder { self.trigger = trigger } - func timeout(timeoutInterval: NSTimeInterval, forcefullyAbortTimeout: NSTimeInterval) -> Self { + func timeout(_ timeoutInterval: TimeInterval, forcefullyAbortTimeout: TimeInterval) -> Self { // = Discussion = // // There's a lot of technical decisions here that is useful to elaborate on. This is @@ -168,34 +176,36 @@ internal class AwaitPromiseBuilder { // checked. // // In addition, stopping the run loop is used to halt code executed on the main run loop. - dispatch_source_set_timer( - trigger.timeoutSource, - dispatch_time(DISPATCH_TIME_NOW, Int64(timeoutInterval * Double(NSEC_PER_SEC))), - DISPATCH_TIME_FOREVER, - timeoutLeeway - ) - dispatch_source_set_event_handler(trigger.timeoutSource) { + trigger.timeoutSource.scheduleOneshot( + deadline: DispatchTime.now() + timeoutInterval, + leeway: timeoutLeeway) + trigger.timeoutSource.setEventHandler() { guard self.promise.asyncResult.isIncomplete() else { return } - let timedOutSem = dispatch_semaphore_create(0) - let semTimedOutOrBlocked = dispatch_semaphore_create(0) - dispatch_semaphore_signal(semTimedOutOrBlocked) + let timedOutSem = DispatchSemaphore(value: 0) + let semTimedOutOrBlocked = DispatchSemaphore(value: 0) + semTimedOutOrBlocked.signal() let runLoop = CFRunLoopGetMain() - CFRunLoopPerformBlock(runLoop, kCFRunLoopDefaultMode) { - if dispatch_semaphore_wait(semTimedOutOrBlocked, DISPATCH_TIME_NOW) == 0 { - dispatch_semaphore_signal(timedOutSem) - dispatch_semaphore_signal(semTimedOutOrBlocked) - if self.promise.resolveResult(.TimedOut) { + #if _runtime(_ObjC) + let runLoopMode = CFRunLoopMode.defaultMode.rawValue + #else + let runLoopMode = kCFRunLoopDefaultMode + #endif + CFRunLoopPerformBlock(runLoop, runLoopMode) { + if semTimedOutOrBlocked.wait(timeout: .now()) == .success { + timedOutSem.signal() + semTimedOutOrBlocked.signal() + if self.promise.resolveResult(.timedOut) { CFRunLoopStop(CFRunLoopGetMain()) } } } // potentially interrupt blocking code on run loop to let timeout code run CFRunLoopStop(runLoop) - let now = dispatch_time(DISPATCH_TIME_NOW, Int64(forcefullyAbortTimeout * Double(NSEC_PER_SEC))) - let didNotTimeOut = dispatch_semaphore_wait(timedOutSem, now) != 0 - let timeoutWasNotTriggered = dispatch_semaphore_wait(semTimedOutOrBlocked, 0) == 0 + let now = DispatchTime.now() + forcefullyAbortTimeout + let didNotTimeOut = timedOutSem.wait(timeout: now) != .success + let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success if didNotTimeOut && timeoutWasNotTriggered { - if self.promise.resolveResult(.BlockedRunLoop) { + if self.promise.resolveResult(.blockedRunLoop) { CFRunLoopStop(CFRunLoopGetMain()) } } @@ -219,15 +229,15 @@ internal class AwaitPromiseBuilder { /// - The async expectation raised an unexpected exception (objc) /// - The async expectation raised an unexpected error (swift) /// - /// The returned AwaitResult will NEVER be .Incomplete. - func wait(fnName: String = __FUNCTION__, file: FileString = __FILE__, line: UInt = __LINE__) -> AwaitResult { + /// The returned AwaitResult will NEVER be .incomplete. + func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { waitLock.acquireWaitingLock( fnName, file: file, line: line) let capture = NMBExceptionCapture(handler: ({ exception in - self.promise.resolveResult(.RaisedException(exception)) + _ = self.promise.resolveResult(.raisedException(exception)) }), finally: ({ self.waitLock.releaseWaitingLock() })) @@ -235,17 +245,17 @@ internal class AwaitPromiseBuilder { do { try self.trigger.start() } catch let error { - self.promise.resolveResult(.ErrorThrown(error)) + _ = self.promise.resolveResult(.errorThrown(error)) } - dispatch_resume(self.trigger.timeoutSource) + self.trigger.timeoutSource.resume() while self.promise.asyncResult.isIncomplete() { // Stopping the run loop does not work unless we run only 1 mode - NSRunLoop.currentRunLoop().runMode(NSDefaultRunLoopMode, beforeDate: NSDate.distantFuture()) + _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) } - dispatch_suspend(self.trigger.timeoutSource) - dispatch_source_cancel(self.trigger.timeoutSource) + self.trigger.timeoutSource.suspend() + self.trigger.timeoutSource.cancel() if let asyncSource = self.trigger.actionSource { - dispatch_source_cancel(asyncSource) + asyncSource.cancel() } } @@ -255,29 +265,24 @@ internal class AwaitPromiseBuilder { internal class Awaiter { let waitLock: WaitLock - let timeoutQueue: dispatch_queue_t - let asyncQueue: dispatch_queue_t + let timeoutQueue: DispatchQueue + let asyncQueue: DispatchQueue internal init( waitLock: WaitLock, - asyncQueue: dispatch_queue_t, - timeoutQueue: dispatch_queue_t) { + asyncQueue: DispatchQueue, + timeoutQueue: DispatchQueue) { self.waitLock = waitLock self.asyncQueue = asyncQueue self.timeoutQueue = timeoutQueue } - private func createTimerSource(queue: dispatch_queue_t) -> dispatch_source_t { - return dispatch_source_create( - DISPATCH_SOURCE_TYPE_TIMER, - 0, - DISPATCH_TIMER_STRICT, - queue - ) + private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { + return DispatchSource.makeTimerSource(flags: .strict, queue: queue) } func performBlock( - closure: ((T) -> Void) throws -> Void) -> AwaitPromiseBuilder { + _ closure: @escaping (@escaping (T) -> Void) throws -> Void) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) var completionCount = 0 @@ -289,7 +294,7 @@ internal class Awaiter { "InvalidNimbleAPIUsage", "Done closure's was called multiple times. waitUntil(..) expects its " + "completion closure to only be called once.") - if promise.resolveResult(.Completed($0)) { + if promise.resolveResult(.completed($0)) { CFRunLoopStop(CFRunLoopGetMain()) } } @@ -302,27 +307,27 @@ internal class Awaiter { trigger: trigger) } - func poll(pollInterval: NSTimeInterval, closure: () throws -> T?) -> AwaitPromiseBuilder { + func poll(_ pollInterval: TimeInterval, 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 = UInt64(pollInterval * Double(NSEC_PER_SEC)) - dispatch_source_set_timer(asyncSource, DISPATCH_TIME_NOW, interval, pollLeeway) - dispatch_source_set_event_handler(asyncSource) { + let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) + asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) + asyncSource.setEventHandler() { do { if let result = try closure() { - if promise.resolveResult(.Completed(result)) { + if promise.resolveResult(.completed(result)) { CFRunLoopStop(CFRunLoopGetCurrent()) } } } catch let error { - if promise.resolveResult(.ErrorThrown(error)) { + if promise.resolveResult(.errorThrown(error)) { CFRunLoopStop(CFRunLoopGetCurrent()) } } } - dispatch_resume(asyncSource) + asyncSource.resume() } return AwaitPromiseBuilder( @@ -334,12 +339,12 @@ internal class Awaiter { } internal func pollBlock( - pollInterval pollInterval: NSTimeInterval, - timeoutInterval: NSTimeInterval, + pollInterval: TimeInterval, + timeoutInterval: TimeInterval, file: FileString, line: UInt, - fnName: String = __FUNCTION__, - expression: () throws -> Bool) -> AwaitResult { + fnName: String = #function, + expression: @escaping () throws -> Bool) -> AwaitResult { let awaiter = NimbleEnvironment.activeInstance.awaiter let result = awaiter.poll(pollInterval) { () throws -> Bool? in do { @@ -354,5 +359,3 @@ internal func pollBlock( return result } - -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift new file mode 100644 index 0000000..d424c98 --- /dev/null +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Errors.swift @@ -0,0 +1,142 @@ +import Foundation + +// Generic + +internal func setFailureMessageForError( + _ failureMessage: FailureMessage, + postfixMessageVerb: String = "throw", + actualError: Error?, + error: T? = nil, + errorType: T.Type? = nil, + closure: ((T) -> Void)? = nil) { + failureMessage.postfixMessage = "\(postfixMessageVerb) error" + + if let error = error { + if let error = error as? CustomDebugStringConvertible { + failureMessage.postfixMessage += " <\(error.debugDescription)>" + } else { + failureMessage.postfixMessage += " <\(error)>" + } + } else if errorType != nil || closure != nil { + failureMessage.postfixMessage += " from type <\(T.self)>" + } + if let _ = closure { + failureMessage.postfixMessage += " that satisfies block" + } + if error == nil && errorType == nil && closure == nil { + failureMessage.postfixMessage = "\(postfixMessageVerb) any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } +} + +internal func errorMatchesExpectedError( + _ actualError: Error, + expectedError: T) -> Bool { + return actualError._domain == expectedError._domain + && 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, + actualError: Error?, + closure: ((Error) -> Void)?) { + failureMessage.postfixMessage = "throw error" + + if let _ = closure { + failureMessage.postfixMessage += " that satisfies block" + } else { + failureMessage.postfixMessage = "throw any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(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 + } + } + } + + return matches +} diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift deleted file mode 100644 index e94c45f..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/ExceptionCapture.swift +++ /dev/null @@ -1,31 +0,0 @@ -import Foundation - -#if !_runtime(_ObjC) -// swift-corelibs-foundation doesn't provide NSException at all, so provide a dummy -class NSException {} -#endif - -// NOTE: This file is not intended to be included in the Xcode project. It -// is picked up by the Swift Package Manager during its build process. - -/// A dummy reimplementation of the `NMBExceptionCapture` class to serve -/// as a stand-in for build and runtime environments that don't support -/// Objective C. -internal class ExceptionCapture { - let finally: (() -> Void)? - - init(handler: ((NSException!) -> Void)?, finally: (() -> Void)?) { - self.finally = finally - } - - func tryBlock(unsafeBlock: (() -> Void)) { - // We have no way of handling Objective C exceptions in Swift, - // so we just go ahead and run the unsafeBlock as-is - unsafeBlock() - - finally?() - } -} - -/// Compatibility with the actual Objective-C implementation -typealias NMBExceptionCapture = ExceptionCapture diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift index e85c755..6c5126a 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Functional.swift @@ -1,7 +1,7 @@ import Foundation -extension SequenceType { - internal func all(fn: Generator.Element -> Bool) -> Bool { +extension Sequence { + internal func all(_ fn: (Iterator.Element) -> Bool) -> Bool { for item in self { if !fn(item) { return false diff --git a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift index 3faab96..012e1e3 100644 --- a/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ b/Example/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift @@ -1,80 +1,213 @@ import Foundation -internal func identityAsString(value: AnyObject?) -> String { - if let value = value { - return NSString(format: "<%p>", unsafeBitCast(value, Int.self)).description +internal func identityAsString(_ value: Any?) -> String { + let anyObject: AnyObject? +#if os(Linux) + anyObject = value as? AnyObject +#else + anyObject = value as AnyObject? +#endif + if let value = anyObject { + return NSString(format: "<%p>", unsafeBitCast(value, to: Int.self)).description } else { return "nil" } } -internal func classAsString(cls: AnyClass) -> String { -#if _runtime(_ObjC) - return NSStringFromClass(cls) -#else - return String(cls) -#endif -} - -internal func arrayAsString(items: [T], joiner: String = ", ") -> String { +internal func arrayAsString(_ items: [T], joiner: String = ", ") -> String { return items.reduce("") { accum, item in let prefix = (accum.isEmpty ? "" : joiner) return accum + prefix + "\(stringify(item))" } } -#if _runtime(_ObjC) -@objc internal protocol NMBStringer { - func NMB_stringify() -> String +/// A type with a customized test output text representation. +/// +/// This textual representation is produced when values will be +/// printed in test runs, and may be useful when producing +/// error messages in custom matchers. +/// +/// - SeeAlso: `CustomDebugStringConvertible` +public protocol TestOutputStringConvertible { + var testDescription: String { get } } -extension NSArray : NMBStringer { - func NMB_stringify() -> String { - let str = self.componentsJoinedByString(", ") - return "[\(str)]" +extension Double: TestOutputStringConvertible { + public var testDescription: String { + return NSNumber(value: self).testDescription } } -#endif -internal func stringify(value: S) -> String { - var generator = value.generate() - var strings = [String]() - var value: S.Generator.Element? - repeat { - value = generator.next() - if value != nil { - strings.append(stringify(value)) +extension Float: TestOutputStringConvertible { + public var testDescription: String { + return NSNumber(value: self).testDescription + } +} + +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 { + case 1: + return NSString(format: "%0.1f", self.doubleValue).description + case 2: + return NSString(format: "%0.2f", self.doubleValue).description + case 3: + return NSString(format: "%0.3f", self.doubleValue).description + default: + return NSString(format: "%0.4f", self.doubleValue).description + } } - } while value != nil - let str = strings.joinWithSeparator(", ") - return "[\(str)]" + return self.description + } } -internal func stringify(value: T) -> String { - if let value = value as? Double { - return NSString(format: "%.4f", (value)).description - } else if let value = value as? NSData { -#if os(Linux) - // FIXME: Swift on Linux triggers a segfault when calling NSData's hash() (last checked on 03-11) - return "NSData" -#else - return "NSData" -#endif +extension Array: TestOutputStringConvertible { + public var testDescription: String { + let list = self.map(Nimble.stringify).joined(separator: ", ") + return "[\(list)]" } - return String(value) } -internal func stringify(value: NMBDoubleConvertible) -> String { - if let value = value as? Double { - return NSString(format: "%.4f", (value)).description +extension AnySequence: TestOutputStringConvertible { + public var testDescription: String { + let generator = self.makeIterator() + var strings = [String]() + var value: AnySequence.Iterator.Element? + + repeat { + value = generator.next() + if let value = value { + strings.append(stringify(value)) + } + } while value != nil + + let list = strings.joined(separator: ", ") + return "[\(list)]" } - return value.stringRepresentation } -internal func stringify(value: T?) -> String { +extension NSArray: TestOutputStringConvertible { + public var testDescription: String { + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") + return "(\(list))" + } +} + +extension NSIndexSet: TestOutputStringConvertible { + public var testDescription: String { + let list = Array(self).map(Nimble.stringify).joined(separator: ", ") + return "(\(list))" + } +} + +extension String: TestOutputStringConvertible { + public var testDescription: String { + return self + } +} + +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 + } +} + +/// +/// Returns a string appropriate for displaying in test output +/// from the provided value. +/// +/// - parameter value: A value that will show up in a test's output. +/// +/// - returns: The string that is returned can be +/// customized per type by conforming a type to the `TestOutputStringConvertible` +/// protocol. When stringifying a non-`TestOutputStringConvertible` type, this +/// function will return the value's debug description and then its +/// normal description if available and in that order. Otherwise it +/// will return the result of constructing a string from the value. +/// +/// - SeeAlso: `TestOutputStringConvertible` +public func stringify(_ value: T) -> String { + 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 stringify(unboxed) } return "nil" } + +#if _runtime(_ObjC) +@objc public class NMBStringer: NSObject { + @objc public class func stringify(_ obj: Any?) -> String { + return Nimble.stringify(obj) + } +} +#endif + +// MARK: Collection Type Stringers + +/// Attempts to generate a pretty type string for a given value. If the value is of a Objective-C +/// collection type, or a subclass thereof, (e.g. `NSArray`, `NSDictionary`, etc.). +/// This function will return the type name of the root class of the class cluster for better +/// readability (e.g. `NSArray` instead of `__NSArrayI`). +/// +/// For values that don't have a type of an Objective-C collection, this function returns the +/// default type description. +/// +/// - parameter value: A value that will be used to determine a type name. +/// +/// - returns: The name of the class cluster root class for Objective-C collection types, or the +/// the `dynamicType` of the value for values of any other type. +public func prettyCollectionType(_ value: T) -> String { + switch value { + case is NSArray: + return String(describing: NSArray.self) + case is NSDictionary: + return String(describing: NSDictionary.self) + case is NSSet: + return String(describing: NSSet.self) + case is NSIndexSet: + return String(describing: NSIndexSet.self) + default: + return String(describing: value) + } +} + +/// Returns the type name for a given collection type. This overload is used by Swift +/// collection types. +/// +/// - parameter collection: A Swift `CollectionType` value. +/// +/// - returns: A string representing the `dynamicType` of the value. +public func prettyCollectionType(_ collection: T) -> String { + return String(describing: type(of: collection)) +} diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h b/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h deleted file mode 100644 index a499059..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.h +++ /dev/null @@ -1,145 +0,0 @@ -#import - -@class NMBExpectation; -@class NMBObjCBeCloseToMatcher; -@class NMBObjCRaiseExceptionMatcher; -@protocol NMBMatcher; - - -#define NIMBLE_EXPORT FOUNDATION_EXPORT - -#ifdef NIMBLE_DISABLE_SHORT_SYNTAX -#define NIMBLE_SHORT(PROTO, ORIGINAL) -#else -#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } -#endif - -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); - -NIMBLE_EXPORT id NMB_equal(id expectedValue); -NIMBLE_SHORT(id equal(id expectedValue), - NMB_equal(expectedValue)); - -NIMBLE_EXPORT id NMB_haveCount(id expectedValue); -NIMBLE_SHORT(id haveCount(id expectedValue), - NMB_haveCount(expectedValue)); - -NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); -NIMBLE_SHORT(NMBObjCBeCloseToMatcher *beCloseTo(id expectedValue), - NMB_beCloseTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_SHORT(id beAnInstanceOf(Class expectedClass), - NMB_beAnInstanceOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); -NIMBLE_SHORT(id beAKindOf(Class expectedClass), - NMB_beAKindOf(expectedClass)); - -NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); -NIMBLE_SHORT(id beginWith(id itemElementOrSubstring), - NMB_beginWith(itemElementOrSubstring)); - -NIMBLE_EXPORT id NMB_beGreaterThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThan(NSNumber *expectedValue), - NMB_beGreaterThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beGreaterThanOrEqualTo(NSNumber *expectedValue), - NMB_beGreaterThanOrEqualTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), - NMB_beIdenticalTo(expectedInstance)); - -NIMBLE_EXPORT id NMB_be(id expectedInstance); -NIMBLE_SHORT(id be(id expectedInstance), - NMB_be(expectedInstance)); - -NIMBLE_EXPORT id NMB_beLessThan(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThan(NSNumber *expectedValue), - NMB_beLessThan(expectedValue)); - -NIMBLE_EXPORT id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); -NIMBLE_SHORT(id beLessThanOrEqualTo(NSNumber *expectedValue), - NMB_beLessThanOrEqualTo(expectedValue)); - -NIMBLE_EXPORT id NMB_beTruthy(void); -NIMBLE_SHORT(id beTruthy(void), - NMB_beTruthy()); - -NIMBLE_EXPORT id NMB_beFalsy(void); -NIMBLE_SHORT(id beFalsy(void), - NMB_beFalsy()); - -NIMBLE_EXPORT id NMB_beTrue(void); -NIMBLE_SHORT(id beTrue(void), - NMB_beTrue()); - -NIMBLE_EXPORT id NMB_beFalse(void); -NIMBLE_SHORT(id beFalse(void), - NMB_beFalse()); - -NIMBLE_EXPORT id NMB_beNil(void); -NIMBLE_SHORT(id beNil(void), - NMB_beNil()); - -NIMBLE_EXPORT id NMB_beEmpty(void); -NIMBLE_SHORT(id beEmpty(void), - NMB_beEmpty()); - -NIMBLE_EXPORT id 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), - NMB_endWith(itemElementOrSubstring)); - -NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), - NMB_raiseException()); - -NIMBLE_EXPORT id NMB_match(id expectedValue); -NIMBLE_SHORT(id match(id expectedValue), - NMB_match(expectedValue)); - -NIMBLE_EXPORT id NMB_allPass(id matcher); -NIMBLE_SHORT(id allPass(id matcher), - NMB_allPass(matcher)); - -NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); -#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define satisfyAnyOf(...) NMB_satisfyAnyOf(__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. -typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); -typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); -NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); - -NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); - -#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) -#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) - -#ifndef NIMBLE_DISABLE_SHORT_SYNTAX -#define expect(...) NMB_expect(^id{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) -#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) -#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) -#define fail() failWithMessage(@"fail() always fails") - - -#define waitUntilTimeout NMB_waitUntilTimeout -#define waitUntil NMB_waitUntil -#endif diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h deleted file mode 100644 index 7e5fb07..0000000 --- a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.h +++ /dev/null @@ -1,11 +0,0 @@ -#import -#import - -@interface NMBExceptionCapture : NSObject - -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally; -- (void)tryBlock:(void(^)())unsafeBlock; - -@end - -typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h similarity index 53% rename from Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m rename to Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h index 0d3b4db..5d416e4 100644 --- a/Example/Pods/Nimble/Sources/Nimble/objc/CurrentTestCaseTracker.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/CurrentTestCaseTracker.h @@ -7,12 +7,3 @@ + (CurrentTestCaseTracker *)sharedInstance; @end @interface CurrentTestCaseTracker (Register) @end - -@implementation CurrentTestCaseTracker (Register) - -+ (void)load { - CurrentTestCaseTracker *tracker = [CurrentTestCaseTracker sharedInstance]; - [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker]; -} - -@end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h new file mode 100644 index 0000000..54677ee --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h @@ -0,0 +1,377 @@ +#import + +@class NMBExpectation; +@class NMBObjCBeCloseToMatcher; +@class NMBObjCRaiseExceptionMatcher; +@protocol NMBMatcher; + + +NS_ASSUME_NONNULL_BEGIN + + +#define NIMBLE_OVERLOADABLE __attribute__((overloadable)) +#define NIMBLE_EXPORT FOUNDATION_EXPORT +#define NIMBLE_EXPORT_INLINE FOUNDATION_STATIC_INLINE + +#define NIMBLE_VALUE_OF(VAL) ({ \ + __typeof__((VAL)) val = (VAL); \ + [NSValue valueWithBytes:&val objCType:@encode(__typeof__((VAL)))]; \ +}) + +#ifdef NIMBLE_DISABLE_SHORT_SYNTAX +#define NIMBLE_SHORT(PROTO, ORIGINAL) +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) +#else +#define NIMBLE_SHORT(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE PROTO { return (ORIGINAL); } +#define NIMBLE_SHORT_OVERLOADED(PROTO, ORIGINAL) FOUNDATION_STATIC_INLINE NIMBLE_OVERLOADABLE PROTO { return (ORIGINAL); } +#endif + + + +#define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBExpectation *NMB_expect(TYPE(^actualBlock)(), 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); + + // overloaded dispatch for nils - expect(nil) + DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) + DEFINE_NMB_EXPECT_OVERLOAD(NSRange, NIMBLE_VALUE_OF(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned int, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(float, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(double, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned long long, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(unsigned char, @(actualBlock())) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_NMB_EXPECT_OVERLOAD(BOOL, @(actualBlock())) + DEFINE_NMB_EXPECT_OVERLOAD(char *, @(actualBlock())) + + +#undef DEFINE_NMB_EXPECT_OVERLOAD + + + +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); + + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_equal(TYPE expectedValue) { \ + return NMB_equal((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id equal(TYPE expectedValue), NMB_equal(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_equal(__nullable id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id equal(__nullable id expectedValue), + NMB_equal(expectedValue)); + + // overloaded dispatch for nils - expect(nil) + DEFINE_OVERLOAD(void*__nullable, (id)nil) + DEFINE_OVERLOAD(NSRange, NIMBLE_VALUE_OF(expectedValue)) + DEFINE_OVERLOAD(long, @(expectedValue)) + 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)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + // bool doesn't get the compiler to dispatch to BOOL types, but using BOOL here seems to allow + // the compiler to dispatch to bool. + DEFINE_OVERLOAD(BOOL, @(expectedValue)) + DEFINE_OVERLOAD(char *, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_haveCount(TYPE expectedValue) { \ + return NMB_haveCount((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id haveCount(TYPE expectedValue), \ + NMB_haveCount(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_haveCount(id expectedValue); + + NIMBLE_SHORT_OVERLOADED(id haveCount(id expectedValue), + NMB_haveCount(expectedValue)); + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ + return NMB_beCloseTo((NSNumber *)(EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ + NMB_beCloseTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), + NMB_beCloseTo(expectedValue)); + + // it would be better to only overload float & double, but zero becomes ambigious + + DEFINE_OVERLOAD(long, @(expectedValue)) + 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)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beAnInstanceOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAnInstanceOf(Class expectedClass) { + return NMB_beAnInstanceOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beAKindOf(Class expectedClass); +NIMBLE_EXPORT_INLINE id beAKindOf(Class expectedClass) { + return NMB_beAKindOf(expectedClass); +} + +NIMBLE_EXPORT id NMB_beginWith(id itemElementOrSubstring); +NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { + return NMB_beginWith(itemElementOrSubstring); +} + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThan(TYPE expectedValue) { \ + return NMB_beGreaterThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThan(NSNumber *expectedValue) { + return NMB_beGreaterThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long, @(expectedValue)) + DEFINE_OVERLOAD(int, @(expectedValue)) + DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(long long, @(expectedValue)) + DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) + DEFINE_OVERLOAD(char, @(expectedValue)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beGreaterThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beGreaterThanOrEqualTo(TYPE expectedValue), \ + NMB_beGreaterThanOrEqualTo(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beGreaterThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + 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)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beIdenticalTo(id expectedInstance); +NIMBLE_SHORT(id beIdenticalTo(id expectedInstance), + NMB_beIdenticalTo(expectedInstance)); + +NIMBLE_EXPORT id NMB_be(id expectedInstance); +NIMBLE_SHORT(id be(id expectedInstance), + NMB_be(expectedInstance)); + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThan(TYPE expectedValue) { \ + return NMB_beLessThan((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThan(TYPE expectedValue), \ + NMB_beLessThan(expectedValue)); + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThan(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThan(NSNumber *expectedValue) { + return NMB_beLessThan(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + 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)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + + +#define DEFINE_OVERLOAD(TYPE, EXPR) \ + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ + id NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ + return NMB_beLessThanOrEqualTo((EXPR)); \ + } \ + NIMBLE_SHORT_OVERLOADED(id beLessThanOrEqualTo(TYPE expectedValue), \ + NMB_beLessThanOrEqualTo(expectedValue)); + + + NIMBLE_EXPORT NIMBLE_OVERLOADABLE + id NMB_beLessThanOrEqualTo(NSNumber *expectedValue); + + NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE + id beLessThanOrEqualTo(NSNumber *expectedValue) { + return NMB_beLessThanOrEqualTo(expectedValue); + } + + DEFINE_OVERLOAD(long, @(expectedValue)) + 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)) + DEFINE_OVERLOAD(unsigned char, @(expectedValue)) + +#undef DEFINE_OVERLOAD + +NIMBLE_EXPORT id NMB_beTruthy(void); +NIMBLE_SHORT(id beTruthy(void), + NMB_beTruthy()); + +NIMBLE_EXPORT id NMB_beFalsy(void); +NIMBLE_SHORT(id beFalsy(void), + NMB_beFalsy()); + +NIMBLE_EXPORT id NMB_beTrue(void); +NIMBLE_SHORT(id beTrue(void), + NMB_beTrue()); + +NIMBLE_EXPORT id NMB_beFalse(void); +NIMBLE_SHORT(id beFalse(void), + NMB_beFalse()); + +NIMBLE_EXPORT id NMB_beNil(void); +NIMBLE_SHORT(id beNil(void), + NMB_beNil()); + +NIMBLE_EXPORT id NMB_beEmpty(void); +NIMBLE_SHORT(id beEmpty(void), + NMB_beEmpty()); + +NIMBLE_EXPORT id 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), + NMB_endWith(itemElementOrSubstring)); + +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); +NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), + NMB_raiseException()); + +NIMBLE_EXPORT id NMB_match(id expectedValue); +NIMBLE_SHORT(id match(id expectedValue), + NMB_match(expectedValue)); + +NIMBLE_EXPORT id NMB_allPass(id matcher); +NIMBLE_SHORT(id allPass(id matcher), + NMB_allPass(matcher)); + +NIMBLE_EXPORT id NMB_satisfyAnyOfWithMatchers(id matchers); +#define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define satisfyAnyOf(...) NMB_satisfyAnyOf(__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. +typedef void (^NMBWaitUntilTimeoutBlock)(NSTimeInterval timeout, void (^action)(void (^)(void))); +typedef void (^NMBWaitUntilBlock)(void (^action)(void (^)(void))); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line); + +NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger line); + +#define NMB_waitUntilTimeout NMB_waitUntilTimeoutBuilder(@(__FILE__), __LINE__) +#define NMB_waitUntil NMB_waitUntilBuilder(@(__FILE__), __LINE__) + +#ifndef NIMBLE_DISABLE_SHORT_SYNTAX +#define expect(...) NMB_expect(^{ return (__VA_ARGS__); }, @(__FILE__), __LINE__) +#define expectAction(BLOCK) NMB_expectAction((BLOCK), @(__FILE__), __LINE__) +#define failWithMessage(msg) NMB_failWithMessage(msg, @(__FILE__), __LINE__) +#define fail() failWithMessage(@"fail() always fails") + + +#define waitUntilTimeout NMB_waitUntilTimeout +#define waitUntil NMB_waitUntil + +#undef NIMBLE_VALUE_OF + +#endif + +NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m similarity index 83% rename from Example/Pods/Nimble/Sources/Nimble/objc/DSL.m rename to Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m index 2170238..cd93ddd 100644 --- a/Example/Pods/Nimble/Sources/Nimble/objc/DSL.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -9,7 +9,11 @@ + (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())actio @end -NIMBLE_EXPORT NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line) { + +NS_ASSUME_NONNULL_BEGIN + + +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(), NSString *__nonnull file, NSUInteger line) { return [[NMBExpectation alloc] initWithActualBlock:actualBlock negative:NO file:file @@ -35,7 +39,7 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beAKindOfMatcher:expectedClass]; } -NIMBLE_EXPORT NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { return [NMBObjCMatcher beCloseToMatcher:expectedValue within:0.001]; } @@ -43,11 +47,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beginWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT id NMB_beGreaterThan(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThan(NSNumber *expectedValue) { return [NMBObjCMatcher beGreaterThanMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { return [NMBObjCMatcher beGreaterThanOrEqualToMatcher:expectedValue]; } @@ -59,11 +63,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT id NMB_beLessThan(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThan(NSNumber *expectedValue) { return [NMBObjCMatcher beLessThanMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { return [NMBObjCMatcher beLessThanOrEqualToMatcher:expectedValue]; } @@ -113,11 +117,11 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT id NMB_equal(id expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_equal(__nullable id expectedValue) { return [NMBObjCMatcher equalMatcher:expectedValue]; } -NIMBLE_EXPORT id NMB_haveCount(id expectedValue) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE id NMB_haveCount(id expectedValue) { return [NMBObjCMatcher haveCountMatcher:expectedValue]; } @@ -148,3 +152,5 @@ NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger [NMBWait untilFile:file line:line action:action]; }; } + +NS_ASSUME_NONNULL_END diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h new file mode 100644 index 0000000..e0ec05a --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h @@ -0,0 +1,11 @@ +#import +#import + +@interface NMBExceptionCapture : NSObject + +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; +- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); + +@end + +typedef void(^NMBSourceCallbackBlock)(BOOL successful); diff --git a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m similarity index 60% rename from Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m rename to Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m index 48f5739..0a882b7 100644 --- a/Example/Pods/Nimble/Sources/Nimble/objc/NMBExceptionCapture.m +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m @@ -1,13 +1,13 @@ #import "NMBExceptionCapture.h" @interface NMBExceptionCapture () -@property (nonatomic, copy) void(^handler)(NSException *exception); -@property (nonatomic, copy) void(^finally)(); +@property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); +@property (nonatomic, copy) void(^ _Nullable finally)(); @end @implementation NMBExceptionCapture -- (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally { +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { self = [super init]; if (self) { self.handler = handler; @@ -16,7 +16,7 @@ - (id)initWithHandler:(void(^)(NSException *))handler finally:(void(^)())finally return self; } -- (void)tryBlock:(void(^)())unsafeBlock { +- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { @try { unsafeBlock(); } @@ -32,4 +32,4 @@ - (void)tryBlock:(void(^)())unsafeBlock { } } -@end \ No newline at end of file +@end diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h new file mode 100644 index 0000000..e5d5ddd --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h @@ -0,0 +1,18 @@ +@class NSString; + +/** + * 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. + * + * @return The string that is returned can be + * customized per type by conforming a type to the `TestOutputStringConvertible` + * protocol. When stringifying a non-`TestOutputStringConvertible` type, this + * function will return the value's debug description and then its + * normal description if available and in that order. Otherwise it + * will return the result of constructing a string from the value. + * + * @see `TestOutputStringConvertible` + */ +extern NSString *_Nonnull NMBStringify(id _Nullable anyObject) __attribute__((warn_unused_result)); diff --git a/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m new file mode 100644 index 0000000..329d39a --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m @@ -0,0 +1,6 @@ +#import "NMBStringify.h" +#import + +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 new file mode 100644 index 0000000..35f26fd --- /dev/null +++ b/Example/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m @@ -0,0 +1,78 @@ +#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); + } +} + +#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]]; + }); +} + +@end diff --git a/Example/Pods/Pods.xcodeproj/project.pbxproj b/Example/Pods/Pods.xcodeproj/project.pbxproj index 6c7c4d5..29d6a5e 100644 --- a/Example/Pods/Pods.xcodeproj/project.pbxproj +++ b/Example/Pods/Pods.xcodeproj/project.pbxproj @@ -7,120 +7,135 @@ objects = { /* Begin PBXBuildFile section */ - 014FEC8E42CA30CD3C8392D8B3027890 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = FF8C40FF3EC899606D42E6898BA856ED /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 025060E74A7822988902819DAE1DA9BC /* PINCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 1113A796DE369F7FBE7ECF141BE4F336 /* PINCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 037191B6A68A07DE395F4FC4D6C6FDA2 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = E3438CD67C5FC6695D7CF53351A1D8DF /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - 03A9FD93E86C0CD07A37D7BF34A02F09 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = C618EA23F10B11A77B0F852414F32492 /* Match.swift */; }; - 112614F21939902B59102E6E876ADCBC /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 58FE28CB83C62F6CE42E41715AA5F743 /* RaisesException.swift */; }; - 135B6326D35C977854AA0C12B3F6CB7D /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 955AC604221E801DF21031D4A581B443 /* DSL.swift */; }; - 13CC849FA70CADF802470B6A90DCDF79 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F670039AF84988FFDEEDCD680C50BCA /* AllPass.swift */; }; + 001BD9D25BB6A3AD9527879098FF9BAA /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 655C73A95EE46C174B1D008A54E62AB6 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 025060E74A7822988902819DAE1DA9BC /* PINCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 9CFCD9A9EE018ED13B4FBC21EE03E430 /* PINCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 02D34928F8983B97607972B8AE6D56FE /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5DF3640A68F4F1DACA4C40FD0995610 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 093B8C691927272D8632112ADD51828D /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = A24434297396BF6CFD80317254A920A2 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 099C51DF43E52CB0DC3069E7C29B1EB5 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = B171B08CBC2D0DF3A50748A3085721AB /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 09E2FB92E3B559B4A133BFEB6238EC0B /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = B20460C976017D26AC7EEAA5FE9D784E /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0CFF6C6170F28B6C7E7EC9125AA4505A /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = ED090E2A47588133620EFDE67FDCD83B /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0F17DDF7E3995474022427A2FC984AE7 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9A362093AF4B81291B7BF3C769A26E8F /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 12AD724D8DC644D22F976C62E94B416D /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 155601A7EE9BD524893E233FD6345C7E /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 150A2AF4D34EB393DA1CD2C2D303E4E3 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 410D041BE5CE8BDF7295A810D5C1D21C /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 166367795AC130F67A4EB2DD08FC9AD4 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; - 179D386E634F2A1CD66798EA658FCD10 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B3B250DFD4215A49C20D6E32B750AA3 /* QuickSelectedTestSuiteBuilder.swift */; }; - 1842B44E6C7FE4A10B8A200BC9B17C19 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2D151BFCACFD38A9C45F7E778ED4B47 /* Configuration.swift */; }; - 19B28DDB5274A6467A602FFFFBE63778 /* PINCache-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C75401F4885399038DBDCF6C0A75B4CD /* PINCache-dummy.m */; }; - 1DF13DA34916766D2D9E6129E657DAD7 /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0E4B7065CEC504F551435EB937EF093B /* String+FileName.swift */; }; - 1ED8C77E9422C66BBF56E6C10D5826F0 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = D71506467E6486630DE85876CCD58097 /* NMBExceptionCapture.m */; }; - 1FF71AC95E8DC491FA1F57573EFAD8C3 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE490E4EC0FFF1BAE62450A5BC036AB7 /* World+DSL.swift */; }; + 179D386E634F2A1CD66798EA658FCD10 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5DDC9B45C3220AFD3093EAAEAE19597E /* QuickSelectedTestSuiteBuilder.swift */; }; + 1842B44E6C7FE4A10B8A200BC9B17C19 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = C8F77C6E310159F1098A3C31E1F0A2C5 /* Configuration.swift */; }; + 19B28DDB5274A6467A602FFFFBE63778 /* PINCache-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 75BAC8681AB2F72A03C05CABDCAEE544 /* PINCache-dummy.m */; }; + 1A9126F01EBC2E30B2E6F881B6B87BCD /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21FE73876492314E1312596628281BE4 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1DF13DA34916766D2D9E6129E657DAD7 /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 959084B9DF3954F6C5D8984822CF8367 /* String+FileName.swift */; }; + 1FF71AC95E8DC491FA1F57573EFAD8C3 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5701134DD3831B5D049625C7F4598934 /* World+DSL.swift */; }; 22D82D9ACAB61010AC6966E9AB6FC61C /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; - 23626BC4DDA1A2E90A155728F57802FF /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = BA7C33F5DFAD5A88C037232DE3A1C8F9 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 24638ED243188FAE6E710F92EA5F1763 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 5039CB5E5859CF12FC6710D144BE015F /* QCKDSL.m */; }; - 27D5E245B4127C991896D789CBDEB573 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = ABC367784A604FEEFB194B272215E265 /* ErrorUtility.swift */; }; + 232A44C5F6145555918520FA61E75E61 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88EE16F2B5CAB80A5DA92BE4E80ADF35 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 24B2AFC31898725750519372CFB2350A /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B41693CC378532208AF21FE2D296A79D /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 27D5E245B4127C991896D789CBDEB573 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84C87ECE4B19D1F14AC1D938E8848136 /* ErrorUtility.swift */; }; + 2A2C12A7B0C614BD6C56CCB1093F0406 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D8B2CFE6591F60BCDF433290AB92B8B /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2B7D05BAC278BD029D094B07FD05DF03 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = B8A3142C547BBE0FA5006147B8A0B249 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; 2C5E88108A0A19673CE2D97AFCC96910 /* MapKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 471D95D6987CD171C923E217DFBBF8D2 /* MapKit.framework */; }; - 30AACAA8D51DC8C429577D9B67BB016C /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 00954035E44DF042D30AED9F8F1ED442 /* BeginWith.swift */; }; - 31629295E87A24C98238C66D41983C49 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 76D1165619960BD82B9BDA06D32A2C71 /* BeVoid.swift */; }; - 38F5CE4B4C59A81734A93E32D35B696E /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 52E041E474C56BD4F3D65DFF018DF3D1 /* FailureMessage.swift */; }; - 39F1AAD875082739BECE56399FA156DA /* PINMemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 105BDDA7402B37D56160821539341392 /* PINMemoryCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 3D1BB98DEA422D8F173613EC715488B9 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 012DFBFB7A1856EA62AD354F7576E7AB /* PostNotification.swift */; }; - 40A24AB9D9C28676521369F49BD1A75B /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 586637917FE99E0C13AB09A84D2FD083 /* Example.swift */; }; - 412840D7EC539083A3759C349E154D09 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3BE86136B7397CBA742B79716DD69CD9 /* Closures.swift */; }; - 415F29FE4E9D970954C46CD3CF4AE345 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF630F86F8FBF002F5D0131BAF332C9C /* SatisfyAnyOf.swift */; }; + 2C859B5C136B3028EA09A3A8EC3F31D8 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEF2C74E3787ED19DA8C8A822821B941 /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2FCD0652F9F03570469908732B747CFA /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE2ED94E44FABCC7C7AE89CE4E250860 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 346D12A0191B7B1428E9336C01B1285C /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 74208FEC57239588B65459D296B7D434 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 39F1AAD875082739BECE56399FA156DA /* PINMemoryCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 0035596C11397EEDBEDE2F280DCD0ACC /* PINMemoryCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3A9DE5E02A5ADDF4742F73DB9818AF40 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = C65AAE5514AF822664A9B22826926A55 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 40A24AB9D9C28676521369F49BD1A75B /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = B1DFBD2CA4959B6E2487A78A47476EA7 /* Example.swift */; }; + 412840D7EC539083A3759C349E154D09 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B376CB9C7B5C5FBCCE3EB12392C459A /* Closures.swift */; }; + 44E30F568C9A3547E4757E27936D9D2A /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = AEA8C3DB84B4E1C95F4D80394802545F /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 44E5CAF9E9444829B0C7076AE94F80F6 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CA86ADEA709F815C617AEE2F89483A8 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4532A308F933EDF27666CC68573818E9 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EA177B2FFFE884859AFA81630E5FDC8 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 45FFBCD795CDE0E97BD594F45514EECF /* CoreLocation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BAF5BEE88CF3240B52A3CA233685495F /* CoreLocation.framework */; }; - 47CBCE8837CE75AE1B7484A63CE387ED /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; 483C21EC8EE4B5CE077007276C67440E /* MapSnap-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1EC8F64F80F2F257791CC7ED6213EF59 /* MapSnap-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 486B74C8EFEB68AD25CE128F3051E432 /* ObjCExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65170912A744D260953B73DDA56F72D8 /* ObjCExpectation.swift */; }; - 4AF6C26A30D865059C24DC5317786B76 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2CF12621CB1E722E47512B00138953D /* BeNil.swift */; }; - 4E5A721963877AA3A6AA3D80DAA4E5E9 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 46F74CB09F3865B01312FD33404A5126 /* AssertionRecorder.swift */; }; - 5104AE2989305145BF446E633B567924 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62CF3EB21ED561A4F8AFB1C074368109 /* EndWith.swift */; }; - 554E0D31C390E5B4A03FBBE41244690C /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = FEDECE06404D71105AD880A8FC54376D /* SuiteHooks.swift */; }; + 494F47D80D5A2DAA2694E40DC231BECE /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = A86E6F5DDD8E2D582E4F49E7863F02AB /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4C0EB4D501BF057B61CD8BBABC05A2B4 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3EE9D677089B1D3ADE1CE73EADDE82D /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4C6BA4EC0EEE176994123474854DBE5A /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC868F661469DBCE8FA63CDF8C278B43 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4F102D7A8607B4F0A143C7B1D23B6975 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33CBFCA27A76DC44913AE31CD000CCB5 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 554CFF29B6DB47BA7B52F42DADD18C5B /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 322D9AE63633A3FD181707E4FC95569A /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 554E0D31C390E5B4A03FBBE41244690C /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = B65135E4149980703B2D011F490F6538 /* SuiteHooks.swift */; }; + 55C6997E60F8F71C2B03FCB6F2E7E75B /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9FB7A676A9159A2208D7B7EAD25EAE4F /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 581402486DC438D381F28FFFAFDE9BB5 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 162ECED5A6D75A471784883906A37F6E /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 589ABF45015A4158C9286463E453B283 /* MapSnap-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 6E18263F92B315E37E086DA304CC458A /* MapSnap-dummy.m */; }; - 5EF5C00C6AECE1FCFFF118577817F5CE /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 68AB096306B1F3DC496E04AC79A7F2F5 /* Equal.swift */; }; - 63BBD83995BA60FA7D2E6AD4138C0D71 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5E1A0633325E4F770302DBFDFB4F0436 /* Functional.swift */; }; - 64539BE196D1741570018FFF86F14133 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB3A2024EB7EF7F49C9F1C65E8349A0F /* MatcherFunc.swift */; }; - 65CD24BC42311A75F5BD0DCC6BE0A466 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = B930640876231E7AC6BA87825CDCE3BD /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6784116E5876F4B74F5E5C0635A3BFFD /* PINDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 151A53E4DA74BB1354C542FD7E37FF3E /* PINDiskCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 68527A7545342CBB4F923DC8543F7B20 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 810614A50290AA14F1268D1312A5B421 /* DSL.m */; }; - 6C789CB703E3AB43A0D561E899EB2A07 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = EB66EF5BF3897028C7954C8A938B7D0F /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6CED297D84F23767ED4E609A4182B1AE /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AEFACEB7BB5A817D3F15B355A4BC59A /* HooksPhase.swift */; }; + 6004362B67D5176778BE3627C2917C5B /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = F016129CCF06862D90CCB932ABD8B098 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 65AA294A455DCD4EEA3837F6D6A1794E /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 8A84B29E18FD19678586CEED05C3EB39 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6784116E5876F4B74F5E5C0635A3BFFD /* PINDiskCache.h in Headers */ = {isa = PBXBuildFile; fileRef = A86586AB665DA71EF0E859734A659480 /* PINDiskCache.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 67C5FD1141932F8FA4ADD7DA62748A4E /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = F46DDAA08389E5436F7733A03C33E708 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 692950F18B7AA626E7630A7C562CBC40 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 91F2A72EF702420F607528E7D6E80B05 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6C789CB703E3AB43A0D561E899EB2A07 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 36305928779B12931DC579AC15B3F2CB /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6CED297D84F23767ED4E609A4182B1AE /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0152844195330E0B9259FB1BB27CDD62 /* HooksPhase.swift */; }; 6E360FA227A88B601E740171DCB0F4F1 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = C0FC03DABE95E8B59D9715CE5B9DFB47 /* XCTest.framework */; }; - 6ED0409031540D9B2AD7B061B608B0C9 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5A72F4C47C8BCDD393043473288C8A6 /* DSL+Wait.swift */; }; - 701AC589422447ECC727455400BED1C3 /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = E88EE3FF1D24B592EC884938705C35D7 /* NSString+QCKSelectorName.m */; }; - 7202A0B871C57B7857341D88C2883A3A /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1ED80C6A26047366EA737151C2ED14BD /* BeIdenticalTo.swift */; }; - 7601A0595D5C2A2D3BCCBBEA390D8A46 /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = B4837CEC5A5F8C0B5E88C47E1AE57292 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 7734BABBECE0071CF5D4430515B938BF /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61D173902408D6ADE9F25BAB640BA4E4 /* BeCloseTo.swift */; }; - 775646739B95E828ECE349F6A39534F4 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0B5A5A970FE71BA70C428C310271B4D /* NimbleEnvironment.swift */; }; + 6EC12E5DAE120A501A99D4134A1D7D28 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FB86AEEC9D35B4EFFB20303C7C3E5FC /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6EE97AD95CE78493C711579A2A6C9E46 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = E222E550A3C17129A922CB77997D5A45 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 70081396B556628C08505BDF25E1DD5A /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C6CB023A4E09A4096826F9570515CB9 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 73773CA54114CD25031B43493B6474A5 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CF66CEE0E88CDC58AFC169094876731E /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 77E225A948BAE51B28B43E058FDCD892 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; - 7CC86ABC7F4135EE12A755B023F134CE /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD08AD0CF29979D1817E657A128BB356 /* AssertionDispatcher.swift */; }; - 7DC9B169B5FCC3EE99F6D36EC530FE1E /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 671EDA57386D2E19965599DE5E09D1C4 /* Async.swift */; }; - 7EBD6B630F4536CB673DC0B455CCB16D /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61776E4E75308486A4F73E5A6C13C1F4 /* BeGreaterThan.swift */; }; - 7F40FC3F4DE4EA4702F41F01A12A7353 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A91F36BC1BD2CD05ED524DC08627B86 /* BeLessThan.swift */; }; - 800A161E9B82DEEDA41B7F1A746B24C4 /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5943F5BA7B747036F6AD09B3D70A48F3 /* ObjCMatcher.swift */; }; - 8040A37FF5BBDF1964CAB8C0068ED315 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F06322C8A9518A8A908D84896879AA50 /* BeGreaterThanOrEqualTo.swift */; }; - 804A12C5F40116FA648D9ED2B4B201EB /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69C335E68F81EF24E919A2D120A66EE /* ExampleGroup.swift */; }; + 789991096AE460E5CDEE7F3B54B08431 /* CwlCatchBadInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = A35A05B6646F22168458E8BEFB343B69 /* CwlCatchBadInstruction.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 799C3E19535A82F15074908B1BBB9A35 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = C42C116581A956FDCC10C8B37A8BA937 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7C2792121CF1996F6795A5672EE00272 /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2A72B81D521C0BAA787E63FCF473D5F /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7FABF717282EC77B44E1F0A61EBB0188 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = A6B90201853F518018EA6DE1CE1CD0C4 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 804A12C5F40116FA648D9ED2B4B201EB /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F2305003EF39AE91850EC7217AB5ACA /* ExampleGroup.swift */; }; + 80EB3F3AD608D1B132A3EA4B3E28CAB1 /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AA34D26D38BDBCDE76340E43300CED6 /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; 8135FD819746872BF9F13EC753A17A74 /* Pods-MapSnap_Tests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 9810CB01E6CF944B678979E75A25A729 /* Pods-MapSnap_Tests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 81E6453ECE511335537301CD3B1C1B82 /* ExceptionCapture.swift in Sources */ = {isa = PBXBuildFile; fileRef = 027F8CFBFB89204A8B1D4775C07562A2 /* ExceptionCapture.swift */; }; - 86FB708FCFE6121A82BB09E5ADD84554 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = BC8D101CFB77477C19478EC2223D1002 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8EBC2D6D10C620EE3CA522EA5EE47E10 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7C150F27704B13A948B8CDC813580B7F /* ExampleHooks.swift */; }; - 91ED5B067FCA3CBD48E3114672941051 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8F4CDDD7E6A00565913837460DF1EA5 /* MatcherProtocols.swift */; }; + 850FAC7757B64C91286A39FD7D0FAA98 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = D9A0F75DC521E872A74F9274818A64E3 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 87018F89EC8B67A9F5B6C58AF9D7865A /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = F28AF6EFDFE2101995C614518595EC49 /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 89AD78E4074EB23249969F39D82E8C28 /* CwlCatchBadInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = 67AF4D9E47F5BDDC0DD59B57E36B929D /* CwlCatchBadInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8EBC2D6D10C620EE3CA522EA5EE47E10 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5CEF9AA8E8E88EA5A0DF3DA6545B8505 /* ExampleHooks.swift */; }; + 8F7F26FA3DF6698595E5192FA83D99E7 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = EDC12A8E1E02D34877DBCBC3D41F459C /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 92252787BCC66DFA7A47156D26AB8687 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 94E08403D6738CCB4FB72E8BDDDD8364 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 93DA24C033D85231D5C659A7D607A0B7 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 973A5872AF69C4E4AD0BE6BDF43FB8C8 /* UIKit.framework */; }; - 96ED0CCA721955637A88FE0C9737EC56 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9EC5459A2AF811AB358D92DA8E07CB7D /* SourceLocation.swift */; }; - 9B5DE58927557CE87968C051D2A1C47E /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7013BFCCB2C257F751A7767913D02E23 /* BeLogical.swift */; }; - 9EFD5953D1622A0B8B35EB0682D032A9 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 82B979EAF69CB2AD1CA22512B5260CE9 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 9F08F74CB8740CF0EFF26746EEB0C930 /* CurrentTestCaseTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = FEC5804F079B75957EBD67487622AAB4 /* CurrentTestCaseTracker.m */; }; - A2CABD326609AD67377700A148785E09 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 27C047C65E7DF34C912AB4A13E607051 /* BeAnInstanceOf.swift */; }; + 93DC61401C1B9D9D632B9878F91B6DEE /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = B24F982F4707A9D96E54931F87500C72 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9ABB68606EE3A3BC42DF42A46BC8CEBC /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2D14D73967CB4F56087BA998D30C9A28 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9CE7D40E732F2EF321F8D1A0978C5619 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0CD17ED75E6EAEF0CA1F971C5363E415 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9E20125005339D1ADAC2362C7E5C4A2A /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 18AACACCC40B426DFE2F906E73BDA77F /* Nimble-dummy.m */; }; + 9E5D268B9AF57A467B3C3B0BF7443763 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 192195BA2EA336E7EA28D7C182BDA2F5 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A09B4C172F63B9BDA9B4DDC51DDC8876 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A488104037F8DEB1E60FD17F4936BE2 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; A343469288CB4D615519EA0F4FE0E8B4 /* PINCache.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6883490BDE7EE9A20663012233DC45FC /* PINCache.framework */; }; - A374A2729E32469085C5025EC7115EB8 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = D25B02DC772634D0A47BE2354C288D7A /* Stringers.swift */; }; - A55EC200F57C00E9A78D8A9DA4545338 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13BFE7D8D5D8F2C8223CEA089D2970BB /* HaveCount.swift */; }; - A97663DF591C19185DFB15667B0A3BE8 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8A7500B1FF6268C3AA69359A7253EB51 /* Callsite.swift */; }; + A88209F9A78929242DE75624FCFA93D9 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = E34810A43C31B758A39B9C7800535E04 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A97663DF591C19185DFB15667B0A3BE8 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 39323F8A2C9D7EBB38C89CA93723C375 /* Callsite.swift */; }; ABBDA244FB4C50E30C4A49D5D80D67A8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; - AEA639EBB50E4E25CAE4F4158EF1355E /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 898C1AC42AFEB86EE8C7D06C4811136A /* QuickTestSuite.swift */; }; - B3B2961DFFEA0CBF719889F35EC95924 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 4C7EBBB24C03A59EC2886C00AEA6014B /* QuickConfiguration.m */; }; - B43EDBC7DA15A429006C67B63D45ACFD /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34CFBB293702254E3FAFBEDC633105E4 /* ThrowError.swift */; }; - B9D2E426B5CA226D60A78A71FA289D4C /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = FF100ADC5962CFB5E8F9EF3E0B4A0457 /* AsyncMatcherWrapper.swift */; }; + AE3AEAB038F7B5D10D1CAF5A2E4F4E8D /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BD88FCF830F5AA07719012A73BD1248 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AEA639EBB50E4E25CAE4F4158EF1355E /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 739CCBC263C22AC5333ADF28F29C8CEF /* QuickTestSuite.swift */; }; + AFEDA5B45B5FBE7AFE686D56403EAB66 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCCA441E132547B451FC1AC68A598DE2 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B0A7757FB2DAE990A999D7468A5C09FD /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 45B7C42BBC164FCF64E4F533E15DB487 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B69BA7B3C7B4FB390B00E1604831DFB3 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6F03736B8A04EDC2948B68F29C204DB5 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B9686EC9BB69075B1FD64333DF2E4221 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9964C939E3A638D4459A6C9AF9173603 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BA5B01308D3A4EE1E1669C7C0830D6C4 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 13DAF4B2CCC59B8FBEA1EA6AA98137F4 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BCD185552414EB57BB78839C07BDB37E /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = E242A7BDEA666B590B19D74FC07CB4BC /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BD759D4932F8CBFC6730DED95330C68C /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = EA9404B3011034BD1A399BD342DA7650 /* QuickConfiguration.m */; }; BEA3FA3678E9F5BC190C0BDEF872E2A1 /* MapSnapManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34823EC979B0EF0A2878C3C3657863F8 /* MapSnapManager.swift */; }; BF0AED927FA8BE109FC52B76945A62B8 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; C0824FF2501E194DCC6C00C402A488A7 /* MKMapSnapshotter+MapSnap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 847576EBBF0E3126E06691F18859CF88 /* MKMapSnapshotter+MapSnap.swift */; }; - C12E0930E021F1894B60BC6AFA8F2409 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 344AB0A1BB79E000BC99F6F196C35B3F /* AdapterProtocols.swift */; }; - C201D2B8C23209FDC2413E17438D5414 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = 3D8BE232BAA4452C50E8AECF68BB1CB5 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C2B8372CB524132A9FB2203524EB6D5D /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = C381A19CB3672768223D7D91983FA2F1 /* ExampleMetadata.swift */; }; - C664475CB5236205EAC1342D36D26DBF /* PINCacheObjectSubscripting.h in Headers */ = {isa = PBXBuildFile; fileRef = 95E43CC139702C2E121ED7ED28F0FB11 /* PINCacheObjectSubscripting.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C81FFEEC76399EF3C7C1EE349C810E76 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6BD62785E32FD29F267D49236B1F724 /* NimbleXCTestHandler.swift */; }; - C920C32F25E5F19010F334C81B09E72E /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = F2E7EB57488B3830DABAD987575A8F01 /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; - C99B3CE02D24B32880CB7B23A96CCE80 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = E91A256656CC3D32A5DA96B86977EA4F /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CA970AD67A547C372B4D0AECC18E24DB /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C84170ED70D7845B7034D847D3BBB5EE /* Quick-dummy.m */; }; - CB86B03A673C3B96F45618BEE2BC98AF /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 356E466E2280C033F58F137762C894A4 /* DSL.swift */; }; - CD0A671D2A8DD31D50449BB358C56134 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = CA3562552A3BDF276BAA691D83E3CC5B /* Expression.swift */; }; - D384563DC0914229491A5E8A496E7321 /* Nullability.h in Headers */ = {isa = PBXBuildFile; fileRef = 3C0D57F8DE923C9E4CC64833478B7FA5 /* Nullability.h */; settings = {ATTRIBUTES = (Public, ); }; }; - D41F628A81153A978EB209E4FE925700 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 069B7D02F294B7CABEB1AF5351733AC6 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C278C1114E97370FF0693479F1FE8634 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 32FCDED16D556E0C201CCD73831BA2DA /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C2B8372CB524132A9FB2203524EB6D5D /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9B1C8D77C658DC38B4AE9280A4F99D9B /* ExampleMetadata.swift */; }; + C459FD78EDF8BCA2D9ADFEFD9B32E461 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = E32DD8077C9A5E555FFD5AEE75E7BC5B /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C664475CB5236205EAC1342D36D26DBF /* PINCacheObjectSubscripting.h in Headers */ = {isa = PBXBuildFile; fileRef = 84D1F9324BC6E1400D91558A87CA7C38 /* PINCacheObjectSubscripting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + CA970AD67A547C372B4D0AECC18E24DB /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 39F8831835EF849F38947F684D3CF283 /* Quick-dummy.m */; }; + CAB36E2E9ADBC842C1FC0235195764FD /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 5D6AD86E9086C6FEC7F1ECE2AFF3D078 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; + CB86B03A673C3B96F45618BEE2BC98AF /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DF27DCB0A12428506E3B01922354973 /* DSL.swift */; }; + CEA8369F1433E2727B8F53C9DF68FBB5 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC275233F24FF9F1FA3D626FB65E658 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D384563DC0914229491A5E8A496E7321 /* Nullability.h in Headers */ = {isa = PBXBuildFile; fileRef = 954ECCBC5D9A8658FEDC045BA40FE8F7 /* Nullability.h */; settings = {ATTRIBUTES = (Public, ); }; }; D44CB08D3DEFC1A912E00AF11A40C8BD /* Pods-MapSnap_Example-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2EAF5CADCC677DF47908125C665FE8E4 /* Pods-MapSnap_Example-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DCA54337E8687685A293CC24A97F936C /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0C24B99B4C09BF03EC6E3B70F29B303 /* Contain.swift */; }; - DF0216DBDE0084F6C87FE9275A4E9F0D /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7E8425265E662AB823B5A189B09DFB2D /* Nimble-dummy.m */; }; - E1D20199BDD265E87F2B49ED791445C9 /* PINDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 69E484B4FDC7BD5D27123C11E5856B3D /* PINDiskCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - E4DD7D8AD860395028DCC71F2A0C6CC2 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 7BA74C04EC47B76D1A258C54EA056864 /* QuickSpec.m */; }; - E6F6FF9554A6C7EABD6B92B691751DAD /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B1F108EF0E52268AF23BF720B44FBB0 /* BeLessThanOrEqual.swift */; }; - E909D0D33037F3C642BBB8D47FC642B3 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 802BC61F3D1B89FF4CFF2BA51991D6BD /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E9A500611CF699885DE8A6BAB4E6B392 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = B57F560F1BBB28CFAAEA95F2770F21E4 /* BeEmpty.swift */; }; - EA7C603AFD85CB1EB5CB0BF94A17B167 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3F056EBD91522F7F0A3DFB43BE5C955B /* World.swift */; }; - EAB47A35CF684A8836E82C51C74137C8 /* PINCache-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 90E519ACFD09630F71530ED7B96DEFE9 /* PINCache-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EBD28A29365C4BEE515ADFF0F7FBB214 /* PINCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 953B08C0BEAFDBB921B48A3FF0D8EF3A /* PINCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; - F093A4C8B493ED064E1346014C3FFF84 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C67B77E33D7F10DEC269425E0712025 /* NSBundle+CurrentTestBundle.swift */; }; + D5E0BE17FA1603C8607E85110ED3FC2C /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = DFFBAE70749755E278AC274019E3A792 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D7FC2E45D074995F6FABD8B8FD27D485 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 9E33459A6697DAFA452E87FDEC983A78 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E0D6D26E683C03726B341311E9383351 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24414EC4F5CC502F9EEBA7E98907ECE7 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E1D20199BDD265E87F2B49ED791445C9 /* PINDiskCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 9BAED53BF462C5ED96DD5007BB947211 /* PINDiskCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + E2AF82FAED429162D2F8C13802029210 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */; }; + E4F4F88CF0EA6E1FE71AFC5F827CE94D /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BF6F7F1A077827CA67F33256CCC6994 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + E7A77BE70CCB379809428AA31D1EE71C /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 7303C89039A08575A856984F35456E4A /* QCKDSL.m */; }; + E9BCDE86BE35C29C67BCB8044EE6E14A /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = ADA227835CEF57BCC7FF50796CE6D184 /* QuickSpec.m */; }; + EA7C603AFD85CB1EB5CB0BF94A17B167 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = B70C86BF4E269690A66ADA368E35BEF5 /* World.swift */; }; + EAB47A35CF684A8836E82C51C74137C8 /* PINCache-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 2DB4E313A8C83F771A92582367F233D0 /* PINCache-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EBD28A29365C4BEE515ADFF0F7FBB214 /* PINCache.m in Sources */ = {isa = PBXBuildFile; fileRef = F12FA619DDE26BB33E46552E9D4EEBBB /* PINCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + EC40103E0F16F9AA7CA68CDFE671FD8B /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 719CB147FA733292BBB2C0CF6207E0C1 /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + EDC82FA39F6D1B80EE6FE77A87AADECF /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4237D27FF620A48AE80EC013B27E70D4 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EEB5DBB3184674C33074628E8FB5370A /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B3B3F87592755B211AA32C8B37CA018 /* NSString+QCKSelectorName.m */; }; + F093A4C8B493ED064E1346014C3FFF84 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26557511D1C26A360BC27011170284E7 /* NSBundle+CurrentTestBundle.swift */; }; + F3199E5D140F672B588EC44DE319EDA3 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = D2EA2334FACA8BFC7BB44E6788B8C049 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; F46E56F2C9D4869FA3799A07BC8DEF3E /* Pods-MapSnap_Tests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1604C658C6A083A78F8143A9ED6C76BF /* Pods-MapSnap_Tests-dummy.m */; }; - F85A9207A8601CE7F835CEC56790616F /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2225E59188536EDB8B41292BC3F95B1 /* Expectation.swift */; }; + F6CE045DD3B4A58640421E96B96AF9AA /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4AADF851A1DA59D3B83A23A76911D3CD /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; F915C3C5B843DD57B30D417A8011990F /* MapSnapCache.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDFC6AD574B9B611CA39A7FCCB6CE40F /* MapSnapCache.swift */; }; - F938620E568DC19C73DF013ABBEEE193 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C0192509E524EFDFB6852EFF8AA4E53 /* Filter.swift */; }; + F938620E568DC19C73DF013ABBEEE193 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67EB0D7E57110AE9445CA16E7C1B71BE /* Filter.swift */; }; F958C1A729A1F37DDC201F262EFC8395 /* Pods-MapSnap_Example-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 35DC955945271F73681C5F54DAA006EA /* Pods-MapSnap_Example-dummy.m */; }; - FB09A16A6662F2689D4AA89538DBF1C1 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 522EA907C39BB119563765CF31D7B584 /* BeAKindOf.swift */; }; + FB5F6E844EE3149D150CE43F930E565B /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 853D2F6862E414FC25CD4AA15A255001 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + FBA6B154E352BEDBCFCFDD7369FD5AAB /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = FA59ADADCBCFE719A706CF9B4314033A /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; FCA0791F4B774819EC91BEDDD8923619 /* UIImageView+MapSnap.swift in Sources */ = {isa = PBXBuildFile; fileRef = 87DA6EC397CBE7FB072E9600ECEE4ED0 /* UIImageView+MapSnap.swift */; }; - FF8B32DC71EA50D7FEB7BEF36C669328 /* PINMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = B794076B0EAA92A932FD745B43290405 /* PINMemoryCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; + FF8B32DC71EA50D7FEB7BEF36C669328 /* PINMemoryCache.m in Sources */ = {isa = PBXBuildFile; fileRef = 8F9AD525F7756C18C96644A274A659D4 /* PINMemoryCache.m */; settings = {COMPILER_FLAGS = "-DOS_OBJECT_USE_OBJC=0"; }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -128,7 +143,7 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = FF61C7C740C1B196A3B33F37B77DBC68; + remoteGlobalIDString = 72E30CEFE495DD0EB9CFB72FCF80894C; remoteInfo = Nimble; }; 81D4340B20588CD7F506EF34B2F7F7EA /* PBXContainerItemProxy */ = { @@ -162,154 +177,169 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 00954035E44DF042D30AED9F8F1ED442 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 0035596C11397EEDBEDE2F280DCD0ACC /* PINMemoryCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINMemoryCache.h; path = PINCache/PINMemoryCache.h; sourceTree = ""; }; 00EBAABC0A5FFD04A18A2AA5346CBBBE /* Pods_MapSnap_Example.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MapSnap_Example.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 012DFBFB7A1856EA62AD354F7576E7AB /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 027F8CFBFB89204A8B1D4775C07562A2 /* ExceptionCapture.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExceptionCapture.swift; path = Sources/Nimble/Utils/ExceptionCapture.swift; sourceTree = ""; }; - 04C766473B08828F7D975C70EF6FCD4F /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; + 0152844195330E0B9259FB1BB27CDD62 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; 04E5C379557AF8A17DD8F8D561773751 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 069B7D02F294B7CABEB1AF5351733AC6 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; 0A3CAD201CC9632D028C5506D18F13A9 /* Pods_MapSnap_Tests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_MapSnap_Tests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 0A91F36BC1BD2CD05ED524DC08627B86 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 0E4B7065CEC504F551435EB937EF093B /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; - 105BDDA7402B37D56160821539341392 /* PINMemoryCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINMemoryCache.h; path = PINCache/PINMemoryCache.h; sourceTree = ""; }; - 1113A796DE369F7FBE7ECF141BE4F336 /* PINCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINCache.h; path = PINCache/PINCache.h; sourceTree = ""; }; - 13BFE7D8D5D8F2C8223CEA089D2970BB /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - 151A53E4DA74BB1354C542FD7E37FF3E /* PINDiskCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINDiskCache.h; path = PINCache/PINDiskCache.h; sourceTree = ""; }; + 0BD88FCF830F5AA07719012A73BD1248 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + 0CD17ED75E6EAEF0CA1F971C5363E415 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + 0DF27DCB0A12428506E3B01922354973 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + 0E164557E1123C9ACC3D63D3881D60AF /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + 13DAF4B2CCC59B8FBEA1EA6AA98137F4 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 155601A7EE9BD524893E233FD6345C7E /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; 1604C658C6A083A78F8143A9ED6C76BF /* Pods-MapSnap_Tests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MapSnap_Tests-dummy.m"; sourceTree = ""; }; - 18330C98DEFF234C233341A7E8921515 /* PINCache-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PINCache-prefix.pch"; sourceTree = ""; }; + 162ECED5A6D75A471784883906A37F6E /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; + 18AACACCC40B426DFE2F906E73BDA77F /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; 18D761D80980B609A853D22D39CA651D /* MapSnap.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = MapSnap.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 1C67B77E33D7F10DEC269425E0712025 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + 192195BA2EA336E7EA28D7C182BDA2F5 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + 1B3B3F87592755B211AA32C8B37CA018 /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.m"; sourceTree = ""; }; 1DF938E982964951B0C7F13F6C927274 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1EC8F64F80F2F257791CC7ED6213EF59 /* MapSnap-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MapSnap-umbrella.h"; sourceTree = ""; }; - 1ED80C6A26047366EA737151C2ED14BD /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 209D128C9431D2334EA782CCF7ACB8AB /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 256333F20779EE0FE1B473C191AF2CD3 /* PINCache.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PINCache.modulemap; sourceTree = ""; }; - 27C047C65E7DF34C912AB4A13E607051 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; - 2B1F108EF0E52268AF23BF720B44FBB0 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - 2C4C49EA0F007BDE194D9B0FB65F7230 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 1F2305003EF39AE91850EC7217AB5ACA /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + 21FE73876492314E1312596628281BE4 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + 24414EC4F5CC502F9EEBA7E98907ECE7 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + 26557511D1C26A360BC27011170284E7 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + 2C6CB023A4E09A4096826F9570515CB9 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + 2D14D73967CB4F56087BA998D30C9A28 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + 2DB4E313A8C83F771A92582367F233D0 /* PINCache-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PINCache-umbrella.h"; sourceTree = ""; }; 2DC697E98A6A7AA744776E038834DE7F /* Pods-MapSnap_Tests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MapSnap_Tests-acknowledgements.plist"; sourceTree = ""; }; 2EAF5CADCC677DF47908125C665FE8E4 /* Pods-MapSnap_Example-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MapSnap_Example-umbrella.h"; sourceTree = ""; }; + 2F51DADD0736F8311FF24B078E8BEDD1 /* PINCache-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PINCache-prefix.pch"; sourceTree = ""; }; 316706D7AF11A9478934891A8CD55B45 /* Pods-MapSnap_Example-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MapSnap_Example-acknowledgements.markdown"; sourceTree = ""; }; + 322D9AE63633A3FD181707E4FC95569A /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; 326896C324165A383E1B943FCCAF7C78 /* Pods-MapSnap_Tests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-MapSnap_Tests.modulemap"; sourceTree = ""; }; - 344AB0A1BB79E000BC99F6F196C35B3F /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + 32FCDED16D556E0C201CCD73831BA2DA /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; + 33CBFCA27A76DC44913AE31CD000CCB5 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + 345C17A2E2500E811F22C3520271B8D6 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 34823EC979B0EF0A2878C3C3657863F8 /* MapSnapManager.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapSnapManager.swift; sourceTree = ""; }; - 34CFBB293702254E3FAFBEDC633105E4 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - 356E466E2280C033F58F137762C894A4 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; 35DC955945271F73681C5F54DAA006EA /* Pods-MapSnap_Example-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-MapSnap_Example-dummy.m"; sourceTree = ""; }; - 3BE86136B7397CBA742B79716DD69CD9 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - 3C0D57F8DE923C9E4CC64833478B7FA5 /* Nullability.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nullability.h; path = PINCache/Nullability.h; sourceTree = ""; }; - 3C7B848FD6995A923F7FDC42EB16EB0F /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - 3D8BE232BAA4452C50E8AECF68BB1CB5 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/Quick/NSString+QCKSelectorName.h"; sourceTree = ""; }; - 3F056EBD91522F7F0A3DFB43BE5C955B /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + 36305928779B12931DC579AC15B3F2CB /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + 39323F8A2C9D7EBB38C89CA93723C375 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 39F8831835EF849F38947F684D3CF283 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; 3FB0C5E6FD9BB323FDB56C1859A98A6E /* Pods-MapSnap_Tests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MapSnap_Tests.debug.xcconfig"; sourceTree = ""; }; + 410D041BE5CE8BDF7295A810D5C1D21C /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; + 4237D27FF620A48AE80EC013B27E70D4 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; 43B4E02BF9B54D425376B90ADBE3AD69 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 46F74CB09F3865B01312FD33404A5126 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + 45B7C42BBC164FCF64E4F533E15DB487 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; 471D95D6987CD171C923E217DFBBF8D2 /* MapKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = MapKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/MapKit.framework; sourceTree = DEVELOPER_DIR; }; - 4C7EBBB24C03A59EC2886C00AEA6014B /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/Quick/Configuration/QuickConfiguration.m; sourceTree = ""; }; - 5039CB5E5859CF12FC6710D144BE015F /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/Quick/DSL/QCKDSL.m; sourceTree = ""; }; - 522EA907C39BB119563765CF31D7B584 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - 52E041E474C56BD4F3D65DFF018DF3D1 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - 586637917FE99E0C13AB09A84D2FD083 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 58FE28CB83C62F6CE42E41715AA5F743 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - 5943F5BA7B747036F6AD09B3D70A48F3 /* ObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObjCMatcher.swift; path = Sources/Nimble/Wrappers/ObjCMatcher.swift; sourceTree = ""; }; - 5AEFACEB7BB5A817D3F15B355A4BC59A /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 5B8EDEF85CCCE7F3B30F72407069623C /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; - 5C884C0E1E79042FFADCE339529CC2FD /* PINCache.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINCache.xcconfig; sourceTree = ""; }; - 5E1A0633325E4F770302DBFDFB4F0436 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 61776E4E75308486A4F73E5A6C13C1F4 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - 61D173902408D6ADE9F25BAB640BA4E4 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - 62CF3EB21ED561A4F8AFB1C074368109 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 65170912A744D260953B73DDA56F72D8 /* ObjCExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ObjCExpectation.swift; path = Sources/Nimble/ObjCExpectation.swift; sourceTree = ""; }; - 671EDA57386D2E19965599DE5E09D1C4 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; + 4AADF851A1DA59D3B83A23A76911D3CD /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; + 5701134DD3831B5D049625C7F4598934 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + 5CEF9AA8E8E88EA5A0DF3DA6545B8505 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 5D6AD86E9086C6FEC7F1ECE2AFF3D078 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; + 5DDC9B45C3220AFD3093EAAEAE19597E /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + 655C73A95EE46C174B1D008A54E62AB6 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 67AF4D9E47F5BDDC0DD59B57E36B929D /* CwlCatchBadInstruction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchBadInstruction.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h; sourceTree = ""; }; + 67EB0D7E57110AE9445CA16E7C1B71BE /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; 6883490BDE7EE9A20663012233DC45FC /* PINCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PINCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 68AB096306B1F3DC496E04AC79A7F2F5 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - 69E484B4FDC7BD5D27123C11E5856B3D /* PINDiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINDiskCache.m; path = PINCache/PINDiskCache.m; sourceTree = ""; }; - 6C0192509E524EFDFB6852EFF8AA4E53 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 6B7B6CD879E03D9D7F062A8392B231F6 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Nimble.modulemap; sourceTree = ""; }; + 6BF6F7F1A077827CA67F33256CCC6994 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; 6D69DFCF032B95807AED401433CB1E38 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + 6D8B2CFE6591F60BCDF433290AB92B8B /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; 6E18263F92B315E37E086DA304CC458A /* MapSnap-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "MapSnap-dummy.m"; sourceTree = ""; }; - 7013BFCCB2C257F751A7767913D02E23 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - 76D1165619960BD82B9BDA06D32A2C71 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 77A8607BB338DCC35B82F78A84286174 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 7B3B250DFD4215A49C20D6E32B750AA3 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 7BA74C04EC47B76D1A258C54EA056864 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/Quick/QuickSpec.m; sourceTree = ""; }; - 7C150F27704B13A948B8CDC813580B7F /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 6F03736B8A04EDC2948B68F29C204DB5 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + 719CB147FA733292BBB2C0CF6207E0C1 /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 7303C89039A08575A856984F35456E4A /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + 739CCBC263C22AC5333ADF28F29C8CEF /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + 74208FEC57239588B65459D296B7D434 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 75BAC8681AB2F72A03C05CABDCAEE544 /* PINCache-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PINCache-dummy.m"; sourceTree = ""; }; + 7AA34D26D38BDBCDE76340E43300CED6 /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h; sourceTree = ""; }; + 7CA86ADEA709F815C617AEE2F89483A8 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 7CC275233F24FF9F1FA3D626FB65E658 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; 7E1C6F16A86765C39ECB8DA590CBFEC3 /* Pods-MapSnap_Example-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MapSnap_Example-frameworks.sh"; sourceTree = ""; }; - 7E8425265E662AB823B5A189B09DFB2D /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - 7F670039AF84988FFDEEDCD680C50BCA /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 7F5B229A5936FB9DB87E121EB3EA35AF /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; 801498E6B252C2281341405BB1A763BB /* Pods-MapSnap_Example-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MapSnap_Example-resources.sh"; sourceTree = ""; }; - 802BC61F3D1B89FF4CFF2BA51991D6BD /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 810614A50290AA14F1268D1312A5B421 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/Nimble/objc/DSL.m; sourceTree = ""; }; - 82B979EAF69CB2AD1CA22512B5260CE9 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/Quick/DSL/QCKDSL.h; sourceTree = ""; }; 8380AD466DE28953EC5F23A95F1704C1 /* MapSnap.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = MapSnap.modulemap; sourceTree = ""; }; 847576EBBF0E3126E06691F18859CF88 /* MKMapSnapshotter+MapSnap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "MKMapSnapshotter+MapSnap.swift"; sourceTree = ""; }; + 84C87ECE4B19D1F14AC1D938E8848136 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + 84D1F9324BC6E1400D91558A87CA7C38 /* PINCacheObjectSubscripting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINCacheObjectSubscripting.h; path = PINCache/PINCacheObjectSubscripting.h; sourceTree = ""; }; + 853D2F6862E414FC25CD4AA15A255001 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; 87DA6EC397CBE7FB072E9600ECEE4ED0 /* UIImageView+MapSnap.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = "UIImageView+MapSnap.swift"; sourceTree = ""; }; 87EC84952A57628085FFB70A8DB70831 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 886059BD6190CC51F8F05DA6C24E6B8F /* Pods-MapSnap_Example.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MapSnap_Example.release.xcconfig"; sourceTree = ""; }; - 898C1AC42AFEB86EE8C7D06C4811136A /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - 8A7500B1FF6268C3AA69359A7253EB51 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 88EE16F2B5CAB80A5DA92BE4E80ADF35 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + 8A488104037F8DEB1E60FD17F4936BE2 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + 8A84B29E18FD19678586CEED05C3EB39 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; 8E6FD446FA445E4BEE23EE881AA06637 /* Pods-MapSnap_Tests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MapSnap_Tests-resources.sh"; sourceTree = ""; }; - 90E519ACFD09630F71530ED7B96DEFE9 /* PINCache-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "PINCache-umbrella.h"; sourceTree = ""; }; + 8F9AD525F7756C18C96644A274A659D4 /* PINMemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINMemoryCache.m; path = PINCache/PINMemoryCache.m; sourceTree = ""; }; + 8FB86AEEC9D35B4EFFB20303C7C3E5FC /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + 91F2A72EF702420F607528E7D6E80B05 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; 94B1EC8C125727BBFB1BDB1A680DBEDF /* PINCache.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = PINCache.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 953B08C0BEAFDBB921B48A3FF0D8EF3A /* PINCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINCache.m; path = PINCache/PINCache.m; sourceTree = ""; }; - 955AC604221E801DF21031D4A581B443 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 95E43CC139702C2E121ED7ED28F0FB11 /* PINCacheObjectSubscripting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINCacheObjectSubscripting.h; path = PINCache/PINCacheObjectSubscripting.h; sourceTree = ""; }; + 94E08403D6738CCB4FB72E8BDDDD8364 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 954ECCBC5D9A8658FEDC045BA40FE8F7 /* Nullability.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nullability.h; path = PINCache/Nullability.h; sourceTree = ""; }; + 959084B9DF3954F6C5D8984822CF8367 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; 9650BAE1EB568BE4117EA90AC6A60631 /* MapSnap-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "MapSnap-prefix.pch"; sourceTree = ""; }; 973A5872AF69C4E4AD0BE6BDF43FB8C8 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; 9810CB01E6CF944B678979E75A25A729 /* Pods-MapSnap_Tests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-MapSnap_Tests-umbrella.h"; sourceTree = ""; }; - 9EC5459A2AF811AB358D92DA8E07CB7D /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - ABC367784A604FEEFB194B272215E265 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + 9964C939E3A638D4459A6C9AF9173603 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + 9A362093AF4B81291B7BF3C769A26E8F /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; + 9B1C8D77C658DC38B4AE9280A4F99D9B /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; + 9B376CB9C7B5C5FBCCE3EB12392C459A /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + 9BAED53BF462C5ED96DD5007BB947211 /* PINDiskCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINDiskCache.m; path = PINCache/PINDiskCache.m; sourceTree = ""; }; + 9CFCD9A9EE018ED13B4FBC21EE03E430 /* PINCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINCache.h; path = PINCache/PINCache.h; sourceTree = ""; }; + 9E33459A6697DAFA452E87FDEC983A78 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + 9E56C28F2E18BDCD39ADAA834E4D8215 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 9EA177B2FFFE884859AFA81630E5FDC8 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + 9FB7A676A9159A2208D7B7EAD25EAE4F /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; + A24434297396BF6CFD80317254A920A2 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + A35A05B6646F22168458E8BEFB343B69 /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; + A3EE9D677089B1D3ADE1CE73EADDE82D /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + A6B90201853F518018EA6DE1CE1CD0C4 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m; sourceTree = ""; }; + A86586AB665DA71EF0E859734A659480 /* PINDiskCache.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = PINDiskCache.h; path = PINCache/PINDiskCache.h; sourceTree = ""; }; + A86E6F5DDD8E2D582E4F49E7863F02AB /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + ACD2AA26B51E6F05D2F24CDA6F000389 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + ADA227835CEF57BCC7FF50796CE6D184 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + AEA8C3DB84B4E1C95F4D80394802545F /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; B11F32B47BB08BCB063319C6A02106A5 /* Pods-MapSnap_Example.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MapSnap_Example.debug.xcconfig"; sourceTree = ""; }; - B2D151BFCACFD38A9C45F7E778ED4B47 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - B4837CEC5A5F8C0B5E88C47E1AE57292 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/Quick/World.h; sourceTree = ""; }; - B57F560F1BBB28CFAAEA95F2770F21E4 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - B5A72F4C47C8BCDD393043473288C8A6 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - B794076B0EAA92A932FD745B43290405 /* PINMemoryCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINMemoryCache.m; path = PINCache/PINMemoryCache.m; sourceTree = ""; }; - B8F4CDDD7E6A00565913837460DF1EA5 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - B930640876231E7AC6BA87825CDCE3BD /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/Quick/Quick.h; sourceTree = ""; }; - BA7C33F5DFAD5A88C037232DE3A1C8F9 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/Nimble/objc/DSL.h; sourceTree = ""; }; + B171B08CBC2D0DF3A50748A3085721AB /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + B1DFBD2CA4959B6E2487A78A47476EA7 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; + B20460C976017D26AC7EEAA5FE9D784E /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + B24F982F4707A9D96E54931F87500C72 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + B2A72B81D521C0BAA787E63FCF473D5F /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + B41693CC378532208AF21FE2D296A79D /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; + B65135E4149980703B2D011F490F6538 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; + B70C86BF4E269690A66ADA368E35BEF5 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + B8A3142C547BBE0FA5006147B8A0B249 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; BAF5BEE88CF3240B52A3CA233685495F /* CoreLocation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreLocation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/CoreLocation.framework; sourceTree = DEVELOPER_DIR; }; - BC8D101CFB77477C19478EC2223D1002 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/Nimble/objc/NMBExceptionCapture.h; sourceTree = ""; }; BF00CD54954819368D2DB39D52868404 /* Pods-MapSnap_Tests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-MapSnap_Tests-acknowledgements.markdown"; sourceTree = ""; }; - BF630F86F8FBF002F5D0131BAF332C9C /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - C0B5A5A970FE71BA70C428C310271B4D /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - C0C24B99B4C09BF03EC6E3B70F29B303 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; C0FC03DABE95E8B59D9715CE5B9DFB47 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS9.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; C148910E1A59AF68E2E4E871118C65AE /* Pods-MapSnap_Tests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-MapSnap_Tests.release.xcconfig"; sourceTree = ""; }; - C381A19CB3672768223D7D91983FA2F1 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - C618EA23F10B11A77B0F852414F32492 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - C69C335E68F81EF24E919A2D120A66EE /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - C75401F4885399038DBDCF6C0A75B4CD /* PINCache-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "PINCache-dummy.m"; sourceTree = ""; }; - C84170ED70D7845B7034D847D3BBB5EE /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - CA3562552A3BDF276BAA691D83E3CC5B /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - CD08AD0CF29979D1817E657A128BB356 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - D05BB8673696A0562BD52E7519C0EC24 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + C42C116581A956FDCC10C8B37A8BA937 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + C65AAE5514AF822664A9B22826926A55 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + C6BA2EA7CC05AC51656AC99C60348FD0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + C8F77C6E310159F1098A3C31E1F0A2C5 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; + CC868F661469DBCE8FA63CDF8C278B43 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + CD0C662F15F6BEB8E036B58C5A6D09DC /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; + CF66CEE0E88CDC58AFC169094876731E /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; D14AE58573FC2AF5B9CE2624CCFFC439 /* MapSnap.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = MapSnap.xcconfig; sourceTree = ""; }; - D25B02DC772634D0A47BE2354C288D7A /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + D2EA2334FACA8BFC7BB44E6788B8C049 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; D3DFF1CF7573E7C2E478EA29CC355ABD /* Pods-MapSnap_Example.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = "Pods-MapSnap_Example.modulemap"; sourceTree = ""; }; - D6BD62785E32FD29F267D49236B1F724 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - D71506467E6486630DE85876CCD58097 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/Nimble/objc/NMBExceptionCapture.m; sourceTree = ""; }; + D5C55C204587DCA529F6C3BFB5B5717A /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; + D9A0F75DC521E872A74F9274818A64E3 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; DDFC6AD574B9B611CA39A7FCCB6CE40F /* MapSnapCache.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; path = MapSnapCache.swift; sourceTree = ""; }; - DE490E4EC0FFF1BAE62450A5BC036AB7 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - E01FC486C6EB02BD947FC0E854D7611B /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + DFFBAE70749755E278AC274019E3A792 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; E20AE27413755917919C57783EFEE550 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E2CF12621CB1E722E47512B00138953D /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - E3438CD67C5FC6695D7CF53351A1D8DF /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - E88EE3FF1D24B592EC884938705C35D7 /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/Quick/NSString+QCKSelectorName.m"; sourceTree = ""; }; - E91A256656CC3D32A5DA96B86977EA4F /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/Quick/QuickSpec.h; sourceTree = ""; }; - EB66EF5BF3897028C7954C8A938B7D0F /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + E222E550A3C17129A922CB77997D5A45 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + E242A7BDEA666B590B19D74FC07CB4BC /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + E32DD8077C9A5E555FFD5AEE75E7BC5B /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + E34810A43C31B758A39B9C7800535E04 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; + E5DF3640A68F4F1DACA4C40FD0995610 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + EA9404B3011034BD1A399BD342DA7650 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; EBBC2B9E182A20742F8B2B03DF84DD89 /* Pods-MapSnap_Tests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-MapSnap_Tests-frameworks.sh"; sourceTree = ""; }; - F06322C8A9518A8A908D84896879AA50 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - F2225E59188536EDB8B41292BC3F95B1 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - F2E7EB57488B3830DABAD987575A8F01 /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/Quick/DSL/World+DSL.h"; sourceTree = ""; }; - F688CC0515B4B182DC6A2DAAD766D878 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = Quick.modulemap; sourceTree = ""; }; + ED090E2A47588133620EFDE67FDCD83B /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h; sourceTree = ""; }; + EDC12A8E1E02D34877DBCBC3D41F459C /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; + F016129CCF06862D90CCB932ABD8B098 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + F0ED6F3490FB4B4C51997100D4FD6F4C /* PINCache.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = "sourcecode.module-map"; path = PINCache.modulemap; sourceTree = ""; }; + F12FA619DDE26BB33E46552E9D4EEBBB /* PINCache.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = PINCache.m; path = PINCache/PINCache.m; sourceTree = ""; }; + F28AF6EFDFE2101995C614518595EC49 /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + F46DDAA08389E5436F7733A03C33E708 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.h"; sourceTree = ""; }; + F4DA477E220DF7543ADF24FB43E32C6C /* PINCache.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = PINCache.xcconfig; sourceTree = ""; }; FA216443334A6193E54ADC89176138E4 /* Pods-MapSnap_Example-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-MapSnap_Example-acknowledgements.plist"; sourceTree = ""; }; - FB3A2024EB7EF7F49C9F1C65E8349A0F /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Wrappers/MatcherFunc.swift; sourceTree = ""; }; - FEC5804F079B75957EBD67487622AAB4 /* CurrentTestCaseTracker.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CurrentTestCaseTracker.m; path = Sources/Nimble/objc/CurrentTestCaseTracker.m; sourceTree = ""; }; - FEDECE06404D71105AD880A8FC54376D /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - FF100ADC5962CFB5E8F9EF3E0B4A0457 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift; sourceTree = ""; }; - FF8C40FF3EC899606D42E6898BA856ED /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/Quick/Configuration/QuickConfiguration.h; sourceTree = ""; }; + FA59ADADCBCFE719A706CF9B4314033A /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + FCCA441E132547B451FC1AC68A598DE2 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + FE2ED94E44FABCC7C7AE89CE4E250860 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + FEF2C74E3787ED19DA8C8A822821B941 /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -358,29 +388,45 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - FEF785D316E836E93C09637D3A3082CA /* Frameworks */ = { + F8B360D4AAEBF44BCDC02A9A8054AC7B /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 47CBCE8837CE75AE1B7484A63CE387ED /* Foundation.framework in Frameworks */, + E2AF82FAED429162D2F8C13802029210 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 3CF42629F78DFCA9A2A534D8160DE280 /* Support Files */ = { + 17BC05A162B692AA328B59AACA48F3B9 /* PINCache */ = { isa = PBXGroup; children = ( - 209D128C9431D2334EA782CCF7ACB8AB /* Info.plist */, - F688CC0515B4B182DC6A2DAAD766D878 /* Quick.modulemap */, - 5B8EDEF85CCCE7F3B30F72407069623C /* Quick.xcconfig */, - C84170ED70D7845B7034D847D3BBB5EE /* Quick-dummy.m */, - D05BB8673696A0562BD52E7519C0EC24 /* Quick-prefix.pch */, - EB66EF5BF3897028C7954C8A938B7D0F /* Quick-umbrella.h */, + 954ECCBC5D9A8658FEDC045BA40FE8F7 /* Nullability.h */, + 9CFCD9A9EE018ED13B4FBC21EE03E430 /* PINCache.h */, + F12FA619DDE26BB33E46552E9D4EEBBB /* PINCache.m */, + 84D1F9324BC6E1400D91558A87CA7C38 /* PINCacheObjectSubscripting.h */, + A86586AB665DA71EF0E859734A659480 /* PINDiskCache.h */, + 9BAED53BF462C5ED96DD5007BB947211 /* PINDiskCache.m */, + 0035596C11397EEDBEDE2F280DCD0ACC /* PINMemoryCache.h */, + 8F9AD525F7756C18C96644A274A659D4 /* PINMemoryCache.m */, + 25F5CCA93C221406E62DCD032D37862A /* Support Files */, + ); + path = PINCache; + sourceTree = ""; + }; + 25F5CCA93C221406E62DCD032D37862A /* Support Files */ = { + isa = PBXGroup; + children = ( + 345C17A2E2500E811F22C3520271B8D6 /* Info.plist */, + F0ED6F3490FB4B4C51997100D4FD6F4C /* PINCache.modulemap */, + F4DA477E220DF7543ADF24FB43E32C6C /* PINCache.xcconfig */, + 75BAC8681AB2F72A03C05CABDCAEE544 /* PINCache-dummy.m */, + 2F51DADD0736F8311FF24B078E8BEDD1 /* PINCache-prefix.pch */, + 2DB4E313A8C83F771A92582367F233D0 /* PINCache-umbrella.h */, ); name = "Support Files"; - path = "../Target Support Files/Quick"; + path = "../Target Support Files/PINCache"; sourceTree = ""; }; 5882F9BA90A742167DF92A849F46A34B /* Pods-MapSnap_Tests */ = { @@ -401,51 +447,13 @@ path = "Target Support Files/Pods-MapSnap_Tests"; sourceTree = ""; }; - 787C0A37C3213B577873175602A51241 /* Quick */ = { - isa = PBXGroup; - children = ( - 8A7500B1FF6268C3AA69359A7253EB51 /* Callsite.swift */, - 3BE86136B7397CBA742B79716DD69CD9 /* Closures.swift */, - B2D151BFCACFD38A9C45F7E778ED4B47 /* Configuration.swift */, - 356E466E2280C033F58F137762C894A4 /* DSL.swift */, - ABC367784A604FEEFB194B272215E265 /* ErrorUtility.swift */, - 586637917FE99E0C13AB09A84D2FD083 /* Example.swift */, - C69C335E68F81EF24E919A2D120A66EE /* ExampleGroup.swift */, - 7C150F27704B13A948B8CDC813580B7F /* ExampleHooks.swift */, - C381A19CB3672768223D7D91983FA2F1 /* ExampleMetadata.swift */, - 6C0192509E524EFDFB6852EFF8AA4E53 /* Filter.swift */, - 5AEFACEB7BB5A817D3F15B355A4BC59A /* HooksPhase.swift */, - 1C67B77E33D7F10DEC269425E0712025 /* NSBundle+CurrentTestBundle.swift */, - 3D8BE232BAA4452C50E8AECF68BB1CB5 /* NSString+QCKSelectorName.h */, - E88EE3FF1D24B592EC884938705C35D7 /* NSString+QCKSelectorName.m */, - 82B979EAF69CB2AD1CA22512B5260CE9 /* QCKDSL.h */, - 5039CB5E5859CF12FC6710D144BE015F /* QCKDSL.m */, - B930640876231E7AC6BA87825CDCE3BD /* Quick.h */, - FF8C40FF3EC899606D42E6898BA856ED /* QuickConfiguration.h */, - 4C7EBBB24C03A59EC2886C00AEA6014B /* QuickConfiguration.m */, - 7B3B250DFD4215A49C20D6E32B750AA3 /* QuickSelectedTestSuiteBuilder.swift */, - E91A256656CC3D32A5DA96B86977EA4F /* QuickSpec.h */, - 7BA74C04EC47B76D1A258C54EA056864 /* QuickSpec.m */, - 898C1AC42AFEB86EE8C7D06C4811136A /* QuickTestSuite.swift */, - 0E4B7065CEC504F551435EB937EF093B /* String+FileName.swift */, - FEDECE06404D71105AD880A8FC54376D /* SuiteHooks.swift */, - B4837CEC5A5F8C0B5E88C47E1AE57292 /* World.h */, - 3F056EBD91522F7F0A3DFB43BE5C955B /* World.swift */, - F2E7EB57488B3830DABAD987575A8F01 /* World+DSL.h */, - DE490E4EC0FFF1BAE62450A5BC036AB7 /* World+DSL.swift */, - E3438CD67C5FC6695D7CF53351A1D8DF /* XCTestSuite+QuickTestSuiteBuilder.m */, - 3CF42629F78DFCA9A2A534D8160DE280 /* Support Files */, - ); - path = Quick; - sourceTree = ""; - }; 7DB346D0F39D3F0E887471402A8071AB = { isa = PBXGroup; children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, A23D02FA91B8F9326C9C75FE4A825241 /* Development Pods */, 986A3765FF8A674B6F19A58CFB682738 /* Frameworks */, - 9F56C961235B4A6BB048FCB8935E2295 /* Pods */, + F29B9E03BD31293EEDA63F2F1377F3CD /* Pods */, A7645D57D50D52661CA2D95508B0D941 /* Products */, D6317BE8621BFFAB9B9C52972948A315 /* Targets Support Files */, ); @@ -482,16 +490,6 @@ name = Frameworks; sourceTree = ""; }; - 9F56C961235B4A6BB048FCB8935E2295 /* Pods */ = { - isa = PBXGroup; - children = ( - F1A0E38D4D346D41A69718AF65D39618 /* Nimble */, - BA9462CFA4927681B1706DD04C07D7C0 /* PINCache */, - 787C0A37C3213B577873175602A51241 /* Quick */, - ); - name = Pods; - sourceTree = ""; - }; A23D02FA91B8F9326C9C75FE4A825241 /* Development Pods */ = { isa = PBXGroup; children = ( @@ -550,48 +548,128 @@ path = MapSnap; sourceTree = ""; }; - BA6A7FDEC50E0D59803373CBA6F10A34 /* Support Files */ = { + AFE59634B96DEA3A91CAEA06FB2FE7C5 /* Support Files */ = { isa = PBXGroup; children = ( - E01FC486C6EB02BD947FC0E854D7611B /* Info.plist */, - 04C766473B08828F7D975C70EF6FCD4F /* Nimble.modulemap */, - 3C7B848FD6995A923F7FDC42EB16EB0F /* Nimble.xcconfig */, - 7E8425265E662AB823B5A189B09DFB2D /* Nimble-dummy.m */, - 77A8607BB338DCC35B82F78A84286174 /* Nimble-prefix.pch */, - 802BC61F3D1B89FF4CFF2BA51991D6BD /* Nimble-umbrella.h */, + C6BA2EA7CC05AC51656AC99C60348FD0 /* Info.plist */, + 6B7B6CD879E03D9D7F062A8392B231F6 /* Nimble.modulemap */, + 7F5B229A5936FB9DB87E121EB3EA35AF /* Nimble.xcconfig */, + 18AACACCC40B426DFE2F906E73BDA77F /* Nimble-dummy.m */, + ACD2AA26B51E6F05D2F24CDA6F000389 /* Nimble-prefix.pch */, + 2D14D73967CB4F56087BA998D30C9A28 /* Nimble-umbrella.h */, ); name = "Support Files"; path = "../Target Support Files/Nimble"; sourceTree = ""; }; - BA9462CFA4927681B1706DD04C07D7C0 /* PINCache */ = { + B03D74BC140472D2C4A29E25E3F8CF30 /* Nimble */ = { isa = PBXGroup; children = ( - 3C0D57F8DE923C9E4CC64833478B7FA5 /* Nullability.h */, - 1113A796DE369F7FBE7ECF141BE4F336 /* PINCache.h */, - 953B08C0BEAFDBB921B48A3FF0D8EF3A /* PINCache.m */, - 95E43CC139702C2E121ED7ED28F0FB11 /* PINCacheObjectSubscripting.h */, - 151A53E4DA74BB1354C542FD7E37FF3E /* PINDiskCache.h */, - 69E484B4FDC7BD5D27123C11E5856B3D /* PINDiskCache.m */, - 105BDDA7402B37D56160821539341392 /* PINMemoryCache.h */, - B794076B0EAA92A932FD745B43290405 /* PINMemoryCache.m */, - BF43C343EE6F87826013967088F335A3 /* Support Files */, + A86E6F5DDD8E2D582E4F49E7863F02AB /* AdapterProtocols.swift */, + 74208FEC57239588B65459D296B7D434 /* AllPass.swift */, + 8A488104037F8DEB1E60FD17F4936BE2 /* AssertionDispatcher.swift */, + 6D8B2CFE6591F60BCDF433290AB92B8B /* AssertionRecorder.swift */, + 9FB7A676A9159A2208D7B7EAD25EAE4F /* Async.swift */, + 32FCDED16D556E0C201CCD73831BA2DA /* AsyncMatcherWrapper.swift */, + 322D9AE63633A3FD181707E4FC95569A /* BeAKindOf.swift */, + FEF2C74E3787ED19DA8C8A822821B941 /* BeAnInstanceOf.swift */, + B20460C976017D26AC7EEAA5FE9D784E /* BeCloseTo.swift */, + FE2ED94E44FABCC7C7AE89CE4E250860 /* BeEmpty.swift */, + E222E550A3C17129A922CB77997D5A45 /* BeginWith.swift */, + 13DAF4B2CCC59B8FBEA1EA6AA98137F4 /* BeGreaterThan.swift */, + 7CA86ADEA709F815C617AEE2F89483A8 /* BeGreaterThanOrEqualTo.swift */, + 0CD17ED75E6EAEF0CA1F971C5363E415 /* BeIdenticalTo.swift */, + AEA8C3DB84B4E1C95F4D80394802545F /* BeLessThan.swift */, + 655C73A95EE46C174B1D008A54E62AB6 /* BeLessThanOrEqual.swift */, + 94E08403D6738CCB4FB72E8BDDDD8364 /* BeLogical.swift */, + B24F982F4707A9D96E54931F87500C72 /* BeNil.swift */, + 162ECED5A6D75A471784883906A37F6E /* BeVoid.swift */, + 9EA177B2FFFE884859AFA81630E5FDC8 /* Contain.swift */, + 5D6AD86E9086C6FEC7F1ECE2AFF3D078 /* CurrentTestCaseTracker.h */, + B2A72B81D521C0BAA787E63FCF473D5F /* CwlBadInstructionException.swift */, + 67AF4D9E47F5BDDC0DD59B57E36B929D /* CwlCatchBadInstruction.h */, + A35A05B6646F22168458E8BEFB343B69 /* CwlCatchBadInstruction.m */, + 9964C939E3A638D4459A6C9AF9173603 /* CwlCatchBadInstruction.swift */, + ED090E2A47588133620EFDE67FDCD83B /* CwlCatchException.h */, + A6B90201853F518018EA6DE1CE1CD0C4 /* CwlCatchException.m */, + 6F03736B8A04EDC2948B68F29C204DB5 /* CwlCatchException.swift */, + B171B08CBC2D0DF3A50748A3085721AB /* CwlDarwinDefinitions.swift */, + B41693CC378532208AF21FE2D296A79D /* DSL.h */, + 8FB86AEEC9D35B4EFFB20303C7C3E5FC /* DSL.m */, + 155601A7EE9BD524893E233FD6345C7E /* DSL.swift */, + FCCA441E132547B451FC1AC68A598DE2 /* DSL+Wait.swift */, + E5DF3640A68F4F1DACA4C40FD0995610 /* EndWith.swift */, + 2C6CB023A4E09A4096826F9570515CB9 /* Equal.swift */, + CC868F661469DBCE8FA63CDF8C278B43 /* Errors.swift */, + D9A0F75DC521E872A74F9274818A64E3 /* Expectation.swift */, + 88EE16F2B5CAB80A5DA92BE4E80ADF35 /* Expression.swift */, + 33CBFCA27A76DC44913AE31CD000CCB5 /* FailureMessage.swift */, + 4237D27FF620A48AE80EC013B27E70D4 /* Functional.swift */, + F28AF6EFDFE2101995C614518595EC49 /* HaveCount.swift */, + 410D041BE5CE8BDF7295A810D5C1D21C /* mach_excServer.c */, + 7AA34D26D38BDBCDE76340E43300CED6 /* mach_excServer.h */, + A24434297396BF6CFD80317254A920A2 /* Match.swift */, + 9A362093AF4B81291B7BF3C769A26E8F /* MatcherFunc.swift */, + 853D2F6862E414FC25CD4AA15A255001 /* MatcherProtocols.swift */, + 24414EC4F5CC502F9EEBA7E98907ECE7 /* MatchError.swift */, + D2EA2334FACA8BFC7BB44E6788B8C049 /* Nimble.h */, + 0BD88FCF830F5AA07719012A73BD1248 /* NimbleEnvironment.swift */, + 192195BA2EA336E7EA28D7C182BDA2F5 /* NimbleXCTestHandler.swift */, + DFFBAE70749755E278AC274019E3A792 /* NMBExceptionCapture.h */, + FA59ADADCBCFE719A706CF9B4314033A /* NMBExceptionCapture.m */, + CF66CEE0E88CDC58AFC169094876731E /* NMBExpectation.swift */, + 4AADF851A1DA59D3B83A23A76911D3CD /* NMBObjCMatcher.swift */, + 6BF6F7F1A077827CA67F33256CCC6994 /* NMBStringify.h */, + 9E33459A6697DAFA452E87FDEC983A78 /* NMBStringify.m */, + 7CC275233F24FF9F1FA3D626FB65E658 /* PostNotification.swift */, + 91F2A72EF702420F607528E7D6E80B05 /* RaisesException.swift */, + A3EE9D677089B1D3ADE1CE73EADDE82D /* SatisfyAnyOf.swift */, + E242A7BDEA666B590B19D74FC07CB4BC /* SourceLocation.swift */, + 21FE73876492314E1312596628281BE4 /* Stringers.swift */, + C65AAE5514AF822664A9B22826926A55 /* ThrowAssertion.swift */, + F016129CCF06862D90CCB932ABD8B098 /* ThrowError.swift */, + 8A84B29E18FD19678586CEED05C3EB39 /* XCTestObservationCenter+Register.m */, + AFE59634B96DEA3A91CAEA06FB2FE7C5 /* Support Files */, ); - path = PINCache; + path = Nimble; sourceTree = ""; }; - BF43C343EE6F87826013967088F335A3 /* Support Files */ = { + CA755D99391206A6BA73494BD0A0E1EA /* Quick */ = { isa = PBXGroup; children = ( - 2C4C49EA0F007BDE194D9B0FB65F7230 /* Info.plist */, - 256333F20779EE0FE1B473C191AF2CD3 /* PINCache.modulemap */, - 5C884C0E1E79042FFADCE339529CC2FD /* PINCache.xcconfig */, - C75401F4885399038DBDCF6C0A75B4CD /* PINCache-dummy.m */, - 18330C98DEFF234C233341A7E8921515 /* PINCache-prefix.pch */, - 90E519ACFD09630F71530ED7B96DEFE9 /* PINCache-umbrella.h */, + 39323F8A2C9D7EBB38C89CA93723C375 /* Callsite.swift */, + 9B376CB9C7B5C5FBCCE3EB12392C459A /* Closures.swift */, + C8F77C6E310159F1098A3C31E1F0A2C5 /* Configuration.swift */, + 0DF27DCB0A12428506E3B01922354973 /* DSL.swift */, + 84C87ECE4B19D1F14AC1D938E8848136 /* ErrorUtility.swift */, + B1DFBD2CA4959B6E2487A78A47476EA7 /* Example.swift */, + 1F2305003EF39AE91850EC7217AB5ACA /* ExampleGroup.swift */, + 5CEF9AA8E8E88EA5A0DF3DA6545B8505 /* ExampleHooks.swift */, + 9B1C8D77C658DC38B4AE9280A4F99D9B /* ExampleMetadata.swift */, + 67EB0D7E57110AE9445CA16E7C1B71BE /* Filter.swift */, + 0152844195330E0B9259FB1BB27CDD62 /* HooksPhase.swift */, + 26557511D1C26A360BC27011170284E7 /* NSBundle+CurrentTestBundle.swift */, + F46DDAA08389E5436F7733A03C33E708 /* NSString+QCKSelectorName.h */, + 1B3B3F87592755B211AA32C8B37CA018 /* NSString+QCKSelectorName.m */, + 45B7C42BBC164FCF64E4F533E15DB487 /* QCKDSL.h */, + 7303C89039A08575A856984F35456E4A /* QCKDSL.m */, + E32DD8077C9A5E555FFD5AEE75E7BC5B /* Quick.h */, + C42C116581A956FDCC10C8B37A8BA937 /* QuickConfiguration.h */, + EA9404B3011034BD1A399BD342DA7650 /* QuickConfiguration.m */, + 5DDC9B45C3220AFD3093EAAEAE19597E /* QuickSelectedTestSuiteBuilder.swift */, + E34810A43C31B758A39B9C7800535E04 /* QuickSpec.h */, + ADA227835CEF57BCC7FF50796CE6D184 /* QuickSpec.m */, + 739CCBC263C22AC5333ADF28F29C8CEF /* QuickTestSuite.swift */, + 959084B9DF3954F6C5D8984822CF8367 /* String+FileName.swift */, + B65135E4149980703B2D011F490F6538 /* SuiteHooks.swift */, + B8A3142C547BBE0FA5006147B8A0B249 /* World.h */, + B70C86BF4E269690A66ADA368E35BEF5 /* World.swift */, + EDC12A8E1E02D34877DBCBC3D41F459C /* World+DSL.h */, + 5701134DD3831B5D049625C7F4598934 /* World+DSL.swift */, + 719CB147FA733292BBB2C0CF6207E0C1 /* XCTestSuite+QuickTestSuiteBuilder.m */, + DE905F04D07FA33EC97B91021F701EAF /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/PINCache"; + path = Quick; sourceTree = ""; }; D6317BE8621BFFAB9B9C52972948A315 /* Targets Support Files */ = { @@ -603,6 +681,20 @@ name = "Targets Support Files"; sourceTree = ""; }; + DE905F04D07FA33EC97B91021F701EAF /* Support Files */ = { + isa = PBXGroup; + children = ( + 9E56C28F2E18BDCD39ADAA834E4D8215 /* Info.plist */, + D5C55C204587DCA529F6C3BFB5B5717A /* Quick.modulemap */, + CD0C662F15F6BEB8E036B58C5A6D09DC /* Quick.xcconfig */, + 39F8831835EF849F38947F684D3CF283 /* Quick-dummy.m */, + 0E164557E1123C9ACC3D63D3881D60AF /* Quick-prefix.pch */, + 36305928779B12931DC579AC15B3F2CB /* Quick-umbrella.h */, + ); + name = "Support Files"; + path = "../Target Support Files/Quick"; + sourceTree = ""; + }; EC104F988039E60978B6BAD12840A9D7 /* Support Files */ = { isa = PBXGroup; children = ( @@ -617,61 +709,14 @@ path = "Example/Pods/Target Support Files/MapSnap"; sourceTree = ""; }; - F1A0E38D4D346D41A69718AF65D39618 /* Nimble */ = { + F29B9E03BD31293EEDA63F2F1377F3CD /* Pods */ = { isa = PBXGroup; children = ( - 344AB0A1BB79E000BC99F6F196C35B3F /* AdapterProtocols.swift */, - 7F670039AF84988FFDEEDCD680C50BCA /* AllPass.swift */, - CD08AD0CF29979D1817E657A128BB356 /* AssertionDispatcher.swift */, - 46F74CB09F3865B01312FD33404A5126 /* AssertionRecorder.swift */, - 671EDA57386D2E19965599DE5E09D1C4 /* Async.swift */, - FF100ADC5962CFB5E8F9EF3E0B4A0457 /* AsyncMatcherWrapper.swift */, - 522EA907C39BB119563765CF31D7B584 /* BeAKindOf.swift */, - 27C047C65E7DF34C912AB4A13E607051 /* BeAnInstanceOf.swift */, - 61D173902408D6ADE9F25BAB640BA4E4 /* BeCloseTo.swift */, - B57F560F1BBB28CFAAEA95F2770F21E4 /* BeEmpty.swift */, - 00954035E44DF042D30AED9F8F1ED442 /* BeginWith.swift */, - 61776E4E75308486A4F73E5A6C13C1F4 /* BeGreaterThan.swift */, - F06322C8A9518A8A908D84896879AA50 /* BeGreaterThanOrEqualTo.swift */, - 1ED80C6A26047366EA737151C2ED14BD /* BeIdenticalTo.swift */, - 0A91F36BC1BD2CD05ED524DC08627B86 /* BeLessThan.swift */, - 2B1F108EF0E52268AF23BF720B44FBB0 /* BeLessThanOrEqual.swift */, - 7013BFCCB2C257F751A7767913D02E23 /* BeLogical.swift */, - E2CF12621CB1E722E47512B00138953D /* BeNil.swift */, - 76D1165619960BD82B9BDA06D32A2C71 /* BeVoid.swift */, - C0C24B99B4C09BF03EC6E3B70F29B303 /* Contain.swift */, - FEC5804F079B75957EBD67487622AAB4 /* CurrentTestCaseTracker.m */, - BA7C33F5DFAD5A88C037232DE3A1C8F9 /* DSL.h */, - 810614A50290AA14F1268D1312A5B421 /* DSL.m */, - 955AC604221E801DF21031D4A581B443 /* DSL.swift */, - B5A72F4C47C8BCDD393043473288C8A6 /* DSL+Wait.swift */, - 62CF3EB21ED561A4F8AFB1C074368109 /* EndWith.swift */, - 68AB096306B1F3DC496E04AC79A7F2F5 /* Equal.swift */, - 027F8CFBFB89204A8B1D4775C07562A2 /* ExceptionCapture.swift */, - F2225E59188536EDB8B41292BC3F95B1 /* Expectation.swift */, - CA3562552A3BDF276BAA691D83E3CC5B /* Expression.swift */, - 52E041E474C56BD4F3D65DFF018DF3D1 /* FailureMessage.swift */, - 5E1A0633325E4F770302DBFDFB4F0436 /* Functional.swift */, - 13BFE7D8D5D8F2C8223CEA089D2970BB /* HaveCount.swift */, - C618EA23F10B11A77B0F852414F32492 /* Match.swift */, - FB3A2024EB7EF7F49C9F1C65E8349A0F /* MatcherFunc.swift */, - B8F4CDDD7E6A00565913837460DF1EA5 /* MatcherProtocols.swift */, - 069B7D02F294B7CABEB1AF5351733AC6 /* Nimble.h */, - C0B5A5A970FE71BA70C428C310271B4D /* NimbleEnvironment.swift */, - D6BD62785E32FD29F267D49236B1F724 /* NimbleXCTestHandler.swift */, - BC8D101CFB77477C19478EC2223D1002 /* NMBExceptionCapture.h */, - D71506467E6486630DE85876CCD58097 /* NMBExceptionCapture.m */, - 65170912A744D260953B73DDA56F72D8 /* ObjCExpectation.swift */, - 5943F5BA7B747036F6AD09B3D70A48F3 /* ObjCMatcher.swift */, - 012DFBFB7A1856EA62AD354F7576E7AB /* PostNotification.swift */, - 58FE28CB83C62F6CE42E41715AA5F743 /* RaisesException.swift */, - BF630F86F8FBF002F5D0131BAF332C9C /* SatisfyAnyOf.swift */, - 9EC5459A2AF811AB358D92DA8E07CB7D /* SourceLocation.swift */, - D25B02DC772634D0A47BE2354C288D7A /* Stringers.swift */, - 34CFBB293702254E3FAFBEDC633105E4 /* ThrowError.swift */, - BA6A7FDEC50E0D59803373CBA6F10A34 /* Support Files */, + B03D74BC140472D2C4A29E25E3F8CF30 /* Nimble */, + 17BC05A162B692AA328B59AACA48F3B9 /* PINCache */, + CA755D99391206A6BA73494BD0A0E1EA /* Quick */, ); - path = Nimble; + name = Pods; sourceTree = ""; }; /* End PBXGroup section */ @@ -693,17 +738,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 56651AC7E3F7B2CDCFEEB8325476F8A3 /* Headers */ = { - isa = PBXHeadersBuildPhase; - buildActionMask = 2147483647; - files = ( - 23626BC4DDA1A2E90A155728F57802FF /* DSL.h in Headers */, - E909D0D33037F3C642BBB8D47FC642B3 /* Nimble-umbrella.h in Headers */, - D41F628A81153A978EB209E4FE925700 /* Nimble.h in Headers */, - 86FB708FCFE6121A82BB09E5ADD84554 /* NMBExceptionCapture.h in Headers */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 5D39FDD1FF3ED95493EB3755F00711F1 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -717,6 +751,22 @@ ); runOnlyForDeploymentPostprocessing = 0; }; + 648F1DF8706A2112A3E88719AC07A6B9 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + CAB36E2E9ADBC842C1FC0235195764FD /* CurrentTestCaseTracker.h in Headers */, + 89AD78E4074EB23249969F39D82E8C28 /* CwlCatchBadInstruction.h in Headers */, + 0CFF6C6170F28B6C7E7EC9125AA4505A /* CwlCatchException.h in Headers */, + 24B2AFC31898725750519372CFB2350A /* DSL.h in Headers */, + 80EB3F3AD608D1B132A3EA4B3E28CAB1 /* mach_excServer.h in Headers */, + 9ABB68606EE3A3BC42DF42A46BC8CEBC /* Nimble-umbrella.h in Headers */, + F3199E5D140F672B588EC44DE319EDA3 /* Nimble.h in Headers */, + D5E0BE17FA1603C8607E85110ED3FC2C /* NMBExceptionCapture.h in Headers */, + E4F4F88CF0EA6E1FE71AFC5F827CE94D /* NMBStringify.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; D812D1FB80D3E6228B62A5BE7C9CF942 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; @@ -729,14 +779,14 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - C201D2B8C23209FDC2413E17438D5414 /* NSString+QCKSelectorName.h in Headers */, - 9EFD5953D1622A0B8B35EB0682D032A9 /* QCKDSL.h in Headers */, + 67C5FD1141932F8FA4ADD7DA62748A4E /* NSString+QCKSelectorName.h in Headers */, + B0A7757FB2DAE990A999D7468A5C09FD /* QCKDSL.h in Headers */, 6C789CB703E3AB43A0D561E899EB2A07 /* Quick-umbrella.h in Headers */, - 65CD24BC42311A75F5BD0DCC6BE0A466 /* Quick.h in Headers */, - 014FEC8E42CA30CD3C8392D8B3027890 /* QuickConfiguration.h in Headers */, - C99B3CE02D24B32880CB7B23A96CCE80 /* QuickSpec.h in Headers */, - C920C32F25E5F19010F334C81B09E72E /* World+DSL.h in Headers */, - 7601A0595D5C2A2D3BCCBBEA390D8A46 /* World.h in Headers */, + C459FD78EDF8BCA2D9ADFEFD9B32E461 /* Quick.h in Headers */, + 799C3E19535A82F15074908B1BBB9A35 /* QuickConfiguration.h in Headers */, + A88209F9A78929242DE75624FCFA93D9 /* QuickSpec.h in Headers */, + 8F7F26FA3DF6698595E5192FA83D99E7 /* World+DSL.h in Headers */, + 2B7D05BAC278BD029D094B07FD05DF03 /* World.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -779,6 +829,23 @@ productReference = 87EC84952A57628085FFB70A8DB70831 /* Quick.framework */; productType = "com.apple.product-type.framework"; }; + 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */ = { + isa = PBXNativeTarget; + buildConfigurationList = BDBD2BBEC8178F07B94D78F9E6991265 /* Build configuration list for PBXNativeTarget "Nimble" */; + buildPhases = ( + ED9F68BF109E5007EBB80B5DD2DD8A03 /* Sources */, + F8B360D4AAEBF44BCDC02A9A8054AC7B /* Frameworks */, + 648F1DF8706A2112A3E88719AC07A6B9 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Nimble; + productName = Nimble; + productReference = E20AE27413755917919C57783EFEE550 /* Nimble.framework */; + productType = "com.apple.product-type.framework"; + }; 791B707A35CB872F4B51964AA1476088 /* MapSnap */ = { isa = PBXNativeTarget; buildConfigurationList = 11E5E12906A228C998A0921F3D3ACB40 /* Build configuration list for PBXNativeTarget "MapSnap" */; @@ -833,23 +900,6 @@ productReference = 94B1EC8C125727BBFB1BDB1A680DBEDF /* PINCache.framework */; productType = "com.apple.product-type.framework"; }; - FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5FE57A1C8E467D246D7D1BCB203A09DC /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - 2823BDA58F2F74DEAB39C2F345AA07A1 /* Sources */, - FEF785D316E836E93C09637D3A3082CA /* Frameworks */, - 56651AC7E3F7B2CDCFEEB8325476F8A3 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = E20AE27413755917919C57783EFEE550 /* Nimble.framework */; - productType = "com.apple.product-type.framework"; - }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ @@ -858,6 +908,11 @@ attributes = { LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0700; + TargetAttributes = { + 791B707A35CB872F4B51964AA1476088 = { + LastSwiftMigration = 0810; + }; + }; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -872,7 +927,7 @@ projectRoot = ""; targets = ( 791B707A35CB872F4B51964AA1476088 /* MapSnap */, - FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */, + 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */, F63877225E395100D8142EFFA7C4A5E5 /* PINCache */, 27CA09ADAE0A0924C71DE37050DC3362 /* Pods-MapSnap_Example */, B458F6F14BDD543EDC284A2644F38C96 /* Pods-MapSnap_Tests */, @@ -890,60 +945,6 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2823BDA58F2F74DEAB39C2F345AA07A1 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C12E0930E021F1894B60BC6AFA8F2409 /* AdapterProtocols.swift in Sources */, - 13CC849FA70CADF802470B6A90DCDF79 /* AllPass.swift in Sources */, - 7CC86ABC7F4135EE12A755B023F134CE /* AssertionDispatcher.swift in Sources */, - 4E5A721963877AA3A6AA3D80DAA4E5E9 /* AssertionRecorder.swift in Sources */, - 7DC9B169B5FCC3EE99F6D36EC530FE1E /* Async.swift in Sources */, - B9D2E426B5CA226D60A78A71FA289D4C /* AsyncMatcherWrapper.swift in Sources */, - FB09A16A6662F2689D4AA89538DBF1C1 /* BeAKindOf.swift in Sources */, - A2CABD326609AD67377700A148785E09 /* BeAnInstanceOf.swift in Sources */, - 7734BABBECE0071CF5D4430515B938BF /* BeCloseTo.swift in Sources */, - E9A500611CF699885DE8A6BAB4E6B392 /* BeEmpty.swift in Sources */, - 30AACAA8D51DC8C429577D9B67BB016C /* BeginWith.swift in Sources */, - 7EBD6B630F4536CB673DC0B455CCB16D /* BeGreaterThan.swift in Sources */, - 8040A37FF5BBDF1964CAB8C0068ED315 /* BeGreaterThanOrEqualTo.swift in Sources */, - 7202A0B871C57B7857341D88C2883A3A /* BeIdenticalTo.swift in Sources */, - 7F40FC3F4DE4EA4702F41F01A12A7353 /* BeLessThan.swift in Sources */, - E6F6FF9554A6C7EABD6B92B691751DAD /* BeLessThanOrEqual.swift in Sources */, - 9B5DE58927557CE87968C051D2A1C47E /* BeLogical.swift in Sources */, - 4AF6C26A30D865059C24DC5317786B76 /* BeNil.swift in Sources */, - 31629295E87A24C98238C66D41983C49 /* BeVoid.swift in Sources */, - DCA54337E8687685A293CC24A97F936C /* Contain.swift in Sources */, - 9F08F74CB8740CF0EFF26746EEB0C930 /* CurrentTestCaseTracker.m in Sources */, - 6ED0409031540D9B2AD7B061B608B0C9 /* DSL+Wait.swift in Sources */, - 68527A7545342CBB4F923DC8543F7B20 /* DSL.m in Sources */, - 135B6326D35C977854AA0C12B3F6CB7D /* DSL.swift in Sources */, - 5104AE2989305145BF446E633B567924 /* EndWith.swift in Sources */, - 5EF5C00C6AECE1FCFFF118577817F5CE /* Equal.swift in Sources */, - 81E6453ECE511335537301CD3B1C1B82 /* ExceptionCapture.swift in Sources */, - F85A9207A8601CE7F835CEC56790616F /* Expectation.swift in Sources */, - CD0A671D2A8DD31D50449BB358C56134 /* Expression.swift in Sources */, - 38F5CE4B4C59A81734A93E32D35B696E /* FailureMessage.swift in Sources */, - 63BBD83995BA60FA7D2E6AD4138C0D71 /* Functional.swift in Sources */, - A55EC200F57C00E9A78D8A9DA4545338 /* HaveCount.swift in Sources */, - 03A9FD93E86C0CD07A37D7BF34A02F09 /* Match.swift in Sources */, - 64539BE196D1741570018FFF86F14133 /* MatcherFunc.swift in Sources */, - 91ED5B067FCA3CBD48E3114672941051 /* MatcherProtocols.swift in Sources */, - DF0216DBDE0084F6C87FE9275A4E9F0D /* Nimble-dummy.m in Sources */, - 775646739B95E828ECE349F6A39534F4 /* NimbleEnvironment.swift in Sources */, - C81FFEEC76399EF3C7C1EE349C810E76 /* NimbleXCTestHandler.swift in Sources */, - 1ED8C77E9422C66BBF56E6C10D5826F0 /* NMBExceptionCapture.m in Sources */, - 486B74C8EFEB68AD25CE128F3051E432 /* ObjCExpectation.swift in Sources */, - 800A161E9B82DEEDA41B7F1A746B24C4 /* ObjCMatcher.swift in Sources */, - 3D1BB98DEA422D8F173613EC715488B9 /* PostNotification.swift in Sources */, - 112614F21939902B59102E6E876ADCBC /* RaisesException.swift in Sources */, - 415F29FE4E9D970954C46CD3CF4AE345 /* SatisfyAnyOf.swift in Sources */, - 96ED0CCA721955637A88FE0C9737EC56 /* SourceLocation.swift in Sources */, - A374A2729E32469085C5025EC7115EB8 /* Stringers.swift in Sources */, - B43EDBC7DA15A429006C67B63D45ACFD /* ThrowError.swift in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; 8608DE1F055157537B549A1B69821B3F /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; @@ -991,18 +992,82 @@ F938620E568DC19C73DF013ABBEEE193 /* Filter.swift in Sources */, 6CED297D84F23767ED4E609A4182B1AE /* HooksPhase.swift in Sources */, F093A4C8B493ED064E1346014C3FFF84 /* NSBundle+CurrentTestBundle.swift in Sources */, - 701AC589422447ECC727455400BED1C3 /* NSString+QCKSelectorName.m in Sources */, - 24638ED243188FAE6E710F92EA5F1763 /* QCKDSL.m in Sources */, + EEB5DBB3184674C33074628E8FB5370A /* NSString+QCKSelectorName.m in Sources */, + E7A77BE70CCB379809428AA31D1EE71C /* QCKDSL.m in Sources */, CA970AD67A547C372B4D0AECC18E24DB /* Quick-dummy.m in Sources */, - B3B2961DFFEA0CBF719889F35EC95924 /* QuickConfiguration.m in Sources */, + BD759D4932F8CBFC6730DED95330C68C /* QuickConfiguration.m in Sources */, 179D386E634F2A1CD66798EA658FCD10 /* QuickSelectedTestSuiteBuilder.swift in Sources */, - E4DD7D8AD860395028DCC71F2A0C6CC2 /* QuickSpec.m in Sources */, + E9BCDE86BE35C29C67BCB8044EE6E14A /* QuickSpec.m in Sources */, AEA639EBB50E4E25CAE4F4158EF1355E /* QuickTestSuite.swift in Sources */, 1DF13DA34916766D2D9E6129E657DAD7 /* String+FileName.swift in Sources */, 554E0D31C390E5B4A03FBBE41244690C /* SuiteHooks.swift in Sources */, 1FF71AC95E8DC491FA1F57573EFAD8C3 /* World+DSL.swift in Sources */, EA7C603AFD85CB1EB5CB0BF94A17B167 /* World.swift in Sources */, - 037191B6A68A07DE395F4FC4D6C6FDA2 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + EC40103E0F16F9AA7CA68CDFE671FD8B /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + ED9F68BF109E5007EBB80B5DD2DD8A03 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 494F47D80D5A2DAA2694E40DC231BECE /* AdapterProtocols.swift in Sources */, + 346D12A0191B7B1428E9336C01B1285C /* AllPass.swift in Sources */, + A09B4C172F63B9BDA9B4DDC51DDC8876 /* AssertionDispatcher.swift in Sources */, + 2A2C12A7B0C614BD6C56CCB1093F0406 /* AssertionRecorder.swift in Sources */, + 55C6997E60F8F71C2B03FCB6F2E7E75B /* Async.swift in Sources */, + C278C1114E97370FF0693479F1FE8634 /* AsyncMatcherWrapper.swift in Sources */, + 554CFF29B6DB47BA7B52F42DADD18C5B /* BeAKindOf.swift in Sources */, + 2C859B5C136B3028EA09A3A8EC3F31D8 /* BeAnInstanceOf.swift in Sources */, + 09E2FB92E3B559B4A133BFEB6238EC0B /* BeCloseTo.swift in Sources */, + 2FCD0652F9F03570469908732B747CFA /* BeEmpty.swift in Sources */, + 6EE97AD95CE78493C711579A2A6C9E46 /* BeginWith.swift in Sources */, + BA5B01308D3A4EE1E1669C7C0830D6C4 /* BeGreaterThan.swift in Sources */, + 44E5CAF9E9444829B0C7076AE94F80F6 /* BeGreaterThanOrEqualTo.swift in Sources */, + 9CE7D40E732F2EF321F8D1A0978C5619 /* BeIdenticalTo.swift in Sources */, + 44E30F568C9A3547E4757E27936D9D2A /* BeLessThan.swift in Sources */, + 001BD9D25BB6A3AD9527879098FF9BAA /* BeLessThanOrEqual.swift in Sources */, + 92252787BCC66DFA7A47156D26AB8687 /* BeLogical.swift in Sources */, + 93DC61401C1B9D9D632B9878F91B6DEE /* BeNil.swift in Sources */, + 581402486DC438D381F28FFFAFDE9BB5 /* BeVoid.swift in Sources */, + 4532A308F933EDF27666CC68573818E9 /* Contain.swift in Sources */, + 7C2792121CF1996F6795A5672EE00272 /* CwlBadInstructionException.swift in Sources */, + 789991096AE460E5CDEE7F3B54B08431 /* CwlCatchBadInstruction.m in Sources */, + B9686EC9BB69075B1FD64333DF2E4221 /* CwlCatchBadInstruction.swift in Sources */, + 7FABF717282EC77B44E1F0A61EBB0188 /* CwlCatchException.m in Sources */, + B69BA7B3C7B4FB390B00E1604831DFB3 /* CwlCatchException.swift in Sources */, + 099C51DF43E52CB0DC3069E7C29B1EB5 /* CwlDarwinDefinitions.swift in Sources */, + AFEDA5B45B5FBE7AFE686D56403EAB66 /* DSL+Wait.swift in Sources */, + 6EC12E5DAE120A501A99D4134A1D7D28 /* DSL.m in Sources */, + 12AD724D8DC644D22F976C62E94B416D /* DSL.swift in Sources */, + 02D34928F8983B97607972B8AE6D56FE /* EndWith.swift in Sources */, + 70081396B556628C08505BDF25E1DD5A /* Equal.swift in Sources */, + 4C6BA4EC0EEE176994123474854DBE5A /* Errors.swift in Sources */, + 850FAC7757B64C91286A39FD7D0FAA98 /* Expectation.swift in Sources */, + 232A44C5F6145555918520FA61E75E61 /* Expression.swift in Sources */, + 4F102D7A8607B4F0A143C7B1D23B6975 /* FailureMessage.swift in Sources */, + EDC82FA39F6D1B80EE6FE77A87AADECF /* Functional.swift in Sources */, + 87018F89EC8B67A9F5B6C58AF9D7865A /* HaveCount.swift in Sources */, + 150A2AF4D34EB393DA1CD2C2D303E4E3 /* mach_excServer.c in Sources */, + 093B8C691927272D8632112ADD51828D /* Match.swift in Sources */, + 0F17DDF7E3995474022427A2FC984AE7 /* MatcherFunc.swift in Sources */, + FB5F6E844EE3149D150CE43F930E565B /* MatcherProtocols.swift in Sources */, + E0D6D26E683C03726B341311E9383351 /* MatchError.swift in Sources */, + 9E20125005339D1ADAC2362C7E5C4A2A /* Nimble-dummy.m in Sources */, + AE3AEAB038F7B5D10D1CAF5A2E4F4E8D /* NimbleEnvironment.swift in Sources */, + 9E5D268B9AF57A467B3C3B0BF7443763 /* NimbleXCTestHandler.swift in Sources */, + FBA6B154E352BEDBCFCFDD7369FD5AAB /* NMBExceptionCapture.m in Sources */, + 73773CA54114CD25031B43493B6474A5 /* NMBExpectation.swift in Sources */, + F6CE045DD3B4A58640421E96B96AF9AA /* NMBObjCMatcher.swift in Sources */, + D7FC2E45D074995F6FABD8B8FD27D485 /* NMBStringify.m in Sources */, + CEA8369F1433E2727B8F53C9DF68FBB5 /* PostNotification.swift in Sources */, + 692950F18B7AA626E7630A7C562CBC40 /* RaisesException.swift in Sources */, + 4C0EB4D501BF057B61CD8BBABC05A2B4 /* SatisfyAnyOf.swift in Sources */, + BCD185552414EB57BB78839C07BDB37E /* SourceLocation.swift in Sources */, + 1A9126F01EBC2E30B2E6F881B6B87BCD /* Stringers.swift in Sources */, + 3A9DE5E02A5ADDF4742F73DB9818AF40 /* ThrowAssertion.swift in Sources */, + 6004362B67D5176778BE3627C2917C5B /* ThrowError.swift in Sources */, + 65AA294A455DCD4EEA3837F6D6A1794E /* XCTestObservationCenter+Register.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1018,7 +1083,7 @@ 4093DECD4FE6A9B415685E3F66CE0A28 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Nimble; - target = FF61C7C740C1B196A3B33F37B77DBC68 /* Nimble */; + target = 72E30CEFE495DD0EB9CFB72FCF80894C /* Nimble */; targetProxy = 6B23296F3236AB6DF6597FE3C35F5A11 /* PBXContainerItemProxy */; }; 4D498D1EAF8F5E607B29602F56DD0568 /* PBXTargetDependency */ = { @@ -1080,9 +1145,9 @@ }; name = Release; }; - 2777CFD5C3DA4FAC446DD01EB5336A99 /* Release */ = { + 3D5C3A73DBFF74C6BC721D7B41B85D50 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5C884C0E1E79042FFADCE339529CC2FD /* PINCache.xcconfig */; + baseConfigurationReference = 7F5B229A5936FB9DB87E121EB3EA35AF /* Nimble.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1093,61 +1158,56 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/PINCache/PINCache-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PINCache/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/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/PINCache/PINCache.modulemap"; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = PINCache; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 3575BDEDA1CAA5ED1B3F2CE33242EE72 /* Debug */ = { + 443760E567D11D37543958342A3B09B8 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = B11F32B47BB08BCB063319C6A02106A5 /* Pods-MapSnap_Example.debug.xcconfig */; + baseConfigurationReference = D14AE58573FC2AF5B9CE2624CCFFC439 /* MapSnap.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + 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-MapSnap_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/MapSnap/MapSnap-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MapSnap/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Example/Pods-MapSnap_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_MapSnap_Example; + MODULEMAP_FILE = "Target Support Files/MapSnap/MapSnap.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = MapSnap; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 45DC86A4687B50782D8FCF2972ECB503 /* Debug */ = { + 4741E38986757785E689CBAA07EEFBCC /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5B8EDEF85CCCE7F3B30F72407069623C /* Quick.xcconfig */; + baseConfigurationReference = F4DA477E220DF7543ADF24FB43E32C6C /* PINCache.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1158,27 +1218,26 @@ 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"; + GCC_PREFIX_HEADER = "Target Support Files/PINCache/PINCache-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PINCache/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/Quick/Quick.modulemap"; + MODULEMAP_FILE = "Target Support Files/PINCache/PINCache.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Quick; + PRODUCT_NAME = PINCache; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 64B1FF811B13E0800286080AA863039D /* Release */ = { + 70DF01555BCCD673FECA3EDBB951BD2D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 886059BD6190CC51F8F05DA6C24E6B8F /* Pods-MapSnap_Example.release.xcconfig */; + baseConfigurationReference = F4DA477E220DF7543ADF24FB43E32C6C /* PINCache.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1189,30 +1248,26 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - INFOPLIST_FILE = "Target Support Files/Pods-MapSnap_Example/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/PINCache/PINCache-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/PINCache/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Example/Pods-MapSnap_Example.modulemap"; + MODULEMAP_FILE = "Target Support Files/PINCache/PINCache.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = Pods_MapSnap_Example; + PRODUCT_NAME = PINCache; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 64C2D3F343E3BA57740D261741CC3924 /* Debug */ = { + 713C4C68EAEC7F2CBE4102D632E3BC60 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3C7B848FD6995A923F7FDC42EB16EB0F /* Nimble.xcconfig */; + baseConfigurationReference = B11F32B47BB08BCB063319C6A02106A5 /* Pods-MapSnap_Example.debug.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1223,25 +1278,29 @@ 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-MapSnap_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Example/Pods-MapSnap_Example.modulemap"; MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Nimble; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MapSnap_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 87D563B4356B8EF0C7497649F81C529E /* Debug */ = { + 7B51DE397CCEF98FE2D7950DC99AF7FF /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 3FB0C5E6FD9BB323FDB56C1859A98A6E /* Pods-MapSnap_Tests.debug.xcconfig */; buildSettings = { @@ -1269,46 +1328,16 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 9368CA774956C58273AE2A9CE2549973 /* Debug */ = { + 992FE01462AF26FF77CFE83D9C76FFD3 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5C884C0E1E79042FFADCE339529CC2FD /* PINCache.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; - 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/PINCache/PINCache-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/PINCache/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/PINCache/PINCache.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = PINCache; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Debug; - }; - B5BE856CDFEA6B378A1B5676CCFB41B8 /* Release */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = D14AE58573FC2AF5B9CE2624CCFFC439 /* MapSnap.xcconfig */; + baseConfigurationReference = 886059BD6190CC51F8F05DA6C24E6B8F /* Pods-MapSnap_Example.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1319,53 +1348,56 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; ENABLE_STRICT_OBJC_MSGSEND = YES; GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/MapSnap/MapSnap-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MapSnap/Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-MapSnap_Example/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/MapSnap/MapSnap.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Example/Pods-MapSnap_Example.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = MapSnap; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MapSnap_Example; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - CEB5235BFEFD1EC88654D9440A078D40 /* Debug */ = { + A0922972E5D80870A1AF8E97A2A4B0D5 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = D14AE58573FC2AF5B9CE2624CCFFC439 /* MapSnap.xcconfig */; + baseConfigurationReference = CD0C662F15F6BEB8E036B58C5A6D09DC /* Quick.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; + 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/MapSnap/MapSnap-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/MapSnap/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/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/MapSnap/MapSnap.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = MapSnap; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; D3E3D092A3FF7311A98E44BBA36FFD12 /* Debug */ = { isa = XCBuildConfiguration; @@ -1409,47 +1441,75 @@ }; name = Debug; }; - D7814673754386D9674428CD0C080D4B /* Release */ = { + D5D1119A4E18B4E760DC43AFE8DFEE3A /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = C148910E1A59AF68E2E4E871118C65AE /* Pods-MapSnap_Tests.release.xcconfig */; + baseConfigurationReference = 7F5B229A5936FB9DB87E121EB3EA35AF /* Nimble.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + 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-MapSnap_Tests/Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.3; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Tests/Pods-MapSnap_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_MapSnap_Tests; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - E3558269B33559FFB831D545724822AE /* Release */ = { + D8F4A81CF27230E57EE9E74C9F71A192 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5B8EDEF85CCCE7F3B30F72407069623C /* Quick.xcconfig */; + baseConfigurationReference = D14AE58573FC2AF5B9CE2624CCFFC439 /* MapSnap.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + 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/MapSnap/MapSnap-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/MapSnap/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/MapSnap/MapSnap.modulemap"; + MTL_ENABLE_DEBUG_INFO = YES; + PRODUCT_NAME = MapSnap; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + E591FFDC5F75517A44C0BB43BAD38FCF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = CD0C662F15F6BEB8E036B58C5A6D09DC /* Quick.xcconfig */; + buildSettings = { + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; + CURRENT_PROJECT_VERSION = 1; + DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; @@ -1462,20 +1522,21 @@ IPHONEOS_DEPLOYMENT_TARGET = 8.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; + MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - EE07226B3BBA2BF884606F0EB789A58E /* Release */ = { + FB3638303379FE978EE620A14A9D038D /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 3C7B848FD6995A923F7FDC42EB16EB0F /* Nimble.xcconfig */; + baseConfigurationReference = C148910E1A59AF68E2E4E871118C65AE /* Pods-MapSnap_Tests.release.xcconfig */; buildSettings = { "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; CURRENT_PROJECT_VERSION = 1; @@ -1486,17 +1547,21 @@ 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-MapSnap_Tests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.0; + IPHONEOS_DEPLOYMENT_TARGET = 8.3; LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-MapSnap_Tests/Pods-MapSnap_Tests.modulemap"; MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nimble; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = Pods_MapSnap_Tests; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 2.3; + SWIFT_VERSION = 3.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; @@ -1509,8 +1574,8 @@ 11E5E12906A228C998A0921F3D3ACB40 /* Build configuration list for PBXNativeTarget "MapSnap" */ = { isa = XCConfigurationList; buildConfigurations = ( - CEB5235BFEFD1EC88654D9440A078D40 /* Debug */, - B5BE856CDFEA6B378A1B5676CCFB41B8 /* Release */, + D8F4A81CF27230E57EE9E74C9F71A192 /* Debug */, + 443760E567D11D37543958342A3B09B8 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1518,8 +1583,8 @@ 145C70D72D2768B49C2CAA912085FF7F /* Build configuration list for PBXNativeTarget "Pods-MapSnap_Example" */ = { isa = XCConfigurationList; buildConfigurations = ( - 3575BDEDA1CAA5ED1B3F2CE33242EE72 /* Debug */, - 64B1FF811B13E0800286080AA863039D /* Release */, + 713C4C68EAEC7F2CBE4102D632E3BC60 /* Debug */, + 992FE01462AF26FF77CFE83D9C76FFD3 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1536,8 +1601,8 @@ 3F31E01EFCFB3ACDAC30114F110B14B1 /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - 45DC86A4687B50782D8FCF2972ECB503 /* Debug */, - E3558269B33559FFB831D545724822AE /* Release */, + E591FFDC5F75517A44C0BB43BAD38FCF /* Debug */, + A0922972E5D80870A1AF8E97A2A4B0D5 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1545,17 +1610,17 @@ 506C592F14435ED8C397597F32FC3005 /* Build configuration list for PBXNativeTarget "Pods-MapSnap_Tests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 87D563B4356B8EF0C7497649F81C529E /* Debug */, - D7814673754386D9674428CD0C080D4B /* Release */, + 7B51DE397CCEF98FE2D7950DC99AF7FF /* Debug */, + FB3638303379FE978EE620A14A9D038D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 5FE57A1C8E467D246D7D1BCB203A09DC /* Build configuration list for PBXNativeTarget "Nimble" */ = { + BDBD2BBEC8178F07B94D78F9E6991265 /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - 64C2D3F343E3BA57740D261741CC3924 /* Debug */, - EE07226B3BBA2BF884606F0EB789A58E /* Release */, + D5D1119A4E18B4E760DC43AFE8DFEE3A /* Debug */, + 3D5C3A73DBFF74C6BC721D7B41B85D50 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1563,8 +1628,8 @@ EC8909B64740DC4412FB6A4B4C3AF5CA /* Build configuration list for PBXNativeTarget "PINCache" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9368CA774956C58273AE2A9CE2549973 /* Debug */, - 2777CFD5C3DA4FAC446DD01EB5336A99 /* Release */, + 4741E38986757785E689CBAA07EEFBCC /* Debug */, + 70DF01555BCCD673FECA3EDBB951BD2D /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata new file mode 100644 index 0000000..919434a --- /dev/null +++ b/Example/Pods/Pods.xcodeproj/project.xcworkspace/contents.xcworkspacedata @@ -0,0 +1,7 @@ + + + + + diff --git a/Example/Pods/Quick/README.md b/Example/Pods/Quick/README.md index bced23c..5c94cef 100644 --- a/Example/Pods/Quick/README.md +++ b/Example/Pods/Quick/README.md @@ -1,5 +1,7 @@ ![](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) + 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). @@ -56,6 +58,12 @@ target 'MyUITests' do 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. + +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). + ## License -Apache 2.0 license. See the `LICENSE` file for details. +Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift index 7b8c2db..9836fef 100644 --- a/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ b/Example/Pods/Quick/Sources/Quick/Configuration/Configuration.swift @@ -4,13 +4,13 @@ import Foundation A closure that temporarily exposes a Configuration object within the scope of the closure. */ -public typealias QuickConfigurer = (configuration: Configuration) -> () +public typealias QuickConfigurer = (_ configuration: Configuration) -> () /** A closure that, given metadata about an example, returns a boolean value indicating whether that example should be run. */ -public typealias ExampleFilter = (example: Example) -> Bool +public typealias ExampleFilter = (_ example: Example) -> Bool /** A configuration encapsulates various options you can use @@ -49,7 +49,7 @@ final public class Configuration: NSObject { whether that example should be included in the examples that are run. */ - public func include(filter: ExampleFilter) { + public func include(_ filter: @escaping ExampleFilter) { inclusionFilters.append(filter) } @@ -63,7 +63,7 @@ final public class Configuration: NSObject { whether that example should be excluded from the examples that are run. */ - public func exclude(filter: ExampleFilter) { + public func exclude(_ filter: @escaping ExampleFilter) { exclusionFilters.append(filter) } @@ -74,11 +74,11 @@ final public class Configuration: NSObject { */ #if _runtime(_ObjC) @objc(beforeEachWithMetadata:) - public func beforeEach(closure: BeforeExampleWithMetadataClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) } #else - public func beforeEach(closure: BeforeExampleWithMetadataClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) } #endif @@ -100,7 +100,7 @@ final public class Configuration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. */ - public func beforeEach(closure: BeforeExampleClosure) { + public func beforeEach(_ closure: @escaping BeforeExampleClosure) { exampleHooks.appendBefore(closure) } @@ -111,11 +111,11 @@ final public class Configuration: NSObject { */ #if _runtime(_ObjC) @objc(afterEachWithMetadata:) - public func afterEach(closure: AfterExampleWithMetadataClosure) { + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) } #else - public func afterEach(closure: AfterExampleWithMetadataClosure) { + public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) } #endif @@ -137,7 +137,7 @@ final public class Configuration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. */ - public func afterEach(closure: AfterExampleClosure) { + public func afterEach(_ closure: @escaping AfterExampleClosure) { exampleHooks.appendAfter(closure) } @@ -146,7 +146,7 @@ final public class Configuration: NSObject { the given closure prior to any and all examples that are run. The two methods are functionally equivalent. */ - public func beforeSuite(closure: BeforeSuiteClosure) { + public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) } @@ -155,7 +155,7 @@ final public class Configuration: NSObject { the given closure after all examples have been run. The two methods are functionally equivalent. */ - public func afterSuite(closure: AfterSuiteClosure) { + public func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) } } diff --git a/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift index bc0e0b4..b514b82 100644 --- a/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ b/Example/Pods/Quick/Sources/Quick/DSL/DSL.swift @@ -8,7 +8,7 @@ - parameter closure: The closure to be run prior to any examples in the test suite. */ -public func beforeSuite(closure: BeforeSuiteClosure) { +public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { World.sharedWorld.beforeSuite(closure) } @@ -22,7 +22,7 @@ public func beforeSuite(closure: BeforeSuiteClosure) { - parameter closure: The closure to be run after all of the examples in the test suite. */ -public func afterSuite(closure: AfterSuiteClosure) { +public func afterSuite(_ closure: @escaping AfterSuiteClosure) { World.sharedWorld.afterSuite(closure) } @@ -36,7 +36,7 @@ public func afterSuite(closure: AfterSuiteClosure) { using `describe` or `context`--the closure may contain any number of `beforeEach` and `afterEach` closures, as well as any number of examples (defined using `it`). */ -public func sharedExamples(name: String, closure: () -> ()) { +public func sharedExamples(_ name: String, closure: @escaping () -> ()) { World.sharedWorld.sharedExamples(name, closure: { (NSDictionary) in closure() }) } @@ -53,7 +53,7 @@ public func sharedExamples(name: String, closure: () -> ()) { The closure takes a SharedExampleContext as an argument. This context is a function that can be executed to retrieve parameters passed in via an `itBehavesLike` function. */ -public func sharedExamples(name: String, closure: SharedExampleClosure) { +public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { World.sharedWorld.sharedExamples(name, closure: closure) } @@ -65,14 +65,14 @@ public func sharedExamples(name: String, closure: SharedExampleClosure) { - 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: () -> ()) { +public func describe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.describe(description, flags: flags, closure: closure) } /** Defines an example group. Equivalent to `describe`. */ -public func context(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func context(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.context(description, flags: flags, closure: closure) } @@ -84,7 +84,7 @@ public func context(description: String, flags: FilterFlags = [:], closure: () - - parameter closure: The closure to be run prior to each example. */ -public func beforeEach(closure: BeforeExampleClosure) { +public func beforeEach(_ closure: @escaping BeforeExampleClosure) { World.sharedWorld.beforeEach(closure) } @@ -92,7 +92,7 @@ public func beforeEach(closure: BeforeExampleClosure) { Identical to Quick.DSL.beforeEach, except the closure is provided with metadata on the example that the closure is being run prior to. */ -public func beforeEach(closure: BeforeExampleWithMetadataClosure) { +public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { World.sharedWorld.beforeEach(closure: closure) } @@ -104,7 +104,7 @@ public func beforeEach(closure: BeforeExampleWithMetadataClosure) { - parameter closure: The closure to be run after each example. */ -public func afterEach(closure: AfterExampleClosure) { +public func afterEach(_ closure: @escaping AfterExampleClosure) { World.sharedWorld.afterEach(closure) } @@ -112,7 +112,7 @@ public func afterEach(closure: AfterExampleClosure) { Identical to Quick.DSL.afterEach, except the closure is provided with metadata on the example that the closure is being run after. */ -public func afterEach(closure: AfterExampleWithMetadataClosure) { +public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { World.sharedWorld.afterEach(closure: closure) } @@ -127,7 +127,7 @@ public func afterEach(closure: AfterExampleWithMetadataClosure) { - 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: () -> ()) { +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) } @@ -143,7 +143,7 @@ public func it(description: String, flags: FilterFlags = [:], file: String = #fi - 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) { +public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { itBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) } @@ -163,7 +163,7 @@ public func itBehavesLike(name: String, flags: FilterFlags = [:], file: String = - 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: SharedExampleContext) { +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) } @@ -174,7 +174,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: () -> ()) { World.sharedWorld.pending(description, closure: closure) } @@ -182,7 +182,7 @@ 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: () -> ()) { +public func xdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { World.sharedWorld.xdescribe(description, flags: flags, closure: closure) } @@ -190,7 +190,7 @@ public func xdescribe(description: String, flags: FilterFlags, 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: () -> ()) { +public func xcontext(_ description: String, flags: FilterFlags, closure: () -> ()) { xdescribe(description, flags: flags, closure: closure) } @@ -198,7 +198,7 @@ public func xcontext(description: String, flags: FilterFlags, 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: () -> ()) { +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) } @@ -207,14 +207,14 @@ public func xit(description: String, flags: FilterFlags = [:], file: String = #f 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: () -> ()) { +public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { World.sharedWorld.fdescribe(description, flags: flags, closure: closure) } /** Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. */ -public func fcontext(description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func fcontext(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { fdescribe(description, flags: flags, closure: closure) } @@ -222,6 +222,6 @@ public func fcontext(description: String, flags: FilterFlags = [:], 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: () -> ()) { +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) } diff --git a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift index 3b9a9be..ab35341 100644 --- a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ b/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -6,19 +6,19 @@ import Foundation writers use in their specs. */ extension World { - internal func beforeSuite(closure: BeforeSuiteClosure) { + internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) } - internal func afterSuite(closure: AfterSuiteClosure) { + internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) } - internal func sharedExamples(name: String, closure: SharedExampleClosure) { + internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { registerSharedExample(name, closure: closure) } - internal func describe(description: String, flags: FilterFlags, closure: () -> ()) { + internal func describe(_ description: String, flags: FilterFlags, closure: () -> ()) { guard currentExampleMetadata == nil else { raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") } @@ -30,26 +30,26 @@ extension World { performWithCurrentExampleGroup(group, closure: closure) } - internal func context(description: String, flags: FilterFlags, closure: () -> ()) { + internal func context(_ description: String, flags: FilterFlags, closure: () -> ()) { guard currentExampleMetadata == nil else { 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: () -> ()) { + internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { var focusedFlags = flags focusedFlags[Filter.focused] = true self.describe(description, flags: focusedFlags, closure: closure) } - internal func xdescribe(description: String, flags: FilterFlags, 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 beforeEach(closure: BeforeExampleClosure) { + 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'. ") } @@ -58,16 +58,16 @@ extension World { #if _runtime(_ObjC) @objc(beforeEachWithMetadata:) - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) } #else - internal func beforeEach(closure closure: BeforeExampleWithMetadataClosure) { + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) } #endif - internal func afterEach(closure: AfterExampleClosure) { + 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'. ") } @@ -76,16 +76,16 @@ extension World { #if _runtime(_ObjC) @objc(afterEachWithMetadata:) - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) } #else - internal func afterEach(closure closure: AfterExampleWithMetadataClosure) { + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) } #endif - internal func it(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { if beforesCurrentlyExecuting { raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") } @@ -100,19 +100,19 @@ extension World { currentExampleGroup.appendExample(example) } - internal func fit(description: String, flags: FilterFlags, file: String, line: UInt, closure: () -> ()) { + 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) } - internal func xit(description: String, flags: FilterFlags, file: String, line: UInt, 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) } - internal func itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { guard currentExampleMetadata == nil else { raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'. ") } @@ -133,27 +133,27 @@ extension World { #if _runtime(_ObjC) @objc(itWithDescription:flags:file:line:closure:) - private func objc_it(description: String, flags: FilterFlags, file: String, line: UInt, 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) } @objc(fitWithDescription:flags:file:line:closure:) - private func objc_fit(description: String, flags: FilterFlags, file: String, line: UInt, 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(xitWithDescription:flags:file:line:closure:) - private func objc_xit(description: String, flags: FilterFlags, file: String, line: UInt, 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(itBehavesLikeSharedExampleNamed:sharedExampleContext:flags:file:line:) - private func objc_itBehavesLike(name: String, sharedExampleContext: SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + 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) } #endif - internal func pending(description: String, closure: () -> ()) { + internal func pending(_ description: String, closure: () -> ()) { print("Pending: \(description)") } diff --git a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift index 3c4035a..8405a81 100644 --- a/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ b/Example/Pods/Quick/Sources/Quick/ErrorUtility.swift @@ -1,8 +1,8 @@ import Foundation -@noreturn internal func raiseError(message: String) { +internal func raiseError(_ message: String) -> Never { #if _runtime(_ObjC) - NSException(name: NSInternalInconsistencyException, reason: message, userInfo: nil).raise() + NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() #endif // This won't be reached when ObjC is available and the exception above is raisd diff --git a/Example/Pods/Quick/Sources/Quick/Example.swift b/Example/Pods/Quick/Sources/Quick/Example.swift index 8929525..844bf3f 100644 --- a/Example/Pods/Quick/Sources/Quick/Example.swift +++ b/Example/Pods/Quick/Sources/Quick/Example.swift @@ -26,7 +26,7 @@ final public class Example: NSObject { private let closure: () -> () private let flags: FilterFlags - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: () -> ()) { + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> ()) { self.internalDescription = description self.closure = closure self.callsite = callsite @@ -46,10 +46,8 @@ final public class Example: NSObject { to be displayed in Xcode's test navigator. */ public var name: String { - switch group!.name { - case .Some(let groupName): return "\(groupName), \(description)" - case .None: return description - } + guard let groupName = group?.name else { return description } + return "\(groupName), \(description)" } /** @@ -67,19 +65,19 @@ final public class Example: NSObject { world.currentExampleMetadata = exampleMetadata world.exampleHooks.executeBefores(exampleMetadata) - group!.phase = .BeforesExecuting + group!.phase = .beforesExecuting for before in group!.befores { - before(exampleMetadata: exampleMetadata) + before(exampleMetadata) } - group!.phase = .BeforesFinished + group!.phase = .beforesFinished closure() - group!.phase = .AftersExecuting + group!.phase = .aftersExecuting for after in group!.afters { - after(exampleMetadata: exampleMetadata) + after(exampleMetadata) } - group!.phase = .AftersFinished + group!.phase = .aftersFinished world.exampleHooks.executeAfters(exampleMetadata) numberOfExamplesRun += 1 diff --git a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift index cf2b983..b0b8be4 100644 --- a/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ b/Example/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -9,7 +9,7 @@ final public class ExampleGroup: NSObject { weak internal var parent: ExampleGroup? internal let hooks = ExampleHooks() - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted private let internalDescription: String private let flags: FilterFlags @@ -34,17 +34,15 @@ final public class ExampleGroup: NSObject { public var examples: [Example] { var examples = childExamples for group in childGroups { - examples.appendContentsOf(group.examples) + examples.append(contentsOf: group.examples) } return examples } internal var name: String? { if let parent = parent { - switch(parent.name) { - case .Some(let name): return "\(name), \(description)" - case .None: return description - } + guard let name = parent.name else { return description } + return "\(name), \(description)" } else { return isInternalRootExampleGroup ? nil : description } @@ -61,44 +59,44 @@ final public class ExampleGroup: NSObject { } internal var befores: [BeforeExampleWithMetadataClosure] { - var closures = Array(hooks.befores.reverse()) + var closures = Array(hooks.befores.reversed()) walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(Array(group.hooks.befores.reverse())) + closures.append(contentsOf: Array(group.hooks.befores.reversed())) } - return Array(closures.reverse()) + return Array(closures.reversed()) } internal var afters: [AfterExampleWithMetadataClosure] { var closures = hooks.afters walkUp() { (group: ExampleGroup) -> () in - closures.appendContentsOf(group.hooks.afters) + closures.append(contentsOf: group.hooks.afters) } return closures } - internal func walkDownExamples(callback: (example: Example) -> ()) { + internal func walkDownExamples(_ callback: (_ example: Example) -> ()) { for example in childExamples { - callback(example: example) + callback(example) } for group in childGroups { group.walkDownExamples(callback) } } - internal func appendExampleGroup(group: ExampleGroup) { + internal func appendExampleGroup(_ group: ExampleGroup) { group.parent = self childGroups.append(group) } - internal func appendExample(example: Example) { + internal func appendExample(_ example: Example) { example.group = self childExamples.append(example) } - private func walkUp(callback: (group: ExampleGroup) -> ()) { + private func walkUp(_ callback: (_ group: ExampleGroup) -> ()) { var group = self while let parent = group.parent { - callback(group: parent) + callback(parent) group = parent } } diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift index 3252bbf..a241b33 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -9,7 +9,7 @@ public typealias BeforeExampleClosure = () -> () 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) -> () /** A closure executed after an example is run. diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift index 1d5fa91..ef6d53e 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -4,39 +4,39 @@ final internal class ExampleHooks { internal var befores: [BeforeExampleWithMetadataClosure] = [] internal var afters: [AfterExampleWithMetadataClosure] = [] - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted - internal func appendBefore(closure: BeforeExampleWithMetadataClosure) { + internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { befores.append(closure) } - internal func appendBefore(closure: BeforeExampleClosure) { + internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { befores.append { (exampleMetadata: ExampleMetadata) in closure() } } - internal func appendAfter(closure: AfterExampleWithMetadataClosure) { + internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { afters.append(closure) } - internal func appendAfter(closure: AfterExampleClosure) { + internal func appendAfter(_ closure: @escaping AfterExampleClosure) { afters.append { (exampleMetadata: ExampleMetadata) in closure() } } - internal func executeBefores(exampleMetadata: ExampleMetadata) { - phase = .BeforesExecuting + internal func executeBefores(_ exampleMetadata: ExampleMetadata) { + phase = .beforesExecuting for before in befores { - before(exampleMetadata: exampleMetadata) + before(exampleMetadata) } - phase = .BeforesFinished + phase = .beforesFinished } - internal func executeAfters(exampleMetadata: ExampleMetadata) { - phase = .AftersExecuting + internal func executeAfters(_ exampleMetadata: ExampleMetadata) { + phase = .aftersExecuting for after in afters { - after(exampleMetadata: exampleMetadata) + after(exampleMetadata) } - phase = .AftersFinished + phase = .aftersFinished } } diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift index 8dc3784..2440158 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/HooksPhase.swift @@ -2,10 +2,10 @@ A description of the execution cycle of the current example with respect to the hooks of that example. */ -internal enum HooksPhase: Int { - case NothingExecuted = 0 - case BeforesExecuting - case BeforesFinished - case AftersExecuting - case AftersFinished +internal enum HooksPhase { + case nothingExecuted + case beforesExecuting + case beforesFinished + case aftersExecuting + case aftersFinished } diff --git a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift index 59bdcf2..b39292b 100644 --- a/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ b/Example/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift @@ -4,29 +4,29 @@ final internal class SuiteHooks { internal var befores: [BeforeSuiteClosure] = [] internal var afters: [AfterSuiteClosure] = [] - internal var phase: HooksPhase = .NothingExecuted + internal var phase: HooksPhase = .nothingExecuted - internal func appendBefore(closure: BeforeSuiteClosure) { + internal func appendBefore(_ closure: @escaping BeforeSuiteClosure) { befores.append(closure) } - internal func appendAfter(closure: AfterSuiteClosure) { + internal func appendAfter(_ closure: @escaping AfterSuiteClosure) { afters.append(closure) } internal func executeBefores() { - phase = .BeforesExecuting + phase = .beforesExecuting for before in befores { before() } - phase = .BeforesFinished + phase = .beforesFinished } internal func executeAfters() { - phase = .AftersExecuting + phase = .aftersExecuting for after in afters { after() } - phase = .AftersFinished + phase = .aftersFinished } } diff --git a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift index e8709e0..730843e 100644 --- a/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ b/Example/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift @@ -2,17 +2,13 @@ import Foundation -extension NSBundle { +extension Bundle { /** Locates the first bundle with a '.xctest' file extension. */ - internal static var currentTestBundle: NSBundle? { - return allBundles().lazy - .filter { - $0.bundlePath.hasSuffix(".xctest") - } - .first + internal static var currentTestBundle: Bundle? { + return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } } } diff --git a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift index 5163a4e..63b55e1 100644 --- a/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ b/Example/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift @@ -1,4 +1,5 @@ #if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +import Foundation /** Responsible for building a "Selected tests" suite. This corresponds to a single @@ -50,18 +51,18 @@ internal class QuickSelectedTestSuiteBuilder: QuickTestSuiteBuilder { } /** - Searches `NSBundle.allBundles()` for an xctest bundle, then looks up the named + Searches `Bundle.allBundles()` for an xctest bundle, then looks up the named test case class in that bundle. 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.characters.split("/").first.map(String.init) +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 = NSBundle.currentTestBundle else { return nil } + guard let bundle = Bundle.currentTestBundle else { return nil } if let testCaseClass = bundle.classNamed(className) { return testCaseClass } diff --git a/Example/Pods/Quick/Sources/Quick/String+FileName.swift b/Example/Pods/Quick/Sources/Quick/String+FileName.swift index 87cea7a..83cdfcf 100644 --- a/Example/Pods/Quick/Sources/Quick/String+FileName.swift +++ b/Example/Pods/Quick/Sources/Quick/String+FileName.swift @@ -6,7 +6,7 @@ extension String { If the receiver represents a path, returns its file name with a file extension. */ var fileName: String? { - return NSURL(string: self)?.URLByDeletingPathExtension?.lastPathComponent + return NSURL(string: self)?.deletingPathExtension?.lastPathComponent } } diff --git a/Example/Pods/Quick/Sources/Quick/World.swift b/Example/Pods/Quick/Sources/Quick/World.swift index b2b58c8..56dae51 100644 --- a/Example/Pods/Quick/Sources/Quick/World.swift +++ b/Example/Pods/Quick/Sources/Quick/World.swift @@ -10,7 +10,7 @@ public typealias SharedExampleContext = () -> (NSDictionary) 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 = (SharedExampleContext) -> () +public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () /** A collection of state Quick builds up in order to work its magic. @@ -44,7 +44,13 @@ final internal class World: NSObject { within this test suite. This is only true within the context of Quick functional tests. */ +#if _runtime(_ObjC) + // Convention of generating Objective-C selector has been changed on Swift 3 + @objc(isRunningAdditionalSuites) + internal var isRunningAdditionalSuites = false +#else internal var isRunningAdditionalSuites = false +#endif private var specs: Dictionary = [:] private var sharedExamples: [String: SharedExampleClosure] = [:] @@ -69,10 +75,10 @@ final internal class World: NSObject { - parameter closure: A closure that takes a Configuration object that can be mutated to change Quick's behavior. */ - internal func configure(closure: QuickConfigurer) { + 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.") - closure(configuration: configuration) + closure(configuration) } /** @@ -101,12 +107,8 @@ final internal class World: NSObject { - parameter cls: 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 { - #if _runtime(_ObjC) - let name = NSStringFromClass(cls) - #else - let name = String(cls) - #endif + internal func rootExampleGroupForSpecClass(_ cls: AnyClass) -> ExampleGroup { + let name = String(describing: cls) if let group = specs[name] { return group @@ -130,32 +132,32 @@ 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(_ specClass: AnyClass) -> [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) } // 3. Remove all excluded examples. return spec.filter { example in - !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example: example) } + !self.configuration.exclusionFilters.reduce(false) { $0 || $1(example) } } } #if _runtime(_ObjC) @objc(examplesForSpecClass:) - private func objc_examples(specClass: AnyClass) -> [Example] { + private func objc_examples(_ specClass: AnyClass) -> [Example] { return examples(specClass) } #endif // MARK: Internal - internal func registerSharedExample(name: String, closure: SharedExampleClosure) { + internal func registerSharedExample(_ name: String, closure: @escaping SharedExampleClosure) { raiseIfSharedExampleAlreadyRegistered(name) sharedExamples[name] = closure } - internal func sharedExample(name: String) -> SharedExampleClosure { + internal func sharedExample(_ name: String) -> SharedExampleClosure { raiseIfSharedExampleNotRegistered(name) return sharedExamples[name]! } @@ -165,28 +167,28 @@ final internal class World: NSObject { } internal var beforesCurrentlyExecuting: Bool { - let suiteBeforesExecuting = suiteHooks.phase == .BeforesExecuting - let exampleBeforesExecuting = exampleHooks.phase == .BeforesExecuting + let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting + let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting var groupBeforesExecuting = false if let runningExampleGroup = currentExampleMetadata?.example.group { - groupBeforesExecuting = runningExampleGroup.phase == .BeforesExecuting + groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting } return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting } internal var aftersCurrentlyExecuting: Bool { - let suiteAftersExecuting = suiteHooks.phase == .AftersExecuting - let exampleAftersExecuting = exampleHooks.phase == .AftersExecuting + let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting + let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting var groupAftersExecuting = false if let runningExampleGroup = currentExampleMetadata?.example.group { - groupAftersExecuting = runningExampleGroup.phase == .AftersExecuting + groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting } return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting } - internal func performWithCurrentExampleGroup(group: ExampleGroup, closure: () -> Void) { + internal func performWithCurrentExampleGroup(_ group: ExampleGroup, closure: () -> Void) { let previousExampleGroup = currentExampleGroup currentExampleGroup = group @@ -206,7 +208,7 @@ 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: example) } + return self.configuration.inclusionFilters.reduce(false) { $0 || $1(example) } } if included.isEmpty && configuration.runAllWhenEverythingFiltered { @@ -216,13 +218,13 @@ final internal class World: NSObject { } } - private func raiseIfSharedExampleAlreadyRegistered(name: String) { + private func raiseIfSharedExampleAlreadyRegistered(_ name: String) { if sharedExamples[name] != nil { raiseError("A shared example named '\(name)' has already been registered.") } } - private func raiseIfSharedExampleNotRegistered(name: String) { + private func raiseIfSharedExampleNotRegistered(_ name: String) { if sharedExamples[name] == nil { raiseError("No shared example named '\(name)' has been registered. Registered shared examples: '\(Array(sharedExamples.keys))'") } diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.h diff --git a/Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m b/Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m similarity index 100% rename from Example/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.m rename to Example/Pods/Quick/Sources/QuickObjectiveC/Configuration/QuickConfiguration.m diff --git a/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h diff --git a/Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.m b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m similarity index 100% rename from Example/Pods/Quick/Sources/Quick/DSL/QCKDSL.m rename to Example/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m diff --git a/Example/Pods/Quick/Sources/Quick/DSL/World+DSL.h b/Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/DSL/World+DSL.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/DSL/World+DSL.h diff --git a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h b/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h diff --git a/Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m b/Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m similarity index 100% rename from Example/Pods/Quick/Sources/Quick/NSString+QCKSelectorName.m rename to Example/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m diff --git a/Example/Pods/Quick/Sources/Quick/Quick.h b/Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/Quick.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/Quick.h diff --git a/Example/Pods/Quick/Sources/Quick/QuickSpec.h b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/QuickSpec.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h diff --git a/Example/Pods/Quick/Sources/Quick/QuickSpec.m b/Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m similarity index 100% rename from Example/Pods/Quick/Sources/Quick/QuickSpec.m rename to Example/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m diff --git a/Example/Pods/Quick/Sources/Quick/World.h b/Example/Pods/Quick/Sources/QuickObjectiveC/World.h similarity index 100% rename from Example/Pods/Quick/Sources/Quick/World.h rename to Example/Pods/Quick/Sources/QuickObjectiveC/World.h diff --git a/Example/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m b/Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m similarity index 100% rename from Example/Pods/Quick/Sources/Quick/XCTestSuite+QuickTestSuiteBuilder.m rename to Example/Pods/Quick/Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m diff --git a/Example/Pods/Target Support Files/Nimble/Info.plist b/Example/Pods/Target Support Files/Nimble/Info.plist index 9ae03a0..5cbb290 100644 --- a/Example/Pods/Target Support Files/Nimble/Info.plist +++ b/Example/Pods/Target Support Files/Nimble/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 3.2.0 + 5.1.1 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h index 5e5b5c8..410c438 100644 --- a/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ b/Example/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -1,8 +1,12 @@ #import +#import "CwlCatchException.h" +#import "CwlCatchBadInstruction.h" +#import "mach_excServer.h" #import "Nimble.h" #import "DSL.h" #import "NMBExceptionCapture.h" +#import "NMBStringify.h" FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Example/Pods/Target Support Files/Quick/Info.plist b/Example/Pods/Target Support Files/Quick/Info.plist index b8a90bb..994ffe8 100644 --- a/Example/Pods/Target Support Files/Quick/Info.plist +++ b/Example/Pods/Target Support Files/Quick/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.9.3 + 0.10.0 CFBundleSignature ???? CFBundleVersion diff --git a/Example/Tests/Tests.swift b/Example/Tests/Tests.swift index 73c11bc..495ef57 100644 --- a/Example/Tests/Tests.swift +++ b/Example/Tests/Tests.swift @@ -32,13 +32,12 @@ class TableOfContentsSpec: QuickSpec { it("will eventually pass") { var time = "passing" - - dispatch_async(dispatch_get_main_queue()) { + DispatchQueue.main.async { time = "done" } waitUntil { done in - NSThread.sleepForTimeInterval(0.5) + Thread.sleep(forTimeInterval: 0.5) expect(time) == "done" done() diff --git a/MapSnap/Classes/MKMapSnapshotter+MapSnap.swift b/MapSnap/Classes/MKMapSnapshotter+MapSnap.swift index 201ff1e..b31e356 100644 --- a/MapSnap/Classes/MKMapSnapshotter+MapSnap.swift +++ b/MapSnap/Classes/MKMapSnapshotter+MapSnap.swift @@ -8,10 +8,10 @@ import MapKit -public typealias MapSnapshotterCompletion = (UIImage?, NSError?) -> Void +public typealias MapSnapshotterCompletion = (UIImage?, Error?) -> Void public extension MKMapSnapshotter { - static func imageForCoordinate(coordinate: CLLocationCoordinate2D, size: CGSize, completion: MapSnapshotterCompletion?) { + static func imageForCoordinate(_ coordinate: CLLocationCoordinate2D, size: CGSize, completion: MapSnapshotterCompletion?) { let span = MKCoordinateSpan(latitudeDelta: 0.5, longitudeDelta: 0.5) let region = MKCoordinateRegion(center: coordinate, span: span) @@ -20,10 +20,10 @@ public extension MKMapSnapshotter { options.size = size let snapshotter = MKMapSnapshotter(options: options) - let queue = dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT, 0) - snapshotter.startWithQueue(queue, completionHandler: { (snapshot: MKMapSnapshot?, error: NSError?) in + let queue = DispatchQueue.global(priority: DispatchQueue.GlobalQueuePriority.default) + snapshotter.start(with: queue, completionHandler: { (snapshot: MKMapSnapshot?, error: Error?) in guard let snapshot = snapshot else { - dispatch_async(dispatch_get_main_queue(), { + DispatchQueue.main.async(execute: { completion?(nil, error) }) @@ -34,21 +34,21 @@ public extension MKMapSnapshotter { let pin = MKPinAnnotationView(annotation: nil, reuseIdentifier: nil) UIGraphicsBeginImageContextWithOptions(image.size, true, image.scale) - image.drawAtPoint(.zero) + image.draw(at: .zero) - var point = snapshot.pointForCoordinate(coordinate) + var point = snapshot.point(for: coordinate) let visibleRect = CGRect(origin: .zero, size: image.size) if visibleRect.contains(point) { point.x = point.x + pin.centerOffset.x - (pin.bounds.size.width / 2.0) point.y = point.y + pin.centerOffset.y - (pin.bounds.size.height / 2.0) - pin.image?.drawAtPoint(point) + pin.image?.draw(at: point) } let compositeImage = UIGraphicsGetImageFromCurrentImageContext() UIGraphicsEndImageContext() - dispatch_async(dispatch_get_main_queue(), { + DispatchQueue.main.async(execute: { completion?(compositeImage, nil) }) }) diff --git a/MapSnap/Classes/MapSnapCache.swift b/MapSnap/Classes/MapSnapCache.swift index bba309a..850decc 100644 --- a/MapSnap/Classes/MapSnapCache.swift +++ b/MapSnap/Classes/MapSnapCache.swift @@ -9,6 +9,6 @@ import Foundation public protocol MapSnapCache { - func objectForKey(key: String) -> AnyObject? - func setObject(object: NSCoding, forKey: String) + func object(forKey key: String) -> Any? + func setObject(_ object: NSCoding, forKey: String) } diff --git a/MapSnap/Classes/MapSnapManager.swift b/MapSnap/Classes/MapSnapManager.swift index 230002c..3991713 100644 --- a/MapSnap/Classes/MapSnapManager.swift +++ b/MapSnap/Classes/MapSnapManager.swift @@ -9,51 +9,51 @@ import MapKit import PINCache -public typealias MapSnapImageCompletion = (UIImage?, NSError?, NSUUID?) -> Void +public typealias MapSnapImageCompletion = (UIImage?, Error?, UUID?) -> Void -public class MapSnapManager { - public static var sharedInstance = MapSnapManager() +open class MapSnapManager { + open static var sharedInstance = MapSnapManager() - public var defaultImageSize = CGSize(width: UIScreen.mainScreen().bounds.width, height: 150.0) - public var cache: MapSnapCache? + open var defaultImageSize = CGSize(width: UIScreen.main.bounds.width, height: 150.0) + open var cache: MapSnapCache? - private var pendingOperationIDs = [NSUUID]() + fileprivate var pendingOperationIDs = [UUID]() } // MARK: - Public public extension MapSnapManager { - func cancelImageRequestWithID(ID: NSUUID) { - guard let index = pendingOperationIDs.indexOf(ID) else { + func cancelImageRequestWithID(_ ID: UUID) { + guard let index = pendingOperationIDs.index(of: ID) else { return } - pendingOperationIDs.removeAtIndex(index) + pendingOperationIDs.remove(at: index) } - func imageForCoordinate(coordinate: CLLocationCoordinate2D, size: CGSize? = nil, completion: MapSnapImageCompletion?) -> NSUUID? { - let cache = self.cache ?? PINCache.sharedCache() + func imageForCoordinate(_ coordinate: CLLocationCoordinate2D, size: CGSize? = nil, completion: MapSnapImageCompletion?) -> UUID? { + let cache = self.cache ?? PINCache.shared() let imageSize = size ?? defaultImageSize let key = [ - String(coordinate), + String(describing: coordinate), "\(imageSize.width)x\(imageSize.height)" - ].joinWithSeparator("-") + ].joined(separator: "-") - if let image = cache.objectForKey(key) as? UIImage { + if let image = cache.object(forKey: key) as? UIImage { completion?(image, nil, nil) return nil } else { - let operationID = NSUUID() + let operationID = UUID() - let snapshotCompletion = { [weak self] (image: UIImage?, error: NSError?) in - guard let index = self?.pendingOperationIDs.indexOf(operationID) else { + let snapshotCompletion = { [weak self] (image: UIImage?, error: Error?) in + guard let index = self?.pendingOperationIDs.index(of: operationID) else { return } - self?.pendingOperationIDs.removeAtIndex(index) + self?.pendingOperationIDs.remove(at: index) if let image = image { cache.setObject(image, forKey: key) diff --git a/MapSnap/Classes/UIImageView+MapSnap.swift b/MapSnap/Classes/UIImageView+MapSnap.swift index c1e1503..78ce159 100644 --- a/MapSnap/Classes/UIImageView+MapSnap.swift +++ b/MapSnap/Classes/UIImageView+MapSnap.swift @@ -10,7 +10,7 @@ import UIKit import CoreLocation public extension UIImageView { - func setMapImageWithCoordinate(coordinate: CLLocationCoordinate2D?, size: CGSize? = nil, placeholderImage: UIImage? = nil) { + func setMapImageWithCoordinate(_ coordinate: CLLocationCoordinate2D?, size: CGSize? = nil, placeholderImage: UIImage? = nil) { cancelMapImageOperation() if let placeholderImage = placeholderImage { @@ -26,7 +26,7 @@ public extension UIImageView { return } - let completion = { [weak self] (image: UIImage?, error: NSError?, operationID: NSUUID?) in + let completion = { [weak self] (image: UIImage?, error: Error?, operationID: UUID?) in let block = { if self?.mapImageOperationUUID != operationID && operationID != nil { return @@ -42,11 +42,11 @@ public extension UIImageView { self?.setNeedsLayout() } - if NSThread.isMainThread() { + if Thread.isMainThread { block() } else { - dispatch_async(dispatch_get_main_queue(), block) + DispatchQueue.main.async(execute: block) } } @@ -68,9 +68,9 @@ public extension UIImageView { private extension UIImageView { static var mapImageOperationAssociatedKey = "com.mapSnap.mapImageOperationAssociatedKey" - var mapImageOperationUUID: NSUUID? { + var mapImageOperationUUID: UUID? { get { - return objc_getAssociatedObject(self, &UIImageView.mapImageOperationAssociatedKey) as? NSUUID + return objc_getAssociatedObject(self, &UIImageView.mapImageOperationAssociatedKey) as? UUID } set {