From 3f2dec7d345237f1e93afe79c9bee5852127fc23 Mon Sep 17 00:00:00 2001 From: Igor Muzyka Date: Fri, 23 Mar 2018 17:37:38 +0200 Subject: [PATCH] Upgraded to Swift 4. Left out some warnings as they are not critical. 5 test cases fail. --- LeeGo.xcodeproj/project.pbxproj | 40 +- .../xcshareddata/xcschemes/LeeGo.xcscheme | 4 +- LeeGoTests/AppearanceSpec.swift | 12 +- LeeGoTests/ConvenienceSpec.swift | 6 +- LeeGoTests/ConvertibleSpec.swift | 12 +- LeeGoTests/TestData.swift | 6 +- Podfile | 4 +- Podfile.lock | 16 +- Pods/Manifest.lock | 16 +- Pods/Nimble/{LICENSE.md => LICENSE} | 2 +- Pods/Nimble/README.md | 750 +++++++-- .../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/AssertionDispatcher.swift | 1 - .../Nimble/Adapters/AssertionRecorder.swift | 4 +- .../Nimble/Adapters/NMBExpectation.swift | 150 +- .../Nimble/Adapters/NMBObjCMatcher.swift | 6 +- .../Nimble/Adapters/NimbleEnvironment.swift | 2 +- .../Nimble/Adapters/NimbleXCTestHandler.swift | 24 +- Pods/Nimble/Sources/Nimble/DSL+Wait.swift | 38 +- Pods/Nimble/Sources/Nimble/DSL.swift | 2 +- Pods/Nimble/Sources/Nimble/Expectation.swift | 86 +- .../Sources/Nimble/ExpectationMessage.swift | 262 ++++ Pods/Nimble/Sources/Nimble/Expression.swift | 15 +- .../Sources/Nimble/FailureMessage.swift | 33 +- .../Sources/Nimble/Matchers/AllPass.swift | 141 +- .../Nimble/Matchers/AsyncMatcherWrapper.swift | 122 +- .../Sources/Nimble/Matchers/BeAKindOf.swift | 62 +- .../Nimble/Matchers/BeAnInstanceOf.swift | 54 +- .../Sources/Nimble/Matchers/BeCloseTo.swift | 60 +- .../Sources/Nimble/Matchers/BeEmpty.swift | 73 +- .../Nimble/Matchers/BeGreaterThan.swift | 26 +- .../Matchers/BeGreaterThanOrEqualTo.swift | 16 +- .../Nimble/Matchers/BeIdenticalTo.swift | 17 +- .../Sources/Nimble/Matchers/BeLessThan.swift | 18 +- .../Nimble/Matchers/BeLessThanOrEqual.swift | 18 +- .../Sources/Nimble/Matchers/BeLogical.swift | 54 +- .../Sources/Nimble/Matchers/BeNil.swift | 11 +- .../Sources/Nimble/Matchers/BeVoid.swift | 10 +- .../Sources/Nimble/Matchers/BeginWith.swift | 41 +- .../Sources/Nimble/Matchers/Contain.swift | 43 +- .../Matchers/ContainElementSatisfying.swift | 60 + .../Sources/Nimble/Matchers/EndWith.swift | 31 +- .../Sources/Nimble/Matchers/Equal.swift | 143 +- .../Sources/Nimble/Matchers/HaveCount.swift | 16 +- .../Sources/Nimble/Matchers/Match.swift | 12 +- .../Sources/Nimble/Matchers/MatchError.swift | 50 +- .../Sources/Nimble/Matchers/MatcherFunc.swift | 22 +- .../Nimble/Matchers/MatcherProtocols.swift | 75 +- .../Nimble/Matchers/PostNotification.swift | 48 +- .../Sources/Nimble/Matchers/Predicate.swift | 348 +++++ .../Nimble/Matchers/RaisesException.swift | 45 +- .../Nimble/Matchers/SatisfyAnyOf.swift | 118 +- .../Nimble/Matchers/ThrowAssertion.swift | 19 +- .../Sources/Nimble/Matchers/ThrowError.swift | 253 ++- .../Sources/Nimble/Matchers/ToSucceed.swift | 37 + Pods/Nimble/Sources/Nimble/Nimble.h | 9 +- Pods/Nimble/Sources/Nimble/Utils/Async.swift | 70 +- Pods/Nimble/Sources/Nimble/Utils/Errors.swift | 89 +- .../Sources/Nimble/Utils/SourceLocation.swift | 8 +- .../Sources/Nimble/Utils/Stringers.swift | 13 +- Pods/Nimble/Sources/NimbleObjectiveC/DSL.h | 12 +- Pods/Nimble/Sources/NimbleObjectiveC/DSL.m | 16 +- .../NimbleObjectiveC/NMBExceptionCapture.h | 4 +- .../NimbleObjectiveC/NMBExceptionCapture.m | 6 +- .../Sources/NimbleObjectiveC/NMBStringify.h | 2 +- Pods/Pods.xcodeproj/project.pbxproj | 1356 +++++++++-------- Pods/Quick/README.md | 39 +- Pods/Quick/Sources/Quick/Behavior.swift | 17 + Pods/Quick/Sources/Quick/Callsite.swift | 29 +- .../Quick/Configuration/Configuration.swift | 10 +- Pods/Quick/Sources/Quick/DSL/DSL.swift | 68 +- Pods/Quick/Sources/Quick/DSL/World+DSL.swift | 64 +- Pods/Quick/Sources/Quick/ErrorUtility.swift | 2 +- Pods/Quick/Sources/Quick/Example.swift | 42 +- Pods/Quick/Sources/Quick/ExampleGroup.swift | 26 +- .../Quick/Sources/Quick/ExampleMetadata.swift | 15 +- Pods/Quick/Sources/Quick/Filter.swift | 15 +- Pods/Quick/Sources/Quick/Hooks/Closures.swift | 6 +- .../Sources/Quick/Hooks/ExampleHooks.swift | 6 +- .../Quick/NSBundle+CurrentTestBundle.swift | 11 +- .../NSString+C99ExtendedIdentifier.swift | 33 + .../Quick/QuickSelectedTestSuiteBuilder.swift | 4 +- Pods/Quick/Sources/Quick/QuickTestSuite.swift | 12 +- .../Quick/Sources/Quick/String+FileName.swift | 12 - Pods/Quick/Sources/Quick/URL+FileName.swift | 12 + Pods/Quick/Sources/Quick/World.swift | 37 +- .../NSString+QCKSelectorName.h | 17 - .../NSString+QCKSelectorName.m | 37 - .../Quick/Sources/QuickObjectiveC/QuickSpec.m | 47 +- .../Sources/QuickSpecBase/QuickSpecBase.m | 55 + .../QuickSpecBase/include/QuickSpecBase.h | 11 + Pods/Target Support Files/Nimble/Info.plist | 2 +- .../Nimble/Nimble-prefix.pch | 8 + .../Nimble/Nimble-umbrella.h | 15 +- .../Nimble/Nimble.xcconfig | 9 +- .../Pods-LeeGoTests-acknowledgements.markdown | 2 +- .../Pods-LeeGoTests-acknowledgements.plist | 2 +- .../Pods-LeeGoTests-frameworks.sh | 79 +- .../Pods-LeeGoTests-resources.sh | 28 +- .../Pods-LeeGoTests-umbrella.h | 8 + .../Pods-LeeGoTests.debug.xcconfig | 10 +- .../Pods-LeeGoTests.release.xcconfig | 10 +- Pods/Target Support Files/Quick/Info.plist | 2 +- .../Quick/Quick-prefix.pch | 8 + .../Quick/Quick-umbrella.h | 8 + .../Target Support Files/Quick/Quick.xcconfig | 7 +- Sources/Conveniences.swift | 29 +- Sources/Core/Appearance.swift | 10 +- Sources/Core/Brick.swift | 4 +- Sources/Core/Composable.swift | 1 + Sources/Core/Configurable.swift | 1 + Sources/Core/Layout.swift | 4 +- Sources/View.swift | 2 +- 122 files changed, 4089 insertions(+), 3282 deletions(-) rename Pods/Nimble/{LICENSE.md => LICENSE} (99%) delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c delete mode 100644 Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h create mode 100644 Pods/Nimble/Sources/Nimble/ExpectationMessage.swift create mode 100644 Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift create mode 100644 Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift create mode 100644 Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift create mode 100644 Pods/Quick/Sources/Quick/Behavior.swift create mode 100644 Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift delete mode 100644 Pods/Quick/Sources/Quick/String+FileName.swift create mode 100644 Pods/Quick/Sources/Quick/URL+FileName.swift delete mode 100644 Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h delete mode 100644 Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m create mode 100644 Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m create mode 100644 Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h diff --git a/LeeGo.xcodeproj/project.pbxproj b/LeeGo.xcodeproj/project.pbxproj index 10dc95c..c760978 100644 --- a/LeeGo.xcodeproj/project.pbxproj +++ b/LeeGo.xcodeproj/project.pbxproj @@ -307,16 +307,16 @@ isa = PBXProject; attributes = { LastSwiftUpdateCheck = 0720; - LastUpgradeCheck = 0830; + LastUpgradeCheck = 0920; ORGANIZATIONNAME = "Victor Wang"; TargetAttributes = { 35F520001C7C73D40089FF41 = { CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0920; }; 35F5200A1C7C73D40089FF41 = { CreatedOnToolsVersion = 7.2.1; - LastSwiftMigration = 0800; + LastSwiftMigration = 0920; }; }; }; @@ -366,13 +366,16 @@ files = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); name = "[CP] Check Pods Manifest.lock"; outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-LeeGoTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n"; + shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n"; showEnvVarsInLog = 0; }; 6B2D5E3E61978A4D366A4F11 /* [CP] Embed Pods Frameworks */ = { @@ -381,9 +384,14 @@ files = ( ); inputPaths = ( + "${SRCROOT}/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-frameworks.sh", + "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework", + "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework", ); name = "[CP] Embed Pods Frameworks"; outputPaths = ( + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework", + "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; @@ -463,14 +471,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -514,14 +528,20 @@ CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; CLANG_WARN_SUSPICIOUS_MOVE = YES; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; @@ -566,7 +586,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.allblue-technology.LeeGo"; PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -587,7 +608,8 @@ PRODUCT_NAME = "$(TARGET_NAME)"; SKIP_INSTALL = YES; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; }; name = Release; }; @@ -600,7 +622,8 @@ LD_RUNPATH_SEARCH_PATHS = "$(inherited) @executable_path/Frameworks @loader_path/Frameworks"; PRODUCT_BUNDLE_IDENTIFIER = "com.allblue-technology.LeeGoTests"; PRODUCT_NAME = "$(TARGET_NAME)"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Debug; }; @@ -614,7 +637,8 @@ PRODUCT_BUNDLE_IDENTIFIER = "com.allblue-technology.LeeGoTests"; PRODUCT_NAME = "$(TARGET_NAME)"; SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = On; + SWIFT_VERSION = 4.0; }; name = Release; }; diff --git a/LeeGo.xcodeproj/xcshareddata/xcschemes/LeeGo.xcscheme b/LeeGo.xcodeproj/xcshareddata/xcschemes/LeeGo.xcscheme index a904cbf..db74991 100644 --- a/LeeGo.xcodeproj/xcshareddata/xcschemes/LeeGo.xcscheme +++ b/LeeGo.xcodeproj/xcshareddata/xcschemes/LeeGo.xcscheme @@ -1,6 +1,6 @@ @@ -56,6 +57,7 @@ buildConfiguration = "Debug" selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB" selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB" + language = "" launchStyle = "0" useCustomWorkingDirectory = "NO" ignoresPersistentStateOnLaunch = "NO" diff --git a/LeeGoTests/AppearanceSpec.swift b/LeeGoTests/AppearanceSpec.swift index 25e9feb..6819f58 100644 --- a/LeeGoTests/AppearanceSpec.swift +++ b/LeeGoTests/AppearanceSpec.swift @@ -140,15 +140,15 @@ class AppearanceSpec: QuickSpec { expect(label.shadowOffset) == CGSize(width: 1.0, height: 3.0) expect(label.highlightedTextColor) == UIColor.clear - Appearance.attributedText([[NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]]).apply(to: label) - expect(label.attributedText) == NSAttributedString(string: "", attributes: [NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]) + Appearance.attributedText([[NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 12)!]]).apply(to: label) + expect(label.attributedText) == NSAttributedString(string: "", attributes: [NSAttributedStringKey.font: UIFont(name: "Helvetica", size: 12)!]) // When for appearance in appearances { appearance.apply(to: label, useDefaultValue: true) } - Appearance.attributedText([[NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]]).apply(to: label, useDefaultValue: true) + Appearance.attributedText([[NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 12)!]]).apply(to: label, useDefaultValue: true) // Then expect(label.isEnabled) == true @@ -172,7 +172,7 @@ class AppearanceSpec: QuickSpec { it("should apply appearance correctly to given UITextField") { // Given let image = UIImage(named: "twitter_favorite", in: Bundle(for: type(of: self)), compatibleWith: nil)! - let attributes:[Attributes] = [[NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]] + let attributes:[Attributes] = [[NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 12)!]] let textField = UITextField() let appearances: [Appearance] = [ @@ -215,7 +215,7 @@ class AppearanceSpec: QuickSpec { XCTAssert(textField.clearButtonMode == .always) Appearance.attributedText(attributes).apply(to: textField) - expect(textField.attributedText) == NSAttributedString(string: "", attributes: [NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]) + expect(textField.attributedText) == NSAttributedString(string: "", attributes: [NSAttributedStringKey.font: UIFont(name: "Helvetica", size: 12)!]) // When for appearance in appearances { @@ -245,7 +245,7 @@ class AppearanceSpec: QuickSpec { it("should apply appearance correctly to given UITextView") { // Given - let attributes: [Attributes] = [[NSFontAttributeName: UIFont(name: "Helvetica", size: 12)!]] + let attributes: [Attributes] = [[NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 12)!]] let textView = UITextView() let appearances: [Appearance] = [ diff --git a/LeeGoTests/ConvenienceSpec.swift b/LeeGoTests/ConvenienceSpec.swift index 735c9da..f543a30 100644 --- a/LeeGoTests/ConvenienceSpec.swift +++ b/LeeGoTests/ConvenienceSpec.swift @@ -55,9 +55,9 @@ class ConvenienceSpec: QuickSpec { } let attributes: [Attributes] = [ - [NSFontAttributeName: UIFont(name: "Helvetica", size: 16)!, NSForegroundColorAttributeName: UIColor.red], - [kCustomAttributeDefaultText: "Test" as AnyObject, NSFontAttributeName: UIFont(name: "Avenir", size: 20)!, NSForegroundColorAttributeName: UIColor.darkText], - [NSFontAttributeName: UIFont(name: "Avenir", size: 16)!, NSForegroundColorAttributeName: UIColor.lightGray] + [NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 16)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.red], + [kCustomAttributeDefaultText: "Test" as AnyObject, NSAttributedStringKey.font.rawValue: UIFont(name: "Avenir", size: 20)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.darkText], + [NSAttributedStringKey.font.rawValue: UIFont(name: "Avenir", size: 16)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.lightGray] ] it("should set attributed string correctly") { diff --git a/LeeGoTests/ConvertibleSpec.swift b/LeeGoTests/ConvertibleSpec.swift index 0de600d..8b37e4a 100644 --- a/LeeGoTests/ConvertibleSpec.swift +++ b/LeeGoTests/ConvertibleSpec.swift @@ -55,9 +55,9 @@ class ConvertibleSpec: QuickSpec { .clearsOnInsertion(true), .textContainerInset(UIEdgeInsets(top: 10, left: 10, bottom: 20, right: 20)), .linkTextAttributes([ - NSFontAttributeName: UIFont.systemFont(ofSize: 13), - NSForegroundColorAttributeName: UIColor.yellow, - NSBackgroundColorAttributeName: UIColor.blue + NSAttributedStringKey.font.rawValue: UIFont.systemFont(ofSize: 13), + NSAttributedStringKey.foregroundColor.rawValue: UIColor.yellow, + NSAttributedStringKey.backgroundColor.rawValue: UIColor.blue ]), .lineFragmentPadding(12.0), .minimumScaleFactor(0.3), @@ -67,9 +67,9 @@ class ConvertibleSpec: QuickSpec { .shadowOffset(CGSize(width: 10, height: 20)), .highlightedTextColor(UIColor.clear), .attributedText([ - [NSFontAttributeName: UIFont(name: "Helvetica", size: 16)!, NSForegroundColorAttributeName: UIColor.red], - [kCustomAttributeDefaultText: "Test" as AnyObject, NSFontAttributeName: UIFont(name: "HelveticaNeue", size: 20)!, NSForegroundColorAttributeName: UIColor.darkText], - [NSFontAttributeName: UIFont(name: "HelveticaNeue", size: 16)!, NSForegroundColorAttributeName: UIColor.lightGray] + [NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 16)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.red], + [kCustomAttributeDefaultText: "Test" as AnyObject, NSAttributedStringKey.font.rawValue: UIFont(name: "HelveticaNeue", size: 20)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.darkText], + [NSAttributedStringKey.font: UIFont(name: "HelveticaNeue", size: 16)!, NSAttributedStringKey.foregroundColor: UIColor.lightGray] ]), .text("Default Text"), .borderStyle(.bezel), diff --git a/LeeGoTests/TestData.swift b/LeeGoTests/TestData.swift index 40a722b..a9875be 100644 --- a/LeeGoTests/TestData.swift +++ b/LeeGoTests/TestData.swift @@ -164,9 +164,9 @@ enum Style: String { case .H3: return [ .attributedText([ - [NSFontAttributeName: UIFont(name: "Helvetica", size: 16)!, NSForegroundColorAttributeName: UIColor.red], - [kCustomAttributeDefaultText: "Test" as AnyObject, NSFontAttributeName: UIFont(name: "Avenir", size: 20)!, NSForegroundColorAttributeName: UIColor.darkText], - [NSFontAttributeName: UIFont(name: "Avenir", size: 16)!, NSForegroundColorAttributeName: UIColor.lightGray] + [NSAttributedStringKey.font.rawValue: UIFont(name: "Helvetica", size: 16)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.red], + [kCustomAttributeDefaultText: "Test" as AnyObject, NSAttributedStringKey.font.rawValue: UIFont(name: "Avenir", size: 20)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.darkText], + [NSAttributedStringKey.font.rawValue: UIFont(name: "Avenir", size: 16)!, NSAttributedStringKey.foregroundColor.rawValue: UIColor.lightGray] ]), .numberOfLines(0), .translatesAutoresizingMaskIntoConstraints(false)] diff --git a/Podfile b/Podfile index 8ce47f6..30bc184 100644 --- a/Podfile +++ b/Podfile @@ -2,7 +2,7 @@ source 'https://github.com/CocoaPods/Specs.git' use_frameworks! target 'LeeGoTests' do - pod 'Quick' - pod 'Nimble' + pod 'Quick', '~> 1.2.0' + pod 'Nimble', '~> 7.0.3' end diff --git a/Podfile.lock b/Podfile.lock index c28252f..e9c21e2 100644 --- a/Podfile.lock +++ b/Podfile.lock @@ -1,15 +1,15 @@ PODS: - - Nimble (5.1.1) - - Quick (0.10.0) + - Nimble (7.0.3) + - Quick (1.2.0) DEPENDENCIES: - - Nimble - - Quick + - Nimble (~> 7.0.3) + - Quick (~> 1.2.0) SPEC CHECKSUMS: - Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 - Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa + Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac + Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 -PODFILE CHECKSUM: 467db5b47f467b9102bb6e38e91d69c941df6bbb +PODFILE CHECKSUM: db15c173ae24133b755c44ce3caa51dc0e20cec7 -COCOAPODS: 1.1.1 +COCOAPODS: 1.4.0 diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index c28252f..e9c21e2 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,15 +1,15 @@ PODS: - - Nimble (5.1.1) - - Quick (0.10.0) + - Nimble (7.0.3) + - Quick (1.2.0) DEPENDENCIES: - - Nimble - - Quick + - Nimble (~> 7.0.3) + - Quick (~> 1.2.0) SPEC CHECKSUMS: - Nimble: 415e3aa3267e7bc2c96b05fa814ddea7bb686a29 - Quick: 5d290df1c69d5ee2f0729956dcf0fd9a30447eaa + Nimble: 7f5a9c447a33002645a071bddafbfb24ea70e0ac + Quick: 58d203b1c5e27fff7229c4c1ae445ad7069a7a08 -PODFILE CHECKSUM: 467db5b47f467b9102bb6e38e91d69c941df6bbb +PODFILE CHECKSUM: db15c173ae24133b755c44ce3caa51dc0e20cec7 -COCOAPODS: 1.1.1 +COCOAPODS: 1.4.0 diff --git a/Pods/Nimble/LICENSE.md b/Pods/Nimble/LICENSE similarity index 99% rename from Pods/Nimble/LICENSE.md rename to Pods/Nimble/LICENSE index 0f3eb71..82b84bf 100644 --- a/Pods/Nimble/LICENSE.md +++ b/Pods/Nimble/LICENSE @@ -186,7 +186,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Pods/Nimble/README.md b/Pods/Nimble/README.md index 684255e..a190ac6 100644 --- a/Pods/Nimble/README.md +++ b/Pods/Nimble/README.md @@ -1,5 +1,10 @@ # Nimble +[![Build Status](https://travis-ci.org/Quick/Nimble.svg?branch=master)](https://travis-ci.org/Quick/Nimble) +[![CocoaPods](https://img.shields.io/cocoapods/v/Nimble.svg)](https://cocoapods.org/pods/Nimble) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Nimble.svg)](https://cocoapods.org/pods/Nimble) + Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by [Cedar](https://github.com/pivotal/cedar). @@ -23,7 +28,7 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Some Background: Expressing Outcomes Using Assertions in XCTest](#some-background-expressing-outcomes-using-assertions-in-xctest) - [Nimble: Expectations Using `expect(...).to`](#nimble-expectations-using-expectto) - [Custom Failure Messages](#custom-failure-messages) - - [Type Checking](#type-checking) + - [Type Safety](#type-safety) - [Operator Overloads](#operator-overloads) - [Lazily Computed Values](#lazily-computed-values) - [C Primitives](#c-primitives) @@ -31,6 +36,7 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Objective-C Support](#objective-c-support) - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) - [Built-in Matcher Functions](#built-in-matcher-functions) + - [Type Checking](#type-checking) - [Equivalence](#equivalence) - [Identity](#identity) - [Comparisons](#comparisons) @@ -41,16 +47,25 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Exceptions](#exceptions) - [Collection Membership](#collection-membership) - [Strings](#strings) - - [Checking if all elements of a collection pass a condition](#checking-if-all-elements-of-a-collection-pass-a-condition) - - [Verify collection count](#verify-collection-count) - - [Verify a notification was posted](#verifying-a-notification-was-posted) + - [Collection Elements](#collection-elements) + - [Collection Count](#collection-count) + - [Notifications](#notifications) - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) + - [Custom Validation](#custom-validation) - [Writing Your Own Matchers](#writing-your-own-matchers) + - [PredicateResult](#predicateresult) - [Lazy Evaluation](#lazy-evaluation) - [Type Checking via Swift Generics](#type-checking-via-swift-generics) - [Customizing Failure Messages](#customizing-failure-messages) + - [Basic Customization](#basic-customization) + - [Full Customization](#full-customization) - [Supporting Objective-C](#supporting-objective-c) - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) + - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) + - [Minimal Step - Use `.predicate`](#minimal-step---use-predicate) + - [Convert to use `Predicate` Type with Old Matcher Constructor](#convert-to-use-predicate-type-with-old-matcher-constructor) + - [Convert to `Predicate` Type with Preferred Constructor](#convert-to-predicate-type-with-preferred-constructor) + - [Deprecation Roadmap](#deprecation-roadmap) - [Installing Nimble](#installing-nimble) - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) @@ -164,7 +179,7 @@ expect(@(1+1)).toWithDescription(equal(@3), @"Make sure libKindergartenMath is l // expected to equal <3.0000>, got <2.0000> ``` -## Type Checking +## Type Safety Nimble makes sure you don't compare two types that don't match: @@ -281,9 +296,9 @@ expect(1 as CInt).to(equal(1)) make expectations on primitive C values, wrap then in an object literal: - ```objc - expect(@(1 + 1)).to(equal(@2)); - ``` +```objc +expect(@(1 + 1)).to(equal(@2)); +``` ## Asynchronous Expectations @@ -291,11 +306,22 @@ In Nimble, it's easy to make expectations on values that are updated asynchronously. Just use `toEventually` or `toEventuallyNot`: ```swift -// Swift +// Swift 3.0 and later + +DispatchQueue.main.async { + ocean.add("dolphins") + ocean.add("whales") +} +expect(ocean).toEventually(contain("dolphins", "whales")) +``` + + +```swift +// Swift 2.3 and earlier dispatch_async(dispatch_get_main_queue()) { - ocean.add("dolphins") - ocean.add("whales") + ocean.add("dolphins") + ocean.add("whales") } expect(ocean).toEventually(contain("dolphins", "whales")) ``` @@ -303,9 +329,10 @@ expect(ocean).toEventually(contain("dolphins", "whales")) ```objc // Objective-C + dispatch_async(dispatch_get_main_queue(), ^{ - [ocean add:@"dolphins"]; - [ocean add:@"whales"]; + [ocean add:@"dolphins"]; + [ocean add:@"whales"]; }); expect(ocean).toEventually(contain(@"dolphins", @"whales")); ``` @@ -347,9 +374,10 @@ You can also provide a callback by using the `waitUntil` function: // Swift waitUntil { done in - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(0.5) - done() + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } } ``` @@ -357,9 +385,10 @@ waitUntil { done in // Objective-C waitUntil(^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:0.5]; - done(); + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; }); ``` @@ -369,9 +398,10 @@ waitUntil(^(void (^done)(void)){ // Swift waitUntil(timeout: 10) { done in - // do some stuff that takes a while... - NSThread.sleepForTimeInterval(1) - done() + ocean.goFish { success in + expect(success).to(beTrue()) + done() + } } ``` @@ -379,13 +409,14 @@ waitUntil(timeout: 10) { done in // Objective-C waitUntilTimeout(10, ^(void (^done)(void)){ - // do some stuff that takes a while... - [NSThread sleepForTimeInterval:1]; - done(); + [ocean goFishWithHandler:^(BOOL success){ + expect(success).to(beTrue()); + done(); + }]; }); ``` -Note: waitUntil triggers its timeout code on the main thread. Blocking the main +Note: `waitUntil` triggers its timeout code on the main thread. Blocking the main thread will cause Nimble to stop the run loop to continue. This can cause test pollution for whatever incomplete code that was running on the main thread. Blocking the main thread can be caused by blocking IO, calls to sleep(), @@ -489,16 +520,78 @@ NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee Nimble includes a wide variety of matcher functions. +## Type Checking + +Nimble supports checking the type membership of any kind of object, whether +Objective-C conformant or not: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// The following tests pass +expect(1).to(beAKindOf(Int.self)) +expect("turtle").to(beAKindOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).to(beAKindOf(SomeProtocol.self)) +expect(classObject).to(beAKindOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAKindOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).to(beAKindOf(SomeProtocol.self)) +expect(structObject).to(beAKindOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAKindOf(SomeClassConformingToProtocol.self)) +``` + +```objc +// Objective-C + +// The following tests pass +NSMutableArray *array = [NSMutableArray array]; +expect(array).to(beAKindOf([NSArray class])); +expect(@1).toNot(beAKindOf([NSNull class])); +``` + +Objects can be tested for their exact types using the `beAnInstanceOf` matcher: + +```swift +// Swift + +protocol SomeProtocol{} +class SomeClassConformingToProtocol: SomeProtocol{} +struct SomeStructConformingToProtocol: SomeProtocol{} + +// Unlike the 'beKindOf' matcher, the 'beAnInstanceOf' matcher only +// passes if the object is the EXACT type requested. The following +// tests pass -- note its behavior when working in an inheritance hierarchy. +expect(1).to(beAnInstanceOf(Int.self)) +expect("turtle").to(beAnInstanceOf(String.self)) + +let classObject = SomeClassConformingToProtocol() +expect(classObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(classObject).to(beAnInstanceOf(SomeClassConformingToProtocol.self)) +expect(classObject).toNot(beAnInstanceOf(SomeStructConformingToProtocol.self)) + +let structObject = SomeStructConformingToProtocol() +expect(structObject).toNot(beAnInstanceOf(SomeProtocol.self)) +expect(structObject).to(beAnInstanceOf(SomeStructConformingToProtocol.self)) +expect(structObject).toNot(beAnInstanceOf(SomeClassConformingToProtocol.self)) +``` + ## Equivalence ```swift // Swift -// Passes if actual is equivalent to expected: +// Passes if 'actual' is equivalent to 'expected': expect(actual).to(equal(expected)) expect(actual) == expected -// Passes if actual is not equivalent to expected: +// Passes if 'actual' is not equivalent to 'expected': expect(actual).toNot(equal(expected)) expect(actual) != expected ``` @@ -506,10 +599,10 @@ expect(actual) != expected ```objc // Objective-C -// Passes if actual is equivalent to expected: +// Passes if 'actual' is equivalent to 'expected': expect(actual).to(equal(expected)) -// Passes if actual is not equivalent to expected: +// Passes if 'actual' is not equivalent to 'expected': expect(actual).toNot(equal(expected)) ``` @@ -521,25 +614,33 @@ Values must be `Equatable`, `Comparable`, or subclasses of `NSObject`. ```swift // Swift -// Passes if actual has the same pointer address as expected: +// Passes if 'actual' has the same pointer address as 'expected': expect(actual).to(beIdenticalTo(expected)) expect(actual) === expected -// Passes if actual does not have the same pointer address as expected: +// Passes if 'actual' does not have the same pointer address as 'expected': expect(actual).toNot(beIdenticalTo(expected)) expect(actual) !== expected ``` -Its important to remember that `beIdenticalTo` only makes sense when comparing types with reference semantics, which have a notion of identity. In Swift, that means a `class`. This matcher will not work with types with value semantics such as `struct` or `enum`. If you need to compare two value types, you can either compare individual properties or if it makes sense to do so, make your type implement `Equatable` and use Nimble's equivalence matchers instead. +It is important to remember that `beIdenticalTo` only makes sense when comparing +types with reference semantics, which have a notion of identity. In Swift, +that means types that are defined as a `class`. + +This matcher will not work when comparing types with value semantics such as +those defined as a `struct` or `enum`. If you need to compare two value types, +consider what it means for instances of your type to be identical. This may mean +comparing individual properties or, if it makes sense to do so, conforming your type +to `Equatable` and using Nimble's equivalence matchers instead. ```objc // Objective-C -// Passes if actual has the same pointer address as expected: +// Passes if 'actual' has the same pointer address as 'expected': expect(actual).to(beIdenticalTo(expected)); -// Passes if actual does not have the same pointer address as expected: +// Passes if 'actual' does not have the same pointer address as 'expected': expect(actual).toNot(beIdenticalTo(expected)); ``` @@ -644,20 +745,20 @@ expect([0.0, 2.0]).to(beCloseTo([0.1, 2.1], within: 0.1)) ```swift // Swift -// Passes if instance is an instance of aClass: +// Passes if 'instance' is an instance of 'aClass': expect(instance).to(beAnInstanceOf(aClass)) -// Passes if instance is an instance of aClass or any of its subclasses: +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: expect(instance).to(beAKindOf(aClass)) ``` ```objc // Objective-C -// Passes if instance is an instance of aClass: +// Passes if 'instance' is an instance of 'aClass': expect(instance).to(beAnInstanceOf(aClass)); -// Passes if instance is an instance of aClass or any of its subclasses: +// Passes if 'instance' is an instance of 'aClass' or any of its subclasses: expect(instance).to(beAKindOf(aClass)); ``` @@ -684,38 +785,38 @@ expect(dolphin).to(beAKindOf([Mammal class])); ## Truthiness ```swift -// Passes if actual is not nil, true, or an object with a boolean value of true: +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()) -// Passes if actual is only true (not nil or an object conforming to Boolean true): +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()) -// Passes if actual is nil, false, or an object with a boolean value of false: +// Passes if 'actual' is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()) -// Passes if actual is only false (not nil or an object conforming to Boolean false): +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()) -// Passes if actual is nil: +// Passes if 'actual' is nil: expect(actual).to(beNil()) ``` ```objc // Objective-C -// Passes if actual is not nil, true, or an object with a boolean value of true: +// Passes if 'actual' is not nil, true, or an object with a boolean value of true: expect(actual).to(beTruthy()); -// Passes if actual is only true (not nil or an object conforming to Boolean true): +// Passes if 'actual' is only true (not nil or an object conforming to Boolean true): expect(actual).to(beTrue()); -// Passes if actual is nil, false, or an object with a boolean value of false: +// Passes if 'actual' is nil, false, or an object with a boolean value of false: expect(actual).to(beFalsy()); -// Passes if actual is only false (not nil or an object conforming to Boolean false): +// Passes if 'actual' is only false (not nil or an object conforming to Boolean false): expect(actual).to(beFalse()); -// Passes if actual is nil: +// Passes if 'actual' is nil: expect(actual).to(beNil()); ``` @@ -726,14 +827,16 @@ If you're using Swift, you can use the `throwAssertion` matcher to check if an a ```swift // Swift -// Passes if somethingThatThrows() throws an assertion, such as calling fatalError() or precondition fails: +// Passes if 'somethingThatThrows()' throws an assertion, +// such as by calling 'fatalError()' or if a precondition fails: +expect { try somethingThatThrows() }.to(throwAssertion()) expect { () -> Void in fatalError() }.to(throwAssertion()) expect { precondition(false) }.to(throwAssertion()) -// Passes if throwing a NSError is not equal to throwing an assertion: +// Passes if throwing an NSError is not equal to throwing an assertion: expect { throw NSError(domain: "test", code: 0, userInfo: nil) }.toNot(throwAssertion()) -// Passes if the post assertion code is not run: +// Passes if the code after the precondition check is not run: var reachedPoint1 = false var reachedPoint2 = false expect { @@ -754,40 +857,53 @@ Notes: ## Swift Error Handling -If you're using Swift 2.0+, you can use the `throwError` matcher to check if an error is thrown. +If you're using Swift 2.0 or newer, you can use the `throwError` matcher to check if an error is thrown. + +Note: +The following code sample references the `Swift.Error` protocol. +This is `Swift.ErrorProtocol` in versions of Swift prior to version 3.0. ```swift // Swift -// Passes if somethingThatThrows() throws an ErrorProtocol: -expect{ try somethingThatThrows() }.to(throwError()) +// Passes if 'somethingThatThrows()' throws an 'Error': +expect { try somethingThatThrows() }.to(throwError()) -// Passes if somethingThatThrows() throws an error with a given domain: -expect{ try somethingThatThrows() }.to(throwError { (error: ErrorProtocol) in +// Passes if 'somethingThatThrows()' throws an error within a particular domain: +expect { try somethingThatThrows() }.to(throwError { (error: Error) in expect(error._domain).to(equal(NSCocoaErrorDomain)) }) -// Passes if somethingThatThrows() throws an error with a given case: -expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) +// Passes if 'somethingThatThrows()' throws a particular error enum case: +expect { try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadCorruptError)) -// Passes if somethingThatThrows() throws an error with a given type: -expect{ try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) +// Passes if 'somethingThatThrows()' throws an error of a particular type: +expect { try somethingThatThrows() }.to(throwError(errorType: NimbleError.self)) ``` -If you are working directly with `ErrorProtocol` values, as is sometimes the case when using `Result` or `Promise` types, you can use the `matchError` matcher to check if the error is the same error is is supposed to be, without requiring explicit casting. +When working directly with `Error` values, using the `matchError` matcher +allows you to perform certain checks on the error itself without having to +explicitly cast the error. + +The `matchError` matcher allows you to check whether or not the error: + +- is the same _type_ of error you are expecting. +- represents a particular error value that you are expecting. + +This can be useful when using `Result` or `Promise` types, for example. ```swift // Swift -let actual: ErrorProtocol = … +let actual: Error = ... -// Passes if actual contains any error value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum)) +// Passes if 'actual' represents any error value from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.self)) -// Passes if actual contains the Timeout value from the NimbleErrorEnum type: -expect(actual).to(matchError(NimbleErrorEnum.Timeout)) +// Passes if 'actual' represents the case 'timeout' from the NimbleErrorEnum type: +expect(actual).to(matchError(NimbleErrorEnum.timeout)) -// Passes if actual contains an NSError equal to the given one: +// Passes if 'actual' contains an NSError equal to the one provided: expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) ``` @@ -798,17 +914,17 @@ Note: This feature is only available in Swift. ```swift // Swift -// Passes if actual, when evaluated, raises an exception: +// Passes if 'actual', when evaluated, raises an exception: expect(actual).to(raiseException()) -// Passes if actual raises an exception with the given name: +// Passes if 'actual' raises an exception with the given name: expect(actual).to(raiseException(named: name)) -// Passes if actual raises an exception with the given name and reason: +// Passes if 'actual' raises an exception with the given name and reason: expect(actual).to(raiseException(named: name, reason: reason)) -// Passes if actual raises an exception and it passes expectations in the block -// (in this case, if name begins with 'a r') +// Passes if 'actual' raises an exception which passes expectations defined in the given closure: +// (in this case, if the exception's name begins with "a r") expect { exception.raise() }.to(raiseException { (exception: NSException) in expect(exception.name).to(beginWith("a r")) }) @@ -817,44 +933,44 @@ expect { exception.raise() }.to(raiseException { (exception: NSException) in ```objc // Objective-C -// Passes if actual, when evaluated, raises an exception: +// Passes if 'actual', when evaluated, raises an exception: expect(actual).to(raiseException()) -// Passes if actual raises an exception with the given name +// Passes if 'actual' raises an exception with the given name expect(actual).to(raiseException().named(name)) -// Passes if actual raises an exception with the given name and reason: +// Passes if 'actual' raises an exception with the given name and reason: expect(actual).to(raiseException().named(name).reason(reason)) -// Passes if actual raises an exception and it passes expectations in the block -// (in this case, if name begins with 'a r') +// Passes if 'actual' raises an exception and it passes expectations defined in the given block: +// (in this case, if name begins with "a r") expect(actual).to(raiseException().satisfyingBlock(^(NSException *exception) { expect(exception.name).to(beginWith(@"a r")); })); ``` -Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). Only Objective-C code can raise -exceptions that Nimble will catch. +Note: Swift currently doesn't have exceptions (see [#220](https://github.com/Quick/Nimble/issues/220#issuecomment-172667064)). +Only Objective-C code can raise exceptions that Nimble will catch. ## Collection Membership ```swift // Swift -// Passes if all of the expected values are members of actual: +// Passes if all of the expected values are members of 'actual': expect(actual).to(contain(expected...)) -// Passes if actual is an empty collection (it contains no elements): +// Passes if 'actual' is empty (i.e. it contains no elements): expect(actual).to(beEmpty()) ``` ```objc // Objective-C -// Passes if expected is a member of actual: +// Passes if expected is a member of 'actual': expect(actual).to(contain(expected)); -// Passes if actual is an empty collection (it contains no elements): +// Passes if 'actual' is empty (i.e. it contains no elements): expect(actual).to(beEmpty()); ``` @@ -887,20 +1003,20 @@ an ordered collection, use `beginWith` and `endWith`: ```swift // Swift -// Passes if the elements in expected appear at the beginning of actual: +// Passes if the elements in expected appear at the beginning of 'actual': expect(actual).to(beginWith(expected...)) -// Passes if the the elements in expected come at the end of actual: +// Passes if the the elements in expected come at the end of 'actual': expect(actual).to(endWith(expected...)) ``` ```objc // Objective-C -// Passes if the elements in expected appear at the beginning of actual: +// Passes if the elements in expected appear at the beginning of 'actual': expect(actual).to(beginWith(expected)); -// Passes if the the elements in expected come at the end of actual: +// Passes if the the elements in expected come at the end of 'actual': expect(actual).to(endWith(expected)); ``` @@ -911,98 +1027,162 @@ expect(actual).to(endWith(expected)); Like `contain`, in Objective-C `beginWith` and `endWith` only support a single argument [for now](https://github.com/Quick/Nimble/issues/27). +For code that returns collections of complex objects without a strict +ordering, there is the `containElementSatisfying` matcher: + +```swift +// Swift + +struct Turtle { + let color: String +} + +let turtles: [Turtle] = functionThatReturnsSomeTurtlesInAnyOrder() + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "green" +})) +expect(turtles).to(containElementSatisfying({ turtle in + return turtle.color == "blue" +}, "that is a turtle with color 'blue'")) + +// The second matcher will incorporate the provided string in the error message +// should it fail +``` + +```objc +// Objective-C + +@interface Turtle : NSObject +@property (nonatomic, readonly, nonnull) NSString *color; +@end + +@implementation Turtle +@end + +NSArray * __nonnull turtles = functionThatReturnsSomeTurtlesInAnyOrder(); + +// This set of matchers passes regardless of whether the array is +// [{color: "blue"}, {color: "green"}] or [{color: "green"}, {color: "blue"}]: + +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"green"]; +})); +expect(turtles).to(containElementSatisfying(^BOOL(id __nonnull object) { + return [[turtle color] isEqualToString:@"blue"]; +})); +``` + ## Strings ```swift // Swift -// Passes if actual contains substring expected: -expect(actual).to(contain(expected)) +// Passes if 'actual' contains 'substring': +expect(actual).to(contain(substring)) -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)) +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)) -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)) +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)) -// Passes if actual is an empty string, "": +// Passes if 'actual' represents the empty string, "": expect(actual).to(beEmpty()) -// Passes if actual matches the regular expression defined in expected: +// Passes if 'actual' matches the regular expression defined in 'expected': expect(actual).to(match(expected)) ``` ```objc // Objective-C -// Passes if actual contains substring expected: +// Passes if 'actual' contains 'substring': expect(actual).to(contain(expected)); -// Passes if actual begins with substring: -expect(actual).to(beginWith(expected)); +// Passes if 'actual' begins with 'prefix': +expect(actual).to(beginWith(prefix)); -// Passes if actual ends with substring: -expect(actual).to(endWith(expected)); +// Passes if 'actual' ends with 'suffix': +expect(actual).to(endWith(suffix)); -// Passes if actual is an empty string, "": +// Passes if 'actual' represents the empty string, "": expect(actual).to(beEmpty()); -// Passes if actual matches the regular expression defined in expected: +// Passes if 'actual' matches the regular expression defined in 'expected': expect(actual).to(match(expected)) ``` -## Checking if all elements of a collection pass a condition +## Collection Elements + +Nimble provides a means to check that all elements of a collection pass a given expectation. + +### Swift + +In Swift, the collection must be an instance of a type conforming to +`Sequence`. ```swift // Swift -// with a custom function: -expect([1,2,3,4]).to(allPass({$0 < 5})) +// Providing a custom function: +expect([1, 2, 3, 4]).to(allPass { $0! < 5 }) -// with another matcher: -expect([1,2,3,4]).to(allPass(beLessThan(5))) +// Composing the expectation with another matcher: +expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) ``` +### Objective-C + +In Objective-C, the collection must be an instance of a type which implements +the `NSFastEnumeration` protocol, and whose elements are instances of a type +which subclasses `NSObject`. + +Additionally, unlike in Swift, there is no override to specify a custom +matcher function. + ```objc // Objective-C -expect(@[@1, @2, @3,@4]).to(allPass(beLessThan(@5))); +expect(@[@1, @2, @3, @4]).to(allPass(beLessThan(@5))); ``` -For Swift the actual value has to be a Sequence, e.g. an array, a set or a custom seqence type. - -For Objective-C the actual value has to be a NSFastEnumeration, e.g. NSArray and NSSet, of NSObjects and only the variant which -uses another matcher is available here. - -## Verify collection count +## Collection Count ```swift // Swift -// passes if actual collection's count is equal to expected +// Passes if 'actual' contains the 'expected' number of elements: expect(actual).to(haveCount(expected)) -// passes if actual collection's count is not equal to expected +// Passes if 'actual' does _not_ contain the 'expected' number of elements: expect(actual).notTo(haveCount(expected)) ``` ```objc // Objective-C -// passes if actual collection's count is equal to expected +// Passes if 'actual' contains the 'expected' number of elements: expect(actual).to(haveCount(expected)) -// passes if actual collection's count is not equal to expected +// Passes if 'actual' does _not_ contain the 'expected' number of elements: expect(actual).notTo(haveCount(expected)) ``` -For Swift the actual value must be a `Collection` such as array, dictionary or set. +For Swift, the actual value must be an instance of a type conforming to `Collection`. +For example, instances of `Array`, `Dictionary`, or `Set`. -For Objective-C the actual value has to be one of the following classes `NSArray`, `NSDictionary`, `NSSet`, `NSHashTable` or one of their subclasses. +For Objective-C, the actual value must be one of the following classes, or their subclasses: -## Foundation + - `NSArray`, + - `NSDictionary`, + - `NSSet`, or + - `NSHashTable`. -### Verifying a Notification was posted +## Notifications ```swift // Swift @@ -1027,6 +1207,8 @@ expect { ## Matching a value to any of a group of matchers ```swift +// Swift + // passes if actual is either less than 10 or greater than 20 expect(actual).to(satisfyAnyOf(beLessThan(10), beGreaterThan(20))) @@ -1039,6 +1221,8 @@ expect(82).to(beLessThan(50) || beGreaterThan(80)) ``` ```objc +// Objective-C + // passes if actual is either less than 10 or greater than 20 expect(actual).to(satisfyAnyOf(beLessThan(@10), beGreaterThan(@20))) @@ -1052,33 +1236,70 @@ Note: This matcher allows you to chain any number of matchers together. This pro could instead refactor that single test into multiple, more precisely focused tests for better coverage. +## Custom Validation + +```swift +// Swift + +// passes if .succeeded is returned from the closure +expect({ + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}).to(succeed()) + +// passes if .failed is returned from the closure +expect({ + guard case .enumCaseWithAssociatedValueThatIDontCareAbout = actual else { + return .failed(reason: "wrong enum case") + } + + return .succeeded +}).notTo(succeed()) +``` + +The `String` provided with `.failed()` is shown when the test fails. + +When using `toEventually()` be careful not to make state changes or run process intensive code since this closure will be ran many times. + # Writing Your Own Matchers In Nimble, matchers are Swift functions that take an expected -value and return a `MatcherFunc` closure. Take `equal`, for example: +value and return a `Predicate` closure. Take `equal`, for example: ```swift // Swift -public func equal(expectedValue: T?) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(expectedValue)>" +public func equal(expectedValue: T?) -> Predicate { + // Can be shortened to: + // Predicate { actual in ... } + // + // But shown with types here for clarity. + return Predicate { (actual: Expression) throws -> PredicateResult in + let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") if let actualValue = try actualExpression.evaluate() { - return actualValue == expectedValue + return PredicateResult( + bool: actualValue == expectedValue!, + message: msg + ) } else { - return false + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } } } ``` -The return value of a `MatcherFunc` closure is a `Bool` that indicates -whether the actual value matches the expectation: `true` if it does, or -`false` if it doesn't. +The return value of a `Predicate` closure is a `PredicateResult` that indicates +whether the actual value matches the expectation and what error message to +display on failure. -> The actual `equal` matcher function does not match when either - `actual` or `expected` are nil; the example above has been edited for - brevity. +> The actual `equal` matcher function does not match when + `expected` are nil; the example above has been edited for brevity. Since matchers are just Swift functions, you can define them anywhere: at the top of your test file, in a file shared by all of your tests, or @@ -1093,6 +1314,63 @@ For examples of how to write your own matchers, just check out the to see how Nimble's built-in set of matchers are implemented. You can also check out the tips below. +## PredicateResult + +`PredicateResult` is the return struct that `Predicate` return to indicate +success and failure. A `PredicateResult` is made up of two values: +`PredicateStatus` and `ExpectationMessage`. + +Instead of a boolean, `PredicateStatus` captures a trinary set of values: + +```swift +// Swift + +public enum PredicateStatus { +// The predicate "passes" with the given expression +// eg - expect(1).to(equal(1)) +case matches + +// The predicate "fails" with the given expression +// eg - expect(1).toNot(equal(1)) +case doesNotMatch + +// The predicate never "passes" with the given expression, even if negated +// eg - expect(nil as Int?).toNot(equal(1)) +case fail + +// ... +} +``` + +Meanwhile, `ExpectationMessage` provides messaging semantics for error reporting. + +```swift +// Swift + +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// ... +} +``` + +Predicates should usually depend on either `.expectedActualValueTo(..)` or +`.fail(..)` when reporting errors. Special cases can be used for the other enum +cases. + +Finally, if your Predicate utilizes other Predicates, you can utilize +`.appended(details:)` and `.appended(message:)` methods to annotate an existing +error with more details. + +A common message to append is failing on nils. For that, `.appendedBeNilHint()` +can be used. + ## Lazy Evaluation `actualExpression` is a lazy, memoized closure around the value provided to the @@ -1103,22 +1381,24 @@ custom matchers should call `actualExpression.evaluate()`: ```swift // Swift -public func beNil() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" - return actualExpression.evaluate() == nil - } +public func beNil() -> Predicate { + // Predicate.simpleNilable(..) automatically generates ExpectationMessage for + // us based on the string we provide to it. Also, the 'Nilable' postfix indicates + // that this Predicate supports matching against nil actualExpressions, instead of + // always resulting in a PredicateStatus.fail result -- which is true for + // Predicate.simple(..) + return Predicate.simpleNilable("be nil") { actualExpression in + let actualValue = try actualExpression.evaluate() + return PredicateStatus(bool: actualValue == nil) + } } ``` -In the above example, `actualExpression` is not `nil`--it is a closure +In the above example, `actualExpression` is not `nil` -- it is a closure that returns a value. The value it returns, which is accessed via the `evaluate()` method, may be `nil`. If that value is `nil`, the `beNil` matcher function returns `true`, indicating that the expectation passed. -Use `expression.isClosure` to determine if the expression will be invoking -a closure to produce its value. - ## Type Checking via Swift Generics Using Swift's generics, matchers can constrain the type of the actual value @@ -1131,43 +1411,108 @@ against the one provided to the matcher function, and passes if they are the sam ```swift // Swift -public func haveDescription(description: String) -> MatcherFunc { - return MatcherFunc { actual, failureMessage in - return actual.evaluate().description == description +public func haveDescription(description: String) -> Predicate { + return Predicate.simple("have description") { actual in + return PredicateStatus(bool: actual.evaluate().description == description) } } ``` ## Customizing Failure Messages -By default, Nimble outputs the following failure message when an -expectation fails: +When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble +outputs the following failure message when an expectation fails: +```swift +// where `message` is the first string argument and +// `actual` is the actual value received in `expect(..)` +"expected to \(message), got <\(actual)>" ``` -expected to match, got <\(actual)> -``` -You can customize this message by modifying the `failureMessage` struct -from within your `MatcherFunc` closure. To change the verb "match" to -something else, update the `postfixMessage` property: +You can customize this message by modifying the way you create a `Predicate`. + +### Basic Customization + +For slightly more complex error messaging, receive the created failure message +with `Predicate.define(..)`: ```swift // Swift -// Outputs: expected to be under the sea, got <\(actual)> -failureMessage.postfixMessage = "be under the sea" +public func equal(_ expectedValue: T?) -> Predicate { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in + let actualValue = try actualExpression.evaluate() + let matches = actualValue == expectedValue && expectedValue != nil + if expectedValue == nil || actualValue == nil { + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) + } + return PredicateResult(status: .fail, message: msg) + } + return PredicateResult(bool: matches, message: msg) + } +} ``` -You can change how the `actual` value is displayed by updating -`failureMessage.actualValue`. Or, to remove it altogether, set it to -`nil`: +In the example above, `msg` is defined based on the string given to +`Predicate.define`. The code looks akin to: ```swift // Swift -// Outputs: expected to be under the sea -failureMessage.actualValue = nil -failureMessage.postfixMessage = "be under the sea" +let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedValue))>") +``` + +### Full Customization + +To fully customize the behavior of the Predicate, use the overload that expects +a `PredicateResult` to be returned. + +Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: + +```swift +public indirect enum ExpectationMessage { +// Emits standard error message: +// eg - "expected to , got " +case expectedActualValueTo(/* message: */ String) + +// Allows any free-form message +// eg - "" +case fail(/* message: */ String) + +// Emits standard error message with a custom actual value instead of the default. +// eg - "expected to , got " +case expectedCustomValueTo(/* message: */ String, /* actual: */ String) + +// Emits standard error message without mentioning the actual value +// eg - "expected to " +case expectedTo(/* message: */ String, /* actual: */ String) + +// ... +} +``` + +For matchers that compose other matchers, there are a handful of helper +functions to annotate messages. + +`appended(message: String)` is used to append to the original failure message: + +```swift +// produces "expected to be true, got (use beFalse() for inverse)" +// appended message do show up inline in Xcode. +.expectedActualValueTo("be true").appended(message: " (use beFalse() for inverse)") +``` + +For a more comprehensive message that spans multiple lines, use +`appended(details: String)` instead: + +```swift +// produces "expected to be true, got \n\nuse beFalse() for inverse\nor use beNil()" +// details do not show inline in Xcode, but do show up in test logs. +.expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") ``` ## Supporting Objective-C @@ -1256,6 +1601,85 @@ extension NMBObjCMatcher { } ``` +## Migrating from the Old Matcher API + +Previously (`<7.0.0`), Nimble supported matchers via the following types: + +- `Matcher` +- `NonNilMatcherFunc` +- `MatcherFunc` + +All of those types have been replaced by `Predicate`. While migrating can be a +lot of work, Nimble currently provides several steps to aid migration of your +custom matchers: + +### Minimal Step - Use `.predicate` + +Nimble provides an extension to the old types that automatically naively +converts those types to the newer `Predicate`. + +```swift +// Swift +public func beginWith(startingElement: T) -> Predicate { + return NonNilMatcherFunc { actualExpression, failureMessage in + failureMessage.postfixMessage = "begin with <\(startingElement)>" + if let actualValue = actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return actualGenerator.next() == startingElement + } + return false + }.predicate +} +``` + +This is the simpliest way to externally support `Predicate` which allows easier +composition than the old Nimble matcher interface, with minimal effort to change. + +### Convert to use `Predicate` Type with Old Matcher Constructor + +The second most convenient step is to utilize special constructors that +`Predicate` supports that closely align to the constructors of the old Nimble +matcher types. + +```swift +// Swift +public func beginWith(startingElement: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.postfixMessage = "begin with <\(startingElement)>" + if let actualValue = actualExpression.evaluate() { + var actualGenerator = actualValue.makeIterator() + return actualGenerator.next() == startingElement + } + return false + } +} +``` + +This allows you to completely drop the old types from your code, although the +intended behavior may alter slightly to what is desired. + +### Convert to `Predicate` Type with Preferred Constructor + +Finally, you can convert to the native `Predicate` format using one of the +constructors not used to assist in the migration. + +### Deprecation Roadmap + +Nimble 7 introduces `Predicate` but will support the old types with warning +deprecations. A couple major releases of Nimble will remain backwards +compatible with the old matcher api, although new features may not be +backported. + +The deprecating plan is a 3 major versions removal. Which is as follows: + + 1. Introduce new `Predicate` API, deprecation warning for old matcher APIs. + (Nimble `v7.x.x`) + 2. Introduce warnings on migration-path features (`.predicate`, + `Predicate`-constructors with similar arguments to old API). (Nimble + `v8.x.x`) + 3. Remove old API. (Nimble `v9.x.x`) + + # Installing Nimble > Nimble can be used on its own, or in conjunction with its sister @@ -1296,7 +1720,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do use_frameworks! - pod 'Nimble', '~> 5.0.0' + pod 'Nimble', '~> 6.0.0' end ``` diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h deleted file mode 100644 index 6ec6a29..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h +++ /dev/null @@ -1,30 +0,0 @@ -// -// CwlCatchException.h -// CwlCatchException -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import - -//! Project version number for CwlCatchException. -FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; - -//! Project version string for CwlCatchException. -FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; - -__attribute__((visibility("hidden"))) -NSException* __nullable catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()); diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m deleted file mode 100644 index 4f9772c..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m +++ /dev/null @@ -1,35 +0,0 @@ -// -// CwlCatchException.m -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#import "CwlCatchException.h" - -__attribute__((visibility("hidden"))) -NSException* catchExceptionOfKind(Class __nonnull type, __attribute__((noescape)) void (^ __nonnull inBlock)()) { - @try { - inBlock(); - } @catch (NSException *exception) { - if ([exception isKindOfClass:type]) { - return exception; - } else { - @throw; - } - } - return nil; -} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift deleted file mode 100644 index b44a232..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift +++ /dev/null @@ -1,32 +0,0 @@ -// -// CwlCatchException.swift -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -// We can't simply cast to Self? in the catchInBlock method so we need this generic function wrapper to do the conversion for us. Mildly annoying. -private func catchReturnTypeConverter(_ type: T.Type, block: () -> Void) -> T? { - return catchExceptionOfKind(type, block) as? T -} - -extension NSException { - public static func catchException(in block: () -> Void) -> Self? { - return catchReturnTypeConverter(self, block: block) - } -} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift deleted file mode 100644 index 2fa67c9..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift +++ /dev/null @@ -1,76 +0,0 @@ -// -// CwlBadInstructionException.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -private func raiseBadInstructionException() { - BadInstructionException().raise() -} - -/// A simple NSException subclass. It's not required to subclass NSException (since the exception type is represented in the name) but this helps for identifying the exception through runtime type. -@objc public class BadInstructionException: NSException { - static var name: String = "com.cocoawithlove.BadInstruction" - - init() { - super.init(name: NSExceptionName(rawValue: BadInstructionException.name), reason: nil, userInfo: nil) - } - - required public init?(coder aDecoder: NSCoder) { - super.init(coder: aDecoder) - } - - /// An Objective-C callable function, invoked from the `mach_exc_server` callback function `catch_mach_exception_raise_state` to push the `raiseBadInstructionException` function onto the stack. - public class func catch_mach_exception_raise_state(_ exception_port: mach_port_t, exception: exception_type_t, code: UnsafePointer, codeCnt: mach_msg_type_number_t, flavor: UnsafeMutablePointer, old_state: UnsafePointer, old_stateCnt: mach_msg_type_number_t, new_state: thread_state_t, new_stateCnt: UnsafeMutablePointer) -> kern_return_t { - - #if arch(x86_64) - // Make sure we've been given enough memory - if old_stateCnt != x86_THREAD_STATE64_COUNT || new_stateCnt.pointee < x86_THREAD_STATE64_COUNT { - return KERN_INVALID_ARGUMENT - } - - // Read the old thread state - var state = old_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { return $0.pointee } - - // 1. Decrement the stack pointer - state.__rsp -= __uint64_t(MemoryLayout.size) - - // 2. Save the old Instruction Pointer to the stack. - if let pointer = UnsafeMutablePointer<__uint64_t>(bitPattern: UInt(state.__rsp)) { - pointer.pointee = state.__rip - } else { - return KERN_INVALID_ARGUMENT - } - - // 3. Set the Instruction Pointer to the new function's address - var f: @convention(c) () -> Void = raiseBadInstructionException - withUnsafePointer(to: &f) { - state.__rip = $0.withMemoryRebound(to: __uint64_t.self, capacity: 1) { return $0.pointee } - } - - // Write the new thread state - new_state.withMemoryRebound(to: x86_thread_state64_t.self, capacity: 1) { $0.pointee = state } - new_stateCnt.pointee = x86_THREAD_STATE64_COUNT - - return KERN_SUCCESS - #else - fatalError("Unavailable for this CPU architecture") - #endif - } -} diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h deleted file mode 100644 index 0333ed2..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h +++ /dev/null @@ -1,61 +0,0 @@ -// -// CwlCatchBadInstruction.h -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if defined(__x86_64__) - -#import -#import - -NS_ASSUME_NONNULL_BEGIN - -// The request_mach_exception_raise_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; -} request_mach_exception_raise_t; - -// The reply_mach_exception_raise_state_t struct is passed to mach_msg which assumes its exact layout. To avoid problems with different layouts, we keep the definition in C rather than Swift. -typedef struct -{ - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; -} reply_mach_exception_raise_state_t; - -extern boolean_t mach_exc_server(mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -NS_ASSUME_NONNULL_END - -#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m deleted file mode 100644 index 22c1377..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m +++ /dev/null @@ -1,50 +0,0 @@ -// -// CwlCatchBadInstruction.m -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -#if defined(__x86_64__) - -#import "CwlCatchBadInstruction.h" - -// Assuming the "PRODUCT_NAME" macro is defined, this will create the name of the Swift generated header file -#define STRINGIZE_NO_EXPANSION(A) #A -#define STRINGIZE_WITH_EXPANSION(A) STRINGIZE_NO_EXPANSION(A) -#define SWIFT_INCLUDE STRINGIZE_WITH_EXPANSION(PRODUCT_NAME-Swift.h) - -// Include the Swift generated header file -#import SWIFT_INCLUDE - -/// A basic function that receives callbacks from mach_exc_server and relays them to the Swift implemented BadInstructionException.catch_mach_exception_raise_state. -kern_return_t catch_mach_exception_raise_state(mach_port_t exception_port, exception_type_t exception, const mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, const thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - return [BadInstructionException catch_mach_exception_raise_state:exception_port exception:exception code:code codeCnt:codeCnt flavor:flavor old_state:old_state old_stateCnt:old_stateCnt new_state:new_state new_stateCnt:new_stateCnt]; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt) { - assert(false); - return KERN_FAILURE; -} - -// The mach port should be configured so that this function is never used. -kern_return_t catch_mach_exception_raise_state_identity(mach_port_t exception_port, mach_port_t thread, mach_port_t task, exception_type_t exception, mach_exception_data_t code, mach_msg_type_number_t codeCnt, int *flavor, thread_state_t old_state, mach_msg_type_number_t old_stateCnt, thread_state_t new_state, mach_msg_type_number_t *new_stateCnt) { - assert(false); - return KERN_FAILURE; -} - -#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift deleted file mode 100644 index ab460b3..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift +++ /dev/null @@ -1,194 +0,0 @@ -// -// CwlCatchBadInstruction.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Foundation - -#if arch(x86_64) - - private enum PthreadError: Error { case code(Int32) } - private enum MachExcServer: Error { case code(kern_return_t) } - - /// A quick function for converting Mach error results into Swift errors - private func kernCheck(_ f: () -> Int32) throws { - let r = f() - guard r == KERN_SUCCESS else { - throw NSError(domain: NSMachErrorDomain, code: Int(r), userInfo: nil) - } - } - - extension execTypesCountTuple { - mutating func pointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: T.self, capacity: EXC_TYPES_COUNT) { ptr -> R in - return block(ptr) - } - } - } - } - - extension request_mach_exception_raise_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } - } - - extension reply_mach_exception_raise_state_t { - mutating func withMsgHeaderPointer(in block: (UnsafeMutablePointer) -> R) -> R { - return withUnsafeMutablePointer(to: &self) { p -> R in - return p.withMemoryRebound(to: mach_msg_header_t.self, capacity: 1) { ptr -> R in - return block(ptr) - } - } - } - } - - /// A structure used to store context associated with the Mach message port - private struct MachContext { - var masks = execTypesCountTuple() - var count: mach_msg_type_number_t = 0 - var ports = execTypesCountTuple() - var behaviors = execTypesCountTuple() - var flavors = execTypesCountTuple() - var currentExceptionPort: mach_port_t = 0 - var handlerThread: pthread_t? = nil - - mutating func withUnsafeMutablePointers(in block: (UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer, UnsafeMutablePointer) -> R) -> R { - return masks.pointer { masksPtr in - return ports.pointer { portsPtr in - return behaviors.pointer { behaviorsPtr in - return flavors.pointer { flavorsPtr in - return block(masksPtr, portsPtr, behaviorsPtr, flavorsPtr) - } - } - } - } - } - } - - /// A function for receiving mach messages and parsing the first with mach_exc_server (and if any others are received, throwing them away). - private func machMessageHandler(_ arg: UnsafeMutableRawPointer) -> UnsafeMutableRawPointer? { - let context = arg.assumingMemoryBound(to: MachContext.self).pointee - var request = request_mach_exception_raise_t() - var reply = reply_mach_exception_raise_state_t() - - var handledfirstException = false - repeat { do { - // Request the next mach message from the port - request.Head.msgh_local_port = context.currentExceptionPort - request.Head.msgh_size = UInt32(MemoryLayout.size) - try kernCheck { request.withMsgHeaderPointer { requestPtr in - mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, request.Head.msgh_size, context.currentExceptionPort, 0, UInt32(MACH_PORT_NULL)) - } } - - // Prepare the reply structure - reply.Head.msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REMOTE(request.Head.msgh_bits), 0) - reply.Head.msgh_local_port = UInt32(MACH_PORT_NULL) - reply.Head.msgh_remote_port = request.Head.msgh_remote_port - reply.Head.msgh_size = UInt32(MemoryLayout.size) - reply.NDR = NDR_record - - if !handledfirstException { - // Use the MiG generated server to invoke our handler for the request and fill in the rest of the reply structure - guard request.withMsgHeaderPointer(in: { requestPtr in reply.withMsgHeaderPointer { replyPtr in - mach_exc_server(requestPtr, replyPtr) - } }) != 0 else { throw MachExcServer.code(reply.RetCode) } - - handledfirstException = true - } else { - // If multiple fatal errors occur, don't handle subsquent errors (let the program crash) - reply.RetCode = KERN_FAILURE - } - - // Send the reply - try kernCheck { reply.withMsgHeaderPointer { replyPtr in - mach_msg(replyPtr, MACH_SEND_MSG, reply.Head.msgh_size, 0, UInt32(MACH_PORT_NULL), 0, UInt32(MACH_PORT_NULL)) - } } - } catch let error as NSError where (error.domain == NSMachErrorDomain && (error.code == Int(MACH_RCV_PORT_CHANGED) || error.code == Int(MACH_RCV_INVALID_NAME))) { - // Port was already closed before we started or closed while we were listening. - // This means the controlling thread shut down. - return nil - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach message error: \(error)") - } } while true - } - - /// Run the provided block. If a mach "BAD_INSTRUCTION" exception is raised, catch it and return a BadInstructionException (which captures stack information about the throw site, if desired). Otherwise return nil. - /// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a "BAD_INSTRUCTION" exception is raised, the block will be exited before completion via Objective-C exception. The risks associated with an Objective-C exception apply here: most Swift/Objective-C functions are *not* exception-safe. Memory may be leaked and the program will not necessarily be left in a safe state. - /// - parameter block: a function without parameters that will be run - /// - returns: if an EXC_BAD_INSTRUCTION is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. - public func catchBadInstruction(in block: () -> Void) -> BadInstructionException? { - var context = MachContext() - var result: BadInstructionException? = nil - do { - var handlerThread: pthread_t? = nil - defer { - // 8. Wait for the thread to terminate *if* we actually made it to the creation point - // The mach port should be destroyed *before* calling pthread_join to avoid a deadlock. - if handlerThread != nil { - pthread_join(handlerThread!, nil) - } - } - - try kernCheck { - // 1. Create the mach port - mach_port_allocate(mach_task_self_, MACH_PORT_RIGHT_RECEIVE, &context.currentExceptionPort) - } - defer { - // 7. Cleanup the mach port - mach_port_destroy(mach_task_self_, context.currentExceptionPort) - } - - try kernCheck { - // 2. Configure the mach port - mach_port_insert_right(mach_task_self_, context.currentExceptionPort, context.currentExceptionPort, MACH_MSG_TYPE_MAKE_SEND) - } - - try kernCheck { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 3. Apply the mach port as the handler for this thread - thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, context.currentExceptionPort, Int32(bitPattern: UInt32(EXCEPTION_STATE) | MACH_EXCEPTION_CODES), x86_THREAD_STATE64, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) - } } - - defer { context.withUnsafeMutablePointers { masksPtr, portsPtr, behaviorsPtr, flavorsPtr in - // 6. Unapply the mach port - _ = thread_swap_exception_ports(mach_thread_self(), EXC_MASK_BAD_INSTRUCTION, 0, EXCEPTION_DEFAULT, THREAD_STATE_NONE, masksPtr, &context.count, portsPtr, behaviorsPtr, flavorsPtr) - } } - - try withUnsafeMutablePointer(to: &context) { c throws in - // 4. Create the thread - let e = pthread_create(&handlerThread, nil, machMessageHandler, c) - guard e == 0 else { throw PthreadError.code(e) } - - // 5. Run the block - result = BadInstructionException.catchException(in: block) - } - } catch { - // Should never be reached but this is testing code, don't try to recover, just abort - fatalError("Mach port error: \(error)") - } - return result - } - -#endif - diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift deleted file mode 100644 index 12a6b9f..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift +++ /dev/null @@ -1,63 +0,0 @@ -// -// CwlDarwinDefinitions.swift -// CwlPreconditionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( http://cocoawithlove.com ). All rights reserved. -// -// Permission to use, copy, modify, and/or distribute this software for any -// purpose with or without fee is hereby granted, provided that the above -// copyright notice and this permission notice appear in all copies. -// -// THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES -// WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF -// MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY -// SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES -// WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN -// ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR -// IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. -// - -import Darwin - -#if arch(x86_64) - -// From /usr/include/mach/port.h -// #define MACH_PORT_RIGHT_RECEIVE ((mach_port_right_t) 1) -let MACH_PORT_RIGHT_RECEIVE: mach_port_right_t = 1 - -// From /usr/include/mach/message.h -// #define MACH_MSG_TYPE_MAKE_SEND 20 /* Must hold receive right */ -// #define MACH_MSGH_BITS_REMOTE(bits) \ -// ((bits) & MACH_MSGH_BITS_REMOTE_MASK) -// #define MACH_MSGH_BITS(remote, local) /* legacy */ \ -// ((remote) | ((local) << 8)) -let MACH_MSG_TYPE_MAKE_SEND: UInt32 = 20 -func MACH_MSGH_BITS_REMOTE(_ bits: UInt32) -> UInt32 { return bits & UInt32(MACH_MSGH_BITS_REMOTE_MASK) } -func MACH_MSGH_BITS(_ remote: UInt32, _ local: UInt32) -> UInt32 { return ((remote) | ((local) << 8)) } - -// From /usr/include/mach/exception_types.h -// #define EXC_BAD_INSTRUCTION 2 /* Instruction failed */ -// #define EXC_MASK_BAD_INSTRUCTION (1 << EXC_BAD_INSTRUCTION) -// #define EXCEPTION_DEFAULT 1 -let EXC_BAD_INSTRUCTION: UInt32 = 2 -let EXC_MASK_BAD_INSTRUCTION: UInt32 = 1 << EXC_BAD_INSTRUCTION -let EXCEPTION_DEFAULT: Int32 = 1 - -// From /usr/include/mach/i386/thread_status.h -// #define THREAD_STATE_NONE 13 -// #define x86_THREAD_STATE64_COUNT ((mach_msg_type_number_t) \ -// ( sizeof (x86_thread_state64_t) / sizeof (int) )) -let THREAD_STATE_NONE: Int32 = 13 -let x86_THREAD_STATE64_COUNT = UInt32(MemoryLayout.size / MemoryLayout.size) - -let EXC_TYPES_COUNT = 14 -struct execTypesCountTuple { - // From /usr/include/mach/i386/exception.h - // #define EXC_TYPES_COUNT 14 /* incl. illegal exception 0 */ - var value: (T,T,T,T,T,T,T,T,T,T,T,T,T,T) = (0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0) - init() { - } -} - -#endif diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c deleted file mode 100644 index 2334538..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c +++ /dev/null @@ -1,537 +0,0 @@ -/* - * IDENTIFICATION: - * stub generated Mon Jan 11 00:24:26 2016 - * with a MiG generated by bootstrap_cmds-93 - * OPTIONS: - */ - -/* Module mach_exc */ - -#if defined(__x86_64__) - -#define __MIG_check__Request__mach_exc_subsystem__ 1 - -#include "mach_excServer.h" - -#ifndef mig_internal -#define mig_internal static __inline__ -#endif /* mig_internal */ - -#ifndef mig_external -#define mig_external -#endif /* mig_external */ - -#if !defined(__MigTypeCheck) && defined(TypeCheck) -#define __MigTypeCheck TypeCheck /* Legacy setting */ -#endif /* !defined(__MigTypeCheck) */ - -#if !defined(__MigKernelSpecificCode) && defined(_MIG_KERNEL_SPECIFIC_CODE_) -#define __MigKernelSpecificCode _MIG_KERNEL_SPECIFIC_CODE_ /* Legacy setting */ -#endif /* !defined(__MigKernelSpecificCode) */ - -#ifndef LimitCheck -#define LimitCheck 0 -#endif /* LimitCheck */ - -#ifndef min -#define min(a,b) ( ((a) < (b))? (a): (b) ) -#endif /* min */ - -#if !defined(_WALIGN_) -#define _WALIGN_(x) (((x) + 3) & ~3) -#endif /* !defined(_WALIGN_) */ - -#if !defined(_WALIGNSZ_) -#define _WALIGNSZ_(x) _WALIGN_(sizeof(x)) -#endif /* !defined(_WALIGNSZ_) */ - -#ifndef UseStaticTemplates -#define UseStaticTemplates 0 -#endif /* UseStaticTemplates */ - -#ifndef __DeclareRcvRpc -#define __DeclareRcvRpc(_NUM_, _NAME_) -#endif /* __DeclareRcvRpc */ - -#ifndef __BeforeRcvRpc -#define __BeforeRcvRpc(_NUM_, _NAME_) -#endif /* __BeforeRcvRpc */ - -#ifndef __AfterRcvRpc -#define __AfterRcvRpc(_NUM_, _NAME_) -#endif /* __AfterRcvRpc */ - -#ifndef __DeclareRcvSimple -#define __DeclareRcvSimple(_NUM_, _NAME_) -#endif /* __DeclareRcvSimple */ - -#ifndef __BeforeRcvSimple -#define __BeforeRcvSimple(_NUM_, _NAME_) -#endif /* __BeforeRcvSimple */ - -#ifndef __AfterRcvSimple -#define __AfterRcvSimple(_NUM_, _NAME_) -#endif /* __AfterRcvSimple */ - -#define novalue void - -#define msgh_request_port msgh_local_port -#define MACH_MSGH_BITS_REQUEST(bits) MACH_MSGH_BITS_LOCAL(bits) -#define msgh_reply_port msgh_remote_port -#define MACH_MSGH_BITS_REPLY(bits) MACH_MSGH_BITS_REMOTE(bits) - -#define MIG_RETURN_ERROR(X, code) {\ - ((mig_reply_error_t *)X)->RetCode = code;\ - ((mig_reply_error_t *)X)->NDR = NDR_record;\ - return;\ - } - -/* Forward Declarations */ - - -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP); - - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_t__defined) -#define __MIG_check__Request__mach_exception_raise_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_t(__attribute__((__unused__)) __Request__mach_exception_raise_t *In0P) -{ - - typedef __Request__mach_exception_raise_t __Request; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 16)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_t__codeCnt__defined */ -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 16)) / 8 < In0P->codeCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 16) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise */ -mig_internal novalue _Xmach_exception_raise - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_t __Request; - typedef __Reply__mach_exception_raise_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_t__defined */ - - __DeclareRcvRpc(2405, "mach_exception_raise") - __BeforeRcvRpc(2405, "mach_exception_raise") - -#if defined(__MIG_check__Request__mach_exception_raise_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_t((__Request *)In0P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_t__defined) */ - - OutP->RetCode = catch_mach_exception_raise(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt); - - OutP->NDR = NDR_record; - - - __AfterRcvRpc(2405, "mach_exception_raise") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if ((In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state */ -mig_internal novalue _Xmach_exception_raise_state - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_t __Request; - typedef __Reply__mach_exception_raise_state_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_t__defined */ - - __DeclareRcvRpc(2406, "mach_exception_raise_state") - __BeforeRcvRpc(2406, "mach_exception_raise_state") - -#if defined(__MIG_check__Request__mach_exception_raise_state_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state(In0P->Head.msgh_request_port, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2406, "mach_exception_raise_state") -} - -#if ( __MigTypeCheck ) -#if __MIG_check__Request__mach_exc_subsystem__ -#if !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) -#define __MIG_check__Request__mach_exception_raise_state_identity_t__defined - -mig_internal kern_return_t __MIG_check__Request__mach_exception_raise_state_identity_t(__attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t *In0P, __attribute__((__unused__)) __Request__mach_exception_raise_state_identity_t **In1PP) -{ - - typedef __Request__mach_exception_raise_state_identity_t __Request; - __Request *In1P; -#if __MigTypeCheck - unsigned int msgh_size; -#endif /* __MigTypeCheck */ - unsigned int msgh_size_delta; - -#if __MigTypeCheck - msgh_size = In0P->Head.msgh_size; - if (!(In0P->Head.msgh_bits & MACH_MSGH_BITS_COMPLEX) || - (In0P->msgh_body.msgh_descriptor_count != 2) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912)) || (msgh_size > (mach_msg_size_t)sizeof(__Request))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->thread.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->thread.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if __MigTypeCheck - if (In0P->task.type != MACH_MSG_PORT_DESCRIPTOR || - In0P->task.disposition != 17) - return MIG_TYPE_ERROR; -#endif /* __MigTypeCheck */ - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt(&In0P->codeCnt, In0P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__codeCnt__defined */ - msgh_size_delta = (8 * In0P->codeCnt); -#if __MigTypeCheck - if ( In0P->codeCnt > 2 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 8 < In0P->codeCnt) || - (msgh_size < (mach_msg_size_t)(sizeof(__Request) - 912) + (8 * In0P->codeCnt))) - return MIG_BAD_ARGUMENTS; - msgh_size -= msgh_size_delta; -#endif /* __MigTypeCheck */ - - *In1PP = In1P = (__Request *) ((pointer_t) In0P + msgh_size_delta - 16); - -#if defined(__NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined) - if (In0P->NDR.int_rep != NDR_record.int_rep) - __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt(&In1P->old_stateCnt, In1P->NDR.int_rep); -#endif /* __NDR_convert__int_rep__Request__mach_exception_raise_state_identity_t__old_stateCnt__defined */ -#if __MigTypeCheck - if ( In1P->old_stateCnt > 224 ) - return MIG_BAD_ARGUMENTS; - if (((msgh_size - (mach_msg_size_t)(sizeof(__Request) - 912)) / 4 < In1P->old_stateCnt) || - (msgh_size != (mach_msg_size_t)(sizeof(__Request) - 912) + (4 * In1P->old_stateCnt))) - return MIG_BAD_ARGUMENTS; -#endif /* __MigTypeCheck */ - - return MACH_MSG_SUCCESS; -} -#endif /* !defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ -#endif /* __MIG_check__Request__mach_exc_subsystem__ */ -#endif /* ( __MigTypeCheck ) */ - - -/* Routine mach_exception_raise_state_identity */ -mig_internal novalue _Xmach_exception_raise_state_identity - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - mach_msg_trailer_t trailer; - } Request __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - typedef __Request__mach_exception_raise_state_identity_t __Request; - typedef __Reply__mach_exception_raise_state_identity_t Reply __attribute__((unused)); - - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - Request *In0P = (Request *) InHeadP; - Request *In1P; - Reply *OutP = (Reply *) OutHeadP; -#ifdef __MIG_check__Request__mach_exception_raise_state_identity_t__defined - kern_return_t check_result; -#endif /* __MIG_check__Request__mach_exception_raise_state_identity_t__defined */ - - __DeclareRcvRpc(2407, "mach_exception_raise_state_identity") - __BeforeRcvRpc(2407, "mach_exception_raise_state_identity") - -#if defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) - check_result = __MIG_check__Request__mach_exception_raise_state_identity_t((__Request *)In0P, (__Request **)&In1P); - if (check_result != MACH_MSG_SUCCESS) - { MIG_RETURN_ERROR(OutP, check_result); } -#endif /* defined(__MIG_check__Request__mach_exception_raise_state_identity_t__defined) */ - - OutP->new_stateCnt = 224; - - OutP->RetCode = catch_mach_exception_raise_state_identity(In0P->Head.msgh_request_port, In0P->thread.name, In0P->task.name, In0P->exception, In0P->code, In0P->codeCnt, &In1P->flavor, In1P->old_state, In1P->old_stateCnt, OutP->new_state, &OutP->new_stateCnt); - if (OutP->RetCode != KERN_SUCCESS) { - MIG_RETURN_ERROR(OutP, OutP->RetCode); - } - - OutP->NDR = NDR_record; - - - OutP->flavor = In1P->flavor; - OutP->Head.msgh_size = (mach_msg_size_t)(sizeof(Reply) - 896) + (((4 * OutP->new_stateCnt))); - - __AfterRcvRpc(2407, "mach_exception_raise_state_identity") -} - - - -/* Description of this subsystem, for use in direct RPC */ -const struct catch_mach_exc_subsystem catch_mach_exc_subsystem = { - mach_exc_server_routine, - 2405, - 2408, - (mach_msg_size_t)sizeof(union __ReplyUnion__catch_mach_exc_subsystem), - (vm_address_t)0, - { - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise, 6, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state, 9, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_t)}, - { (mig_impl_routine_t) 0, - (mig_stub_routine_t) _Xmach_exception_raise_state_identity, 11, 0, (routine_arg_descriptor_t)0, (mach_msg_size_t)sizeof(__Reply__mach_exception_raise_state_identity_t)}, - } -}; - -mig_external boolean_t mach_exc_server - (mach_msg_header_t *InHeadP, mach_msg_header_t *OutHeadP) -{ - /* - * typedef struct { - * mach_msg_header_t Head; - * NDR_record_t NDR; - * kern_return_t RetCode; - * } mig_reply_error_t; - */ - - register mig_routine_t routine; - - OutHeadP->msgh_bits = MACH_MSGH_BITS(MACH_MSGH_BITS_REPLY(InHeadP->msgh_bits), 0); - OutHeadP->msgh_remote_port = InHeadP->msgh_reply_port; - /* Minimal size: routine() will update it if different */ - OutHeadP->msgh_size = (mach_msg_size_t)sizeof(mig_reply_error_t); - OutHeadP->msgh_local_port = MACH_PORT_NULL; - OutHeadP->msgh_id = InHeadP->msgh_id + 100; - - if ((InHeadP->msgh_id > 2407) || (InHeadP->msgh_id < 2405) || - ((routine = catch_mach_exc_subsystem.routine[InHeadP->msgh_id - 2405].stub_routine) == 0)) { - ((mig_reply_error_t *)OutHeadP)->NDR = NDR_record; - ((mig_reply_error_t *)OutHeadP)->RetCode = MIG_BAD_ID; - return FALSE; - } - (*routine) (InHeadP, OutHeadP); - return TRUE; -} - -mig_external mig_routine_t mach_exc_server_routine - (mach_msg_header_t *InHeadP) -{ - register int msgh_id; - - msgh_id = InHeadP->msgh_id - 2405; - - if ((msgh_id > 2) || (msgh_id < 0)) - return 0; - - return catch_mach_exc_subsystem.routine[msgh_id].stub_routine; -} - -#endif - diff --git a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h b/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h deleted file mode 100644 index 766ba11..0000000 --- a/Pods/Nimble/Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h +++ /dev/null @@ -1,298 +0,0 @@ -#ifndef _mach_exc_server_ -#define _mach_exc_server_ - -/* Module mach_exc */ - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -/* BEGIN VOUCHER CODE */ - -#ifndef KERNEL -#if defined(__has_include) -#if __has_include() -#ifndef USING_VOUCHERS -#define USING_VOUCHERS -#endif -#ifndef __VOUCHER_FORWARD_TYPE_DECLS__ -#define __VOUCHER_FORWARD_TYPE_DECLS__ -#ifdef __cplusplus -extern "C" { -#endif - extern boolean_t voucher_mach_msg_set(mach_msg_header_t *msg) __attribute__((weak_import)); -#ifdef __cplusplus -} -#endif -#endif // __VOUCHER_FORWARD_TYPE_DECLS__ -#endif // __has_include() -#endif // __has_include -#endif // !KERNEL - -/* END VOUCHER CODE */ - - -#ifdef AUTOTEST -#ifndef FUNCTION_PTR_T -#define FUNCTION_PTR_T -typedef void (*function_ptr_t)(mach_port_t, char *, mach_msg_type_number_t); -typedef struct { - char *name; - function_ptr_t function; -} function_table_entry; -typedef function_table_entry *function_table_t; -#endif /* FUNCTION_PTR_T */ -#endif /* AUTOTEST */ - -#ifndef mach_exc_MSG_COUNT -#define mach_exc_MSG_COUNT 3 -#endif /* mach_exc_MSG_COUNT */ - -#include -#include -#include -#include - -#ifdef __BeforeMigServerHeader -__BeforeMigServerHeader -#endif /* __BeforeMigServerHeader */ - - -/* Routine mach_exception_raise */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt -); - -/* Routine mach_exception_raise_state */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state -( - mach_port_t exception_port, - exception_type_t exception, - const mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - const thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -/* Routine mach_exception_raise_state_identity */ -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -kern_return_t catch_mach_exception_raise_state_identity -( - mach_port_t exception_port, - mach_port_t thread, - mach_port_t task, - exception_type_t exception, - mach_exception_data_t code, - mach_msg_type_number_t codeCnt, - int *flavor, - thread_state_t old_state, - mach_msg_type_number_t old_stateCnt, - thread_state_t new_state, - mach_msg_type_number_t *new_stateCnt -); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -boolean_t mach_exc_server( - mach_msg_header_t *InHeadP, - mach_msg_header_t *OutHeadP); - -#ifdef mig_external -mig_external -#else -extern -#endif /* mig_external */ -mig_routine_t mach_exc_server_routine( - mach_msg_header_t *InHeadP); - - -/* Description of this subsystem, for use in direct RPC */ -extern const struct catch_mach_exc_subsystem { - mig_server_routine_t server; /* Server routine */ - mach_msg_id_t start; /* Min routine number */ - mach_msg_id_t end; /* Max routine number + 1 */ - unsigned int maxsize; /* Max msg size */ - vm_address_t reserved; /* Reserved */ - struct routine_descriptor /*Array of routine descriptors */ - routine[3]; -} catch_mach_exc_subsystem; - -/* typedefs for all requests */ - -#ifndef __Request__mach_exc_subsystem__defined -#define __Request__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - } __Request__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - /* start of the kernel processed data */ - mach_msg_body_t msgh_body; - mach_msg_port_descriptor_t thread; - mach_msg_port_descriptor_t task; - /* end of the kernel processed data */ - NDR_record_t NDR; - exception_type_t exception; - mach_msg_type_number_t codeCnt; - int64_t code[2]; - int flavor; - mach_msg_type_number_t old_stateCnt; - natural_t old_state[224]; - } __Request__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Request__mach_exc_subsystem__defined */ - - -/* union of all requests */ - -#ifndef __RequestUnion__catch_mach_exc_subsystem__defined -#define __RequestUnion__catch_mach_exc_subsystem__defined -union __RequestUnion__catch_mach_exc_subsystem { - __Request__mach_exception_raise_t Request_mach_exception_raise; - __Request__mach_exception_raise_state_t Request_mach_exception_raise_state; - __Request__mach_exception_raise_state_identity_t Request_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ -/* typedefs for all replies */ - -#ifndef __Reply__mach_exc_subsystem__defined -#define __Reply__mach_exc_subsystem__defined - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - } __Reply__mach_exception_raise_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif - -#ifdef __MigPackStructs -#pragma pack(4) -#endif - typedef struct { - mach_msg_header_t Head; - NDR_record_t NDR; - kern_return_t RetCode; - int flavor; - mach_msg_type_number_t new_stateCnt; - natural_t new_state[224]; - } __Reply__mach_exception_raise_state_identity_t __attribute__((unused)); -#ifdef __MigPackStructs -#pragma pack() -#endif -#endif /* !__Reply__mach_exc_subsystem__defined */ - - -/* union of all replies */ - -#ifndef __ReplyUnion__catch_mach_exc_subsystem__defined -#define __ReplyUnion__catch_mach_exc_subsystem__defined -union __ReplyUnion__catch_mach_exc_subsystem { - __Reply__mach_exception_raise_t Reply_mach_exception_raise; - __Reply__mach_exception_raise_state_t Reply_mach_exception_raise_state; - __Reply__mach_exception_raise_state_identity_t Reply_mach_exception_raise_state_identity; -}; -#endif /* __RequestUnion__catch_mach_exc_subsystem__defined */ - -#ifndef subsystem_to_name_map_mach_exc -#define subsystem_to_name_map_mach_exc \ - { "mach_exception_raise", 2405 },\ - { "mach_exception_raise_state", 2406 },\ - { "mach_exception_raise_state_identity", 2407 } -#endif - -#ifdef __AfterMigServerHeader -__AfterMigServerHeader -#endif /* __AfterMigServerHeader */ - -#endif /* _mach_exc_server_ */ diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift index 2e30f61..94a9030 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionDispatcher.swift @@ -1,4 +1,3 @@ - /// AssertionDispatcher allows multiple AssertionHandlers to receive /// assertion messages. /// diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift index 7d0bab2..740c392 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -22,7 +22,7 @@ public struct AssertionRecord: CustomStringConvertible { /// This is useful for testing failure messages for matchers. /// /// @see AssertionHandler -public class AssertionRecorder : AssertionHandler { +public class AssertionRecorder: AssertionHandler { /// All the assertions that were captured by this recorder public var assertions = [AssertionRecord]() @@ -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: @escaping () throws -> Void) { +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, closure: () throws -> Void) { let environment = NimbleEnvironment.activeInstance let oldRecorder = environment.assertionHandler let capturer = NMBExceptionCapture(handler: nil, finally: ({ diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift index 47d4eed..88d9406 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -1,8 +1,16 @@ import Foundation -#if _runtime(_ObjC) +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE -internal struct ObjCMatcherWrapper : Matcher { +private func from(objcPredicate: NMBPredicate) -> Predicate { + return Predicate { actualExpression in + let result = objcPredicate.satisfies(({ try! actualExpression.evaluate() }), + location: actualExpression.location) + return result.toSwift() + } +} + +internal struct ObjCMatcherWrapper: Matcher { let matcher: NMBMatcher func matches(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { @@ -21,14 +29,14 @@ internal struct ObjCMatcherWrapper : Matcher { } // Equivalent to Expectation, but for Nimble's Objective-C interface -public class NMBExpectation : NSObject { +public class NMBExpectation: NSObject { internal let _actualBlock: () -> NSObject! internal var _negative: Bool internal let _file: FileString internal let _line: UInt internal var _timeout: TimeInterval = 1.0 - public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { + @objc public init(actualBlock: @escaping () -> NSObject!, negative: Bool, file: FileString, line: UInt) { self._actualBlock = actualBlock self._negative = negative self._file = file @@ -36,94 +44,142 @@ public class NMBExpectation : NSObject { } private var expectValue: Expectation { - return expect(_file, line: _line){ + return expect(_file, line: _line) { self._actualBlock() as NSObject? } } - public var withTimeout: (TimeInterval) -> NMBExpectation { + @objc public var withTimeout: (TimeInterval) -> NMBExpectation { return ({ timeout in self._timeout = timeout return self }) } - public var to: (NMBMatcher) -> Void { + @objc public var to: (NMBMatcher) -> Void { return ({ matcher in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) + if let pred = matcher as? NMBPredicate { + self.expectValue.to(from(objcPredicate: pred)) + } else { + self.expectValue.to(ObjCMatcherWrapper(matcher: matcher)) + } }) } - public var toWithDescription: (NMBMatcher, String) -> Void { + @objc public var toWithDescription: (NMBMatcher, String) -> Void { return ({ matcher, description in - self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) + if let pred = matcher as? NMBPredicate { + self.expectValue.to(from(objcPredicate: pred), description: description) + } else { + self.expectValue.to(ObjCMatcherWrapper(matcher: matcher), description: description) + } }) } - public var toNot: (NMBMatcher) -> Void { + @objc public var toNot: (NMBMatcher) -> Void { return ({ matcher in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher) - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toNot(from(objcPredicate: pred)) + } else { + self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher)) + } }) } - public var toNotWithDescription: (NMBMatcher, String) -> Void { + @objc public var toNotWithDescription: (NMBMatcher, String) -> Void { return ({ matcher, description in - self.expectValue.toNot( - ObjCMatcherWrapper(matcher: matcher), description: description - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toNot(from(objcPredicate: pred), description: description) + } else { + self.expectValue.toNot(ObjCMatcherWrapper(matcher: matcher), description: description) + } }) } - public var notTo: (NMBMatcher) -> Void { return toNot } + @objc public var notTo: (NMBMatcher) -> Void { return toNot } - public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } + @objc public var notToWithDescription: (NMBMatcher, String) -> Void { return toNotWithDescription } - public var toEventually: (NMBMatcher) -> Void { + @objc public var toEventually: (NMBMatcher) -> Void { return ({ matcher in - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventually( + from(objcPredicate: pred), + timeout: self._timeout, + description: nil + ) + } else { + self.expectValue.toEventually( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: nil + ) + } }) } - public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { + @objc public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { return ({ matcher, description in - self.expectValue.toEventually( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventually( + from(objcPredicate: pred), + timeout: self._timeout, + description: description + ) + } else { + self.expectValue.toEventually( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: description + ) + } }) } - public var toEventuallyNot: (NMBMatcher) -> Void { + @objc public var toEventuallyNot: (NMBMatcher) -> Void { return ({ matcher in - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: nil - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventuallyNot( + from(objcPredicate: pred), + timeout: self._timeout, + description: nil + ) + } else { + self.expectValue.toEventuallyNot( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: nil + ) + } }) } - public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { + @objc public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { return ({ matcher, description in - self.expectValue.toEventuallyNot( - ObjCMatcherWrapper(matcher: matcher), - timeout: self._timeout, - description: description - ) + if let pred = matcher as? NMBPredicate { + self.expectValue.toEventuallyNot( + from(objcPredicate: pred), + timeout: self._timeout, + description: description + ) + } else { + self.expectValue.toEventuallyNot( + ObjCMatcherWrapper(matcher: matcher), + timeout: self._timeout, + description: description + ) + } }) } - public var toNotEventually: (NMBMatcher) -> Void { return toEventuallyNot } + @objc public var toNotEventually: (NMBMatcher) -> Void { + return toEventuallyNot + } - public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } + @objc public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { + return toEventuallyNotWithDescription + } - public class func failWithMessage(_ message: String, file: FileString, line: UInt) { + @objc public class func failWithMessage(_ message: String, file: FileString, line: UInt) { fail(message, location: SourceLocation(file: file, line: line)) } } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift b/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift index c609f69..9ba2ffa 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NMBObjCMatcher.swift @@ -1,11 +1,13 @@ import Foundation -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +// swiftlint:disable line_length public typealias MatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage) -> Bool public typealias FullMatcherBlock = (_ actualExpression: Expression, _ failureMessage: FailureMessage, _ shouldNotMatch: Bool) -> Bool +// swiftlint:enable line_length -public class NMBObjCMatcher : NSObject, NMBMatcher { +public class NMBObjCMatcher: NSObject, NMBMatcher { let _match: MatcherBlock let _doesNotMatch: MatcherBlock let canMatchNil: Bool diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift index a55cb27..e1b5432 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -2,7 +2,7 @@ import Dispatch import Foundation /// "Global" state of Nimble is stored here. Only DSL functions should access / be aware of this -/// class' existance +/// class' existence internal class NimbleEnvironment { static var activeInstance: NimbleEnvironment { get { diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 1aba8bc..0ad8590 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -3,7 +3,7 @@ import XCTest /// Default handler for Nimble. This assertion handler passes failures along to /// XCTest. -public class NimbleXCTestHandler : AssertionHandler { +public class NimbleXCTestHandler: AssertionHandler { public func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { if !assertion { recordFailure("\(message.stringValue)\n", location: location) @@ -29,14 +29,14 @@ public class NimbleShortXCTestHandler: AssertionHandler { /// Fallback handler in case XCTest is unavailable. This assertion handler will abort /// the program if it is invoked. -class NimbleXCTestUnavailableHandler : AssertionHandler { +class NimbleXCTestUnavailableHandler: AssertionHandler { func assert(_ assertion: Bool, message: FailureMessage, location: SourceLocation) { fatalError("XCTest is not available and no custom assertion handler was configured. Aborting.") } } -#if _runtime(_ObjC) - /// Helper class providing access to the currently executing XCTestCase instance, if any +#if !SWIFT_PACKAGE +/// Helper class providing access to the currently executing XCTestCase instance, if any @objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { @objc static let sharedInstance = CurrentTestCaseTracker() @@ -52,9 +52,8 @@ class NimbleXCTestUnavailableHandler : AssertionHandler { } #endif - func isXCTestAvailable() -> Bool { -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) // XCTest is weakly linked and so may not be present return NSClassFromString("XCTestCase") != nil #else @@ -63,15 +62,20 @@ func isXCTestAvailable() -> Bool { } private func recordFailure(_ message: String, location: SourceLocation) { -#if _runtime(_ObjC) +#if SWIFT_PACKAGE + XCTFail("\(message)", file: location.file, line: location.line) +#else if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { - testCase.recordFailure(withDescription: message, inFile: location.file, atLine: location.line, expected: true) + #if swift(>=4) + let line = Int(location.line) + #else + let line = location.line + #endif + testCase.recordFailure(withDescription: message, inFile: location.file, atLine: 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: .internalInconsistencyException, reason: msg, userInfo: nil).raise() } -#else - XCTFail("\(message)\n", file: location.file, line: location.line) #endif } diff --git a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift index 619b6dc..a84682f 100644 --- a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -11,25 +11,42 @@ private enum ErrorResult { /// bridges to Objective-C via the @objc keyword. This class encapsulates callback-style /// asynchronous waiting logic so that it may be called from Objective-C and Swift. internal class NMBWait: NSObject { +// About these kind of lines, `@objc` attributes are only required for Objective-C +// support, so that should be conditional on Darwin platforms and normal Xcode builds +// (non-SwiftPM builds). +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objc internal class func until( timeout: TimeInterval, file: FileString = #file, line: UInt = #line, - action: @escaping (@escaping () -> Void) -> Void) -> Void { + action: @escaping (@escaping () -> Void) -> Void) { return throwableUntil(timeout: timeout, file: file, line: line) { done in action(done) } } +#else + internal class func until( + timeout: TimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) -> Void) { + return throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) + } + } +#endif // Using a throwable closure makes this method not objc compatible. internal class func throwableUntil( timeout: TimeInterval, file: FileString = #file, line: UInt = #line, - action: @escaping (@escaping () -> Void) throws -> Void) -> Void { + action: @escaping (@escaping () -> Void) throws -> Void) { let awaiter = NimbleEnvironment.activeInstance.awaiter let leeway = timeout / 2.0 - let result = awaiter.performBlock { (done: @escaping (ErrorResult) -> Void) throws -> Void in + // swiftlint:disable:next line_length + let result = awaiter.performBlock(file: file, line: line) { (done: @escaping (ErrorResult) -> Void) throws -> Void in DispatchQueue.main.async { let capture = NMBExceptionCapture( handler: ({ exception in @@ -39,7 +56,7 @@ internal class NMBWait: NSObject { ) capture.tryBlock { do { - try action() { + try action { done(.none) } } catch let e { @@ -70,19 +87,20 @@ internal class NMBWait: NSObject { } } - #if _runtime(_ObjC) +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE @objc(untilFile:line:action:) - internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) -> Void { + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> 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 { +#else + internal class func until(_ file: FileString = #file, line: UInt = #line, action: @escaping (() -> Void) -> Void) { until(timeout: 1, file: file, line: line, action: action) } - #endif +#endif } internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterval) -> String { + // swiftlint:disable:next line_length return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway) 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." } @@ -93,6 +111,6 @@ internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: TimeInterv /// /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. -public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) -> Void { +public func waitUntil(timeout: TimeInterval = 1, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { NMBWait.until(timeout: timeout, file: file, line: line, action: action) } diff --git a/Pods/Nimble/Sources/Nimble/DSL.swift b/Pods/Nimble/Sources/Nimble/DSL.swift index 7ebd684..e49bb0c 100644 --- a/Pods/Nimble/Sources/Nimble/DSL.swift +++ b/Pods/Nimble/Sources/Nimble/DSL.swift @@ -43,7 +43,7 @@ internal func nimblePrecondition( line: UInt = #line) { let result = expr() if !result { -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) let e = NSException( name: NSExceptionName(name()), reason: message(), diff --git a/Pods/Nimble/Sources/Nimble/Expectation.swift b/Pods/Nimble/Sources/Nimble/Expectation.swift index 16d7c3b..e3f616a 100644 --- a/Pods/Nimble/Sources/Nimble/Expectation.swift +++ b/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -1,8 +1,8 @@ import Foundation +// Deprecated internal func expressionMatches(_ expression: Expression, matcher: U, to: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T -{ + where U: Matcher, U.ValueType == T { let msg = FailureMessage() msg.userDescription = description msg.to = to @@ -13,14 +13,14 @@ internal func expressionMatches(_ expression: Expression, matcher: U, t } return (pass, msg) } catch let error { - msg.actualValue = "an unexpected error thrown: <\(error)>" + msg.stringValue = "unexpected error thrown: <\(error)>" return (false, msg) } } +// Deprecated internal func expressionDoesNotMatch(_ expression: Expression, matcher: U, toNot: String, description: String?) -> (Bool, FailureMessage) - where U: Matcher, U.ValueType == T -{ + where U: Matcher, U.ValueType == T { let msg = FailureMessage() msg.userDescription = description msg.to = toNot @@ -31,11 +31,46 @@ internal func expressionDoesNotMatch(_ expression: Expression, matcher: } return (pass, msg) } catch let error { - msg.actualValue = "an unexpected error thrown: <\(error)>" + msg.stringValue = "unexpected error thrown: <\(error)>" return (false, msg) } } +internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { + func run() -> (Bool, FailureMessage) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let result = try predicate.satisfies(expression) + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try expression.evaluate()))>" + } + return (result.toBoolean(expectation: style), msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } + } + + var result: (Bool, FailureMessage) = (false, FailureMessage()) + if captureExceptions { + let capture = NMBExceptionCapture(handler: ({ exception -> Void in + let msg = FailureMessage() + msg.stringValue = "unexpected exception raised: \(exception)" + result = (false, msg) + }), finally: nil) + capture.tryBlock { + result = run() + } + } else { + result = run() + } + + return result +} + public struct Expectation { public let expression: Expression @@ -45,31 +80,52 @@ public struct Expectation { handler.assert(pass, message: message, location: expression.location) } - /// Tests the actual value using a matcher to match. + ////////////////// OLD API ///////////////////// + + /// DEPRECATED: Tests the actual value using a matcher to match. public func to(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { + 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. + /// DEPRECATED: Tests the actual value using a matcher to not match. public func toNot(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { + where U: Matcher, U.ValueType == T { + // swiftlint:disable:next line_length let (pass, msg) = expressionDoesNotMatch(expression, matcher: matcher, toNot: "to not", description: description) verify(pass, msg) } - /// Tests the actual value using a matcher to not match. + /// DEPRECATED: Tests the actual value using a matcher to not match. /// /// Alias to toNot(). public func notTo(_ matcher: U, description: String? = nil) - where U: Matcher, U.ValueType == T - { + where U: Matcher, U.ValueType == T { toNot(matcher, description: description) } + ////////////////// NEW API ///////////////////// + + /// Tests the actual value using a matcher to match. + public func to(_ predicate: Predicate, description: String? = nil) { + let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + public func toNot(_ predicate: Predicate, description: String? = nil) { + let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + public func notTo(_ predicate: Predicate, description: String? = nil) { + toNot(predicate, description: description) + } + // see: // - AsyncMatcherWrapper for extension // - NMBExpectation for Objective-C interface diff --git a/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift b/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift new file mode 100644 index 0000000..992ee0e --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/ExpectationMessage.swift @@ -0,0 +1,262 @@ +import Foundation + +public indirect enum ExpectationMessage { + // --- Primary Expectations --- + /// includes actual value in output ("expected to , got ") + case expectedActualValueTo(/* message: */ String) + /// uses a custom actual value string in output ("expected to , got ") + case expectedCustomValueTo(/* message: */ String, /* actual: */ String) + /// excludes actual value in output ("expected to ") + case expectedTo(/* message: */ String) + /// allows any free-form message ("") + case fail(/* message: */ String) + + // --- Composite Expectations --- + // Generally, you'll want the methods, appended(message:) and appended(details:) instead. + + /// Not Fully Implemented Yet. + case prepends(/* Prepended Message */ String, ExpectationMessage) + + /// appends after an existing message (" (use beNil() to match nils)") + case appends(ExpectationMessage, /* Appended Message */ String) + + /// provides long-form multi-line explainations ("\n\n") + case details(ExpectationMessage, String) + + internal var sampleMessage: String { + let asStr = toString(actual: "", expected: "expected", to: "to") + let asFailureMessage = FailureMessage() + update(failureMessage: asFailureMessage) + // swiftlint:disable:next line_length + return "(toString(actual:expected:to:) -> \(asStr) || update(failureMessage:) -> \(asFailureMessage.stringValue))" + } + + /// Returns the smallest message after the "expected to" string that summarizes the error. + /// + /// Returns the message part from ExpectationMessage, ignoring all .appends and .details. + public var expectedMessage: String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return msg + case let .expectedActualValueTo(msg): + return msg + case let .expectedCustomValueTo(msg, _): + return msg + case let .prepends(_, expectation): + return expectation.expectedMessage + case let .appends(expectation, msg): + return "\(expectation.expectedMessage)\(msg)" + case let .details(expectation, _): + return expectation.expectedMessage + } + } + + /// Appends a message after the primary expectation message + public func appended(message: String) -> ExpectationMessage { + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo, .appends, .prepends: + return .appends(self, message) + case let .details(expectation, msg): + return .details(expectation.appended(message: message), msg) + } + } + + /// Appends a message hinting to use beNil() for when the actual value given was nil. + public func appendedBeNilHint() -> ExpectationMessage { + return appended(message: " (use beNil() to match nils)") + } + + /// Appends a detailed (aka - multiline) message after the primary expectation message + /// Detailed messages will be placed after .appended(message:) calls. + public func appended(details: String) -> ExpectationMessage { + return .details(self, details) + } + + internal func visitLeafs(_ f: (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + switch self { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(self) + case let .prepends(msg, expectation): + return .prepends(msg, expectation.visitLeafs(f)) + case let .appends(expectation, msg): + return .appends(expectation.visitLeafs(f), msg) + case let .details(expectation, msg): + return .details(expectation.visitLeafs(f), msg) + } + } + + /// Replaces a primary expectation with one returned by f. Preserves all composite expectations + /// that were built upon it (aka - all appended(message:) and appended(details:). + public func replacedExpectation(_ f: @escaping (ExpectationMessage) -> ExpectationMessage) -> ExpectationMessage { + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case .fail, .expectedTo, .expectedActualValueTo, .expectedCustomValueTo: + return f(msg) + default: + return msg + } + } + return visitLeafs(walk) + } + + /// Wraps a primary expectation with text before and after it. + /// Alias to prepended(message: before).appended(message: after) + public func wrappedExpectation(before: String, after: String) -> ExpectationMessage { + return prepended(expectation: before).appended(message: after) + } + + /// Prepends a message by modifying the primary expectation + public func prepended(expectation message: String) -> ExpectationMessage { + func walk(_ msg: ExpectationMessage) -> ExpectationMessage { + switch msg { + case let .expectedTo(msg): + return .expectedTo(message + msg) + case let .expectedActualValueTo(msg): + return .expectedActualValueTo(message + msg) + case let .expectedCustomValueTo(msg, actual): + return .expectedCustomValueTo(message + msg, actual) + default: + return msg.visitLeafs(walk) + } + } + return visitLeafs(walk) + } + + // TODO: test & verify correct behavior + internal func prepended(message: String) -> ExpectationMessage { + return .prepends(message, self) + } + + /// Converts the tree of ExpectationMessages into a final built string. + public func toString(actual: String, expected: String = "expected", to: String = "to") -> String { + switch self { + case let .fail(msg): + return msg + case let .expectedTo(msg): + return "\(expected) \(to) \(msg)" + case let .expectedActualValueTo(msg): + return "\(expected) \(to) \(msg), got \(actual)" + case let .expectedCustomValueTo(msg, actual): + return "\(expected) \(to) \(msg), got \(actual)" + case let .prepends(msg, expectation): + return "\(msg)\(expectation.toString(actual: actual, expected: expected, to: to))" + case let .appends(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\(msg)" + case let .details(expectation, msg): + return "\(expectation.toString(actual: actual, expected: expected, to: to))\n\n\(msg)" + } + } + + // Backwards compatibility: converts ExpectationMessage tree to FailureMessage + internal func update(failureMessage: FailureMessage) { + switch self { + case let .fail(msg): + failureMessage.stringValue = msg + case let .expectedTo(msg): + failureMessage.actualValue = nil + failureMessage.postfixMessage = msg + case let .expectedActualValueTo(msg): + failureMessage.postfixMessage = msg + case let .expectedCustomValueTo(msg, actual): + failureMessage.postfixMessage = msg + failureMessage.actualValue = actual + case let .prepends(msg, expectation): + expectation.update(failureMessage: failureMessage) + if let desc = failureMessage.userDescription { + failureMessage.userDescription = "\(msg)\(desc)" + } else { + failureMessage.userDescription = msg + } + case let .appends(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendMessage(msg) + case let .details(expectation, msg): + expectation.update(failureMessage: failureMessage) + failureMessage.appendDetails(msg) + } + } +} + +extension FailureMessage { + internal func toExpectationMessage() -> ExpectationMessage { + let defaultMsg = FailureMessage() + if expected != defaultMsg.expected || _stringValueOverride != nil { + return .fail(stringValue) + } + + var msg: ExpectationMessage = .fail(userDescription ?? "") + if actualValue != "" && actualValue != nil { + msg = .expectedCustomValueTo(postfixMessage, actualValue ?? "") + } else if postfixMessage != defaultMsg.postfixMessage { + if actualValue == nil { + msg = .expectedTo(postfixMessage) + } else { + msg = .expectedActualValueTo(postfixMessage) + } + } + if postfixActual != defaultMsg.postfixActual { + msg = .appends(msg, postfixActual) + } + if let m = extendedMessage { + msg = .details(msg, m) + } + return msg + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + +public class NMBExpectationMessage: NSObject { + private let msg: ExpectationMessage + + internal init(swift msg: ExpectationMessage) { + self.msg = msg + } + + public init(expectedTo message: String) { + self.msg = .expectedTo(message) + } + public init(expectedActualValueTo message: String) { + self.msg = .expectedActualValueTo(message) + } + + public init(expectedActualValueTo message: String, customActualValue actual: String) { + self.msg = .expectedCustomValueTo(message, actual) + } + + public init(fail message: String) { + self.msg = .fail(message) + } + + public init(prepend message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(appendedMessage message: String, child: NMBExpectationMessage) { + self.msg = .appends(child.msg, message) + } + + public init(prependedMessage message: String, child: NMBExpectationMessage) { + self.msg = .prepends(message, child.msg) + } + + public init(details message: String, child: NMBExpectationMessage) { + self.msg = .details(child.msg, message) + } + + public func appendedBeNilHint() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: msg.appendedBeNilHint()) + } + + public func toSwift() -> ExpectationMessage { return self.msg } +} + +extension ExpectationMessage { + func toObjectiveC() -> NMBExpectationMessage { + return NMBExpectationMessage(swift: self) + } +} + +#endif diff --git a/Pods/Nimble/Sources/Nimble/Expression.swift b/Pods/Nimble/Sources/Nimble/Expression.swift index 8ba53e4..5a233fd 100644 --- a/Pods/Nimble/Sources/Nimble/Expression.swift +++ b/Pods/Nimble/Sources/Nimble/Expression.swift @@ -5,7 +5,7 @@ import Foundation internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { var cache: T? return ({ withoutCaching in - if (withoutCaching || cache == nil) { + if withoutCaching || cache == nil { cache = try closure() } return cache! @@ -77,7 +77,11 @@ public struct Expression { /// @param block The block that can cast the current Expression value to a /// new type. public func cast(_ block: @escaping (T?) throws -> U?) -> Expression { - return Expression(expression: ({ try block(self.evaluate()) }), location: self.location, isClosure: self.isClosure) + return Expression( + expression: ({ try block(self.evaluate()) }), + location: self.location, + isClosure: self.isClosure + ) } public func evaluate() throws -> T? { @@ -85,6 +89,11 @@ public struct Expression { } public func withoutCaching() -> Expression { - return Expression(memoizedExpression: self._expression, location: location, withoutCaching: true, isClosure: isClosure) + return Expression( + memoizedExpression: self._expression, + location: location, + withoutCaching: true, + isClosure: isClosure + ) } } diff --git a/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Pods/Nimble/Sources/Nimble/FailureMessage.swift index 2d245e5..2bc57eb 100644 --- a/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ b/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -12,8 +12,8 @@ public class FailureMessage: NSObject { /// An optional message that will be appended as a new line and provides additional details /// about the failure. This message will only be visible in the issue navigator / in logs but /// not directly in the source editor since only a single line is presented there. - public var extendedMessage: String? = nil - public var userDescription: String? = nil + public var extendedMessage: String? + public var userDescription: String? public var stringValue: String { get { @@ -29,6 +29,9 @@ public class FailureMessage: NSObject { } internal var _stringValueOverride: String? + internal var hasOverriddenStringValue: Bool { + return _stringValueOverride != nil + } public override init() { } @@ -59,7 +62,31 @@ public class FailureMessage: NSObject { if let userDescription = userDescription { return "\(userDescription)\n\(value)" } - + return value } + + internal func appendMessage(_ msg: String) { + if hasOverriddenStringValue { + stringValue += "\(msg)" + } else if actualValue != nil { + postfixActual += msg + } else { + postfixMessage += msg + } + } + + internal func appendDetails(_ msg: String) { + if hasOverriddenStringValue { + if let desc = userDescription { + stringValue = "\(desc)\n\(stringValue)" + } + stringValue += "\n\(msg)" + } else { + if let desc = userDescription { + userDescription = desc + } + extendedMessage = msg + } + } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift index 3a9258d..8affa62 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -1,71 +1,79 @@ import Foundation -public func allPass - (_ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc - where U: Sequence, U.Iterator.Element == T -{ - return allPass("pass a condition", passFunc) +public func allPass + (_ passFunc: @escaping (T?) throws -> Bool) -> Predicate + where U: Sequence, T == U.Iterator.Element { + let matcher = Predicate.simpleNilable("pass a condition") { actualExpression in + return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) + } + return createPredicate(matcher) } -public func allPass - (_ passName: String, _ passFunc: @escaping (T?) -> Bool) -> NonNilMatcherFunc - where U: Sequence, U.Iterator.Element == T -{ - return createAllPassMatcher() { - expression, failureMessage in - failureMessage.postfixMessage = passName - return passFunc(try expression.evaluate()) - } +public func allPass + (_ passName: String, _ passFunc: @escaping (T?) throws -> Bool) -> Predicate + where U: Sequence, T == U.Iterator.Element { + let matcher = Predicate.simpleNilable(passName) { actualExpression in + return PredicateStatus(bool: try passFunc(try actualExpression.evaluate())) + } + return createPredicate(matcher) } -public func allPass - (_ matcher: V) -> NonNilMatcherFunc - where U: Sequence, V: Matcher, U.Iterator.Element == V.ValueType -{ - return createAllPassMatcher() { - try matcher.matches($0, failureMessage: $1) - } +public func allPass(_ elementMatcher: M) -> Predicate + where S: Sequence, M: Matcher, S.Iterator.Element == M.ValueType { + return createPredicate(elementMatcher.predicate) } -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() { +public func allPass(_ elementPredicate: Predicate) -> Predicate + where S: Sequence { + return createPredicate(elementPredicate) +} + +private func createPredicate(_ elementMatcher: Predicate) -> Predicate + where S: Sequence { + return Predicate { actualExpression in + guard let actualValue = try actualExpression.evaluate() else { + return PredicateResult( + status: .fail, + message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") + ) + } + + var failure: ExpectationMessage = .expectedTo("all pass") 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 + let predicateResult = try elementMatcher.satisfies(exp) + if predicateResult.status == .matches { + failure = predicateResult.message.prepended(expectation: "all ") + } else { + failure = predicateResult.message + .replacedExpectation({ .expectedTo($0.expectedMessage) }) + .wrappedExpectation( + before: "all ", + after: ", but failed first at element <\(stringify(currentElement))>" + + " in <\(stringify(actualValue))>" + ) + return PredicateResult(status: .doesNotMatch, message: failure) } } - failureMessage.postfixMessage = "all \(failureMessage.postfixMessage)" - } else { - failureMessage.postfixMessage = "all pass (use beNil() to match nils)" - return false + failure = failure.replacedExpectation({ expectation in + return .expectedTo(expectation.expectedMessage) + }) + return PredicateResult(status: .matches, message: failure) } - - return true - } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func allPassMatcher(_ matcher: NMBObjCMatcher) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + @objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() var nsObjects = [NSObject]() - + var collectionIsUsable = true if let value = actualValue as? NSFastEnumeration { - let generator = NSFastEnumerationIterator(value) + var generator = NSFastEnumerationIterator(value) while let obj = generator.next() { if let nsObject = obj as? NSObject { nsObjects.append(nsObject) @@ -77,23 +85,36 @@ extension NMBObjCMatcher { } else { collectionIsUsable = false } - + if !collectionIsUsable { - failureMessage.postfixMessage = - "allPass only works with NSFastEnumeration (NSArray, NSSet, ...) of NSObjects" - failureMessage.expected = "" - failureMessage.to = "" - return false + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + // swiftlint:disable:next line_length + fail: "allPass can only be used with types which implement NSFastEnumeration (NSArray, NSSet, ...), and whose elements subclass NSObject, got <\(actualValue?.description ?? "nil")>" + ) + ) } - + let expr = Expression(expression: ({ nsObjects }), location: location) - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: expr.location) - } - return try! createAllPassMatcher(elementEvaluator).matches( - expr, failureMessage: failureMessage) + let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in + if let predicate = matcher as? NMBPredicate { + return predicate.satisfies(({ try! expr.evaluate() }), location: expr.location).toSwift() + } else { + let failureMessage = FailureMessage() + let result = matcher.matches( + ({ try! expr.evaluate() }), + failureMessage: failureMessage, + location: expr.location + ) + let expectationMsg = failureMessage.toExpectationMessage() + return PredicateResult( + bool: result, + message: expectationMsg + ) + } + }) + return try! pred.satisfies(expr).toObjectiveC() } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift index 6b89c76..3cba8b0 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift @@ -7,9 +7,39 @@ public struct AsyncDefaults { public static var PollInterval: TimeInterval = 0.01 } +private func async(style: ExpectationStyle, predicate: Predicate, timeout: TimeInterval, poll: TimeInterval, fnName: String) -> Predicate { + return Predicate { actualExpression in + let uncachedExpression = actualExpression.withoutCaching() + let fnName = "expect(...).\(fnName)(...)" + var lastPredicateResult: PredicateResult? + let result = pollBlock( + pollInterval: poll, + timeoutInterval: timeout, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: fnName) { + lastPredicateResult = try predicate.satisfies(uncachedExpression) + return lastPredicateResult!.toBoolean(expectation: style) + } + switch result { + case .completed: return lastPredicateResult! + case .timedOut: return PredicateResult(status: .fail, message: lastPredicateResult!.message) + case let .errorThrown(error): + return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) + case let .raisedException(exception): + return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) + case .blockedRunLoop: + // swiftlint:disable:next line_length + return PredicateResult(status: .fail, message: lastPredicateResult!.message.appended(message: " (timed out, but main thread was unresponsive).")) + case .incomplete: + internalError("Reached .incomplete state for toEventually(...).") + } + } +} + +// Deprecated internal struct AsyncMatcherWrapper: Matcher - where U: Matcher, U.ValueType == T -{ + where U: Matcher, U.ValueType == T { let fullMatcher: U let timeoutInterval: TimeInterval let pollInterval: TimeInterval @@ -31,14 +61,14 @@ internal struct AsyncMatcherWrapper: Matcher fnName: fnName) { try self.fullMatcher.matches(uncachedExpression, failureMessage: failureMessage) } - switch (result) { + switch result { case let .completed(isSuccessful): return isSuccessful case .timedOut: return false case let .errorThrown(error): - failureMessage.actualValue = "an unexpected error thrown: <\(error)>" + failureMessage.stringValue = "an unexpected error thrown: <\(error)>" return false case let .raisedException(exception): - failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" + failureMessage.stringValue = "an unexpected exception thrown: <\(exception)>" return false case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." @@ -48,7 +78,7 @@ internal struct AsyncMatcherWrapper: Matcher } } - func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { + func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) -> Bool { let uncachedExpression = actualExpression.withoutCaching() let result = pollBlock( pollInterval: pollInterval, @@ -58,14 +88,14 @@ internal struct AsyncMatcherWrapper: Matcher fnName: "expect(...).toEventuallyNot(...)") { try self.fullMatcher.doesNotMatch(uncachedExpression, failureMessage: failureMessage) } - switch (result) { + switch result { case let .completed(isSuccessful): return isSuccessful case .timedOut: return false case let .errorThrown(error): - failureMessage.actualValue = "an unexpected error thrown: <\(error)>" + failureMessage.stringValue = "an unexpected error thrown: <\(error)>" return false case let .raisedException(exception): - failureMessage.actualValue = "an unexpected exception thrown: <\(exception)>" + failureMessage.stringValue = "an unexpected exception thrown: <\(exception)>" return false case .blockedRunLoop: failureMessage.postfixMessage += " (timed out, but main thread was unresponsive)." @@ -76,9 +106,72 @@ internal struct AsyncMatcherWrapper: Matcher } } -private let toEventuallyRequiresClosureError = FailureMessage(stringValue: "expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) )\nSwift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function") +private let toEventuallyRequiresClosureError = FailureMessage( + // swiftlint:disable:next line_length + stringValue: "expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) )\nSwift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function" +) + +extension Expectation { + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + async(style: .toMatch, predicate: predicate, timeout: timeout, poll: pollInterval, fnName: "toEventually"), + to: "to eventually", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toEventuallyNot(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + async( + style: .toNotMatch, + predicate: predicate, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot" + ), + to: "to eventually not", + description: description, + captureExceptions: false + ) + verify(pass, msg) + } + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + public func toNotEventually(_ predicate: Predicate, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) { + return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) + } +} +// Deprecated extension Expectation { /// Tests the actual value using a matcher to match by checking continuously /// at each pollInterval until the timeout is reached. @@ -87,8 +180,7 @@ extension Expectation { /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. public func toEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { + where U: Matcher, U.ValueType == T { if expression.isClosure { let (pass, msg) = expressionMatches( expression, @@ -112,8 +204,7 @@ extension Expectation { /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. public func toEventuallyNot(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { + where U: Matcher, U.ValueType == T { if expression.isClosure { let (pass, msg) = expressionDoesNotMatch( expression, @@ -139,8 +230,7 @@ extension Expectation { /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. public func toNotEventually(_ matcher: U, timeout: TimeInterval = AsyncDefaults.Timeout, pollInterval: TimeInterval = AsyncDefaults.PollInterval, description: String? = nil) - where U: Matcher, U.ValueType == T - { + where U: Matcher, U.ValueType == T { return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift index 99b8f8f..5674525 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -1,34 +1,64 @@ 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 { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAKindOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false +private func matcherMessage(forType expectedType: T.Type) -> String { + return "be a kind of \(String(describing: expectedType))" +} +private func matcherMessage(forClass expectedClass: AnyClass) -> String { + return "be a kind of \(String(describing: expectedClass))" +} + +/// A Nimble matcher that succeeds when the actual value is an instance of the given class. +public func beAKindOf(_ expectedType: T.Type) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + message = .expectedCustomValueTo(matcherMessage(forType: expectedType), "") + return PredicateResult(status: .fail, message: message) + } + message = .expectedCustomValueTo( + "be a kind of \(String(describing: expectedType))", + "<\(String(describing: type(of: validInstance))) instance>" + ) + + return PredicateResult( + bool: validInstance is T, + message: message + ) } } +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { + return Predicate.define { actualExpression in + let message: ExpectationMessage + let status: PredicateStatus + let instance = try actualExpression.evaluate() if let validInstance = instance { - failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" + status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + "<\(String(describing: type(of: validInstance))) instance>" + ) } else { - failureMessage.actualValue = "" + status = .fail + message = .expectedCustomValueTo( + matcherMessage(forClass: expectedClass), + "" + ) } - failureMessage.postfixMessage = "be a kind of \(String(describing: expectedClass))" - return instance != nil && instance!.isKind(of: expectedClass) + + return PredicateResult(status: status, message: message) } } extension NMBObjCMatcher { - public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift index 2298c78..70c5661 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -1,37 +1,53 @@ import Foundation -// A Nimble matcher that catches attempts to use beAnInstanceOf with non Objective-C types -public func beAnInstanceOf(_ expectedClass: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc {actualExpression, failureMessage in - failureMessage.stringValue = "beAnInstanceOf only works on Objective-C types since" - + " the Swift compiler will automatically type check Swift-only types." - + " This expectation is redundant." - return false +/// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. +public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedType))" + return Predicate.define { actualExpression in + let instance = try actualExpression.evaluate() + guard let validInstance = instance else { + return PredicateResult( + status: .doesNotMatch, + message: .expectedActualValueTo(errorMessage) + ) + } + + let actualString = "<\(String(describing: type(of: validInstance))) instance>" + + return PredicateResult( + status: PredicateStatus(bool: type(of: validInstance) == expectedType), + message: .expectedCustomValueTo(errorMessage, actualString) + ) } } /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAKindOf if you want to match against subclasses -public func beAnInstanceOf(_ expectedClass: AnyClass) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { + let errorMessage = "be an instance of \(String(describing: expectedClass))" + return Predicate.define { actualExpression in let instance = try actualExpression.evaluate() + let actualString: String if let validInstance = instance { - failureMessage.actualValue = "<\(String(describing: type(of: validInstance))) instance>" + actualString = "<\(String(describing: type(of: validInstance))) instance>" } else { - failureMessage.actualValue = "" + actualString = "" } - failureMessage.postfixMessage = "be an instance of \(String(describing: expectedClass))" -#if _runtime(_ObjC) - return instance != nil && instance!.isMember(of: expectedClass) -#else - return instance != nil && type(of: instance!) == expectedClass -#endif + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + let matches = instance != nil && instance!.isMember(of: expectedClass) + #else + let matches = instance != nil && type(of: instance!) == expectedClass + #endif + return PredicateResult( + status: PredicateStatus(bool: matches), + message: .expectedCustomValueTo(errorMessage, actualString) + ) } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift index 48e9895..dfb4e28 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -1,20 +1,26 @@ import Foundation -internal let DefaultDelta = 0.0001 - -internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double, failureMessage: FailureMessage) -> Bool { - failureMessage.postfixMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - failureMessage.actualValue = "<\(stringify(actualValue))>" - return actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta +public let DefaultDelta = 0.0001 + +internal func isCloseTo(_ actualValue: NMBDoubleConvertible?, + expectedValue: NMBDoubleConvertible, + delta: Double) + -> PredicateResult { + let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" + return PredicateResult( + bool: actualValue != nil && + abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, + message: .expectedCustomValueTo(errorMessage, "<\(stringify(actualValue))>") + ) } /// A Nimble matcher that succeeds when a value is close to another. This is used for floating /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) +public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDelta) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } @@ -22,14 +28,14 @@ public func beCloseTo(_ expectedValue: Double, within delta: Double = DefaultDel /// point values which can have imprecise results when doing arithmetic on them. /// /// @see equal -public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta, failureMessage: failureMessage) +public func beCloseTo(_ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta) -> Predicate { + return Predicate.define { actualExpression in + return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } -#if _runtime(_ObjC) -public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +public class NMBObjCBeCloseToMatcher: NSObject, NMBMatcher { var _expected: NSNumber var _delta: CDouble init(expected: NSNumber, within: CDouble) { @@ -37,7 +43,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { _delta = within } - public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + @objc public func matches(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -46,7 +52,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { return try! matcher.matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + @objc public func doesNotMatch(_ actualExpression: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let actualBlock: () -> NMBDoubleConvertible? = ({ return actualExpression() as? NMBDoubleConvertible }) @@ -55,7 +61,7 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { return try! matcher.doesNotMatch(expr, failureMessage: failureMessage) } - public var within: (CDouble) -> NMBObjCBeCloseToMatcher { + @objc public var within: (CDouble) -> NMBObjCBeCloseToMatcher { return ({ delta in return NMBObjCBeCloseToMatcher(expected: self._expected, within: delta) }) @@ -63,30 +69,28 @@ public class NMBObjCBeCloseToMatcher : NSObject, NMBMatcher { } extension NMBObjCMatcher { - public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { + @objc 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]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" +public func beCloseTo(_ expectedValues: [Double], within delta: Double = DefaultDelta) -> Predicate<[Double]> { + let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" + return Predicate.simple(errorMessage) { actualExpression in if let actual = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actual))>" - if actual.count != expectedValues.count { - return false + return .doesNotMatch } else { for (index, actualItem) in actual.enumerated() { if fabs(actualItem - expectedValues[index]) > delta { - return false + return .doesNotMatch } } - return true + return .matches } } - return false + return .doesNotMatch } } @@ -106,7 +110,7 @@ public func ≈(lhs: Expectation, rhs: (expected: NMBDoubl lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) } -public func ==(lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { +public func == (lhs: Expectation, rhs: (expected: NMBDoubleConvertible, delta: Double)) { lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift index 19df0d2..3cbc15d 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -1,37 +1,33 @@ 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 { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actualSeq = try actualExpression.evaluate() if actualSeq == nil { - return true + return .fail } var generator = actualSeq!.makeIterator() - return generator.next() == nil + return PredicateStatus(bool: generator.next() == nil) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actualString = try actualExpression.evaluate() - return actualString == nil || NSString(string: actualString!).length == 0 + return PredicateStatus(bool: actualString == nil || NSString(string: actualString!).length == 0) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For NSString instances, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actualString = try actualExpression.evaluate() - return actualString == nil || actualString!.length == 0 + return PredicateStatus(bool: actualString == nil || actualString!.length == 0) } } @@ -40,52 +36,59 @@ public func beEmpty() -> NonNilMatcherFunc { /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actualDictionary = try actualExpression.evaluate() - return actualDictionary == nil || actualDictionary!.count == 0 + return PredicateStatus(bool: actualDictionary == nil || actualDictionary!.count == 0) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actualArray = try actualExpression.evaluate() - return actualArray == nil || actualArray!.count == 0 + return PredicateStatus(bool: actualArray == nil || actualArray!.count == 0) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be empty" +public func beEmpty() -> Predicate { + return Predicate.simple("be empty") { actualExpression in let actual = try actualExpression.evaluate() - return actual == nil || actual!.count == 0 + return PredicateStatus(bool: actual == nil || actual!.count == 0) } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beEmptyMatcher() -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + @objc public class func beEmptyMatcher() -> NMBPredicate { + return NMBPredicate { actualExpression in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() - failureMessage.postfixMessage = "be empty" + if let value = actualValue as? NMBCollection { let expr = Expression(expression: ({ value as NMBCollection }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) + return try! beEmpty().satisfies(expr).toObjectiveC() } else if let value = actualValue as? NSString { let expr = Expression(expression: ({ value as String }), location: location) - return try! beEmpty().matches(expr, failureMessage: failureMessage) + return try! beEmpty().satisfies(expr).toObjectiveC() } else if let actualValue = actualValue { - failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - failureMessage.actualValue = "\(String(describing: type(of: actualValue))) type" + // swiftlint:disable:next line_length + let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + expectedActualValueTo: badTypeErrorMsg, + customActualValue: "\(String(describing: type(of: actualValue))) type" + ) + ) } - return false + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage(expectedActualValueTo: "be empty").appendedBeNilHint() + ) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift index 1345199..8717f97 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -1,38 +1,38 @@ import Foundation - /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" +public func beGreaterThan(_ expectedValue: T?) -> Predicate { + let errorMessage = "be greater than <\(stringify(expectedValue))>" + return Predicate.simple(errorMessage) { actualExpression in if let actual = try actualExpression.evaluate(), let expected = expectedValue { - return actual > expected + return PredicateStatus(bool: actual > expected) } - return false + return .fail } } /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() - let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending + let matches = actualValue != nil + && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending return matches - } + }.requireNonNil } public func >(lhs: Expectation, rhs: T) { lhs.to(beGreaterThan(rhs)) } -public func >(lhs: Expectation, rhs: NMBComparable?) { +public func > (lhs: Expectation, rhs: NMBComparable?) { lhs.to(beGreaterThan(rhs)) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift index 2949fce..55d8e7b 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -2,26 +2,26 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be greater than or equal to <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() if let actual = actualValue, let expected = expectedValue { return actual >= expected } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { 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) != ComparisonResult.orderedAscending return matches - } + }.requireNonNil } public func >=(lhs: Expectation, rhs: T) { @@ -32,9 +32,9 @@ public func >=(lhs: Expectation, rhs: T) { lhs.to(beGreaterThanOrEqualTo(rhs)) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift index ca3357b..ad19def 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -1,10 +1,9 @@ import Foundation - /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. -public func beIdenticalTo(_ expected: Any?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beIdenticalTo(_ expected: Any?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in #if os(Linux) let actual = try actualExpression.evaluate() as? AnyObject #else @@ -17,13 +16,13 @@ public func beIdenticalTo(_ expected: Any?) -> NonNilMatcherFunc { #else return actual === (expected as AnyObject?) && actual !== nil #endif - } + }.requireNonNil } -public func ===(lhs: Expectation, rhs: Any?) { +public func === (lhs: Expectation, rhs: Any?) { lhs.to(beIdenticalTo(rhs)) } -public func !==(lhs: Expectation, rhs: Any?) { +public func !== (lhs: Expectation, rhs: Any?) { lhs.toNot(beIdenticalTo(rhs)) } @@ -31,13 +30,13 @@ public func !==(lhs: Expectation, rhs: Any?) { /// as the expected instance. /// /// Alias for "beIdenticalTo". -public func be(_ expected: Any?) -> NonNilMatcherFunc { +public func be(_ expected: Any?) -> Predicate { return beIdenticalTo(expected) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { + @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let aExpr = actualExpression.cast { $0 as Any? } return try! beIdenticalTo(expected).matches(aExpr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift index fbcd7c7..8047efd 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -1,37 +1,37 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beLessThan(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" if let actual = try actualExpression.evaluate(), let expected = expectedValue { return actual < expected } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: NMBComparable?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than <\(stringify(expectedValue))>" let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending return matches - } + }.requireNonNil } public func <(lhs: Expectation, rhs: T) { lhs.to(beLessThan(rhs)) } -public func <(lhs: Expectation, rhs: NMBComparable?) { +public func < (lhs: Expectation, rhs: NMBComparable?) { lhs.to(beLessThan(rhs)) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { + @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { $0 as? NMBComparable } return try! beLessThan(expected).matches(expr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift index a0cd2f0..f9e9f4e 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -2,24 +2,24 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be less than or equal to <\(stringify(expectedValue))>" if let actual = try actualExpression.evaluate(), let expected = expectedValue { return actual <= expected } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { + return Predicate.fromDeprecatedClosure { 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) != ComparisonResult.orderedDescending - } + }.requireNonNil } public func <=(lhs: Expectation, rhs: T) { @@ -30,10 +30,10 @@ public func <=(lhs: Expectation, rhs: T) { lhs.to(beLessThanOrEqualTo(rhs)) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil:false) { actualExpression, failureMessage in + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift index 49272a3..2b18b4c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -72,37 +72,32 @@ extension UInt: ExpressibleByBooleanLiteral { } } -internal func matcherWithFailureMessage(_ matcher: NonNilMatcherFunc, postprocessor: @escaping (FailureMessage) -> Void) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - defer { postprocessor(failureMessage) } - return try matcher.matcher(actualExpression, failureMessage) - } +internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { + return Predicate { actualExpression in + let result = try matcher.satisfies(actualExpression) + return PredicateResult(status: result.status, message: message) + }.requireNonNil } // MARK: beTrue() / beFalse() /// A Nimble matcher that succeeds when the actual value is exactly true. /// This matcher will not match against nils. -public func beTrue() -> NonNilMatcherFunc { - return matcherWithFailureMessage(equal(true)) { failureMessage in - failureMessage.postfixMessage = "be true" - } +public func beTrue() -> Predicate { + return rename(equal(true), failureMessage: .expectedActualValueTo("be true")) } /// A Nimble matcher that succeeds when the actual value is exactly false. /// This matcher will not match against nils. -public func beFalse() -> NonNilMatcherFunc { - return matcherWithFailureMessage(equal(false)) { failureMessage in - failureMessage.postfixMessage = "be false" - } +public func beFalse() -> Predicate { + return rename(equal(false), failureMessage: .expectedActualValueTo("be false")) } // MARK: beTruthy() / beFalsy() /// A Nimble matcher that succeeds when the actual value is not logically false. -public func beTruthy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be truthy" +public func beTruthy() -> Predicate { + return Predicate.simpleNilable("be truthy") { actualExpression in let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { // FIXME: This is a workaround to SR-2290. @@ -110,20 +105,19 @@ public func beTruthy() -> MatcherFun // - 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 PredicateStatus(bool: number.boolValue == true) } - return actualValue == (true as T) + return PredicateStatus(bool: actualValue == (true as T)) } - return actualValue != nil + return PredicateStatus(bool: actualValue != nil) } } /// A Nimble matcher that succeeds when the actual value is logically false. /// This matcher will match against nils. -public func beFalsy() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be falsy" +public func beFalsy() -> Predicate { + return Predicate.simpleNilable("be falsy") { actualExpression in let actualValue = try actualExpression.evaluate() if let actualValue = actualValue { // FIXME: This is a workaround to SR-2290. @@ -131,39 +125,39 @@ public func beFalsy() -> MatcherFunc // - 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 PredicateStatus(bool: number.boolValue == false) } - return actualValue == (false as T) + return PredicateStatus(bool: actualValue == (false as T)) } - return actualValue == nil + return PredicateStatus(bool: actualValue == nil) } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beTruthyMatcher() -> NMBObjCMatcher { + @objc public class func beTruthyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTruthy().matches(expr, failureMessage: failureMessage) } } - public class func beFalsyMatcher() -> NMBObjCMatcher { + @objc public class func beFalsyMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalsy().matches(expr, failureMessage: failureMessage) } } - public class func beTrueMatcher() -> NMBObjCMatcher { + @objc public class func beTrueMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beTrue().matches(expr, failureMessage: failureMessage) } } - public class func beFalseMatcher() -> NMBObjCMatcher { + @objc public class func beFalseMatcher() -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try! beFalse().matches(expr, failureMessage: failureMessage) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift index a6fb31f..a22e0f4 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift @@ -1,17 +1,16 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "be nil" +public func beNil() -> Predicate { + return Predicate.simpleNilable("be nil") { actualExpression in let actualValue = try actualExpression.evaluate() - return actualValue == nil + return PredicateStatus(bool: actualValue == nil) } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beNilMatcher() -> NMBObjCMatcher { + @objc public class func beNilMatcher() -> NMBObjCMatcher { return NMBObjCMatcher { actualExpression, failureMessage in return try! beNil().matches(actualExpression, failureMessage: failureMessage) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift index 8f86265..f5bf22a 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift @@ -1,18 +1,18 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> MatcherFunc<()> { - return MatcherFunc { actualExpression, failureMessage in +public func beVoid() -> Predicate<()> { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "be void" let actualValue: ()? = try actualExpression.evaluate() return actualValue != nil } } -public func ==(lhs: Expectation<()>, rhs: ()) { +public func == (lhs: Expectation<()>, rhs: ()) { lhs.to(beVoid()) } -public func !=(lhs: Expectation<()>, rhs: ()) { +public func != (lhs: Expectation<()>, rhs: ()) { lhs.toNot(beVoid()) -} \ No newline at end of file +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift index ef6c603..c2ab568 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -1,58 +1,53 @@ import Foundation - /// A Nimble matcher that succeeds when the actual sequence's first element /// is equal to the expected value. -public func beginWith(_ startingElement: T) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" +public func beginWith(_ startingElement: T) -> Predicate + where S.Iterator.Element == T { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in if let actualValue = try actualExpression.evaluate() { var actualGenerator = actualValue.makeIterator() - return actualGenerator.next() == startingElement + return PredicateStatus(bool: actualGenerator.next() == startingElement) } - return false + return .fail } } /// A Nimble matcher that succeeds when the actual collection's first element /// is equal to the expected object. -public func beginWith(_ startingElement: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingElement)>" - guard let collection = try actualExpression.evaluate() else { return false } - guard collection.count > 0 else { return false } +public func beginWith(_ startingElement: Any) -> Predicate { + return Predicate.simple("begin with <\(startingElement)>") { actualExpression in + guard let collection = try actualExpression.evaluate() else { return .fail } + guard collection.count > 0 else { return .doesNotMatch } #if os(Linux) guard let collectionValue = collection.object(at: 0) as? NSObject else { - return false + return .fail } #else let collectionValue = collection.object(at: 0) as AnyObject #endif - return collectionValue.isEqual(startingElement) + return PredicateStatus(bool: collectionValue.isEqual(startingElement)) } } /// A Nimble matcher that succeeds when the actual string contains expected substring /// where the expected substring's location is zero. -public func beginWith(_ startingSubstring: String) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "begin with <\(startingSubstring)>" +public func beginWith(_ startingSubstring: String) -> Predicate { + return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in if let actual = try actualExpression.evaluate() { let range = actual.range(of: startingSubstring) - return range != nil && range!.lowerBound == actual.startIndex + return PredicateStatus(bool: range != nil && range!.lowerBound == actual.startIndex) } - return false + return .fail } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = try! actualExpression.evaluate() - if let _ = actual as? String { + if (actual as? String) != nil { let expr = actualExpression.cast { $0 as? String } return try! beginWith(expected as! String).matches(expr, failureMessage: failureMessage) } else { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift index 4400d30..f1afb72 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -1,16 +1,14 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence contains the expected value. -public func contain(_ items: T...) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ +public func contain(_ items: T...) -> Predicate + where S.Iterator.Element == T { return contain(items) } -public func contain(_ items: [T]) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in +public func contain(_ items: [T]) -> Predicate + where S.Iterator.Element == T { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" if let actual = try actualExpression.evaluate() { return items.all { @@ -18,16 +16,16 @@ public func contain(_ items: [T]) -> NonNilMatcherFun } } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: String...) -> NonNilMatcherFunc { +public func contain(_ substrings: String...) -> Predicate { return contain(substrings) } -public func contain(_ substrings: [String]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func contain(_ substrings: [String]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" if let actual = try actualExpression.evaluate() { return substrings.all { @@ -36,42 +34,42 @@ public func contain(_ substrings: [String]) -> NonNilMatcherFunc { } } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: NSString...) -> NonNilMatcherFunc { +public func contain(_ substrings: NSString...) -> Predicate { return contain(substrings) } -public func contain(_ substrings: [NSString]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func contain(_ substrings: [NSString]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(substrings))>" if let actual = try actualExpression.evaluate() { return substrings.all { actual.range(of: $0.description).length != 0 } } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(_ items: Any?...) -> NonNilMatcherFunc { +public func contain(_ items: Any?...) -> Predicate { return contain(items) } -public func contain(_ items: [Any?]) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func contain(_ items: [Any?]) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "contain <\(arrayAsString(items))>" guard let actual = try actualExpression.evaluate() else { return false } return items.all { item in return item != nil && actual.contains(item!) } - } + }.requireNonNil } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { + @objc public class func containMatcher(_ expected: [NSObject]) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() @@ -85,6 +83,7 @@ extension NMBObjCMatcher { let expr = Expression(expression: ({ value as String }), location: location) return try! contain(expected as! [String]).matches(expr, failureMessage: failureMessage) } else if actualValue != nil { + // swiftlint:disable:next line_length failureMessage.postfixMessage = "contain <\(arrayAsString(expected))> (only works for NSArrays, NSSets, NSHashTables, and NSStrings)" } else { failureMessage.postfixMessage = "contain <\(arrayAsString(expected))>" diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift new file mode 100644 index 0000000..ae0d854 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift @@ -0,0 +1,60 @@ +import Foundation + +public func containElementSatisfying(_ predicate: @escaping ((T) -> Bool), _ predicateDescription: String = "") -> Predicate where S.Iterator.Element == T { + + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + failureMessage.actualValue = nil + + if predicateDescription == "" { + failureMessage.postfixMessage = "find object in collection that satisfies predicate" + } else { + failureMessage.postfixMessage = "find object in collection \(predicateDescription)" + } + + if let sequence = try actualExpression.evaluate() { + for object in sequence { + if predicate(object) { + return true + } + } + + return false + } + + return false + }.requireNonNil +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + extension NMBObjCMatcher { + @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBObjCMatcher { + return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + let value = try! actualExpression.evaluate() + guard let enumeration = value as? NSFastEnumeration else { + // swiftlint:disable:next line_length + failureMessage.postfixMessage = "containElementSatisfying must be provided an NSFastEnumeration object" + failureMessage.actualValue = nil + failureMessage.expected = "" + failureMessage.to = "" + return false + } + + var iterator = NSFastEnumerationIterator(enumeration) + while let item = iterator.next() { + guard let object = item as? NSObject else { + continue + } + + if predicate(object) { + return true + } + } + + failureMessage.actualValue = nil + failureMessage.postfixMessage = "" + failureMessage.to = "to find object in collection that satisfies predicate" + return false + } + } + } +#endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift index b96e96c..a6f9f91 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -1,12 +1,10 @@ import Foundation - /// A Nimble matcher that succeeds when the actual sequence's last element /// is equal to the expected value. -public func endWith(_ endingElement: T) -> NonNilMatcherFunc - where S.Iterator.Element == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in +public func endWith(_ endingElement: T) -> Predicate + where S.Iterator.Element == T { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" if let actualValue = try actualExpression.evaluate() { @@ -17,17 +15,17 @@ public func endWith(_ endingElement: T) -> NonNilMatc lastItem = item item = actualGenerator.next() } while(item != nil) - + return lastItem == endingElement } return false - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual collection's last element /// is equal to the expected object. -public func endWith(_ endingElement: Any) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func endWith(_ endingElement: Any) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingElement)>" guard let collection = try actualExpression.evaluate() else { return false } guard collection.count > 0 else { return false } @@ -40,29 +38,28 @@ public func endWith(_ endingElement: Any) -> NonNilMatcherFunc NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func endWith(_ endingSubstring: String) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "end with <\(endingSubstring)>" if let collection = try actualExpression.evaluate() { return collection.hasSuffix(endingSubstring) } return false - } + }.requireNonNil } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { + @objc public class func endWithMatcher(_ expected: Any) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let actual = try! actualExpression.evaluate() - if let _ = actual as? String { + if (actual as? String) != nil { let expr = actualExpression.cast { $0 as? String } return try! endWith(expected as! String).matches(expr, failureMessage: failureMessage) } else { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift index 53579e0..9467154 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -4,18 +4,20 @@ 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 { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +public func equal(_ expectedValue: T?) -> Predicate { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in let actualValue = try actualExpression.evaluate() let matches = actualValue == expectedValue && expectedValue != nil if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - return false + return PredicateResult(status: .fail, message: msg) } - return matches + return PredicateResult(status: PredicateStatus(bool: matches), message: msg) } } @@ -23,74 +25,95 @@ public func equal(_ expectedValue: T?) -> NonNilMatcherFunc { /// Values can support equal by supporting the Equatable protocol. /// /// @see beCloseTo if you want to match imprecise types (eg - floats, doubles). -public func equal(_ expectedValue: [T: C]?) -> NonNilMatcherFunc<[T: C]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +public func equal(_ expectedValue: [T: C]?) -> Predicate<[T: C]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in let actualValue = try actualExpression.evaluate() if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - return false + return PredicateResult(status: .fail, message: msg) } - return expectedValue! == actualValue! + return PredicateResult( + status: PredicateStatus(bool: expectedValue! == actualValue!), + message: msg + ) } } /// A Nimble matcher that succeeds when the actual collection is equal to the expected collection. /// Items must implement the Equatable protocol. -public func equal(_ expectedValue: [T]?) -> NonNilMatcherFunc<[T]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +public func equal(_ expectedValue: [T]?) -> Predicate<[T]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in let actualValue = try actualExpression.evaluate() if expectedValue == nil || actualValue == nil { - if expectedValue == nil { - failureMessage.postfixActual = " (use beNil() to match nils)" + if expectedValue == nil && actualValue != nil { + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - return false + return PredicateResult( + status: .fail, + message: msg + ) } - return expectedValue! == actualValue! + return PredicateResult( + bool: expectedValue! == actualValue!, + message: msg + ) } } /// A Nimble matcher allowing comparison of collection with optional type -public func equal(_ expectedValue: [T?]) -> NonNilMatcherFunc<[T?]> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { + return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in if let actualValue = try actualExpression.evaluate() { + let doesNotMatch = PredicateResult( + status: .doesNotMatch, + message: msg + ) + if expectedValue.count != actualValue.count { - return false + return doesNotMatch } - + for (index, item) in actualValue.enumerated() { let otherItem = expectedValue[index] if item == nil && otherItem == nil { continue } else if item == nil && otherItem != nil { - return false + return doesNotMatch } else if item != nil && otherItem == nil { - return false + return doesNotMatch } else if item! != otherItem! { - return false + return doesNotMatch } } - - return true + + return PredicateResult( + status: .matches, + message: msg + ) } else { - failureMessage.postfixActual = " (use beNil() to match nils)" + return PredicateResult( + status: .fail, + message: msg.appendedBeNilHint() + ) } - - return false } } /// 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?) -> Predicate> { 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?) -> Predicate> { return equal(expectedValue, stringify: { if let set = $0 { return stringify(Array(set).sorted { $0 < $1 }) @@ -100,33 +123,49 @@ public func equal(_ expectedValue: Set?) -> NonNilMatcherFunc< }) } -private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> NonNilMatcherFunc> { - return NonNilMatcherFunc { actualExpression, failureMessage in - failureMessage.postfixMessage = "equal <\(stringify(expectedValue))>" +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { + return Predicate { actualExpression in + var errorMessage: ExpectationMessage = + .expectedActualValueTo("equal <\(stringify(expectedValue))>") if let expectedValue = expectedValue { if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "<\(stringify(actualValue))>" + errorMessage = .expectedCustomValueTo( + "equal <\(stringify(expectedValue))>", + "<\(stringify(actualValue))>" + ) if expectedValue == actualValue { - return true + return PredicateResult( + status: .matches, + message: errorMessage + ) } let missing = expectedValue.subtracting(actualValue) if missing.count > 0 { - failureMessage.postfixActual += ", missing <\(stringify(missing))>" + errorMessage = errorMessage.appended(message: ", missing <\(stringify(missing))>") } let extra = actualValue.subtracting(expectedValue) if extra.count > 0 { - failureMessage.postfixActual += ", extra <\(stringify(extra))>" + errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") } + return PredicateResult( + status: .doesNotMatch, + message: errorMessage + ) } + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) } else { - failureMessage.postfixActual = " (use beNil() to match nils)" + return PredicateResult( + status: .fail, + message: errorMessage.appendedBeNilHint() + ) } - - return false } } @@ -146,11 +185,11 @@ public func !=(lhs: Expectation<[T]>, rhs: [T]?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation>, rhs: Set?) { +public func == (lhs: Expectation>, rhs: Set?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation>, rhs: Set?) { +public func != (lhs: Expectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } @@ -162,17 +201,17 @@ public func !=(lhs: Expectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { lhs.toNot(equal(rhs)) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift index 5b24af2..93335a8 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -7,9 +7,10 @@ import Foundation /// A Nimble matcher that succeeds when the actual Collection's count equals /// the expected value -public func haveCount(_ expectedValue: T.IndexDistance) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func haveCount(_ expectedValue: T.IndexDistance) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { + // swiftlint:disable:next line_length failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" @@ -18,14 +19,15 @@ public func haveCount(_ expectedValue: T.IndexDistance) -> NonNil } else { return false } - } + }.requireNonNil } /// A Nimble matcher that succeeds when the actual collection's count equals /// the expected value -public func haveCount(_ expectedValue: Int) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in +public func haveCount(_ expectedValue: Int) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { + // swiftlint:disable:next line_length failureMessage.postfixMessage = "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" @@ -37,9 +39,9 @@ public func haveCount(_ expectedValue: Int) -> MatcherFunc { } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { + @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBObjCMatcher { return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in let location = actualExpression.location let actualValue = try! actualExpression.evaluate() diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift index 3ad5fb5..1e5762f 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -2,10 +2,10 @@ import Foundation /// A Nimble matcher that succeeds when the actual string satisfies the regular expression /// described by the expected string. -public func match(_ expectedValue: String?) -> NonNilMatcherFunc { - return NonNilMatcherFunc { actualExpression, failureMessage in +public func match(_ expectedValue: String?) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in failureMessage.postfixMessage = "match <\(stringify(expectedValue))>" - + if let actual = try actualExpression.evaluate() { if let regexp = expectedValue { return actual.range(of: regexp, options: .regularExpression) != nil @@ -13,13 +13,13 @@ public func match(_ expectedValue: String?) -> NonNilMatcherFunc { } return false - } + }.requireNonNil } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func matchMatcher(_ expected: NSString) -> NMBMatcher { + @objc 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/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift index 2092cb6..9c86fb7 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -1,26 +1,58 @@ import Foundation +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +public func matchError(_ error: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + let actualError: Error? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + } + return matches + }.requireNonNil +} + /// 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 +public func matchError(_ error: T) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in let actualError: Error? = try actualExpression.evaluate() setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) - return errorMatchesNonNilFieldsOrClosure(actualError, error: error) - } + + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + } + return matches + }.requireNonNil } /// 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 +public func matchError(_ errorType: T.Type) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in let actualError: Error? = try actualExpression.evaluate() - setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) - return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) - } + setFailureMessageForError( + failureMessage, + postfixMessageVerb: "match", + actualError: actualError, + errorType: errorType + ) + var matches = false + if actualError as? T != nil { + matches = true + } + return matches + }.requireNonNil } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift index 02d3245..abcafa9 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatcherFunc.swift @@ -1,14 +1,15 @@ -/// A convenience API to build matchers that don't need special negation +/// DEPRECATED: A convenience API to build matchers that don't need special negation /// behavior. The toNot() behavior is the negation of to(). /// /// @see NonNilMatcherFunc if you prefer to have this matcher fail when nil -/// values are recieved in an expectation. +/// values are received in an expectation. /// /// You may use this when implementing your own custom matchers. /// /// Use the Matcher protocol instead of this type to accept custom matchers as /// input parameters. /// @see allPass for an example that uses accepts other matchers as input. +@available(*, deprecated, message: "Use to Predicate instead") public struct MatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool @@ -23,9 +24,16 @@ public struct MatcherFunc: Matcher { public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { return try !matcher(actualExpression, failureMessage) } + + /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. + /// Note: You should definitely spend the time to convert to the new api as soon as possible + /// since this struct type is deprecated. + public var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } } -/// A convenience API to build matchers that don't need special negation +/// DEPRECATED: A convenience API to build matchers that don't need special negation /// behavior. The toNot() behavior is the negation of to(). /// /// Unlike MatcherFunc, this will always fail if an expectation contains nil. @@ -36,6 +44,7 @@ public struct MatcherFunc: Matcher { /// 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. +@available(*, deprecated, message: "Use to Predicate instead") public struct NonNilMatcherFunc: Matcher { public let matcher: (Expression, FailureMessage) throws -> Bool @@ -66,4 +75,11 @@ public struct NonNilMatcherFunc: Matcher { } return false } + + /// Compatibility layer to new Matcher API. Converts an old-style matcher to a new one. + /// Note: You should definitely spend the time to convert to the new api as soon as possible + /// since this struct type is deprecated. + public var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift index ac1eb9d..82f3cf0 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -1,17 +1,34 @@ import Foundation // `CGFloat` is in Foundation (swift-corelibs-foundation) on Linux. -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) import CoreGraphics #endif /// Implement this protocol to implement a custom matcher for Swift +@available(*, deprecated, message: "Use Predicate instead") public protocol Matcher { associatedtype ValueType func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool } -#if _runtime(_ObjC) +extension Matcher { + var predicate: Predicate { + return Predicate.fromDeprecatedMatcher(self) + } + + var toClosure: (Expression, FailureMessage, Bool) throws -> Bool { + return ({ expr, msg, expectedResult in + if expectedResult { + return try self.matches(expr, failureMessage: msg) + } else { + return try self.doesNotMatch(expr, failureMessage: msg) + } + }) + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) /// Objective-C interface to the Swift variant of Matcher. @objc public protocol NMBMatcher { func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool @@ -19,67 +36,51 @@ public protocol Matcher { } #endif -#if _runtime(_ObjC) /// Protocol for types that support contain() matcher. -@objc public protocol NMBContainer { - @objc(containsObject:) +public protocol NMBContainer { func contains(_ anObject: Any) -> Bool } +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) // FIXME: NSHashTable can not conform to NMBContainer since swift-DEVELOPMENT-SNAPSHOT-2016-04-25-a //extension NSHashTable : NMBContainer {} // Corelibs Foundation does not include this class yet -#else -public protocol NMBContainer { - func contains(_ anObject: Any) -> Bool -} #endif -extension NSArray : NMBContainer {} -extension NSSet : NMBContainer {} +extension NSArray: NMBContainer {} +extension NSSet: NMBContainer {} -#if _runtime(_ObjC) /// Protocol for types that support only beEmpty(), haveCount() matchers -@objc public protocol NMBCollection { - var count: Int { get } -} - -extension NSHashTable : NMBCollection {} // Corelibs Foundation does not include these classes yet -extension NSMapTable : NMBCollection {} -#else public protocol NMBCollection { var count: Int { get } } + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +extension NSHashTable: NMBCollection {} // Corelibs Foundation does not include these classes yet +extension NSMapTable: NMBCollection {} #endif -extension NSSet : NMBCollection {} -extension NSIndexSet : NMBCollection {} -extension NSDictionary : NMBCollection {} +extension NSSet: NMBCollection {} +extension NSIndexSet: NMBCollection {} +extension NSDictionary: NMBCollection {} -#if _runtime(_ObjC) /// Protocol for types that support beginWith(), endWith(), beEmpty() matchers -@objc public protocol NMBOrderedCollection : NMBCollection { - @objc(objectAtIndex:) +public protocol NMBOrderedCollection: NMBCollection { func object(at index: Int) -> Any } -#else -public protocol NMBOrderedCollection : NMBCollection { - func object(at index: Int) -> Any -} -#endif -extension NSArray : NMBOrderedCollection {} +extension NSArray: NMBOrderedCollection {} public protocol NMBDoubleConvertible { var doubleValue: CDouble { get } } -extension Double : NMBDoubleConvertible { +extension Double: NMBDoubleConvertible { public var doubleValue: CDouble { return self } } -extension Float : NMBDoubleConvertible { +extension Float: NMBDoubleConvertible { public var doubleValue: CDouble { return CDouble(self) } @@ -91,7 +92,7 @@ extension CGFloat: NMBDoubleConvertible { } } -extension NSNumber : NMBDoubleConvertible { +extension NSNumber: NMBDoubleConvertible { } private let dateFormatter: DateFormatter = { @@ -130,7 +131,7 @@ extension NSDate: TestOutputStringConvertible { /// beGreaterThan(), beGreaterThanOrEqualTo(), and equal() matchers. /// /// Types that conform to Swift's Comparable protocol will work implicitly too -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) @objc public protocol NMBComparable { func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult } @@ -141,12 +142,12 @@ public protocol NMBComparable { } #endif -extension NSNumber : NMBComparable { +extension NSNumber: NMBComparable { public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! NSNumber) } } -extension NSString : NMBComparable { +extension NSString: NMBComparable { public func NMB_compare(_ otherObject: NMBComparable!) -> ComparisonResult { return compare(otherObject as! String) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift index 84b9d49..ee886f1 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -1,9 +1,36 @@ import Foundation +// A workaround to SR-6419. +extension NotificationCenter { +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) + #if swift(>=4.0) + #if swift(>=4.0.2) + #else + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif + #elseif swift(>=3.2) + #if swift(>=3.2.2) + #else + // swiftlint:disable:next line_length + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif + #else + // swiftlint:disable:next line_length + func addObserver(forName name: Notification.Name?, object obj: Any?, queue: OperationQueue?, using block: @escaping (Notification) -> Void) -> NSObjectProtocol { + return addObserver(forName: name, object: obj, queue: queue, usingBlock: block) + } + #endif +#endif +} + internal class NotificationCollector { private(set) var observedNotifications: [Notification] private let notificationCenter: NotificationCenter - #if _runtime(_ObjC) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) private var token: AnyObject? #else private var token: NSObjectProtocol? @@ -15,14 +42,15 @@ internal class NotificationCollector { } func startObserving() { - self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil) { + // swiftlint:disable:next line_length + self.token = self.notificationCenter.addObserver(forName: nil, object: nil, queue: nil, using: { [weak self] n in // linux-swift gets confused by .append(n) - [weak self] n in self?.observedNotifications.append(n) - } + self?.observedNotifications.append(n) + }) } deinit { - #if _runtime(_ObjC) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) if let token = self.token { self.notificationCenter.removeObserver(token) } @@ -36,19 +64,17 @@ internal class NotificationCollector { private let mainThread = pthread_self() -let notificationCenterDefault = NotificationCenter.default - public func postNotifications( _ notificationsMatcher: T, - fromNotificationCenter center: NotificationCenter = notificationCenterDefault) - -> MatcherFunc + fromNotificationCenter center: NotificationCenter = .default) + -> Predicate where T: Matcher, T.ValueType == [Notification] { - let _ = mainThread // Force lazy-loading of this value + _ = mainThread // Force lazy-loading of this value let collector = NotificationCollector(notificationCenter: center) collector.startObserving() var once: Bool = false - return MatcherFunc { actualExpression, failureMessage in + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in let collectorNotificationsExpression = Expression(memoizedExpression: { _ in return collector.observedNotifications }, location: actualExpression.location, withoutCaching: true) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift new file mode 100644 index 0000000..e48d164 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift @@ -0,0 +1,348 @@ +// New Matcher API +// +import Foundation + +/// A Predicate is part of the new matcher API that provides assertions to expectations. +/// +/// Given a code snippet: +/// +/// expect(1).to(equal(2)) +/// ^^^^^^^^ +/// Called a "matcher" +/// +/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate +/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble +/// matcher API. +/// +/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, +/// predicates are simple wrappers around closures to provide static type information and +/// allow composition and wrapping of existing behaviors. +public struct Predicate { + fileprivate var matcher: (Expression) throws -> PredicateResult + + /// Constructs a predicate that knows how take a given value + public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { + self.matcher = matcher + } + + /// Uses a predicate on a given value to see if it passes the predicate. + /// + /// @param expression The value to run the predicate's logic against + /// @returns A predicate result indicate passing or failing and an associated error message. + public func satisfies(_ expression: Expression) throws -> PredicateResult { + return try matcher(expression) + } +} + +/// Provides convenience helpers to defining predicates +extension Predicate { + /// Like Predicate() constructor, but automatically guard against nil (actual) values + public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func define(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(msg)) + }.requireNonNil + } + + /// Defines a predicate with a default message that can be returned in the closure + /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. + public static func defineNilable(_ msg: String, matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { + return Predicate { actual in + return try matcher(actual, .expectedActualValueTo(msg)) + } + } +} + +extension Predicate { + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Also ensures the predicate's actual value cannot pass with `nil` given. + public static func simple(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) + }.requireNonNil + } + + /// Provides a simple predicate definition that provides no control over the predefined + /// error message. + /// + /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. + public static func simpleNilable(_ msg: String, matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { + return Predicate { actual in + return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(msg)) + } + } +} + +// Question: Should this be exposed? It's safer to not for now and decide later. +internal enum ExpectationStyle { + case toMatch, toNotMatch +} + +/// The value that a Predicates return to describe if the given (actual) value matches the +/// predicate. +public struct PredicateResult { + /// Status indicates if the predicate matches, does not match, or fails. + var status: PredicateStatus + /// The error message that can be displayed if it does not match + var message: ExpectationMessage + + /// Constructs a new PredicateResult with a given status and error message + public init(status: PredicateStatus, message: ExpectationMessage) { + self.status = status + self.message = message + } + + /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) + public init(bool: Bool, message: ExpectationMessage) { + self.status = PredicateStatus(bool: bool) + self.message = message + } + + /// Converts the result to a boolean based on what the expectation intended + internal func toBoolean(expectation style: ExpectationStyle) -> Bool { + return status.toBoolean(expectation: style) + } +} + +/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not +public enum PredicateStatus { + /// Matches indicates if the predicate / matcher passes with the given value + /// + /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. + case matches + /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* + /// succeed if the expectation was inverted. + /// + /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. + case doesNotMatch + /// Fail indicates the predicate will never satisfy with the given value in any case. + /// A perfect example is that most matchers fail whenever given `nil`. + /// + /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. + /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. + /// Your predicate will still need to guard against nils, but error messaging will be + /// handled for you. + case fail + + /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). + public init(bool matches: Bool) { + if matches { + self = .matches + } else { + self = .doesNotMatch + } + } + + private func shouldMatch() -> Bool { + switch self { + case .matches: return true + case .doesNotMatch, .fail: return false + } + } + + private func shouldNotMatch() -> Bool { + switch self { + case .doesNotMatch: return true + case .matches, .fail: return false + } + } + + /// Converts the PredicateStatus result to a boolean based on what the expectation intended + internal func toBoolean(expectation style: ExpectationStyle) -> Bool { + if style == .toMatch { + return shouldMatch() + } else { + return shouldNotMatch() + } + } +} + +// Backwards compatibility until Old Matcher API removal +extension Predicate: Matcher { + /// Compatibility layer for old Matcher API, deprecated + public static func fromDeprecatedFullClosure(_ matcher: @escaping (Expression, FailureMessage, Bool) throws -> Bool) -> Predicate { + return Predicate { actual in + let failureMessage = FailureMessage() + let result = try matcher(actual, failureMessage, true) + return PredicateResult( + status: PredicateStatus(bool: result), + message: failureMessage.toExpectationMessage() + ) + } + } + + /// Compatibility layer for old Matcher API, deprecated. + /// Emulates the MatcherFunc API + public static func fromDeprecatedClosure(_ matcher: @escaping (Expression, FailureMessage) throws -> Bool) -> Predicate { + return Predicate { actual in + let failureMessage = FailureMessage() + let result = try matcher(actual, failureMessage) + return PredicateResult( + status: PredicateStatus(bool: result), + message: failureMessage.toExpectationMessage() + ) + } + + } + + /// Compatibility layer for old Matcher API, deprecated. + /// Same as calling .predicate on a MatcherFunc or NonNilMatcherFunc type. + public static func fromDeprecatedMatcher(_ matcher: M) -> Predicate where M: Matcher, M.ValueType == T { + return self.fromDeprecatedFullClosure(matcher.toClosure) + } + + /// Deprecated Matcher API, use satisfies(_:_) instead + public func matches(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let result = try satisfies(actualExpression) + result.message.update(failureMessage: failureMessage) + return result.toBoolean(expectation: .toMatch) + } + + /// Deprecated Matcher API, use satisfies(_:_) instead + public func doesNotMatch(_ actualExpression: Expression, failureMessage: FailureMessage) throws -> Bool { + let result = try satisfies(actualExpression) + result.message.update(failureMessage: failureMessage) + return result.toBoolean(expectation: .toNotMatch) + } +} + +extension Predicate { + // Someday, make this public? Needs documentation + internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { + return Predicate { actual -> PredicateResult in + let result = try self.satisfies(actual) + return try f(actual, result) + } + } + + /// Returns a new Predicate based on the current one that always fails if nil is given as + /// the actual value. + /// + /// This replaces `NonNilMatcherFunc`. + public var requireNonNil: Predicate { + return after { actual, result in + if try actual.evaluate() == nil { + return PredicateResult( + status: .fail, + message: result.message.appendedBeNilHint() + ) + } + return result + } + } +} + +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) +public typealias PredicateBlock = (_ actualExpression: Expression) -> NMBPredicateResult + +public class NMBPredicate: NSObject { + private let predicate: PredicateBlock + + public init(predicate: @escaping PredicateBlock) { + self.predicate = predicate + } + + func satisfies(_ expression: @escaping () -> NSObject!, location: SourceLocation) -> NMBPredicateResult { + let expr = Expression(expression: expression, location: location) + return self.predicate(expr) + } +} + +extension NMBPredicate: NMBMatcher { + public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let result = satisfies(actualBlock, location: location).toSwift() + result.message.update(failureMessage: failureMessage) + return result.status.toBoolean(expectation: .toMatch) + } + + public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + let result = satisfies(actualBlock, location: location).toSwift() + result.message.update(failureMessage: failureMessage) + return result.status.toBoolean(expectation: .toNotMatch) + } +} + +final public class NMBPredicateResult: NSObject { + public var status: NMBPredicateStatus + public var message: NMBExpectationMessage + + public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { + self.status = status + self.message = message + } + + public init(bool success: Bool, message: NMBExpectationMessage) { + self.status = NMBPredicateStatus.from(bool: success) + self.message = message + } + + public func toSwift() -> PredicateResult { + return PredicateResult(status: status.toSwift(), + message: message.toSwift()) + } +} + +extension PredicateResult { + public func toObjectiveC() -> NMBPredicateResult { + return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) + } +} + +final public class NMBPredicateStatus: NSObject { + private let status: Int + private init(status: Int) { + self.status = status + } + + public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) + public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) + public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) + + public override var hashValue: Int { return self.status.hashValue } + + public override func isEqual(_ object: Any?) -> Bool { + guard let otherPredicate = object as? NMBPredicateStatus else { + return false + } + return self.status == otherPredicate.status + } + + public static func from(status: PredicateStatus) -> NMBPredicateStatus { + switch status { + case .matches: return self.matches + case .doesNotMatch: return self.doesNotMatch + case .fail: return self.fail + } + } + + public static func from(bool success: Bool) -> NMBPredicateStatus { + return self.from(status: PredicateStatus(bool: success)) + } + + public func toSwift() -> PredicateStatus { + switch status { + case NMBPredicateStatus.matches.status: return .matches + case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch + case NMBPredicateStatus.fail.status: return .fail + default: + internalError("Unhandle status for NMBPredicateStatus") + } + } +} + +extension PredicateStatus { + public func toObjectiveC() -> NMBPredicateStatus { + return NMBPredicateStatus.from(status: self) + } +} + +#endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift index 09e28c7..60553bd 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -1,7 +1,7 @@ import Foundation // This matcher requires the Objective-C, and being built by Xcode rather than the Swift Package Manager -#if _runtime(_ObjC) && !SWIFT_PACKAGE +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE /// A Nimble matcher that succeeds when the actual expression raises an /// exception with the specified name, reason, and/or userInfo. @@ -16,8 +16,8 @@ public func raiseException( named: String? = nil, reason: String? = nil, userInfo: NSDictionary? = nil, - closure: ((NSException) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in + closure: ((NSException) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in var exception: NSException? let capture = NMBExceptionCapture(handler: ({ e in @@ -29,11 +29,25 @@ public func raiseException( return } - setFailureMessageForException(failureMessage, exception: exception, named: named, reason: reason, userInfo: userInfo, closure: closure) - return exceptionMatchesNonNilFieldsOrClosure(exception, named: named, reason: reason, userInfo: userInfo, closure: closure) + setFailureMessageForException( + failureMessage, + exception: exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) + return exceptionMatchesNonNilFieldsOrClosure( + exception, + named: named, + reason: reason, + userInfo: userInfo, + closure: closure + ) } } +// swiftlint:disable:next function_parameter_count internal func setFailureMessageForException( _ failureMessage: FailureMessage, exception: NSException?, @@ -52,7 +66,7 @@ internal func setFailureMessageForException( if let userInfo = userInfo { failureMessage.postfixMessage += " with userInfo <\(userInfo)>" } - if let _ = closure { + if closure != nil { failureMessage.postfixMessage += " that satisfies block" } if named == nil && reason == nil && userInfo == nil && closure == nil { @@ -60,6 +74,7 @@ internal func setFailureMessageForException( } if let exception = exception { + // swiftlint:disable:next line_length failureMessage.actualValue = "\(String(describing: type(of: exception))) { name=\(exception.name), reason='\(stringify(exception.reason))', userInfo=\(stringify(exception.userInfo)) }" } else { failureMessage.actualValue = "no exception" @@ -97,11 +112,11 @@ internal func exceptionMatchesNonNilFieldsOrClosure( } } } - + return matches } -public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { +public class NMBObjCRaiseExceptionMatcher: NSObject, NMBMatcher { internal var _name: String? internal var _reason: String? internal var _userInfo: NSDictionary? @@ -114,7 +129,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { _block = block } - public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + @objc public func matches(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { let block: () -> Any? = ({ _ = actualBlock(); return nil }) let expr = Expression(expression: block, location: location) @@ -126,11 +141,11 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { ).matches(expr, failureMessage: failureMessage) } - public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { + @objc public func doesNotMatch(_ actualBlock: @escaping () -> NSObject!, failureMessage: FailureMessage, location: SourceLocation) -> Bool { return !matches(actualBlock, failureMessage: failureMessage, location: location) } - public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { + @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { return ({ name in return NMBObjCRaiseExceptionMatcher( name: name, @@ -141,7 +156,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { + @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { return ({ reason in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -152,7 +167,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { + @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { return ({ userInfo in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -163,7 +178,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { }) } - public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { + @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { return ({ block in return NMBObjCRaiseExceptionMatcher( name: self._name, @@ -176,7 +191,7 @@ public class NMBObjCRaiseExceptionMatcher : NSObject, NMBMatcher { } extension NMBObjCMatcher { - public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { + @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift index b24b3ec..d02a0ff 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -2,63 +2,107 @@ import Foundation /// A Nimble matcher that succeeds when the actual value matches with any of the matchers /// provided in the variable list of matchers. -public func satisfyAnyOf(_ matchers: U...) -> NonNilMatcherFunc - where U: Matcher, U.ValueType == T -{ +public func satisfyAnyOf(_ matchers: U...) -> Predicate + where U: Matcher, U.ValueType == T { return satisfyAnyOf(matchers) } -internal func satisfyAnyOf(_ matchers: [U]) -> NonNilMatcherFunc - where U: Matcher, U.ValueType == T -{ - return NonNilMatcherFunc { actualExpression, failureMessage in - let postfixMessages = NSMutableArray() - var matches = false - for matcher in matchers { - if try matcher.matches(actualExpression, failureMessage: failureMessage) { - matches = true +/// Deprecated. Please use `satisfyAnyOf(_) -> Predicate` instead. +internal func satisfyAnyOf(_ matchers: [U]) -> Predicate + where U: Matcher, U.ValueType == T { + return NonNilMatcherFunc { actualExpression, failureMessage in + let postfixMessages = NSMutableArray() + var matches = false + for matcher in matchers { + if try matcher.matches(actualExpression, failureMessage: failureMessage) { + matches = true + } + postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) } - postfixMessages.add(NSString(string: "{\(failureMessage.postfixMessage)}")) - } - failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") - if let actualValue = try actualExpression.evaluate() { - failureMessage.actualValue = "\(actualValue)" - } + failureMessage.postfixMessage = "match one of: " + postfixMessages.componentsJoined(by: ", or ") + if let actualValue = try actualExpression.evaluate() { + failureMessage.actualValue = "\(actualValue)" + } - return matches - } + return matches + }.predicate +} + +internal func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { + return Predicate { actualExpression in + var postfixMessages = [String]() + var matches = false + for predicate in predicates { + let result = try predicate.satisfies(actualExpression) + if result.toBoolean(expectation: .toMatch) { + matches = true + } + postfixMessages.append("{\(result.message.expectedMessage)}") + } + + var msg: ExpectationMessage + if let actualValue = try actualExpression.evaluate() { + msg = .expectedCustomValueTo( + "match one of: " + postfixMessages.joined(separator: ", or "), + "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match one of: " + postfixMessages.joined(separator: ", or ") + ) + } + + return PredicateResult( + status: PredicateStatus(bool: matches), + message: msg + ) + }.requireNonNil } -public func ||(left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> NonNilMatcherFunc { +public func || (left: Predicate, right: Predicate) -> Predicate { + return satisfyAnyOf(left, right) +} + +public func || (left: NonNilMatcherFunc, right: NonNilMatcherFunc) -> Predicate { return satisfyAnyOf(left, right) } -public func ||(left: MatcherFunc, right: MatcherFunc) -> NonNilMatcherFunc { +public func || (left: MatcherFunc, right: MatcherFunc) -> Predicate { return satisfyAnyOf(left, right) } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) extension NMBObjCMatcher { - public class func satisfyAnyOfMatcher(_ matchers: [NMBObjCMatcher]) -> NMBObjCMatcher { - return NMBObjCMatcher(canMatchNil: false) { actualExpression, failureMessage in + @objc public class func satisfyAnyOfMatcher(_ matchers: [NMBMatcher]) -> NMBPredicate { + return NMBPredicate { actualExpression in if matchers.isEmpty { - failureMessage.stringValue = "satisfyAnyOf must be called with at least one matcher" - return false + return NMBPredicateResult( + status: NMBPredicateStatus.fail, + message: NMBExpectationMessage( + fail: "satisfyAnyOf must be called with at least one matcher" + ) + ) } - - var elementEvaluators = [NonNilMatcherFunc]() + + var elementEvaluators = [Predicate]() for matcher in matchers { - let elementEvaluator: (Expression, FailureMessage) -> Bool = { - expression, failureMessage in - return matcher.matches( - {try! expression.evaluate()}, failureMessage: failureMessage, location: actualExpression.location) + let elementEvaluator = Predicate { expression in + if let predicate = matcher as? NMBPredicate { + // swiftlint:disable:next line_length + return predicate.satisfies({ try! expression.evaluate() }, location: actualExpression.location).toSwift() + } else { + let failureMessage = FailureMessage() + // swiftlint:disable:next line_length + let success = matcher.matches({ try! expression.evaluate() }, failureMessage: failureMessage, location: actualExpression.location) + return PredicateResult(bool: success, message: failureMessage.toExpectationMessage()) + } } - - elementEvaluators.append(NonNilMatcherFunc(elementEvaluator)) + + elementEvaluators.append(elementEvaluator) } - - return try! satisfyAnyOf(elementEvaluators).matches(actualExpression, failureMessage: failureMessage) + + return try! satisfyAnyOf(elementEvaluators).satisfies(actualExpression).toObjectiveC() } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift index 67f9cf6..a530c60 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -1,16 +1,16 @@ import Foundation -public func throwAssertion() -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - #if arch(x86_64) && _runtime(_ObjC) && !SWIFT_PACKAGE +public func throwAssertion() -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + #if arch(x86_64) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE failureMessage.postfixMessage = "throw an assertion" failureMessage.actualValue = nil - + var succeeded = true - + let caughtException: BadInstructionException? = catchBadInstruction { #if os(tvOS) - if (!NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning) { + if !NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning { print() print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + "fatal error while using throwAssertion(), please disable 'Debug Executable' " + @@ -36,11 +36,11 @@ public func throwAssertion() -> MatcherFunc { 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." + @@ -49,7 +49,8 @@ public func throwAssertion() -> MatcherFunc { #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") + "by placing the test case inside an #if arch(x86_64) or (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) conditional statement") + // swiftlint:disable:previous line_length #endif } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift index 8c9b91b..872ca5c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -1,5 +1,127 @@ import Foundation +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparison by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError() -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + failureMessage.postfixMessage = "throw any error" + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } + return actualError != nil + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + var matches = false + if let actualError = actualError, errorMatchesExpectedError(actualError, expectedError: error) { + matches = true + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + return matches + } +} + +/// A Nimble matcher that succeeds when the actual expression throws an +/// error of the specified type or from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +/// +/// Alternatively, you can pass a closure to do any arbitrary custom matching +/// to the thrown error. The closure only gets called when an error was thrown. +/// +/// nil arguments indicates that the matcher should not attempt to match against +/// that parameter. +public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: error, + errorType: nil, + closure: closure + ) + var matches = false + if let actualError = actualError as? T, error == actualError { + matches = true + + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + return matches + } +} + /// A Nimble matcher that succeeds when the actual expression throws an /// error of the specified type or from the specified case. /// @@ -12,21 +134,92 @@ import Foundation /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. public func throwError( - _ error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError + errorType: T.Type, + closure: ((T) -> Void)? = nil) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError( + failureMessage, + actualError: actualError, + error: nil, + errorType: errorType, + closure: closure + ) + var matches = false + if let actualError = actualError { + matches = true + if let actualError = actualError as? T { + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } else { + matches = (actualError is T) + // The closure expects another ErrorProtocol as argument, so this + // is _supposed_ to fail, so that it becomes more obvious. + if let closure = closure { + let assertions = gatherExpectations { + if let actual = actualError as? T { + closure(actual) + } + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } } + } - setFailureMessageForError(failureMessage, actualError: actualError, error: error, errorType: errorType, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, error: error, errorType: errorType, closure: closure) + 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 `Error` in the closure. +/// +/// The closure only gets called when an error was thrown. +public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError } + + setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + return matches + } } /// A Nimble matcher that succeeds when the actual expression throws any @@ -36,18 +229,30 @@ public func throwError( /// values of the existential type `Error` in the closure. /// /// The closure only gets called when an error was thrown. -public func throwError( - closure: ((Error) -> Void)? = nil) -> MatcherFunc { - return MatcherFunc { actualExpression, failureMessage in - - var actualError: Error? - do { - _ = try actualExpression.evaluate() - } catch let catchedError { - actualError = catchedError +public func throwError(closure: @escaping ((T) -> Void)) -> Predicate { + return Predicate.fromDeprecatedClosure { actualExpression, failureMessage in + + var actualError: Error? + do { + _ = try actualExpression.evaluate() + } catch let catchedError { + actualError = catchedError + } + + setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) + + var matches = false + if let actualError = actualError as? T { + matches = true + + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false } - - setFailureMessageForError(failureMessage, actualError: actualError, closure: closure) - return errorMatchesNonNilFieldsOrClosure(actualError, closure: closure) } + return matches + } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift new file mode 100644 index 0000000..01369bb --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift @@ -0,0 +1,37 @@ +/** + Used by the `toSucceed` matcher. + + This is the return type for the closure. + */ +public enum ToSucceedResult { + case succeeded + case failed(reason: String) +} + +/** + A Nimble matcher that takes in a closure for validation. + + Return `.succeeded` when the validation succeeds. + Return `.failed` with a failure reason when the validation fails. + */ +public func succeed() -> Predicate<() -> ToSucceedResult> { + return Predicate.define { actualExpression in + let optActual = try actualExpression.evaluate() + guard let actual = optActual else { + return PredicateResult(status: .fail, message: .fail("expected a closure, got ")) + } + + switch actual() { + case .succeeded: + return PredicateResult( + bool: true, + message: .expectedCustomValueTo("succeed", "") + ) + case .failed(let reason): + return PredicateResult( + bool: false, + message: .expectedCustomValueTo("succeed", " because <\(reason)>") + ) + } + } +} diff --git a/Pods/Nimble/Sources/Nimble/Nimble.h b/Pods/Nimble/Sources/Nimble/Nimble.h index 790d16d..2bbc693 100644 --- a/Pods/Nimble/Sources/Nimble/Nimble.h +++ b/Pods/Nimble/Sources/Nimble/Nimble.h @@ -3,11 +3,10 @@ #import "NMBStringify.h" #import "DSL.h" -#import "CwlCatchException.h" -#import "CwlCatchBadInstruction.h" - -#if !TARGET_OS_TV - #import "mach_excServer.h" +#if TARGET_OS_TV + #import "CwlPreconditionTesting_POSIX.h" +#else + #import "CwlPreconditionTesting.h" #endif FOUNDATION_EXPORT double NimbleVersionNumber; diff --git a/Pods/Nimble/Sources/Nimble/Utils/Async.swift b/Pods/Nimble/Sources/Nimble/Utils/Async.swift index c902692..c77a8fc 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Async.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Async.swift @@ -2,7 +2,7 @@ import CoreFoundation import Dispatch import Foundation -#if !_runtime(_ObjC) +#if !(os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) import CDispatch #endif @@ -27,12 +27,12 @@ internal protocol WaitLock { } internal class AssertionWaitLock: WaitLock { - private var currentWaiter: WaitingInfo? = nil + private var currentWaiter: WaitingInfo? init() { } func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - #if _runtime(_ObjC) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) let isMainThread = Thread.isMainThread #else let isMainThread = _CFIsMainThread() @@ -89,7 +89,7 @@ internal enum AwaitResult { func isCompleted() -> Bool { switch self { - case .completed(_): return true + case .completed: return true default: return false } } @@ -105,11 +105,15 @@ internal class AwaitPromise { signal = DispatchSemaphore(value: 1) } + deinit { + signal.signal() + } + /// Resolves the promise with the given result if it has not been resolved. Repeated calls to /// this method will resolve in a no-op. /// /// @returns a Bool that indicates if the async result was accepted or rejected because another - /// value was recieved first. + /// value was received first. func resolveResult(_ result: AwaitResult) -> Bool { if signal.wait(timeout: .now()) == .success { self.asyncResult = result @@ -176,16 +180,25 @@ internal class AwaitPromiseBuilder { // checked. // // In addition, stopping the run loop is used to halt code executed on the main run loop. + #if swift(>=4.0) + trigger.timeoutSource.schedule( + deadline: DispatchTime.now() + timeoutInterval, + repeating: .never, + leeway: timeoutLeeway + ) + #else trigger.timeoutSource.scheduleOneshot( deadline: DispatchTime.now() + timeoutInterval, - leeway: timeoutLeeway) - trigger.timeoutSource.setEventHandler() { + leeway: timeoutLeeway + ) + #endif + trigger.timeoutSource.setEventHandler { guard self.promise.asyncResult.isIncomplete() else { return } let timedOutSem = DispatchSemaphore(value: 0) let semTimedOutOrBlocked = DispatchSemaphore(value: 0) semTimedOutOrBlocked.signal() let runLoop = CFRunLoopGetMain() - #if _runtime(_ObjC) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) let runLoopMode = CFRunLoopMode.defaultMode.rawValue #else let runLoopMode = kCFRunLoopDefaultMode @@ -218,7 +231,7 @@ internal class AwaitPromiseBuilder { /// @discussion /// This function must be executed on the main thread and cannot be nested. This is because /// this function (and it's related methods) coordinate through the main run loop. Tampering - /// with the run loop can cause undesireable behavior. + /// with the run loop can cause undesirable behavior. /// /// This method will return an AwaitResult in the following cases: /// @@ -252,7 +265,7 @@ internal class AwaitPromiseBuilder { // Stopping the run loop does not work unless we run only 1 mode _ = RunLoop.current.run(mode: .defaultRunLoopMode, before: .distantFuture) } - self.trigger.timeoutSource.suspend() + self.trigger.timeoutSource.cancel() if let asyncSource = self.trigger.actionSource { asyncSource.cancel() @@ -282,20 +295,23 @@ internal class Awaiter { } func performBlock( - _ closure: @escaping (@escaping (T) -> Void) throws -> Void) -> AwaitPromiseBuilder { + file: FileString, + line: UInt, + _ closure: @escaping (@escaping (T) -> Void) throws -> Void + ) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) var completionCount = 0 let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { - try closure() { + try closure { completionCount += 1 - nimblePrecondition( - completionCount < 2, - "InvalidNimbleAPIUsage", - "Done closure's was called multiple times. waitUntil(..) expects its " + - "completion closure to only be called once.") - if promise.resolveResult(.completed($0)) { - CFRunLoopStop(CFRunLoopGetMain()) + if completionCount < 2 { + if promise.resolveResult(.completed($0)) { + CFRunLoopStop(CFRunLoopGetMain()) + } + } else { + fail("waitUntil(..) expects its completion closure to be only called once", + file: file, line: line) } } } @@ -313,8 +329,12 @@ internal class Awaiter { let asyncSource = createTimerSource(asyncQueue) let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { let interval = DispatchTimeInterval.nanoseconds(Int(pollInterval * TimeInterval(NSEC_PER_SEC))) + #if swift(>=4.0) + asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) + #else asyncSource.scheduleRepeating(deadline: .now(), interval: interval, leeway: pollLeeway) - asyncSource.setEventHandler() { + #endif + asyncSource.setEventHandler { do { if let result = try closure() { if promise.resolveResult(.completed(result)) { @@ -347,14 +367,10 @@ internal func pollBlock( expression: @escaping () throws -> Bool) -> AwaitResult { let awaiter = NimbleEnvironment.activeInstance.awaiter let result = awaiter.poll(pollInterval) { () throws -> Bool? in - do { - if try expression() { - return true - } - return nil - } catch let error { - throw error + if try expression() { + return true } + return nil }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval / 2.0).wait(fnName, file: file, line: line) return result diff --git a/Pods/Nimble/Sources/Nimble/Utils/Errors.swift b/Pods/Nimble/Sources/Nimble/Utils/Errors.swift index d424c98..074cb20 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Errors.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Errors.swift @@ -12,15 +12,11 @@ internal func setFailureMessageForError( failureMessage.postfixMessage = "\(postfixMessageVerb) error" if let error = error { - if let error = error as? CustomDebugStringConvertible { - failureMessage.postfixMessage += " <\(error.debugDescription)>" - } else { - failureMessage.postfixMessage += " <\(error)>" - } + failureMessage.postfixMessage += " <\(error)>" } else if errorType != nil || closure != nil { failureMessage.postfixMessage += " from type <\(T.self)>" } - if let _ = closure { + if closure != nil { failureMessage.postfixMessage += " that satisfies block" } if error == nil && errorType == nil && closure == nil { @@ -41,63 +37,6 @@ internal func errorMatchesExpectedError( && actualError._code == expectedError._code } -internal func errorMatchesExpectedError( - _ actualError: Error, - expectedError: T) -> Bool - where T: Equatable -{ - if let actualError = actualError as? T { - return actualError == expectedError - } - return false -} - -internal func errorMatchesNonNilFieldsOrClosure( - _ actualError: Error?, - error: T? = nil, - errorType: T.Type? = nil, - closure: ((T) -> Void)? = nil) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let error = error { - if !errorMatchesExpectedError(actualError, expectedError: error) { - matches = false - } - } - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError as T) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } else if errorType != nil { - matches = (actualError is T) - // The closure expects another ErrorProtocol as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - if let closure = closure { - let assertions = gatherExpectations { - if let actual = actualError as? T { - closure(actual) - } - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } - } - - return matches -} - // Non-generic internal func setFailureMessageForError( @@ -106,7 +45,7 @@ internal func setFailureMessageForError( closure: ((Error) -> Void)?) { failureMessage.postfixMessage = "throw error" - if let _ = closure { + if closure != nil { failureMessage.postfixMessage += " that satisfies block" } else { failureMessage.postfixMessage = "throw any error" @@ -118,25 +57,3 @@ internal func setFailureMessageForError( 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/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift index a7279aa..4e37aef 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift @@ -5,13 +5,13 @@ import Foundation // stdlib, and because recent versions of the XCTest overlay require `StaticString` // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on Mac), we // have to use `String` instead because StaticString can't be generated from Objective-C -#if _runtime(_ObjC) -public typealias FileString = String -#else +#if SWIFT_PACKAGE public typealias FileString = StaticString +#else +public typealias FileString = String #endif -public final class SourceLocation : NSObject { +public final class SourceLocation: NSObject { public let file: FileString public let line: UInt diff --git a/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift b/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift index 012e1e3..cd6de20 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/Stringers.swift @@ -1,6 +1,5 @@ import Foundation - internal func identityAsString(_ value: Any?) -> String { let anyObject: AnyObject? #if os(Linux) @@ -51,7 +50,7 @@ extension NSNumber: TestOutputStringConvertible { // 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. @@ -87,14 +86,14 @@ extension AnySequence: TestOutputStringConvertible { 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)]" } @@ -149,11 +148,11 @@ 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) } @@ -165,7 +164,7 @@ public func stringify(_ value: T?) -> String { return "nil" } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) @objc public class NMBStringer: NSObject { @objc public class func stringify(_ obj: Any?) -> String { return Nimble.stringify(obj) diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h index 54677ee..caa3f7c 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h +++ b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h @@ -30,12 +30,12 @@ NS_ASSUME_NONNULL_BEGIN #define DEFINE_NMB_EXPECT_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBExpectation *NMB_expect(TYPE(^actualBlock)(), NSString *file, NSUInteger line) { \ + NMBExpectation *NMB_expect(TYPE(^actualBlock)(void), NSString *file, NSUInteger line) { \ return NMB_expect(^id { return EXPR; }, file, line); \ } NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBExpectation *NMB_expect(id(^actualBlock)(), NSString *file, NSUInteger line); + NMBExpectation *NMB_expect(id(^actualBlock)(void), NSString *file, NSUInteger line); // overloaded dispatch for nils - expect(nil) DEFINE_NMB_EXPECT_OVERLOAD(void*, nil) @@ -60,7 +60,7 @@ NS_ASSUME_NONNULL_BEGIN -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line); +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line); @@ -186,6 +186,8 @@ NIMBLE_EXPORT_INLINE id beginWith(id itemElementOrSubstring) { DEFINE_OVERLOAD(unsigned long, @(expectedValue)) DEFINE_OVERLOAD(int, @(expectedValue)) DEFINE_OVERLOAD(unsigned int, @(expectedValue)) + DEFINE_OVERLOAD(float, @(expectedValue)) + DEFINE_OVERLOAD(double, @(expectedValue)) DEFINE_OVERLOAD(long long, @(expectedValue)) DEFINE_OVERLOAD(unsigned long long, @(expectedValue)) DEFINE_OVERLOAD(char, @(expectedValue)) @@ -322,6 +324,10 @@ NIMBLE_EXPORT id NMB_containWithNilTermination(id itemOrSubstring, . #define contain(...) NMB_contain(__VA_ARGS__) #endif +NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)); +NIMBLE_SHORT(id containElementSatisfying(BOOL(^predicate)(id)), + NMB_containElementSatisfying(predicate)); + NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring); NIMBLE_SHORT(id endWith(id itemElementOrSubstring), NMB_endWith(itemElementOrSubstring)); diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m index cd93ddd..5a145b8 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -4,8 +4,8 @@ SWIFT_CLASS("_TtC6Nimble7NMBWait") @interface NMBWait : NSObject -+ (void)untilTimeout:(NSTimeInterval)timeout file:(NSString *)file line:(NSUInteger)line action:(void(^)())action; -+ (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())action; ++ (void)untilTimeout:(NSTimeInterval)timeout file:(NSString *)file line:(NSUInteger)line action:(void (^ _Nonnull)(void (^ _Nonnull)(void)))action; ++ (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void (^ _Nonnull)(void (^ _Nonnull)(void)))action; @end @@ -13,14 +13,14 @@ + (void)untilFile:(NSString *)file line:(NSUInteger)line action:(void(^)())actio NS_ASSUME_NONNULL_BEGIN -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(), NSString *__nonnull file, NSUInteger line) { +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBExpectation *__nonnull NMB_expect(id __nullable(^actualBlock)(void), NSString *__nonnull file, NSUInteger line) { return [[NMBExpectation alloc] initWithActualBlock:actualBlock negative:NO file:file line:line]; } -NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(), NSString *file, NSUInteger line) { +NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSString *file, NSUInteger line) { return NMB_expect(^id{ actualBlock(); return nil; @@ -113,6 +113,10 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBObjCMatcher containMatcher:itemOrSubstringArray]; } +NIMBLE_EXPORT id NMB_containElementSatisfying(BOOL(^predicate)(id)) { + return [NMBObjCMatcher containElementSatisfyingMatcher:predicate]; +} + NIMBLE_EXPORT id NMB_endWith(id itemElementOrSubstring) { return [NMBObjCMatcher endWithMatcher:itemElementOrSubstring]; } @@ -142,13 +146,13 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger } NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { - return ^(NSTimeInterval timeout, void (^action)(void (^)(void))) { + return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { [NMBWait untilTimeout:timeout file:file line:line action:action]; }; } NIMBLE_EXPORT NMBWaitUntilBlock NMB_waitUntilBuilder(NSString *file, NSUInteger line) { - return ^(void (^action)(void (^)(void))) { + return ^(void (^ _Nonnull action)(void (^ _Nonnull)(void))) { [NMBWait untilFile:file line:line action:action]; }; } diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h index e0ec05a..e6e0272 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h @@ -3,8 +3,8 @@ @interface NMBExceptionCapture : NSObject -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally; -- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally; +- (void)tryBlock:(__attribute__((noescape)) void(^ _Nonnull)(void))unsafeBlock NS_SWIFT_NAME(tryBlock(_:)); @end diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m index 0a882b7..3381047 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.m @@ -2,12 +2,12 @@ @interface NMBExceptionCapture () @property (nonatomic, copy) void(^ _Nullable handler)(NSException * _Nullable); -@property (nonatomic, copy) void(^ _Nullable finally)(); +@property (nonatomic, copy) void(^ _Nullable finally)(void); @end @implementation NMBExceptionCapture -- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)())finally { +- (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnull))handler finally:(void(^ _Nullable)(void))finally { self = [super init]; if (self) { self.handler = handler; @@ -16,7 +16,7 @@ - (nonnull instancetype)initWithHandler:(void(^ _Nullable)(NSException * _Nonnul return self; } -- (void)tryBlock:(void(^ _Nonnull)())unsafeBlock { +- (void)tryBlock:(void(^ _Nonnull)(void))unsafeBlock { @try { unsafeBlock(); } diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h index e5d5ddd..7938bca 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h @@ -4,7 +4,7 @@ * Returns a string appropriate for displaying in test output * from the provided value. * - * @param value A value that will show up in a test's output. + * @param anyObject A value that will show up in a test's output. * * @return The string that is returned can be * customized per type by conforming a type to the `TestOutputStringConvertible` diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index e337027..e5538c0 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,110 +7,117 @@ objects = { /* Begin PBXBuildFile section */ - 047A68C646E00EB6D7D4D7343B801D09 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3DC9FAE16E2DD68869AF1B29FA0A42A /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 048CB7D541B3B4B3CD2202B1A2AA42D8 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = C42C5B691F88D400838222A950546155 /* ErrorUtility.swift */; }; - 07722FBCF6B380961B9D2832D5883F45 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DEE1F436B68692319DE23FF7A16197E /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0AEC20AACF9B10846830274E3B2AA6FD /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 226C1AC4144C4405F39189731DF06CEC /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0ECEEBC712D404AA6CF1E76A9284BFF9 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = FB4B011BF1B4ECE6DC8D463CBA2E5EF7 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 110A640A9BE45841BA938B4C29EF5446 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4F0F33EFE650B5CE4774260C8F19455E /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 127CD37052B8E0BC645D83D4664F59D4 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 856B2E5E4EC8E2BD9ED45AAD6930A672 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 17261E344C2027602431A636759AC7F2 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 627AA9D56F221212717BC6C0D69D5091 /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 19CE19012813358015F0E027BF6DC976 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 49AF9D9E9BF733396E9E801393E6C10F /* QCKDSL.m */; }; - 1C50F54510D5C2B2AD84D7B74A6EDEBB /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = A9265D9D90339F897C0C6F78088E7BEB /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1C7CA1FAFBF8B865596C739FEA39CDEE /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 91C1B940CAE99BBBBC563963CD22996B /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 22C1DE74D494C10BBE727F239A68447D /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FBF7128876ED36020056A396B66AC27 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 234BFC45ACAC4A8FB945EA17B6A74B0B /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 623285D9DBDE57EEBB2AC7A9C9663905 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 23E2E1E02FE79EE1E1688CBBAA777297 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA2A27C4B8DBD796FF529A57FD25B53F /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 24EF979DB6A2B88464E07F5C5937EE14 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */; }; - 27B262F95D3CF9E3C74541A41929691C /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = D4621A1C4746AC480C7F889631FC8F57 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 320854015265EF6277CA073080DB1BAD /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 1994804C15E018526C78E3AA0DEFF054 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 33F9B85F26F3874ACFF7CD5DF76C68AB /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 06A989D72663C047BC47DCC622F66FB5 /* QuickSpec.m */; }; - 38C3BEBC71B3E8D536EE7A8CEE7275BA /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 81DD63D0E746C06C1F7567210AD80A79 /* QuickSelectedTestSuiteBuilder.swift */; }; - 3915DBB4731CB17B255A7FE86E240B6E /* CwlCatchBadInstruction.m in Sources */ = {isa = PBXBuildFile; fileRef = 4CEE6D090220683EB93ACD11A04038DD /* CwlCatchBadInstruction.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 455073787A3F0941A95ABE24D3AEABB2 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7BDE47B2FE86C887FC8019C041BBB1FE /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 469E9C3ED9FD6009F7C9AAF9E537E212 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = CE7DD158EC41F47A2796AB19C2CD1AD8 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4DDAB2A9B809E6D22DB18E718B101631 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 8C33038D662C60BCD958328580E7438C /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4E3F6E8CF5C210B57EE8640200215AA9 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 6137764203F68DD3C80397DF73F677AC /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 4F27AA5D3E55DAE636E1B510B97DF1E9 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = AECEA2EDA41473899EE391CA038EDC38 /* XCTest.framework */; }; - 4F3F103945CC52D0A3B8A891BB0E21C4 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 30778608352B15B9CFC7475AD8F932AB /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4FB3C3160C59F40193FDCFAC0876359F /* String+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF10FB1A495235AFCC59693A7F0F5708 /* String+FileName.swift */; }; - 50B80F12A9BAE302F07F6CF94752F462 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 0BC4F2CA1ACAB7C5DC246E5970464CA7 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 551440A0F92574039C1D2EB39227D6B8 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = BC3735170CDCA6A1C7E7D0E1876ED22B /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 599669823A2EED2928C77F301F6B0515 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C7B2E4FE5801A893DA4774DEC2C3985 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5C5F39245799AA5DD0197F0F6691EB84 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 121014C803EAD4DC51829FDA23BCADA6 /* ExampleHooks.swift */; }; - 62744EF299751FB49B5FCD81D8C8FFF7 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 208F66BD9FCF9E4BBBDCC434971F5113 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 64D6B12299BA264C67A1BCE0FDE0FAB9 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B61E8D3E9D121174B375148D6C10C6E /* HooksPhase.swift */; }; - 65F5217D44A557FC16218DE5DE348C35 /* CwlCatchBadInstruction.h in Headers */ = {isa = PBXBuildFile; fileRef = F9550ABBCFEA5EE7A657664A6BD9E1F7 /* CwlCatchBadInstruction.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6CDBA48C3A8621E4EE1DAFFE240F0D82 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5A4E497DD63B34CAF4112164C7D5C267 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6E397D9FB11A47E48D70287D734B12B2 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 31F522E7A1E6B249CF89B55968863A58 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 737E19F3254F5929263982C29237C0BA /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6A47E312B3885EF64B81BD590AD21B4 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 74031C856297E532E47F34786EB60E68 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = DF7EABDCC39B9B8DB73114838A7F7DC2 /* Callsite.swift */; }; - 74FD712F3B503891B6BD9E5CD287E481 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCCFAE0EFBD62266157ABDA892351069 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 76036D32625A56D480D84AA46961EF91 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = BCBDD456B535FEADB8D72DB83652D74D /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 78F3DE174B4F8D368EF8EEFD7EE62087 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8C64DCE9D714CA88C06BDCC413FD3661 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7D6269A3CFE53C28DAA6B92E8FC017A7 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 18CEB9B86795A0FDAA385DB81A49672B /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7F6750C7B1847733370B18C4CBFE32DF /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4EE1F2D1C9D5935F6B6B5CC49C89E323 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7FE2883D6EBD544641DE389DF766F61F /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5577B9533B505701B6B8BD927676BEDF /* ExampleMetadata.swift */; }; - 8015239010C1D642F14C105F8FF8E035 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5AC2EAD622CBF58EAD71675C54310955 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 80B632316CBA416E41F02DD165F7B675 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */; }; - 8507F4BF7437EB40A3626EDCC68BFF6D /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = D1BBF1DEB58CE50279BE9C836B3DE1E1 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8654571F855691C23B7B8E61B2141944 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5058B4852C449730EE28E5F2CD349B24 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 86FFB76B2EDCF4AE79CC4C0BD8A0FE9A /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2DAB46B24EC3101A9C139178DD3C5F2 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 87DD62F200DAB5E1D701AB9F94D1D422 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = 9BB1FA4E1DD555F459E31D6ECB9DB70C /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8C30EAD5FFD28B387099B41C74657A67 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 215D2DBBD2F1901DAD0BA635F194457A /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8E2CC1BCEE1CCEC690A71E5B34426708 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = D28B2800FDF12318ACA5F5DBE510C973 /* QuickConfiguration.m */; }; - 917949F596E1188261FC59214782C3D9 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 72B50685A7115CB568F2F23A42E31BEA /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 947162383483B6391F8CDF38249BFBD2 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = B4E171821B1D0ED4DB541E993A5B631F /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9544A4EEC2A8448743ECA9981F88B60F /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF53CCA7C0DCBC78C82FED3FBDD6BF88 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9AF235C16362BA00BFBF12147907E953 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C33CF42AD6E1A448E98D4CAFB155DAA /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9BEBD1791C233763A8DC13080BFB99C9 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2F54711B380CFE23B29ACEF631A3929 /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9E95D6E15DBE9B0FC92AAF60D42D1464 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = F795FA3DE9E15CB7DD017F791C55A8AC /* Nimble-dummy.m */; }; - A23B77348C6EA3985C11D7C0093E83EB /* NSString+QCKSelectorName.m in Sources */ = {isa = PBXBuildFile; fileRef = 59EB76E621C8755DF95EE8DDC2B7D3DC /* NSString+QCKSelectorName.m */; }; - A33F1754198E8E8CCC7087F6176FFDC8 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 10FFD83D547B8B236BCBB6812BC65762 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A448F837592E21D9387322E8DA0DD93F /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = C97C4E97A47F53078887A61504367F9A /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A57B0E4BDDB177D142A5146B7E7D37F6 /* Pods-LeeGoTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 729F16C30B6274DA672D3ECD6388035A /* Pods-LeeGoTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A82F24F413A5B799D20AD4B520315AFB /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 304505C0F1B221D485B302E2CE50F1F9 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - A91166D0A5E8F1D5D5377622C381C045 /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1C9A478DF22318E51905AFC8BF831B2D /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AB05294543A9496CDC109ADF5500F40D /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 1D8EA7085BF13E9F8CFBE94FFDC15988 /* Quick-dummy.m */; }; - AB255C27EF10E742C6567775022F49D5 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = D6C53CB242E67876DD3964EC5C775479 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC0B24EF198E3BEDFCC9F25D7B8EEDAB /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = FCEC90FE3EA43490331DC53C67E7DE5B /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC29CC89E22273BF0D0DC2C841B7524C /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = C69EC1174FCE1660F05AF470B443E0E7 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B093484B1637B3D3AF65DF2232FDBADC /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = B85EE744366A34C7FDACC881DF2B63AB /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - B191688F386B15A6D52F27041D2AD45D /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = C1518EBA50C2AF0B14455D2294C76038 /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - B1D918961FBFC6AF64510C1A044D7F2B /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = C04ED5D70AFD1276F89B7864AFF47B96 /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; - B9BD565DAB07F8E2288A960A1D3EFAC1 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = ACB1FA806FF532E4E4DF8E6B4FFEB9C6 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BB10A2D0B1EE5B1BA811354116F83E3F /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 62A5C7D27930FA6D032FA0D83D8E8239 /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BB34F76D2FF37A0C4BDCAD552B148597 /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 737A82FCDA66C02D7D479C048DB2024B /* ExampleGroup.swift */; }; - BBD082C2025E0BC8CA4E0067BF25F247 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 819A575F359D9CC99E7A834A8DD76FE9 /* DSL.swift */; }; - BE1A0D1C2939E5BC6B055E05C5A31510 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = FB8055C076D64C8F4113B12B35839A9A /* Closures.swift */; }; - BF3AF1D2B46E09E2B3DCC824E6C1F5AF /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = C12298FB0CC92BD3BD16C958F3718416 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C0E0C6351F88B8C5B995BB8B372AD895 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */; }; - CB7558CCDD935C9E82BBF454022ED1D3 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05E8C36BA4865751AB3994028E5BE98B /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CE3FA6AE0944D4AE737F0E57CFF4A615 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = BA22155F3C9AB9685BF4ED3A389D109A /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CE4CEF6328E255B380E2B2692B351CF8 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = A91D06EDAC9BBAD13C3148F1E86A9AD4 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - CF18F976D04838F3B5A6F1DC047B2DD9 /* NSString+QCKSelectorName.h in Headers */ = {isa = PBXBuildFile; fileRef = D98C8E0613D6A9703B32EF66CEC66F15 /* NSString+QCKSelectorName.h */; settings = {ATTRIBUTES = (Project, ); }; }; - D2CC7D44F6DCD3459C2324F80735D701 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = D8593AD35173FBE77030F2D197B14FAB /* NSBundle+CurrentTestBundle.swift */; }; - D88575ED37BC462E8130CDBEFE9EA308 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 60A4CF4AA34D746BEB8F62EA84D9F202 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DB462DF46A9D66FC5C69B0638CCEEA96 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DF9D722BA3C848F0B22BA1EC3D350C9 /* SuiteHooks.swift */; }; - DC32331BE565888E694E1321BB1D80F5 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 86806CF3A6F7FB54DF0EEB9134380E4E /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DCEE854E62441E78FED15CC994497F61 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 06E793A8549531332D1762623F08F9BF /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - DD630998F1441804CE820F6FBC9210CC /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8601E6DFDFEE896F928FE9B3086F90F /* Filter.swift */; }; - E5CCEF0B83F8272D10671C01AAE4FFA0 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AA367A34E0B8C1B01749CCC12FD43C5 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E6089EAAD293B443D5BB11BA815D7865 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B7E28761C1C8F0D60BC9747BF68D1C9B /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; - E86254173AFD7B53AE0DB84C8C525FF9 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = B44A77CEE68F660091F34ABFAEEBC6F1 /* QuickTestSuite.swift */; }; - EBA52C16F42E42A1824D87C284F4A60C /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 525B5EB32452EE8123EA3E65FDC81622 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F2EB651EBF1C4A4500632FBBE2E26978 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7A924660943DF4DCD57E3A85BF6FB095 /* World.swift */; }; - F4A1B7A059AAA6727EB70E58E09332A4 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C6329DD1EE75A68AA931A2192C28C69 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F60D221B548716DF35193FC2CF244676 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 71937B4B91A62971088D88CADF9D17CC /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F693D0A9E0D05F815A85DC258E75AF8D /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = CCD0E5C7B919B722CBA4C68A93D55A7A /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; - F75C849DB5BF242889E93090C8E58992 /* Pods-LeeGoTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 041322DAFC52BA04979D3BC3B1629AC6 /* Pods-LeeGoTests-dummy.m */; }; - F963E36C0CDF72319F0B9B1AA93F862B /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88BA7AEF2D8D3AF6041413BDF1702FB3 /* Example.swift */; }; - F9D61EB5EEB799105913685722FF4C9C /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = F26BA5A6FE4D418C4B347B819197FA63 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F9E05A63D447B51E008B89731192FE7F /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33C4401213EBEC6BC1797D974E52767D /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FAB4ECE0C5039D99BB7173880670871D /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 104135CFA58204DC8EBF1167E28F5206 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FB3B454C437962309C0D21110C73E6AD /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = CC1192DACE9ABA6C9B169B9EBA366C9A /* World+DSL.swift */; }; - FC04F54461FC080A4E9402D17F926C4E /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4D539FB87A15C293A79566EBF3F9E109 /* Configuration.swift */; }; - FCFFEB587281358CFF05A65ED9E94C12 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FE7DAEFE89DD4FD50B980F9C9D6B7B2 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0A2CA8B0DD7E300ABFCF1956E6B58248 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 2727DBDF3F41A52F002F6B1992165881 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0AE66323ADA7A11F049075963048ACB1 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 3FBDD60AB5EC0183A198A13D9A5D7BCE /* XCTest.framework */; }; + 0AEB0026DDAD4B260B3126EA80BB28E7 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D8173434FE00016739EAFDEFEA9313 /* Foundation.framework */; }; + 143CDE1B7AAD7550DC3B5FA19AB759FE /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = B6D48A33A49B17952C7ABB6214240CB9 /* URL+FileName.swift */; }; + 17C8EE7DF3F57C8F99EAF63C6E61EA99 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5626FB74EE8784DFFFC4B80B1061AB4 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1A3E19B9F5EEB773C3BB61CA42F8BF62 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D35B9829391F58D646F665CACF28F89 /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1B384FD5822537DB8064022679AE086D /* NSString+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 057B1682EF92E71137867F0C259AF2CC /* NSString+C99ExtendedIdentifier.swift */; }; + 1E1CE28FFCCD7499620B47C910E9B9E9 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 645422FB2E7D26E7DD6556CCAC35DAF0 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 1E2B3483E2D97AA59BE8945F7ACA3FD8 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8737F3E0C1FB1ABDDC8F61A081B1F76B /* World.swift */; }; + 22E9F6FA56858A5F7A5D664E5968ECB0 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 88CCA655A571DD68102067AFB473BD77 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 25D1805055756CAA69A167CA03B2465C /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2DD6CC02AD6D4C0E7D1169EF9ECB3706 /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 27BDC2902972602E8EA42A7F6A83759B /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = 24FAED8BD878439BC32BE461165E4E08 /* ErrorUtility.swift */; }; + 29A65FF7D1752DFFF87F5DC8F55CE859 /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = CCE295D4D0ED3F1666C5921320F0E2C6 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 31C39ED8CB1C9317F1F2840FC919662D /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9E0D34DBF4CE55E4FF1BADBA826F9389 /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 32B38992751B96F21324BFC9923BFCBD /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 495BFC3F9A44D525D4BFC5B10557E6C3 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 35CADB1AD8E063A35DF68147F3183206 /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = EF959663D47B18687B5785D72D856CB6 /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3B3A88E074630B1EBC2139F4F70F0443 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0AB0094EAAC3C18B000459B228F01637 /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3B5274566B8419D18AEF2E4FA0A36B24 /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 1C846417EADDAAFF733CF6AC8FEB5EEA /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 3C66D2692E811DAE57A244A67E7AC555 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = D31FA66A5FC0844A36FC1358ACE2220C /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3D1A89FDD6B579BAA92AD398E5C019F9 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = BAA7B55BBFC51CA440749FF23010D40E /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3E04D23B2995705A6106D41F3E3E4E33 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = B4273097B1D0DCCA1E22978B03474F2F /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 41C783192F7ECD485C8C6384D30CBF11 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B6BAD1D6087151AE80585CD387919BA /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 42EAAE8CFB95F2352FCE036F263263E1 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 53D1429ABADDB303927AEA89A830C740 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 448467C5A780E9AA05314FCF88DEB677 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 7D9A924C203A11767BBF4D9C3737DA5D /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + 45F183320C688F9978649F30ABE21D09 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35AEA5EE84902B2868710A17C747AE0E /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 4B0C9589A6481496F6B8F111F31D7C83 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E8E430D83F3CC7F72E348A0B222C46F /* QuickTestSuite.swift */; }; + 4BB4C9429190D1C57A7E026E2E34E924 /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C7D6328493B73EF741AC61F4CEF01E /* QuickSelectedTestSuiteBuilder.swift */; }; + 4C149C625B2323BCBB00227B2070A660 /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = E585A4F6C1434FD922B8371E432B5051 /* QuickSpecBase.m */; }; + 4CDACD8A5A6CFB688838AA988E7D1E43 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A4C7C0F330B57E3287FCFAF89776AF4F /* Nimble-dummy.m */; }; + 4EBCFFB6BEFC352E9F16804DB992615A /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 12989D830FCE4AEF54A357265111CAEF /* QCKDSL.m */; }; + 4FABBF5CA8F735F48035BE4144613CB7 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 014CC71E572C5CC14ADFA82A8B7B97DC /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 50698F14E7847E18B907E9373FBF4C21 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D8173434FE00016739EAFDEFEA9313 /* Foundation.framework */; }; + 54CC2049C937561A469575AF9E6A6FE9 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6642EE042EBCD8FB5BA4D88BAF4EAB36 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 55A8920996C3EC10F0BE13BCCA845874 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = DBEE4D473415B347A54A2E432EE8EEF7 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 58C0125D796A97541FDE3414001D8A92 /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5B11548A6516BB21526619897608E9F /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 58D964317DFBB10F54A273CB12843017 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 440EEE98EDFE4F4752E17AFA3F550530 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5AB9DB61D62D8BF7B1C734B373F361E7 /* CurrentTestCaseTracker.h in Headers */ = {isa = PBXBuildFile; fileRef = 0F18AD3DFDC80322BBE0B149EC31BCC7 /* CurrentTestCaseTracker.h */; settings = {ATTRIBUTES = (Private, ); }; }; + 5BF274C2DEF332ED79B1CD15CFEC3498 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 47578CD4C4970729A947555C915B2317 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5DBCC0E4C72649C9A39A00D40D944DDA /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 69CFEBDFF127350398462FF823B76A13 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5F9AFDECC14365CD10F3D83D50020E32 /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 9F7F7F422628BD0102712BD3296ED4AD /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 61400A521201DBCDC4CBF35F40E05AE2 /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5C4D786F262665CE8C9113FA91745753 /* Filter.swift */; }; + 62D26CE7BA3AEDB4E5E87218FDCBBA90 /* Functional.swift in Sources */ = {isa = PBXBuildFile; fileRef = D954E7E4D336837086313DAE758F7F32 /* Functional.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6593C547A71CCEFC480CD578080A327F /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = 835B6DA0EF74C46A43F1142347E4B44E /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 65985C142EE8A74E6E56D5E30A39C79C /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3018B485E8310AC7A651EF03D32D0823 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 68FD03C72D719117929696B62038B3D7 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2192785265D796ADAF8B5DE3C97DD4CE /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 69B80157634D6FAF248D37F397732357 /* CwlPreconditionTesting.h in Headers */ = {isa = PBXBuildFile; fileRef = CAB52415DA15D60348D226639C322706 /* CwlPreconditionTesting.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 6BB0EBEB4730B94AC07458E398D142C8 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8F4384CDA1479E6D88E3486B78FD7485 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 6CB4890B9BF5F846E980634AFE83917D /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 24FAA89E2AC44E204B5E39B77BD6B921 /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7195BF38C2966BDBBD8AA9DDD22FF34C /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73C1D1A0D20C667FAF4F01C3BA4AC451 /* Behavior.swift */; }; + 73BC5AC2ECDB8722E085F14B53E0D24E /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = B2C2E6D41C88E8547B16FD2C42FEF515 /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 75538A8B20C7A20AF3D54BBF35D56FFE /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = B54E8617109E65C3B975FE6AB81F0562 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 75ABB48E3C30C2D736C3D05D6FD566A8 /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 605EF2A73B22D3E0863B202A2B7CFDEE /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 75E5FDE42449EC1F917641B0ED037CC3 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 301223B3EB74E21CDB1303C459B57231 /* ExampleHooks.swift */; }; + 7B5222991D1C53DF737242CA6C90012C /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = C949E12BA82E3B6636449B775694F4F3 /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7BA2A412DB4711124FFA20C934EF7BA7 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 38A82DE4A0130E4C946A904FEDDD74CA /* QuickSpec.m */; }; + 7C08AD1027A55213CC1481A412CE9768 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9C78BF27F3A2B7B1368FE2E4317B6557 /* DSL.swift */; }; + 7C8217EA6B0B135426919FB2B7246444 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = B9985CC02179403DC54B3460DCE486AC /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7E0C9AE6468A5DF91F0F4C7A387D725C /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC9AD5FA0EE5E85143D7DD2030D6818D /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8170866E2ACE0ACFBC6D90081354EC65 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34B5614CBE84B80AA39F75553B3C322A /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8B55BD430033027AD5FF22D630DD9F62 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 82267A98670DE3E96EAB2047A8872FE0 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8B5BDB67BD2CF4C771C9039D7AE81F0F /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 65B4CDEF78BF13177A9303C1E765E5F6 /* World+DSL.swift */; }; + 8D1810D4027F8DEBDEF3A7C482CB5D9A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = E5D8173434FE00016739EAFDEFEA9313 /* Foundation.framework */; }; + 8FC5ACFD6C6C867C1C0143AB605CECB0 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = EEBCF9B57684FD89791D983A4733101F /* Quick-dummy.m */; }; + 925AE0083E743F34AACE80B3038CA3F9 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 42DD07575CFDE63DE6412F425FDBED71 /* SuiteHooks.swift */; }; + 96132E7432F8DD315A88A07C6B4F9C72 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = E15D0BD895E38B9512195BFED925B0F7 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 988EED125395950177DC14AF9BC87D8D /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 698366519E8DF1484C0AE2845EB47D7F /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A272932A4DF9AC2D3B0A21AC70606F6D /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = B887FE600257A86B38E726B0E1D628AF /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A57B0E4BDDB177D142A5146B7E7D37F6 /* Pods-LeeGoTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = FB1620D5CFCB6AF404B911AC7B9CD910 /* Pods-LeeGoTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + A61ADD214AA182EEB2AC95EA3F3D658F /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 187D1EDF80EB0D8FC035AC3570D09DD5 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A74537420FF0CEDC6B9E82E1DC4C2B15 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = CE1C0594000452979B62B1798B1A59E8 /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A7C13C62E4116CA964A3E82179092AD5 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7F8524E2A1A324B13D66AAB576C8C742 /* NMBObjCMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A9C3C71D3A8A9628E0B63FC4A2CA9804 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9245B48A46AAC45502A6B8A2AB745038 /* HooksPhase.swift */; }; + AAA2830BBCD86431B3EEB0ED968DF4A3 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = C57921338FECDDCDAAC88A57C2055737 /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + ADEE95A3A188BE3095990E20766BCCC8 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4751C923ACB051055F76821461557965 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AE4DA49ECD693BF384CD824DF02D7C6E /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 613C21AD6E98946BCAA54F25374CE020 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AF1174085D9BC5D50FCE0480E9C2BE94 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40E944EFD24B41C7BD60837DFABAFB06 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B102ABE4E54B71B3D2C2118E2782FAB9 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1AB10174D3955FC8BF42A3B45B4C011 /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B14FCCF2C84AB3E93FB4612D9C5ABC0C /* World.h in Headers */ = {isa = PBXBuildFile; fileRef = 129DA04B381B509DAEDD565711C5A0DA /* World.h */; settings = {ATTRIBUTES = (Project, ); }; }; + B2C151B20635A480E1937E3D2B509BB4 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = A45DFC46E4EDF480399017D92090D5C1 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BC7B9761322C74FA27969BD55833BA47 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77125F245BAE7809A034657A48A40830 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BD8BD37B4103E5D314C4188EDBFA8C8B /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 6D2E298780429D096F1EC434CFC3B225 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + BEFB96135769A65ABFF3EE7291BBD809 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = D685C0D509328CD8778F99DD53A49A48 /* Closures.swift */; }; + BF3B7218901760A6226C7F6346BEF454 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBD64278700877FA62EC38F4B27A4881 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C06FA100C1BBEE34B863BCB8A65359C1 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 55E9F8B6E78A1CAF1BEE982E163FA968 /* MatcherFunc.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C128E16BFCB471143B3B3D86BE41C9C6 /* World+DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 467F00CAF06ADEF612F697F068843FB2 /* World+DSL.h */; settings = {ATTRIBUTES = (Project, ); }; }; + C1D862177DC2999FAC710AC25F253BD0 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = F2C33F4DC31A8120E8743B2A6163585F /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C2467221FCD579800B9CD8FBBDB10B4D /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7FE66AEC1DADAB5A835D219A5EC52ABA /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C2C88D1375857D58485862CB2149CF3C /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = EA8315675F3D2B2385E834043F85C676 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + C8320A6164C870ADDB8A855ADEBBBDC9 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 15A5A2213F831D11D721E17AA14BFB58 /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + CCDAF11E7AF29E720C587B038145F622 /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CC8DBE433A202DCF807B91BB5557F6D /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + CF55697859D633C852C3586384647EB6 /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 240CEA0915AA3241F6A49CB65CEC8767 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D6EAB9669C4CCFCBF6D7D40D0E3A646A /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 829CA47FBDF0A83BF67F7102D4CD40E6 /* ExampleGroup.swift */; }; + D9E62C41794D0B5D2CD68CA92C4BA836 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 679FFD5386CAB1887F96D8FF6D84B7B8 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + DACDE56B381B7BFEBA603EEDD350DE72 /* Configuration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4FEA1DF1C7C22E7B20D2DC30FB9D3EF1 /* Configuration.swift */; }; + DF026F6F406A4FB6CEA63B0A4B9E27DD /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 26D7B54C77385B78FFA011C64D94E436 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E6184782E8E062F0B53F45FF74E062D6 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8452C5F4B63A4A0178E56CDC9E95DFE8 /* ExampleMetadata.swift */; }; + EAAA05EBBC34225C0DB45797712E24A1 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0BE63B47CD572A17C6AFDF8853BFCA4F /* AsyncMatcherWrapper.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EAE2AAE5EB826B38978692984BB22FDD /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = A6288AE2766817391D894EE944596984 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EB06F2366BA6B4DDDF3427C9A1D961F2 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75B78AC1C0059E66BD95A9F0CD2D24F5 /* NSBundle+CurrentTestBundle.swift */; }; + EB3A73071ABA60E77E0704649637D8BD /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 77C2834A0AE71F3E85759885C0557533 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EBB7D1A0B182BF219DCE2AAECCD4454F /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 8EF0EA564D82AB46B710DC6096C1EA6B /* QuickConfiguration.m */; }; + EE1E29F50D53F1F84F3A607A50A088D9 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20C9E93FDAF76CEA15A9E23CC159DED1 /* Callsite.swift */; }; + EF8548E0C37E8888D9DDC11ED89D3568 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DE960FDA70783D86C4832257093317D2 /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F28003B228B82B7E1497D4F41F55A31E /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67C7BB2DC0DED3CBCF5D776D9E39AB30 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F3BAA36614ABDBC0538B0DEA99CF80A0 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = EADFE06546D2FE7C91DF557E0F5ED093 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F4BD249C60F21F5E0F7C1FAC8A5BC2AF /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1D9DA3454B15DE38784FA22A452C0121 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F51B46CE5B6DD69661607FB6F4536F38 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BA4794DD94D5DE6BFFFEEC72B8C43E3 /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; + F724744BAFFE1E2CD0663B1B42CA2AFB /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = B38F7EB4258060BAA361D06EF1B16D9B /* Example.swift */; }; + F75C849DB5BF242889E93090C8E58992 /* Pods-LeeGoTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 07C590B3DC02CE631ECCF5D2963AB612 /* Pods-LeeGoTests-dummy.m */; }; + F9649DD59BAEE88C6864EEFE73ECA88C /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5378FB44B13DD72D6D9510C786BA96C5 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + FB433A84B0A557CD5E5948A8B6705024 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 2294B6CCB2D8D93AE1F605AAA6A03240 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -125,134 +132,141 @@ isa = PBXContainerItemProxy; containerPortal = D41D8CD98F00B204E9800998ECF8427E /* Project object */; proxyType = 1; - remoteGlobalIDString = 1321E318D10CFDC9F5B93A7952492CCD; + remoteGlobalIDString = DD7C8BF89FE8053D0A2A2D88BB49CF07; remoteInfo = Nimble; }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 041322DAFC52BA04979D3BC3B1629AC6 /* Pods-LeeGoTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LeeGoTests-dummy.m"; sourceTree = ""; }; - 05E8C36BA4865751AB3994028E5BE98B /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; - 06A989D72663C047BC47DCC622F66FB5 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; - 06E793A8549531332D1762623F08F9BF /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - 07657AAD9A8C349C277A5F2E67CD29B4 /* Pods-LeeGoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LeeGoTests.debug.xcconfig"; sourceTree = ""; }; - 0BC4F2CA1ACAB7C5DC246E5970464CA7 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.c; sourceTree = ""; }; - 104135CFA58204DC8EBF1167E28F5206 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; - 10FFD83D547B8B236BCBB6812BC65762 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 121014C803EAD4DC51829FDA23BCADA6 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - 14537A5EC332D4F5F8A2D483B328CC37 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Nimble.modulemap; sourceTree = ""; }; - 18CEB9B86795A0FDAA385DB81A49672B /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - 1994804C15E018526C78E3AA0DEFF054 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 1BBE788E6EBEE817760AE46FEE7B932D /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = Quick.modulemap; sourceTree = ""; }; - 1C9A478DF22318E51905AFC8BF831B2D /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - 1D8EA7085BF13E9F8CFBE94FFDC15988 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - 208F66BD9FCF9E4BBBDCC434971F5113 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - 215D2DBBD2F1901DAD0BA635F194457A /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; - 226C1AC4144C4405F39189731DF06CEC /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - 2DEE1F436B68692319DE23FF7A16197E /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; - 2DF9D722BA3C848F0B22BA1EC3D350C9 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - 304505C0F1B221D485B302E2CE50F1F9 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - 30778608352B15B9CFC7475AD8F932AB /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; - 30F689BC8B81D1056E432C3548425A3D /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 31F522E7A1E6B249CF89B55968863A58 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - 32343C8281B13DD7FE4F6D40BDF37C6A /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - 33C4401213EBEC6BC1797D974E52767D /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - 3B61E8D3E9D121174B375148D6C10C6E /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - 3BA1749B6350D4231655E6B4AC28652C /* Pods_LeeGoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Pods_LeeGoTests.framework; path = "Pods-LeeGoTests.framework"; sourceTree = BUILT_PRODUCTS_DIR; }; - 3BE6AE3E9B59CC9DECE8F989016F5B9A /* Pods-LeeGoTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LeeGoTests-acknowledgements.plist"; sourceTree = ""; }; - 49AF9D9E9BF733396E9E801393E6C10F /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; - 4C6329DD1EE75A68AA931A2192C28C69 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; - 4CEE6D090220683EB93ACD11A04038DD /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; - 4D539FB87A15C293A79566EBF3F9E109 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; - 4EE1F2D1C9D5935F6B6B5CC49C89E323 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - 4F0F33EFE650B5CE4774260C8F19455E /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; - 4FBF7128876ED36020056A396B66AC27 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; - 4FF26D4815A87B2A17820007FF2887B9 /* Pods-LeeGoTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LeeGoTests-acknowledgements.markdown"; sourceTree = ""; }; - 5058B4852C449730EE28E5F2CD349B24 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 525B5EB32452EE8123EA3E65FDC81622 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - 53584C214DEB762A1E5076EBE4D8CC81 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; - 5577B9533B505701B6B8BD927676BEDF /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - 59427109F84AD13E6A9564C18025D3B0 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 59EB76E621C8755DF95EE8DDC2B7D3DC /* NSString+QCKSelectorName.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "NSString+QCKSelectorName.m"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.m"; sourceTree = ""; }; - 5A4D1D81D919C7953BF0A41715A04DEA /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble.framework; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - 5A4E497DD63B34CAF4112164C7D5C267 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; - 5AC2EAD622CBF58EAD71675C54310955 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 60A4CF4AA34D746BEB8F62EA84D9F202 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - 6137764203F68DD3C80397DF73F677AC /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; - 623285D9DBDE57EEBB2AC7A9C9663905 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 627AA9D56F221212717BC6C0D69D5091 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - 62A5C7D27930FA6D032FA0D83D8E8239 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; - 673188E86B2ADCE6F8F15B4C5668C02F /* Pods-LeeGoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LeeGoTests.release.xcconfig"; sourceTree = ""; }; - 71937B4B91A62971088D88CADF9D17CC /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - 729F16C30B6274DA672D3ECD6388035A /* Pods-LeeGoTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LeeGoTests-umbrella.h"; sourceTree = ""; }; - 72B50685A7115CB568F2F23A42E31BEA /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 737A82FCDA66C02D7D479C048DB2024B /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - 7A924660943DF4DCD57E3A85BF6FB095 /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - 7AA367A34E0B8C1B01749CCC12FD43C5 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - 7BDE47B2FE86C887FC8019C041BBB1FE /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; - 7FE7DAEFE89DD4FD50B980F9C9D6B7B2 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; - 819A575F359D9CC99E7A834A8DD76FE9 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - 81DD63D0E746C06C1F7567210AD80A79 /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - 856B2E5E4EC8E2BD9ED45AAD6930A672 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; - 86806CF3A6F7FB54DF0EEB9134380E4E /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - 88A9381D91255401863A2174DDDDC0A3 /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 88BA7AEF2D8D3AF6041413BDF1702FB3 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 8C33038D662C60BCD958328580E7438C /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; - 8C64DCE9D714CA88C06BDCC413FD3661 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 91C1B940CAE99BBBBC563963CD22996B /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; - 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - 954B5272EA2120AA3260D71B6BEF8007 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; - 9BB1FA4E1DD555F459E31D6ECB9DB70C /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.h; sourceTree = ""; }; - 9C33CF42AD6E1A448E98D4CAFB155DAA /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 9C7B2E4FE5801A893DA4774DEC2C3985 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 9F52AA1D68A8A208A26A876380746CD9 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick.framework; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - A91D06EDAC9BBAD13C3148F1E86A9AD4 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; - A9265D9D90339F897C0C6F78088E7BEB /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - AC8E671A7AF452830CCCB18FDD1A531C /* Pods-LeeGoTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LeeGoTests-frameworks.sh"; sourceTree = ""; }; - ACB1FA806FF532E4E4DF8E6B4FFEB9C6 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; - AECEA2EDA41473899EE391CA038EDC38 /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.0.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - AF53CCA7C0DCBC78C82FED3FBDD6BF88 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - B2DAB46B24EC3101A9C139178DD3C5F2 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - B44A77CEE68F660091F34ABFAEEBC6F1 /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - B4E171821B1D0ED4DB541E993A5B631F /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Sources/Lib/CwlPreconditionTesting/CwlCatchException/CwlCatchException/CwlCatchException.m; sourceTree = ""; }; - B7E28761C1C8F0D60BC9747BF68D1C9B /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; - B85EE744366A34C7FDACC881DF2B63AB /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/mach_excServer.h; sourceTree = ""; }; - B8601E6DFDFEE896F928FE9B3086F90F /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - BA22155F3C9AB9685BF4ED3A389D109A /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; - BC3735170CDCA6A1C7E7D0E1876ED22B /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; - BCBDD456B535FEADB8D72DB83652D74D /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - BF10FB1A495235AFCC59693A7F0F5708 /* String+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+FileName.swift"; path = "Sources/Quick/String+FileName.swift"; sourceTree = ""; }; - C04ED5D70AFD1276F89B7864AFF47B96 /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; - C12298FB0CC92BD3BD16C958F3718416 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - C1518EBA50C2AF0B14455D2294C76038 /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; - C42C5B691F88D400838222A950546155 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - C69EC1174FCE1660F05AF470B443E0E7 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; - C97C4E97A47F53078887A61504367F9A /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; - CC1192DACE9ABA6C9B169B9EBA366C9A /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - CCD0E5C7B919B722CBA4C68A93D55A7A /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; - CE7DD158EC41F47A2796AB19C2CD1AD8 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - D1BBF1DEB58CE50279BE9C836B3DE1E1 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - D28B2800FDF12318ACA5F5DBE510C973 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; - D4621A1C4746AC480C7F889631FC8F57 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; - D6A47E312B3885EF64B81BD590AD21B4 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; - D6C53CB242E67876DD3964EC5C775479 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - D8593AD35173FBE77030F2D197B14FAB /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - D98C8E0613D6A9703B32EF66CEC66F15 /* NSString+QCKSelectorName.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "NSString+QCKSelectorName.h"; path = "Sources/QuickObjectiveC/NSString+QCKSelectorName.h"; sourceTree = ""; }; - DA2A27C4B8DBD796FF529A57FD25B53F /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - DF7EABDCC39B9B8DB73114838A7F7DC2 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - E1F5F24AD8C11ECBD8D92BA90D5BC090 /* Pods-LeeGoTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; path = "Pods-LeeGoTests.modulemap"; sourceTree = ""; }; - ECF6119DA0532B74B479DF3928941203 /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; - F26BA5A6FE4D418C4B347B819197FA63 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - F2F54711B380CFE23B29ACEF631A3929 /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - F3DC9FAE16E2DD68869AF1B29FA0A42A /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - F795FA3DE9E15CB7DD017F791C55A8AC /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - F901FF153B8EFF1254F4EAF9E8BA022F /* Pods-LeeGoTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LeeGoTests-resources.sh"; sourceTree = ""; }; - F9550ABBCFEA5EE7A657664A6BD9E1F7 /* CwlCatchBadInstruction.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchBadInstruction.h; path = Sources/Lib/CwlPreconditionTesting/CwlPreconditionTesting/CwlCatchBadInstruction.h; sourceTree = ""; }; - FB4B011BF1B4ECE6DC8D463CBA2E5EF7 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; - FB8055C076D64C8F4113B12B35839A9A /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - FCCFAE0EFBD62266157ABDA892351069 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - FCEC90FE3EA43490331DC53C67E7DE5B /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; + 014CC71E572C5CC14ADFA82A8B7B97DC /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + 057B1682EF92E71137867F0C259AF2CC /* NSString+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSString+C99ExtendedIdentifier.swift"; path = "Sources/Quick/NSString+C99ExtendedIdentifier.swift"; sourceTree = ""; }; + 06F4CC7EC5506C8980D024242FD3F5B8 /* Pods-LeeGoTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-LeeGoTests-acknowledgements.plist"; sourceTree = ""; }; + 07C590B3DC02CE631ECCF5D2963AB612 /* Pods-LeeGoTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-LeeGoTests-dummy.m"; sourceTree = ""; }; + 0AB0094EAAC3C18B000459B228F01637 /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + 0BE63B47CD572A17C6AFDF8853BFCA4F /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcherWrapper.swift; path = Sources/Nimble/Matchers/AsyncMatcherWrapper.swift; sourceTree = ""; }; + 0F18AD3DFDC80322BBE0B149EC31BCC7 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CurrentTestCaseTracker.h; path = Sources/NimbleObjectiveC/CurrentTestCaseTracker.h; sourceTree = ""; }; + 12989D830FCE4AEF54A357265111CAEF /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + 129DA04B381B509DAEDD565711C5A0DA /* World.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = World.h; path = Sources/QuickObjectiveC/World.h; sourceTree = ""; }; + 14C07866E3A8DA681A285F08E0A7826C /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 15A5A2213F831D11D721E17AA14BFB58 /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + 187D1EDF80EB0D8FC035AC3570D09DD5 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; + 1C846417EADDAAFF733CF6AC8FEB5EEA /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + 1D9DA3454B15DE38784FA22A452C0121 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + 20C9E93FDAF76CEA15A9E23CC159DED1 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + 2192785265D796ADAF8B5DE3C97DD4CE /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + 2294B6CCB2D8D93AE1F605AAA6A03240 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; + 23336EB091B922270B4288FDFCF59D14 /* Pods-LeeGoTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LeeGoTests-frameworks.sh"; sourceTree = ""; }; + 240CEA0915AA3241F6A49CB65CEC8767 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + 24FAA89E2AC44E204B5E39B77BD6B921 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + 24FAED8BD878439BC32BE461165E4E08 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + 26D7B54C77385B78FFA011C64D94E436 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 2727DBDF3F41A52F002F6B1992165881 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + 2DD6CC02AD6D4C0E7D1169EF9ECB3706 /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; + 2E8E430D83F3CC7F72E348A0B222C46F /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + 301223B3EB74E21CDB1303C459B57231 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + 3018B485E8310AC7A651EF03D32D0823 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; + 302EF8E66B89F3DB1A346EC83C76CA6F /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 34B5614CBE84B80AA39F75553B3C322A /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + 35AEA5EE84902B2868710A17C747AE0E /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + 38A82DE4A0130E4C946A904FEDDD74CA /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + 3B6BAD1D6087151AE80585CD387919BA /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + 3BA1749B6350D4231655E6B4AC28652C /* Pods_LeeGoTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_LeeGoTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 3FBDD60AB5EC0183A198A13D9A5D7BCE /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; + 40E944EFD24B41C7BD60837DFABAFB06 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 42DD07575CFDE63DE6412F425FDBED71 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; + 440EEE98EDFE4F4752E17AFA3F550530 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; + 467F00CAF06ADEF612F697F068843FB2 /* World+DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = "World+DSL.h"; path = "Sources/QuickObjectiveC/DSL/World+DSL.h"; sourceTree = ""; }; + 4751C923ACB051055F76821461557965 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 47578CD4C4970729A947555C915B2317 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + 495BFC3F9A44D525D4BFC5B10557E6C3 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + 4FEA1DF1C7C22E7B20D2DC30FB9D3EF1 /* Configuration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Configuration.swift; path = Sources/Quick/Configuration/Configuration.swift; sourceTree = ""; }; + 5378FB44B13DD72D6D9510C786BA96C5 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + 53D1429ABADDB303927AEA89A830C740 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + 53EF9E89608B00E0EC6239A38A8FF622 /* Pods-LeeGoTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LeeGoTests.debug.xcconfig"; sourceTree = ""; }; + 55E9F8B6E78A1CAF1BEE982E163FA968 /* MatcherFunc.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherFunc.swift; path = Sources/Nimble/Matchers/MatcherFunc.swift; sourceTree = ""; }; + 59F5B3AA331B378FF452B2B3606423C6 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + 5A4D1D81D919C7953BF0A41715A04DEA /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 5C4D786F262665CE8C9113FA91745753 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 605EF2A73B22D3E0863B202A2B7CFDEE /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + 6068BA5F15DE1E52A4F0CB98F40343A0 /* Pods-LeeGoTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-LeeGoTests-acknowledgements.markdown"; sourceTree = ""; }; + 613C21AD6E98946BCAA54F25374CE020 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + 645422FB2E7D26E7DD6556CCAC35DAF0 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 65B4CDEF78BF13177A9303C1E765E5F6 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; + 6636B8D87BD87218AA667C34F0B220F8 /* Pods-LeeGoTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-LeeGoTests.modulemap"; sourceTree = ""; }; + 6642EE042EBCD8FB5BA4D88BAF4EAB36 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + 679FFD5386CAB1887F96D8FF6D84B7B8 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.c; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; + 67C7BB2DC0DED3CBCF5D776D9E39AB30 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + 698366519E8DF1484C0AE2845EB47D7F /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + 69CFEBDFF127350398462FF823B76A13 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; + 6BA4794DD94D5DE6BFFFEEC72B8C43E3 /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickSpecBase/include/QuickSpecBase.h; sourceTree = ""; }; + 6D2E298780429D096F1EC434CFC3B225 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + 71633BC04123B2C854BCBA975BDE148D /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; + 73C1D1A0D20C667FAF4F01C3BA4AC451 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; + 75B78AC1C0059E66BD95A9F0CD2D24F5 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + 77125F245BAE7809A034657A48A40830 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + 77C2834A0AE71F3E85759885C0557533 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + 7CC8DBE433A202DCF807B91BB5557F6D /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 7D9A924C203A11767BBF4D9C3737DA5D /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 7F8524E2A1A324B13D66AAB576C8C742 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBObjCMatcher.swift; path = Sources/Nimble/Adapters/NMBObjCMatcher.swift; sourceTree = ""; }; + 7FE66AEC1DADAB5A835D219A5EC52ABA /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + 82020CEDB175B2A09261F3ED7D72BE71 /* Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + 82267A98670DE3E96EAB2047A8872FE0 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + 829CA47FBDF0A83BF67F7102D4CD40E6 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + 835B6DA0EF74C46A43F1142347E4B44E /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; + 8452C5F4B63A4A0178E56CDC9E95DFE8 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; + 8737F3E0C1FB1ABDDC8F61A081B1F76B /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + 88CCA655A571DD68102067AFB473BD77 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; + 8D35B9829391F58D646F665CACF28F89 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; + 8EF0EA564D82AB46B710DC6096C1EA6B /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 8F4384CDA1479E6D88E3486B78FD7485 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; + 9245B48A46AAC45502A6B8A2AB745038 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; + 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; + 9C1965DFDB98F4612965B29CA2787EFB /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; + 9C78BF27F3A2B7B1368FE2E4317B6557 /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + 9E0D34DBF4CE55E4FF1BADBA826F9389 /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; + 9F52AA1D68A8A208A26A876380746CD9 /* Quick.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 9F7F7F422628BD0102712BD3296ED4AD /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; + A1AB10174D3955FC8BF42A3B45B4C011 /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; + A45DFC46E4EDF480399017D92090D5C1 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Utils/Async.swift; sourceTree = ""; }; + A4C7C0F330B57E3287FCFAF89776AF4F /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; + A5626FB74EE8784DFFFC4B80B1061AB4 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + A5B11548A6516BB21526619897608E9F /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + A6288AE2766817391D894EE944596984 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + A8B75A181F51BE5B2DE768BAF8AD65BA /* Pods-LeeGoTests-resources.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-LeeGoTests-resources.sh"; sourceTree = ""; }; + B2C2E6D41C88E8547B16FD2C42FEF515 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; + B38F7EB4258060BAA361D06EF1B16D9B /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; + B4273097B1D0DCCA1E22978B03474F2F /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; + B54E8617109E65C3B975FE6AB81F0562 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + B6D48A33A49B17952C7ABB6214240CB9 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; + B887FE600257A86B38E726B0E1D628AF /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + B9985CC02179403DC54B3460DCE486AC /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; + BAA7B55BBFC51CA440749FF23010D40E /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + BBD64278700877FA62EC38F4B27A4881 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + C57921338FECDDCDAAC88A57C2055737 /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; + C949E12BA82E3B6636449B775694F4F3 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; + CAB52415DA15D60348D226639C322706 /* CwlPreconditionTesting.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlPreconditionTesting.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/Mach/CwlPreconditionTesting.h; sourceTree = ""; }; + CCE295D4D0ED3F1666C5921320F0E2C6 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; + CE1C0594000452979B62B1798B1A59E8 /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; + CE31DE883347DA5FE6B7F79F715D5D71 /* Nimble.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.xcconfig; sourceTree = ""; }; + D31FA66A5FC0844A36FC1358ACE2220C /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; + D685C0D509328CD8778F99DD53A49A48 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + D6ACF56A3280DBAABFB47A125BE3EFC6 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; + D954E7E4D336837086313DAE758F7F32 /* Functional.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Functional.swift; path = Sources/Nimble/Utils/Functional.swift; sourceTree = ""; }; + DBEE4D473415B347A54A2E432EE8EEF7 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; + DE960FDA70783D86C4832257093317D2 /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; + E15D0BD895E38B9512195BFED925B0F7 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; + E585A4F6C1434FD922B8371E432B5051 /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickSpecBase/QuickSpecBase.m; sourceTree = ""; }; + E5D8173434FE00016739EAFDEFEA9313 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS10.3.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; + EA57C72EE293B50ED3E1BA58B9FFCD89 /* Quick.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.xcconfig; sourceTree = ""; }; + EA8315675F3D2B2385E834043F85C676 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; + EADFE06546D2FE7C91DF557E0F5ED093 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + EC9AD5FA0EE5E85143D7DD2030D6818D /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + EEBCF9B57684FD89791D983A4733101F /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + EF959663D47B18687B5785D72D856CB6 /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; + F291C50C45B7A5FDF5A883AD5434EA3C /* Pods-LeeGoTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-LeeGoTests.release.xcconfig"; sourceTree = ""; }; + F2C33F4DC31A8120E8743B2A6163585F /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + F4C7D6328493B73EF741AC61F4CEF01E /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + FB1620D5CFCB6AF404B911AC7B9CD910 /* Pods-LeeGoTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-LeeGoTests-umbrella.h"; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -260,65 +274,155 @@ isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 80B632316CBA416E41F02DD165F7B675 /* Foundation.framework in Frameworks */, - 4F27AA5D3E55DAE636E1B510B97DF1E9 /* XCTest.framework in Frameworks */, + 0AEB0026DDAD4B260B3126EA80BB28E7 /* Foundation.framework in Frameworks */, + 0AE66323ADA7A11F049075963048ACB1 /* XCTest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - B51485FF042F194E727C44322C659789 /* Frameworks */ = { + 819A9B65073BE3B5599196C0A3B27EBC /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - C0E0C6351F88B8C5B995BB8B372AD895 /* Foundation.framework in Frameworks */, + 50698F14E7847E18B907E9373FBF4C21 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - DBE2CE2F5ED086FC1DD44D4B176AEA5B /* Frameworks */ = { + B51485FF042F194E727C44322C659789 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 24EF979DB6A2B88464E07F5C5937EE14 /* Foundation.framework in Frameworks */, + 8D1810D4027F8DEBDEF3A7C482CB5D9A /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ + 1E46D4735FEE19A6FE54056CFAAF3347 /* Pods-LeeGoTests */ = { + isa = PBXGroup; + children = ( + 82020CEDB175B2A09261F3ED7D72BE71 /* Info.plist */, + 6636B8D87BD87218AA667C34F0B220F8 /* Pods-LeeGoTests.modulemap */, + 6068BA5F15DE1E52A4F0CB98F40343A0 /* Pods-LeeGoTests-acknowledgements.markdown */, + 06F4CC7EC5506C8980D024242FD3F5B8 /* Pods-LeeGoTests-acknowledgements.plist */, + 07C590B3DC02CE631ECCF5D2963AB612 /* Pods-LeeGoTests-dummy.m */, + 23336EB091B922270B4288FDFCF59D14 /* Pods-LeeGoTests-frameworks.sh */, + A8B75A181F51BE5B2DE768BAF8AD65BA /* Pods-LeeGoTests-resources.sh */, + FB1620D5CFCB6AF404B911AC7B9CD910 /* Pods-LeeGoTests-umbrella.h */, + 53EF9E89608B00E0EC6239A38A8FF622 /* Pods-LeeGoTests.debug.xcconfig */, + F291C50C45B7A5FDF5A883AD5434EA3C /* Pods-LeeGoTests.release.xcconfig */, + ); + name = "Pods-LeeGoTests"; + path = "Target Support Files/Pods-LeeGoTests"; + sourceTree = ""; + }; + 3C3FDCB7F0ADE0D02BF96EB1D4E2C89F /* Pods */ = { + isa = PBXGroup; + children = ( + 695F660D008FE976B8707B664F8D3388 /* Nimble */, + D803EB5B15D4EAD4461BD11F3EF5188C /* Quick */, + ); + name = Pods; + sourceTree = ""; + }; 433CD3331B6C3787F473C941B61FC68F /* Frameworks */ = { isa = PBXGroup; children = ( - 9D9CFF97A2D41D7CB20A427D5386C7A6 /* iOS */, + 7BE34EE7067F7CC8A54539A282682749 /* iOS */, ); name = Frameworks; sourceTree = ""; }; - 544C6EEED62ABD6307EEEA2B83A1AD71 /* Support Files */ = { + 695F660D008FE976B8707B664F8D3388 /* Nimble */ = { isa = PBXGroup; children = ( - 30F689BC8B81D1056E432C3548425A3D /* Info.plist */, - 1BBE788E6EBEE817760AE46FEE7B932D /* Quick.modulemap */, - ECF6119DA0532B74B479DF3928941203 /* Quick.xcconfig */, - 1D8EA7085BF13E9F8CFBE94FFDC15988 /* Quick-dummy.m */, - 53584C214DEB762A1E5076EBE4D8CC81 /* Quick-prefix.pch */, - 304505C0F1B221D485B302E2CE50F1F9 /* Quick-umbrella.h */, + 5378FB44B13DD72D6D9510C786BA96C5 /* AdapterProtocols.swift */, + 26D7B54C77385B78FFA011C64D94E436 /* AllPass.swift */, + 495BFC3F9A44D525D4BFC5B10557E6C3 /* AssertionDispatcher.swift */, + B2C2E6D41C88E8547B16FD2C42FEF515 /* AssertionRecorder.swift */, + A45DFC46E4EDF480399017D92090D5C1 /* Async.swift */, + 0BE63B47CD572A17C6AFDF8853BFCA4F /* AsyncMatcherWrapper.swift */, + EC9AD5FA0EE5E85143D7DD2030D6818D /* BeAKindOf.swift */, + F2C33F4DC31A8120E8743B2A6163585F /* BeAnInstanceOf.swift */, + BBD64278700877FA62EC38F4B27A4881 /* BeCloseTo.swift */, + A5B11548A6516BB21526619897608E9F /* BeEmpty.swift */, + 7CC8DBE433A202DCF807B91BB5557F6D /* BeginWith.swift */, + 40E944EFD24B41C7BD60837DFABAFB06 /* BeGreaterThan.swift */, + 440EEE98EDFE4F4752E17AFA3F550530 /* BeGreaterThanOrEqualTo.swift */, + 1D9DA3454B15DE38784FA22A452C0121 /* BeIdenticalTo.swift */, + A1AB10174D3955FC8BF42A3B45B4C011 /* BeLessThan.swift */, + B54E8617109E65C3B975FE6AB81F0562 /* BeLessThanOrEqual.swift */, + 645422FB2E7D26E7DD6556CCAC35DAF0 /* BeLogical.swift */, + 605EF2A73B22D3E0863B202A2B7CFDEE /* BeNil.swift */, + D31FA66A5FC0844A36FC1358ACE2220C /* BeVoid.swift */, + CE1C0594000452979B62B1798B1A59E8 /* Contain.swift */, + 2DD6CC02AD6D4C0E7D1169EF9ECB3706 /* ContainElementSatisfying.swift */, + 0F18AD3DFDC80322BBE0B149EC31BCC7 /* CurrentTestCaseTracker.h */, + B887FE600257A86B38E726B0E1D628AF /* CwlBadInstructionException.swift */, + 7FE66AEC1DADAB5A835D219A5EC52ABA /* CwlCatchBadInstruction.swift */, + C57921338FECDDCDAAC88A57C2055737 /* CwlCatchException.h */, + C949E12BA82E3B6636449B775694F4F3 /* CwlCatchException.m */, + 53D1429ABADDB303927AEA89A830C740 /* CwlCatchException.swift */, + 3B6BAD1D6087151AE80585CD387919BA /* CwlDarwinDefinitions.swift */, + EF959663D47B18687B5785D72D856CB6 /* CwlMachBadInstructionHandler.h */, + 9F7F7F422628BD0102712BD3296ED4AD /* CwlMachBadInstructionHandler.m */, + CAB52415DA15D60348D226639C322706 /* CwlPreconditionTesting.h */, + 2294B6CCB2D8D93AE1F605AAA6A03240 /* DSL.h */, + 82267A98670DE3E96EAB2047A8872FE0 /* DSL.m */, + 8D35B9829391F58D646F665CACF28F89 /* DSL.swift */, + 4751C923ACB051055F76821461557965 /* DSL+Wait.swift */, + BAA7B55BBFC51CA440749FF23010D40E /* EndWith.swift */, + 15A5A2213F831D11D721E17AA14BFB58 /* Equal.swift */, + 77125F245BAE7809A034657A48A40830 /* Errors.swift */, + 3018B485E8310AC7A651EF03D32D0823 /* Expectation.swift */, + B4273097B1D0DCCA1E22978B03474F2F /* ExpectationMessage.swift */, + 014CC71E572C5CC14ADFA82A8B7B97DC /* Expression.swift */, + A5626FB74EE8784DFFFC4B80B1061AB4 /* FailureMessage.swift */, + D954E7E4D336837086313DAE758F7F32 /* Functional.swift */, + 698366519E8DF1484C0AE2845EB47D7F /* HaveCount.swift */, + 679FFD5386CAB1887F96D8FF6D84B7B8 /* mach_excServer.c */, + 835B6DA0EF74C46A43F1142347E4B44E /* mach_excServer.h */, + 67C7BB2DC0DED3CBCF5D776D9E39AB30 /* Match.swift */, + 55E9F8B6E78A1CAF1BEE982E163FA968 /* MatcherFunc.swift */, + 8F4384CDA1479E6D88E3486B78FD7485 /* MatcherProtocols.swift */, + 35AEA5EE84902B2868710A17C747AE0E /* MatchError.swift */, + 2727DBDF3F41A52F002F6B1992165881 /* Nimble.h */, + 6642EE042EBCD8FB5BA4D88BAF4EAB36 /* NimbleEnvironment.swift */, + 240CEA0915AA3241F6A49CB65CEC8767 /* NimbleXCTestHandler.swift */, + 88CCA655A571DD68102067AFB473BD77 /* NMBExceptionCapture.h */, + 24FAA89E2AC44E204B5E39B77BD6B921 /* NMBExceptionCapture.m */, + 2192785265D796ADAF8B5DE3C97DD4CE /* NMBExpectation.swift */, + 7F8524E2A1A324B13D66AAB576C8C742 /* NMBObjCMatcher.swift */, + E15D0BD895E38B9512195BFED925B0F7 /* NMBStringify.h */, + 613C21AD6E98946BCAA54F25374CE020 /* NMBStringify.m */, + 9E0D34DBF4CE55E4FF1BADBA826F9389 /* PostNotification.swift */, + DE960FDA70783D86C4832257093317D2 /* Predicate.swift */, + A6288AE2766817391D894EE944596984 /* RaisesException.swift */, + 77C2834A0AE71F3E85759885C0557533 /* SatisfyAnyOf.swift */, + EADFE06546D2FE7C91DF557E0F5ED093 /* SourceLocation.swift */, + 34B5614CBE84B80AA39F75553B3C322A /* Stringers.swift */, + 0AB0094EAAC3C18B000459B228F01637 /* ThrowAssertion.swift */, + 47578CD4C4970729A947555C915B2317 /* ThrowError.swift */, + CCE295D4D0ED3F1666C5921320F0E2C6 /* ToSucceed.swift */, + 187D1EDF80EB0D8FC035AC3570D09DD5 /* XCTestObservationCenter+Register.m */, + 8B13CFA6D94FE39CA45677D7C6C75415 /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Quick"; + path = Nimble; sourceTree = ""; }; - 56264A85FB9BD721A9FC926B89A25D95 /* Pods */ = { + 7BE34EE7067F7CC8A54539A282682749 /* iOS */ = { isa = PBXGroup; children = ( - 8729ED7B1D5195A04BCEFF7577B57A23 /* Nimble */, - DA1542DA1F69CCCF459BBC489E9907BD /* Quick */, + E5D8173434FE00016739EAFDEFEA9313 /* Foundation.framework */, + 3FBDD60AB5EC0183A198A13D9A5D7BCE /* XCTest.framework */, ); - name = Pods; + name = iOS; sourceTree = ""; }; 7D1E955F6EC25CE227EF43A3DF494F5C /* Targets Support Files */ = { isa = PBXGroup; children = ( - F49EBF110066909B0AEB8AA336924D4D /* Pods-LeeGoTests */, + 1E46D4735FEE19A6FE54056CFAAF3347 /* Pods-LeeGoTests */, ); name = "Targets Support Files"; sourceTree = ""; @@ -328,130 +432,77 @@ children = ( 93A4A3777CF96A4AAC1D13BA6DCCEA73 /* Podfile */, 433CD3331B6C3787F473C941B61FC68F /* Frameworks */, - 56264A85FB9BD721A9FC926B89A25D95 /* Pods */, + 3C3FDCB7F0ADE0D02BF96EB1D4E2C89F /* Pods */, DE1E02E4816025EC0676F9144112DA6F /* Products */, 7D1E955F6EC25CE227EF43A3DF494F5C /* Targets Support Files */, ); sourceTree = ""; }; - 8729ED7B1D5195A04BCEFF7577B57A23 /* Nimble */ = { + 8B13CFA6D94FE39CA45677D7C6C75415 /* Support Files */ = { isa = PBXGroup; children = ( - F3DC9FAE16E2DD68869AF1B29FA0A42A /* AdapterProtocols.swift */, - 06E793A8549531332D1762623F08F9BF /* AllPass.swift */, - FCCFAE0EFBD62266157ABDA892351069 /* AssertionDispatcher.swift */, - 33C4401213EBEC6BC1797D974E52767D /* AssertionRecorder.swift */, - C69EC1174FCE1660F05AF470B443E0E7 /* Async.swift */, - BC3735170CDCA6A1C7E7D0E1876ED22B /* AsyncMatcherWrapper.swift */, - 71937B4B91A62971088D88CADF9D17CC /* BeAKindOf.swift */, - C97C4E97A47F53078887A61504367F9A /* BeAnInstanceOf.swift */, - AF53CCA7C0DCBC78C82FED3FBDD6BF88 /* BeCloseTo.swift */, - 9C33CF42AD6E1A448E98D4CAFB155DAA /* BeEmpty.swift */, - D6C53CB242E67876DD3964EC5C775479 /* BeginWith.swift */, - 2DEE1F436B68692319DE23FF7A16197E /* BeGreaterThan.swift */, - A9265D9D90339F897C0C6F78088E7BEB /* BeGreaterThanOrEqualTo.swift */, - 10FFD83D547B8B236BCBB6812BC65762 /* BeIdenticalTo.swift */, - 31F522E7A1E6B249CF89B55968863A58 /* BeLessThan.swift */, - 104135CFA58204DC8EBF1167E28F5206 /* BeLessThanOrEqual.swift */, - 226C1AC4144C4405F39189731DF06CEC /* BeLogical.swift */, - 9C7B2E4FE5801A893DA4774DEC2C3985 /* BeNil.swift */, - 8C64DCE9D714CA88C06BDCC413FD3661 /* BeVoid.swift */, - D1BBF1DEB58CE50279BE9C836B3DE1E1 /* Contain.swift */, - CCD0E5C7B919B722CBA4C68A93D55A7A /* CurrentTestCaseTracker.h */, - D6A47E312B3885EF64B81BD590AD21B4 /* CwlBadInstructionException.swift */, - F9550ABBCFEA5EE7A657664A6BD9E1F7 /* CwlCatchBadInstruction.h */, - 4CEE6D090220683EB93ACD11A04038DD /* CwlCatchBadInstruction.m */, - 5A4E497DD63B34CAF4112164C7D5C267 /* CwlCatchBadInstruction.swift */, - 9BB1FA4E1DD555F459E31D6ECB9DB70C /* CwlCatchException.h */, - B4E171821B1D0ED4DB541E993A5B631F /* CwlCatchException.m */, - 4C6329DD1EE75A68AA931A2192C28C69 /* CwlCatchException.swift */, - 62A5C7D27930FA6D032FA0D83D8E8239 /* CwlDarwinDefinitions.swift */, - FB4B011BF1B4ECE6DC8D463CBA2E5EF7 /* DSL.h */, - 91C1B940CAE99BBBBC563963CD22996B /* DSL.m */, - 627AA9D56F221212717BC6C0D69D5091 /* DSL.swift */, - B2DAB46B24EC3101A9C139178DD3C5F2 /* DSL+Wait.swift */, - 5058B4852C449730EE28E5F2CD349B24 /* EndWith.swift */, - C12298FB0CC92BD3BD16C958F3718416 /* Equal.swift */, - 4EE1F2D1C9D5935F6B6B5CC49C89E323 /* Errors.swift */, - 05E8C36BA4865751AB3994028E5BE98B /* Expectation.swift */, - 5AC2EAD622CBF58EAD71675C54310955 /* Expression.swift */, - 18CEB9B86795A0FDAA385DB81A49672B /* FailureMessage.swift */, - 7FE7DAEFE89DD4FD50B980F9C9D6B7B2 /* Functional.swift */, - BA22155F3C9AB9685BF4ED3A389D109A /* HaveCount.swift */, - 0BC4F2CA1ACAB7C5DC246E5970464CA7 /* mach_excServer.c */, - B85EE744366A34C7FDACC881DF2B63AB /* mach_excServer.h */, - 1C9A478DF22318E51905AFC8BF831B2D /* Match.swift */, - ACB1FA806FF532E4E4DF8E6B4FFEB9C6 /* MatcherFunc.swift */, - DA2A27C4B8DBD796FF529A57FD25B53F /* MatcherProtocols.swift */, - A91D06EDAC9BBAD13C3148F1E86A9AD4 /* MatchError.swift */, - CE7DD158EC41F47A2796AB19C2CD1AD8 /* Nimble.h */, - F26BA5A6FE4D418C4B347B819197FA63 /* NimbleEnvironment.swift */, - 7AA367A34E0B8C1B01749CCC12FD43C5 /* NimbleXCTestHandler.swift */, - 72B50685A7115CB568F2F23A42E31BEA /* NMBExceptionCapture.h */, - 86806CF3A6F7FB54DF0EEB9134380E4E /* NMBExceptionCapture.m */, - 215D2DBBD2F1901DAD0BA635F194457A /* NMBExpectation.swift */, - FCEC90FE3EA43490331DC53C67E7DE5B /* NMBObjCMatcher.swift */, - D4621A1C4746AC480C7F889631FC8F57 /* NMBStringify.h */, - 856B2E5E4EC8E2BD9ED45AAD6930A672 /* NMBStringify.m */, - 525B5EB32452EE8123EA3E65FDC81622 /* PostNotification.swift */, - 30778608352B15B9CFC7475AD8F932AB /* RaisesException.swift */, - 208F66BD9FCF9E4BBBDCC434971F5113 /* SatisfyAnyOf.swift */, - 623285D9DBDE57EEBB2AC7A9C9663905 /* SourceLocation.swift */, - F2F54711B380CFE23B29ACEF631A3929 /* Stringers.swift */, - 4F0F33EFE650B5CE4774260C8F19455E /* ThrowAssertion.swift */, - 4FBF7128876ED36020056A396B66AC27 /* ThrowError.swift */, - 60A4CF4AA34D746BEB8F62EA84D9F202 /* XCTestObservationCenter+Register.m */, - F154A167CC9AC286CB008DF3527B8F65 /* Support Files */, + 14C07866E3A8DA681A285F08E0A7826C /* Info.plist */, + 71633BC04123B2C854BCBA975BDE148D /* Nimble.modulemap */, + CE31DE883347DA5FE6B7F79F715D5D71 /* Nimble.xcconfig */, + A4C7C0F330B57E3287FCFAF89776AF4F /* Nimble-dummy.m */, + 9C1965DFDB98F4612965B29CA2787EFB /* Nimble-prefix.pch */, + 69CFEBDFF127350398462FF823B76A13 /* Nimble-umbrella.h */, ); - name = Nimble; - path = Nimble; + name = "Support Files"; + path = "../Target Support Files/Nimble"; sourceTree = ""; }; - 9D9CFF97A2D41D7CB20A427D5386C7A6 /* iOS */ = { + A066C6EF561B336DD2220BF5ACE721E3 /* Support Files */ = { isa = PBXGroup; children = ( - 32DF21EF8268E32D359CD23F2CF3EFE3 /* Foundation.framework */, - AECEA2EDA41473899EE391CA038EDC38 /* XCTest.framework */, + 302EF8E66B89F3DB1A346EC83C76CA6F /* Info.plist */, + D6ACF56A3280DBAABFB47A125BE3EFC6 /* Quick.modulemap */, + EA57C72EE293B50ED3E1BA58B9FFCD89 /* Quick.xcconfig */, + EEBCF9B57684FD89791D983A4733101F /* Quick-dummy.m */, + 59F5B3AA331B378FF452B2B3606423C6 /* Quick-prefix.pch */, + DBEE4D473415B347A54A2E432EE8EEF7 /* Quick-umbrella.h */, ); - name = iOS; + name = "Support Files"; + path = "../Target Support Files/Quick"; sourceTree = ""; }; - DA1542DA1F69CCCF459BBC489E9907BD /* Quick */ = { + D803EB5B15D4EAD4461BD11F3EF5188C /* Quick */ = { isa = PBXGroup; children = ( - DF7EABDCC39B9B8DB73114838A7F7DC2 /* Callsite.swift */, - FB8055C076D64C8F4113B12B35839A9A /* Closures.swift */, - 4D539FB87A15C293A79566EBF3F9E109 /* Configuration.swift */, - 819A575F359D9CC99E7A834A8DD76FE9 /* DSL.swift */, - C42C5B691F88D400838222A950546155 /* ErrorUtility.swift */, - 88BA7AEF2D8D3AF6041413BDF1702FB3 /* Example.swift */, - 737A82FCDA66C02D7D479C048DB2024B /* ExampleGroup.swift */, - 121014C803EAD4DC51829FDA23BCADA6 /* ExampleHooks.swift */, - 5577B9533B505701B6B8BD927676BEDF /* ExampleMetadata.swift */, - B8601E6DFDFEE896F928FE9B3086F90F /* Filter.swift */, - 3B61E8D3E9D121174B375148D6C10C6E /* HooksPhase.swift */, - D8593AD35173FBE77030F2D197B14FAB /* NSBundle+CurrentTestBundle.swift */, - D98C8E0613D6A9703B32EF66CEC66F15 /* NSString+QCKSelectorName.h */, - 59EB76E621C8755DF95EE8DDC2B7D3DC /* NSString+QCKSelectorName.m */, - 7BDE47B2FE86C887FC8019C041BBB1FE /* QCKDSL.h */, - 49AF9D9E9BF733396E9E801393E6C10F /* QCKDSL.m */, - 6137764203F68DD3C80397DF73F677AC /* Quick.h */, - 1994804C15E018526C78E3AA0DEFF054 /* QuickConfiguration.h */, - D28B2800FDF12318ACA5F5DBE510C973 /* QuickConfiguration.m */, - 81DD63D0E746C06C1F7567210AD80A79 /* QuickSelectedTestSuiteBuilder.swift */, - 8C33038D662C60BCD958328580E7438C /* QuickSpec.h */, - 06A989D72663C047BC47DCC622F66FB5 /* QuickSpec.m */, - B44A77CEE68F660091F34ABFAEEBC6F1 /* QuickTestSuite.swift */, - BF10FB1A495235AFCC59693A7F0F5708 /* String+FileName.swift */, - 2DF9D722BA3C848F0B22BA1EC3D350C9 /* SuiteHooks.swift */, - C04ED5D70AFD1276F89B7864AFF47B96 /* World.h */, - 7A924660943DF4DCD57E3A85BF6FB095 /* World.swift */, - B7E28761C1C8F0D60BC9747BF68D1C9B /* World+DSL.h */, - CC1192DACE9ABA6C9B169B9EBA366C9A /* World+DSL.swift */, - C1518EBA50C2AF0B14455D2294C76038 /* XCTestSuite+QuickTestSuiteBuilder.m */, - 544C6EEED62ABD6307EEEA2B83A1AD71 /* Support Files */, + 73C1D1A0D20C667FAF4F01C3BA4AC451 /* Behavior.swift */, + 20C9E93FDAF76CEA15A9E23CC159DED1 /* Callsite.swift */, + D685C0D509328CD8778F99DD53A49A48 /* Closures.swift */, + 4FEA1DF1C7C22E7B20D2DC30FB9D3EF1 /* Configuration.swift */, + 9C78BF27F3A2B7B1368FE2E4317B6557 /* DSL.swift */, + 24FAED8BD878439BC32BE461165E4E08 /* ErrorUtility.swift */, + B38F7EB4258060BAA361D06EF1B16D9B /* Example.swift */, + 829CA47FBDF0A83BF67F7102D4CD40E6 /* ExampleGroup.swift */, + 301223B3EB74E21CDB1303C459B57231 /* ExampleHooks.swift */, + 8452C5F4B63A4A0178E56CDC9E95DFE8 /* ExampleMetadata.swift */, + 5C4D786F262665CE8C9113FA91745753 /* Filter.swift */, + 9245B48A46AAC45502A6B8A2AB745038 /* HooksPhase.swift */, + 75B78AC1C0059E66BD95A9F0CD2D24F5 /* NSBundle+CurrentTestBundle.swift */, + 057B1682EF92E71137867F0C259AF2CC /* NSString+C99ExtendedIdentifier.swift */, + B9985CC02179403DC54B3460DCE486AC /* QCKDSL.h */, + 12989D830FCE4AEF54A357265111CAEF /* QCKDSL.m */, + 1C846417EADDAAFF733CF6AC8FEB5EEA /* Quick.h */, + 6D2E298780429D096F1EC434CFC3B225 /* QuickConfiguration.h */, + 8EF0EA564D82AB46B710DC6096C1EA6B /* QuickConfiguration.m */, + F4C7D6328493B73EF741AC61F4CEF01E /* QuickSelectedTestSuiteBuilder.swift */, + EA8315675F3D2B2385E834043F85C676 /* QuickSpec.h */, + 38A82DE4A0130E4C946A904FEDDD74CA /* QuickSpec.m */, + 6BA4794DD94D5DE6BFFFEEC72B8C43E3 /* QuickSpecBase.h */, + E585A4F6C1434FD922B8371E432B5051 /* QuickSpecBase.m */, + 2E8E430D83F3CC7F72E348A0B222C46F /* QuickTestSuite.swift */, + 42DD07575CFDE63DE6412F425FDBED71 /* SuiteHooks.swift */, + B6D48A33A49B17952C7ABB6214240CB9 /* URL+FileName.swift */, + 129DA04B381B509DAEDD565711C5A0DA /* World.h */, + 8737F3E0C1FB1ABDDC8F61A081B1F76B /* World.swift */, + 467F00CAF06ADEF612F697F068843FB2 /* World+DSL.h */, + 65B4CDEF78BF13177A9303C1E765E5F6 /* World+DSL.swift */, + 7D9A924C203A11767BBF4D9C3737DA5D /* XCTestSuite+QuickTestSuiteBuilder.m */, + A066C6EF561B336DD2220BF5ACE721E3 /* Support Files */, ); - name = Quick; path = Quick; sourceTree = ""; }; @@ -465,38 +516,6 @@ name = Products; sourceTree = ""; }; - F154A167CC9AC286CB008DF3527B8F65 /* Support Files */ = { - isa = PBXGroup; - children = ( - 32343C8281B13DD7FE4F6D40BDF37C6A /* Info.plist */, - 14537A5EC332D4F5F8A2D483B328CC37 /* Nimble.modulemap */, - 954B5272EA2120AA3260D71B6BEF8007 /* Nimble.xcconfig */, - F795FA3DE9E15CB7DD017F791C55A8AC /* Nimble-dummy.m */, - 88A9381D91255401863A2174DDDDC0A3 /* Nimble-prefix.pch */, - BCBDD456B535FEADB8D72DB83652D74D /* Nimble-umbrella.h */, - ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; - sourceTree = ""; - }; - F49EBF110066909B0AEB8AA336924D4D /* Pods-LeeGoTests */ = { - isa = PBXGroup; - children = ( - 59427109F84AD13E6A9564C18025D3B0 /* Info.plist */, - E1F5F24AD8C11ECBD8D92BA90D5BC090 /* Pods-LeeGoTests.modulemap */, - 4FF26D4815A87B2A17820007FF2887B9 /* Pods-LeeGoTests-acknowledgements.markdown */, - 3BE6AE3E9B59CC9DECE8F989016F5B9A /* Pods-LeeGoTests-acknowledgements.plist */, - 041322DAFC52BA04979D3BC3B1629AC6 /* Pods-LeeGoTests-dummy.m */, - AC8E671A7AF452830CCCB18FDD1A531C /* Pods-LeeGoTests-frameworks.sh */, - F901FF153B8EFF1254F4EAF9E8BA022F /* Pods-LeeGoTests-resources.sh */, - 729F16C30B6274DA672D3ECD6388035A /* Pods-LeeGoTests-umbrella.h */, - 07657AAD9A8C349C277A5F2E67CD29B4 /* Pods-LeeGoTests.debug.xcconfig */, - 673188E86B2ADCE6F8F15B4C5668C02F /* Pods-LeeGoTests.release.xcconfig */, - ); - name = "Pods-LeeGoTests"; - path = "Target Support Files/Pods-LeeGoTests"; - sourceTree = ""; - }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ @@ -508,64 +527,48 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 2ACF6192E10A038A21EFA2156C9F7EA3 /* Headers */ = { + 85497845823171A47E23A59621A44463 /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - F693D0A9E0D05F815A85DC258E75AF8D /* CurrentTestCaseTracker.h in Headers */, - 65F5217D44A557FC16218DE5DE348C35 /* CwlCatchBadInstruction.h in Headers */, - 87DD62F200DAB5E1D701AB9F94D1D422 /* CwlCatchException.h in Headers */, - 0ECEEBC712D404AA6CF1E76A9284BFF9 /* DSL.h in Headers */, - B093484B1637B3D3AF65DF2232FDBADC /* mach_excServer.h in Headers */, - 76036D32625A56D480D84AA46961EF91 /* Nimble-umbrella.h in Headers */, - 469E9C3ED9FD6009F7C9AAF9E537E212 /* Nimble.h in Headers */, - 917949F596E1188261FC59214782C3D9 /* NMBExceptionCapture.h in Headers */, - 27B262F95D3CF9E3C74541A41929691C /* NMBStringify.h in Headers */, + 5AB9DB61D62D8BF7B1C734B373F361E7 /* CurrentTestCaseTracker.h in Headers */, + AAA2830BBCD86431B3EEB0ED968DF4A3 /* CwlCatchException.h in Headers */, + 35CADB1AD8E063A35DF68147F3183206 /* CwlMachBadInstructionHandler.h in Headers */, + 69B80157634D6FAF248D37F397732357 /* CwlPreconditionTesting.h in Headers */, + FB433A84B0A557CD5E5948A8B6705024 /* DSL.h in Headers */, + 6593C547A71CCEFC480CD578080A327F /* mach_excServer.h in Headers */, + 5DBCC0E4C72649C9A39A00D40D944DDA /* Nimble-umbrella.h in Headers */, + 0A2CA8B0DD7E300ABFCF1956E6B58248 /* Nimble.h in Headers */, + 22E9F6FA56858A5F7A5D664E5968ECB0 /* NMBExceptionCapture.h in Headers */, + 96132E7432F8DD315A88A07C6B4F9C72 /* NMBStringify.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 6E4D8110C70B1B347329EAFF6BC7817B /* Headers */ = { + D52BBEDA5B369A120CCB2DEE35E38BCB /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - CF18F976D04838F3B5A6F1DC047B2DD9 /* NSString+QCKSelectorName.h in Headers */, - 455073787A3F0941A95ABE24D3AEABB2 /* QCKDSL.h in Headers */, - A82F24F413A5B799D20AD4B520315AFB /* Quick-umbrella.h in Headers */, - 4E3F6E8CF5C210B57EE8640200215AA9 /* Quick.h in Headers */, - 320854015265EF6277CA073080DB1BAD /* QuickConfiguration.h in Headers */, - 4DDAB2A9B809E6D22DB18E718B101631 /* QuickSpec.h in Headers */, - E6089EAAD293B443D5BB11BA815D7865 /* World+DSL.h in Headers */, - B1D918961FBFC6AF64510C1A044D7F2B /* World.h in Headers */, + 7C8217EA6B0B135426919FB2B7246444 /* QCKDSL.h in Headers */, + 55A8920996C3EC10F0BE13BCCA845874 /* Quick-umbrella.h in Headers */, + 3B5274566B8419D18AEF2E4FA0A36B24 /* Quick.h in Headers */, + BD8BD37B4103E5D314C4188EDBFA8C8B /* QuickConfiguration.h in Headers */, + C2C88D1375857D58485862CB2149CF3C /* QuickSpec.h in Headers */, + F51B46CE5B6DD69661607FB6F4536F38 /* QuickSpecBase.h in Headers */, + C128E16BFCB471143B3B3D86BE41C9C6 /* World+DSL.h in Headers */, + B14FCCF2C84AB3E93FB4612D9C5ABC0C /* World.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXHeadersBuildPhase section */ /* Begin PBXNativeTarget section */ - 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */ = { - isa = PBXNativeTarget; - buildConfigurationList = B1DBAFB75A3AF98C8C6B0863BDC7A2E3 /* Build configuration list for PBXNativeTarget "Nimble" */; - buildPhases = ( - 3C4AABA28564F6F29FE8E3F38226690A /* Sources */, - DBE2CE2F5ED086FC1DD44D4B176AEA5B /* Frameworks */, - 2ACF6192E10A038A21EFA2156C9F7EA3 /* Headers */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = Nimble; - productName = Nimble; - productReference = 5A4D1D81D919C7953BF0A41715A04DEA /* Nimble.framework */; - productType = "com.apple.product-type.framework"; - }; 89E90D623693415BEE73066C7CFF8223 /* Quick */ = { isa = PBXNativeTarget; buildConfigurationList = 6EEF7E90D133428B1CF21B2B6C115BCC /* Build configuration list for PBXNativeTarget "Quick" */; buildPhases = ( - DE89D18C5BDCE6BC6B90BDFAB3BC3899 /* Sources */, + 65EFC71B79F1145FE1DC5D66C3598BD3 /* Sources */, 5BDFDA57445A33EA373A280BC35EAED1 /* Frameworks */, - 6E4D8110C70B1B347329EAFF6BC7817B /* Headers */, + D52BBEDA5B369A120CCB2DEE35E38BCB /* Headers */, ); buildRules = ( ); @@ -595,14 +598,31 @@ productReference = 3BA1749B6350D4231655E6B4AC28652C /* Pods_LeeGoTests.framework */; productType = "com.apple.product-type.framework"; }; + DD7C8BF89FE8053D0A2A2D88BB49CF07 /* Nimble */ = { + isa = PBXNativeTarget; + buildConfigurationList = 439502BDB29394EE0D69336E69C8494C /* Build configuration list for PBXNativeTarget "Nimble" */; + buildPhases = ( + 3B8E072FBCB923980AC89BAC33C449B9 /* Sources */, + 819A9B65073BE3B5599196C0A3B27EBC /* Frameworks */, + 85497845823171A47E23A59621A44463 /* Headers */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Nimble; + productName = Nimble; + productReference = 5A4D1D81D919C7953BF0A41715A04DEA /* Nimble.framework */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ D41D8CD98F00B204E9800998ECF8427E /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0730; - LastUpgradeCheck = 0700; + LastSwiftUpdateCheck = 0930; + LastUpgradeCheck = 0930; }; buildConfigurationList = 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 3.2"; @@ -616,7 +636,7 @@ projectDirPath = ""; projectRoot = ""; targets = ( - 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */, + DD7C8BF89FE8053D0A2A2D88BB49CF07 /* Nimble */, B7D3EDA00B01F6394C99CFD16ED0C1E5 /* Pods-LeeGoTests */, 89E90D623693415BEE73066C7CFF8223 /* Quick */, ); @@ -632,98 +652,104 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 3C4AABA28564F6F29FE8E3F38226690A /* Sources */ = { + 3B8E072FBCB923980AC89BAC33C449B9 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 047A68C646E00EB6D7D4D7343B801D09 /* AdapterProtocols.swift in Sources */, - DCEE854E62441E78FED15CC994497F61 /* AllPass.swift in Sources */, - 74FD712F3B503891B6BD9E5CD287E481 /* AssertionDispatcher.swift in Sources */, - F9E05A63D447B51E008B89731192FE7F /* AssertionRecorder.swift in Sources */, - AC29CC89E22273BF0D0DC2C841B7524C /* Async.swift in Sources */, - 551440A0F92574039C1D2EB39227D6B8 /* AsyncMatcherWrapper.swift in Sources */, - F60D221B548716DF35193FC2CF244676 /* BeAKindOf.swift in Sources */, - A448F837592E21D9387322E8DA0DD93F /* BeAnInstanceOf.swift in Sources */, - 9544A4EEC2A8448743ECA9981F88B60F /* BeCloseTo.swift in Sources */, - 9AF235C16362BA00BFBF12147907E953 /* BeEmpty.swift in Sources */, - AB255C27EF10E742C6567775022F49D5 /* BeginWith.swift in Sources */, - 07722FBCF6B380961B9D2832D5883F45 /* BeGreaterThan.swift in Sources */, - 1C50F54510D5C2B2AD84D7B74A6EDEBB /* BeGreaterThanOrEqualTo.swift in Sources */, - A33F1754198E8E8CCC7087F6176FFDC8 /* BeIdenticalTo.swift in Sources */, - 6E397D9FB11A47E48D70287D734B12B2 /* BeLessThan.swift in Sources */, - FAB4ECE0C5039D99BB7173880670871D /* BeLessThanOrEqual.swift in Sources */, - 0AEC20AACF9B10846830274E3B2AA6FD /* BeLogical.swift in Sources */, - 599669823A2EED2928C77F301F6B0515 /* BeNil.swift in Sources */, - 78F3DE174B4F8D368EF8EEFD7EE62087 /* BeVoid.swift in Sources */, - 8507F4BF7437EB40A3626EDCC68BFF6D /* Contain.swift in Sources */, - 737E19F3254F5929263982C29237C0BA /* CwlBadInstructionException.swift in Sources */, - 3915DBB4731CB17B255A7FE86E240B6E /* CwlCatchBadInstruction.m in Sources */, - 6CDBA48C3A8621E4EE1DAFFE240F0D82 /* CwlCatchBadInstruction.swift in Sources */, - 947162383483B6391F8CDF38249BFBD2 /* CwlCatchException.m in Sources */, - F4A1B7A059AAA6727EB70E58E09332A4 /* CwlCatchException.swift in Sources */, - BB10A2D0B1EE5B1BA811354116F83E3F /* CwlDarwinDefinitions.swift in Sources */, - 86FFB76B2EDCF4AE79CC4C0BD8A0FE9A /* DSL+Wait.swift in Sources */, - 1C7CA1FAFBF8B865596C739FEA39CDEE /* DSL.m in Sources */, - 17261E344C2027602431A636759AC7F2 /* DSL.swift in Sources */, - 8654571F855691C23B7B8E61B2141944 /* EndWith.swift in Sources */, - BF3AF1D2B46E09E2B3DCC824E6C1F5AF /* Equal.swift in Sources */, - 7F6750C7B1847733370B18C4CBFE32DF /* Errors.swift in Sources */, - CB7558CCDD935C9E82BBF454022ED1D3 /* Expectation.swift in Sources */, - 8015239010C1D642F14C105F8FF8E035 /* Expression.swift in Sources */, - 7D6269A3CFE53C28DAA6B92E8FC017A7 /* FailureMessage.swift in Sources */, - FCFFEB587281358CFF05A65ED9E94C12 /* Functional.swift in Sources */, - CE3FA6AE0944D4AE737F0E57CFF4A615 /* HaveCount.swift in Sources */, - 50B80F12A9BAE302F07F6CF94752F462 /* mach_excServer.c in Sources */, - A91166D0A5E8F1D5D5377622C381C045 /* Match.swift in Sources */, - B9BD565DAB07F8E2288A960A1D3EFAC1 /* MatcherFunc.swift in Sources */, - 23E2E1E02FE79EE1E1688CBBAA777297 /* MatcherProtocols.swift in Sources */, - CE4CEF6328E255B380E2B2692B351CF8 /* MatchError.swift in Sources */, - 9E95D6E15DBE9B0FC92AAF60D42D1464 /* Nimble-dummy.m in Sources */, - F9D61EB5EEB799105913685722FF4C9C /* NimbleEnvironment.swift in Sources */, - E5CCEF0B83F8272D10671C01AAE4FFA0 /* NimbleXCTestHandler.swift in Sources */, - DC32331BE565888E694E1321BB1D80F5 /* NMBExceptionCapture.m in Sources */, - 8C30EAD5FFD28B387099B41C74657A67 /* NMBExpectation.swift in Sources */, - AC0B24EF198E3BEDFCC9F25D7B8EEDAB /* NMBObjCMatcher.swift in Sources */, - 127CD37052B8E0BC645D83D4664F59D4 /* NMBStringify.m in Sources */, - EBA52C16F42E42A1824D87C284F4A60C /* PostNotification.swift in Sources */, - 4F3F103945CC52D0A3B8A891BB0E21C4 /* RaisesException.swift in Sources */, - 62744EF299751FB49B5FCD81D8C8FFF7 /* SatisfyAnyOf.swift in Sources */, - 234BFC45ACAC4A8FB945EA17B6A74B0B /* SourceLocation.swift in Sources */, - 9BEBD1791C233763A8DC13080BFB99C9 /* Stringers.swift in Sources */, - 110A640A9BE45841BA938B4C29EF5446 /* ThrowAssertion.swift in Sources */, - 22C1DE74D494C10BBE727F239A68447D /* ThrowError.swift in Sources */, - D88575ED37BC462E8130CDBEFE9EA308 /* XCTestObservationCenter+Register.m in Sources */, + F9649DD59BAEE88C6864EEFE73ECA88C /* AdapterProtocols.swift in Sources */, + DF026F6F406A4FB6CEA63B0A4B9E27DD /* AllPass.swift in Sources */, + 32B38992751B96F21324BFC9923BFCBD /* AssertionDispatcher.swift in Sources */, + 73BC5AC2ECDB8722E085F14B53E0D24E /* AssertionRecorder.swift in Sources */, + B2C151B20635A480E1937E3D2B509BB4 /* Async.swift in Sources */, + EAAA05EBBC34225C0DB45797712E24A1 /* AsyncMatcherWrapper.swift in Sources */, + 7E0C9AE6468A5DF91F0F4C7A387D725C /* BeAKindOf.swift in Sources */, + C1D862177DC2999FAC710AC25F253BD0 /* BeAnInstanceOf.swift in Sources */, + BF3B7218901760A6226C7F6346BEF454 /* BeCloseTo.swift in Sources */, + 58C0125D796A97541FDE3414001D8A92 /* BeEmpty.swift in Sources */, + CCDAF11E7AF29E720C587B038145F622 /* BeginWith.swift in Sources */, + AF1174085D9BC5D50FCE0480E9C2BE94 /* BeGreaterThan.swift in Sources */, + 58D964317DFBB10F54A273CB12843017 /* BeGreaterThanOrEqualTo.swift in Sources */, + F4BD249C60F21F5E0F7C1FAC8A5BC2AF /* BeIdenticalTo.swift in Sources */, + B102ABE4E54B71B3D2C2118E2782FAB9 /* BeLessThan.swift in Sources */, + 75538A8B20C7A20AF3D54BBF35D56FFE /* BeLessThanOrEqual.swift in Sources */, + 1E1CE28FFCCD7499620B47C910E9B9E9 /* BeLogical.swift in Sources */, + 75ABB48E3C30C2D736C3D05D6FD566A8 /* BeNil.swift in Sources */, + 3C66D2692E811DAE57A244A67E7AC555 /* BeVoid.swift in Sources */, + A74537420FF0CEDC6B9E82E1DC4C2B15 /* Contain.swift in Sources */, + 25D1805055756CAA69A167CA03B2465C /* ContainElementSatisfying.swift in Sources */, + A272932A4DF9AC2D3B0A21AC70606F6D /* CwlBadInstructionException.swift in Sources */, + C2467221FCD579800B9CD8FBBDB10B4D /* CwlCatchBadInstruction.swift in Sources */, + 7B5222991D1C53DF737242CA6C90012C /* CwlCatchException.m in Sources */, + 42EAAE8CFB95F2352FCE036F263263E1 /* CwlCatchException.swift in Sources */, + 41C783192F7ECD485C8C6384D30CBF11 /* CwlDarwinDefinitions.swift in Sources */, + 5F9AFDECC14365CD10F3D83D50020E32 /* CwlMachBadInstructionHandler.m in Sources */, + ADEE95A3A188BE3095990E20766BCCC8 /* DSL+Wait.swift in Sources */, + 8B55BD430033027AD5FF22D630DD9F62 /* DSL.m in Sources */, + 1A3E19B9F5EEB773C3BB61CA42F8BF62 /* DSL.swift in Sources */, + 3D1A89FDD6B579BAA92AD398E5C019F9 /* EndWith.swift in Sources */, + C8320A6164C870ADDB8A855ADEBBBDC9 /* Equal.swift in Sources */, + BC7B9761322C74FA27969BD55833BA47 /* Errors.swift in Sources */, + 65985C142EE8A74E6E56D5E30A39C79C /* Expectation.swift in Sources */, + 3E04D23B2995705A6106D41F3E3E4E33 /* ExpectationMessage.swift in Sources */, + 4FABBF5CA8F735F48035BE4144613CB7 /* Expression.swift in Sources */, + 17C8EE7DF3F57C8F99EAF63C6E61EA99 /* FailureMessage.swift in Sources */, + 62D26CE7BA3AEDB4E5E87218FDCBBA90 /* Functional.swift in Sources */, + 988EED125395950177DC14AF9BC87D8D /* HaveCount.swift in Sources */, + D9E62C41794D0B5D2CD68CA92C4BA836 /* mach_excServer.c in Sources */, + F28003B228B82B7E1497D4F41F55A31E /* Match.swift in Sources */, + C06FA100C1BBEE34B863BCB8A65359C1 /* MatcherFunc.swift in Sources */, + 6BB0EBEB4730B94AC07458E398D142C8 /* MatcherProtocols.swift in Sources */, + 45F183320C688F9978649F30ABE21D09 /* MatchError.swift in Sources */, + 4CDACD8A5A6CFB688838AA988E7D1E43 /* Nimble-dummy.m in Sources */, + 54CC2049C937561A469575AF9E6A6FE9 /* NimbleEnvironment.swift in Sources */, + CF55697859D633C852C3586384647EB6 /* NimbleXCTestHandler.swift in Sources */, + 6CB4890B9BF5F846E980634AFE83917D /* NMBExceptionCapture.m in Sources */, + 68FD03C72D719117929696B62038B3D7 /* NMBExpectation.swift in Sources */, + A7C13C62E4116CA964A3E82179092AD5 /* NMBObjCMatcher.swift in Sources */, + AE4DA49ECD693BF384CD824DF02D7C6E /* NMBStringify.m in Sources */, + 31C39ED8CB1C9317F1F2840FC919662D /* PostNotification.swift in Sources */, + EF8548E0C37E8888D9DDC11ED89D3568 /* Predicate.swift in Sources */, + EAE2AAE5EB826B38978692984BB22FDD /* RaisesException.swift in Sources */, + EB3A73071ABA60E77E0704649637D8BD /* SatisfyAnyOf.swift in Sources */, + F3BAA36614ABDBC0538B0DEA99CF80A0 /* SourceLocation.swift in Sources */, + 8170866E2ACE0ACFBC6D90081354EC65 /* Stringers.swift in Sources */, + 3B3A88E074630B1EBC2139F4F70F0443 /* ThrowAssertion.swift in Sources */, + 5BF274C2DEF332ED79B1CD15CFEC3498 /* ThrowError.swift in Sources */, + 29A65FF7D1752DFFF87F5DC8F55CE859 /* ToSucceed.swift in Sources */, + A61ADD214AA182EEB2AC95EA3F3D658F /* XCTestObservationCenter+Register.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - DE89D18C5BDCE6BC6B90BDFAB3BC3899 /* Sources */ = { + 65EFC71B79F1145FE1DC5D66C3598BD3 /* Sources */ = { isa = PBXSourcesBuildPhase; buildActionMask = 2147483647; files = ( - 74031C856297E532E47F34786EB60E68 /* Callsite.swift in Sources */, - BE1A0D1C2939E5BC6B055E05C5A31510 /* Closures.swift in Sources */, - FC04F54461FC080A4E9402D17F926C4E /* Configuration.swift in Sources */, - BBD082C2025E0BC8CA4E0067BF25F247 /* DSL.swift in Sources */, - 048CB7D541B3B4B3CD2202B1A2AA42D8 /* ErrorUtility.swift in Sources */, - F963E36C0CDF72319F0B9B1AA93F862B /* Example.swift in Sources */, - BB34F76D2FF37A0C4BDCAD552B148597 /* ExampleGroup.swift in Sources */, - 5C5F39245799AA5DD0197F0F6691EB84 /* ExampleHooks.swift in Sources */, - 7FE2883D6EBD544641DE389DF766F61F /* ExampleMetadata.swift in Sources */, - DD630998F1441804CE820F6FBC9210CC /* Filter.swift in Sources */, - 64D6B12299BA264C67A1BCE0FDE0FAB9 /* HooksPhase.swift in Sources */, - D2CC7D44F6DCD3459C2324F80735D701 /* NSBundle+CurrentTestBundle.swift in Sources */, - A23B77348C6EA3985C11D7C0093E83EB /* NSString+QCKSelectorName.m in Sources */, - 19CE19012813358015F0E027BF6DC976 /* QCKDSL.m in Sources */, - AB05294543A9496CDC109ADF5500F40D /* Quick-dummy.m in Sources */, - 8E2CC1BCEE1CCEC690A71E5B34426708 /* QuickConfiguration.m in Sources */, - 38C3BEBC71B3E8D536EE7A8CEE7275BA /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 33F9B85F26F3874ACFF7CD5DF76C68AB /* QuickSpec.m in Sources */, - E86254173AFD7B53AE0DB84C8C525FF9 /* QuickTestSuite.swift in Sources */, - 4FB3C3160C59F40193FDCFAC0876359F /* String+FileName.swift in Sources */, - DB462DF46A9D66FC5C69B0638CCEEA96 /* SuiteHooks.swift in Sources */, - FB3B454C437962309C0D21110C73E6AD /* World+DSL.swift in Sources */, - F2EB651EBF1C4A4500632FBBE2E26978 /* World.swift in Sources */, - B191688F386B15A6D52F27041D2AD45D /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + 7195BF38C2966BDBBD8AA9DDD22FF34C /* Behavior.swift in Sources */, + EE1E29F50D53F1F84F3A607A50A088D9 /* Callsite.swift in Sources */, + BEFB96135769A65ABFF3EE7291BBD809 /* Closures.swift in Sources */, + DACDE56B381B7BFEBA603EEDD350DE72 /* Configuration.swift in Sources */, + 7C08AD1027A55213CC1481A412CE9768 /* DSL.swift in Sources */, + 27BDC2902972602E8EA42A7F6A83759B /* ErrorUtility.swift in Sources */, + F724744BAFFE1E2CD0663B1B42CA2AFB /* Example.swift in Sources */, + D6EAB9669C4CCFCBF6D7D40D0E3A646A /* ExampleGroup.swift in Sources */, + 75E5FDE42449EC1F917641B0ED037CC3 /* ExampleHooks.swift in Sources */, + E6184782E8E062F0B53F45FF74E062D6 /* ExampleMetadata.swift in Sources */, + 61400A521201DBCDC4CBF35F40E05AE2 /* Filter.swift in Sources */, + A9C3C71D3A8A9628E0B63FC4A2CA9804 /* HooksPhase.swift in Sources */, + EB06F2366BA6B4DDDF3427C9A1D961F2 /* NSBundle+CurrentTestBundle.swift in Sources */, + 1B384FD5822537DB8064022679AE086D /* NSString+C99ExtendedIdentifier.swift in Sources */, + 4EBCFFB6BEFC352E9F16804DB992615A /* QCKDSL.m in Sources */, + 8FC5ACFD6C6C867C1C0143AB605CECB0 /* Quick-dummy.m in Sources */, + EBB7D1A0B182BF219DCE2AAECCD4454F /* QuickConfiguration.m in Sources */, + 4BB4C9429190D1C57A7E026E2E34E924 /* QuickSelectedTestSuiteBuilder.swift in Sources */, + 7BA2A412DB4711124FFA20C934EF7BA7 /* QuickSpec.m in Sources */, + 4C149C625B2323BCBB00227B2070A660 /* QuickSpecBase.m in Sources */, + 4B0C9589A6481496F6B8F111F31D7C83 /* QuickTestSuite.swift in Sources */, + 925AE0083E743F34AACE80B3038CA3F9 /* SuiteHooks.swift in Sources */, + 143CDE1B7AAD7550DC3B5FA19AB759FE /* URL+FileName.swift in Sources */, + 8B5BDB67BD2CF4C771C9039D7AE81F0F /* World+DSL.swift in Sources */, + 1E2B3483E2D97AA59BE8945F7ACA3FD8 /* World.swift in Sources */, + 448467C5A780E9AA05314FCF88DEB677 /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -733,7 +759,7 @@ B60BF1A591079A0C854F8282EDD138C5 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Nimble; - target = 1321E318D10CFDC9F5B93A7952492CCD /* Nimble */; + target = DD7C8BF89FE8053D0A2A2D88BB49CF07 /* Nimble */; targetProxy = E910200BB0E3DD49704F5316A4EB4D3A /* PBXContainerItemProxy */; }; FAAD741098E402157BC6B0223E677AAC /* PBXTargetDependency */ = { @@ -745,60 +771,25 @@ /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 04020B9E0797A7C9CA7A101EA9312572 /* Release */ = { + 1038F2258833E747292026A51736F0C6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 954B5272EA2120AA3260D71B6BEF8007 /* Nimble.xcconfig */; + baseConfigurationReference = 53EF9E89608B00E0EC6239A38A8FF622 /* Pods-LeeGoTests.debug.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; - 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/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; - PRODUCT_NAME = Nimble; - SDKROOT = iphoneos; - SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; - TARGETED_DEVICE_FAMILY = "1,2"; - VERSIONING_SYSTEM = "apple-generic"; - VERSION_INFO_PREFIX = ""; - }; - name = Release; - }; - 69C87F8DE370440072918D898A01AF7D /* Debug */ = { - isa = XCBuildConfiguration; - baseConfigurationReference = 07657AAD9A8C349C277A5F2E67CD29B4 /* Pods-LeeGoTests.debug.xcconfig */; - buildSettings = { - "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; - "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; - CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; - DEFINES_MODULE = YES; - DYLIB_COMPATIBILITY_VERSION = 1; - DYLIB_CURRENT_VERSION = 1; - DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LeeGoTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + 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-LeeGoTests/Pods-LeeGoTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -806,6 +797,7 @@ PRODUCT_NAME = Pods_LeeGoTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; @@ -813,170 +805,121 @@ }; name = Debug; }; - 9809813E151BE9C6D02E3229FD57F085 /* Release */ = { + 3229EE22958E2216C172C9C713A1B1CE /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = ECF6119DA0532B74B479DF3928941203 /* Quick.xcconfig */; + baseConfigurationReference = EA57C72EE293B50ED3E1BA58B9FFCD89 /* Quick.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; 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"; - MTL_ENABLE_DEBUG_INFO = NO; PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Onone"; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Release; + name = Debug; }; - 9FF28EF49597B9B1CE6B9FD7532961B9 /* Debug */ = { + 42642BC2090C1F01FA133D0BAD557484 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = ECF6119DA0532B74B479DF3928941203 /* Quick.xcconfig */; + baseConfigurationReference = CE31DE883347DA5FE6B7F79F715D5D71 /* Nimble.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Info.plist"; + 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/Quick/Quick.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; - PRODUCT_NAME = Quick; + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; - }; - A435E3C35B2666C25C53422D898980A7 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = NO; - CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; - CLANG_CXX_LIBRARY = "libc++"; - CLANG_ENABLE_MODULES = YES; - CLANG_ENABLE_OBJC_ARC = YES; - CLANG_WARN_BOOL_CONVERSION = YES; - CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; - CLANG_WARN_EMPTY_BODY = YES; - CLANG_WARN_ENUM_CONVERSION = YES; - CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; - CLANG_WARN_UNREACHABLE_CODE = YES; - CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; - CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = NO; - ENABLE_TESTABILITY = YES; - GCC_C_LANGUAGE_STANDARD = gnu99; - GCC_DYNAMIC_NO_PIC = NO; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - "POD_CONFIGURATION_DEBUG=1", - "DEBUG=1", - "$(inherited)", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; - GCC_WARN_UNUSED_FUNCTION = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; - ONLY_ACTIVE_ARCH = YES; - PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; - STRIP_INSTALLED_PRODUCT = NO; - SYMROOT = "${SRCROOT}/../build"; - }; - name = Debug; + name = Release; }; - D7B9076A9C78E18A8605B3758EEE0B71 /* Debug */ = { + 6B4B805320F41E3B7571BC025BC768DF /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 954B5272EA2120AA3260D71B6BEF8007 /* Nimble.xcconfig */; + baseConfigurationReference = CE31DE883347DA5FE6B7F79F715D5D71 /* Nimble.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = dwarf; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; INFOPLIST_FILE = "Target Support Files/Nimble/Info.plist"; 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/Nimble/Nimble.modulemap"; - MTL_ENABLE_DEBUG_INFO = YES; PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; - SWIFT_VERSION = 3.0; + SWIFT_SWIFT3_OBJC_INFERENCE = Off; + SWIFT_VERSION = 4.0; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - E0FCB9055153292A114DA3D6D090A432 /* Release */ = { + 91F19D51C32619EFA354D60F4E844B94 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 673188E86B2ADCE6F8F15B4C5668C02F /* Pods-LeeGoTests.release.xcconfig */; + baseConfigurationReference = F291C50C45B7A5FDF5A883AD5434EA3C /* Pods-LeeGoTests.release.xcconfig */; buildSettings = { + CODE_SIGN_IDENTITY = ""; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - ENABLE_STRICT_OBJC_MSGSEND = YES; - GCC_NO_COMMON_BLOCKS = YES; INFOPLIST_FILE = "Target Support Files/Pods-LeeGoTests/Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + 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-LeeGoTests/Pods-LeeGoTests.modulemap"; - MTL_ENABLE_DEBUG_INFO = NO; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -984,49 +927,164 @@ PRODUCT_NAME = Pods_LeeGoTests; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - F2C4F47FC8AD76198661C5EFDE751899 /* Release */ = { + C3E37FB098AE76440E29106ADBF00CEB /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; CLANG_ANALYZER_NONNULL = YES; - CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x"; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; CLANG_CXX_LIBRARY = "libc++"; CLANG_ENABLE_MODULES = YES; CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; CLANG_WARN_CONSTANT_CONVERSION = YES; - CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; CLANG_WARN_EMPTY_BODY = YES; CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; CLANG_WARN_INT_CONVERSION = YES; - CLANG_WARN_OBJC_ROOT_CLASS = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; CLANG_WARN_UNREACHABLE_CODE = YES; CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; CODE_SIGNING_REQUIRED = NO; - COPY_PHASE_STRIP = YES; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = dwarf; + ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_TESTABILITY = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_DYNAMIC_NO_PIC = NO; + GCC_NO_COMMON_BLOCKS = YES; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PREPROCESSOR_DEFINITIONS = ( + "POD_CONFIGURATION_DEBUG=1", + "DEBUG=1", + "$(inherited)", + ); + GCC_WARN_64_TO_32_BIT_CONVERSION = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; + GCC_WARN_UNDECLARED_SELECTOR = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; + GCC_WARN_UNUSED_FUNCTION = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = YES; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = "$(TARGET_NAME)"; + PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; + STRIP_INSTALLED_PRODUCT = NO; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = DEBUG; + SYMROOT = "${SRCROOT}/../build"; + }; + name = Debug; + }; + DA03565BE765DB55C6448FB363A44481 /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + CLANG_ANALYZER_NONNULL = YES; + CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; + CLANG_CXX_LANGUAGE_STANDARD = "gnu++14"; + CLANG_CXX_LIBRARY = "libc++"; + CLANG_ENABLE_MODULES = YES; + CLANG_ENABLE_OBJC_ARC = YES; + CLANG_ENABLE_OBJC_WEAK = YES; + CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES; + CLANG_WARN_BOOL_CONVERSION = YES; + CLANG_WARN_COMMA = YES; + CLANG_WARN_CONSTANT_CONVERSION = YES; + CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES; + CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR; + CLANG_WARN_DOCUMENTATION_COMMENTS = YES; + CLANG_WARN_EMPTY_BODY = YES; + CLANG_WARN_ENUM_CONVERSION = YES; + CLANG_WARN_INFINITE_RECURSION = YES; + CLANG_WARN_INT_CONVERSION = YES; + CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES; + CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES; + CLANG_WARN_OBJC_LITERAL_CONVERSION = YES; + CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR; + CLANG_WARN_RANGE_LOOP_ANALYSIS = YES; + CLANG_WARN_STRICT_PROTOTYPES = YES; + CLANG_WARN_SUSPICIOUS_MOVE = YES; + CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE; + CLANG_WARN_UNREACHABLE_CODE = YES; + CLANG_WARN__DUPLICATE_METHOD_MATCH = YES; + CODE_SIGNING_REQUIRED = NO; + COPY_PHASE_STRIP = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; - GCC_C_LANGUAGE_STANDARD = gnu99; + ENABLE_STRICT_OBJC_MSGSEND = YES; + GCC_C_LANGUAGE_STANDARD = gnu11; + GCC_NO_COMMON_BLOCKS = YES; GCC_PREPROCESSOR_DEFINITIONS = ( "POD_CONFIGURATION_RELEASE=1", "$(inherited)", ); GCC_WARN_64_TO_32_BIT_CONVERSION = YES; - GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR; GCC_WARN_UNDECLARED_SELECTOR = YES; - GCC_WARN_UNINITIALIZED_AUTOS = YES; + GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 8.1; + IPHONEOS_DEPLOYMENT_TARGET = 8.0; + MTL_ENABLE_DEBUG_INFO = NO; + PRODUCT_NAME = "$(TARGET_NAME)"; PROVISIONING_PROFILE_SPECIFIER = NO_SIGNING/; STRIP_INSTALLED_PRODUCT = NO; SYMROOT = "${SRCROOT}/../build"; + }; + name = Release; + }; + EE51D49F06DB1754728FAE9B08215246 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = EA57C72EE293B50ED3E1BA58B9FFCD89 /* Quick.xcconfig */; + buildSettings = { + CODE_SIGN_IDENTITY = ""; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + 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/Quick/Quick.modulemap"; + PRODUCT_NAME = Quick; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_OPTIMIZATION_LEVEL = "-Owholemodule"; + SWIFT_VERSION = 4.0; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; }; name = Release; }; @@ -1036,35 +1094,35 @@ 2D8E8EC45A3A1A1D94AE762CB5028504 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - A435E3C35B2666C25C53422D898980A7 /* Debug */, - F2C4F47FC8AD76198661C5EFDE751899 /* Release */, + C3E37FB098AE76440E29106ADBF00CEB /* Debug */, + DA03565BE765DB55C6448FB363A44481 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 4EF026BA15229B8086DFCED1EC4A9F70 /* Build configuration list for PBXNativeTarget "Pods-LeeGoTests" */ = { + 439502BDB29394EE0D69336E69C8494C /* Build configuration list for PBXNativeTarget "Nimble" */ = { isa = XCConfigurationList; buildConfigurations = ( - 69C87F8DE370440072918D898A01AF7D /* Debug */, - E0FCB9055153292A114DA3D6D090A432 /* Release */, + 6B4B805320F41E3B7571BC025BC768DF /* Debug */, + 42642BC2090C1F01FA133D0BAD557484 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 6EEF7E90D133428B1CF21B2B6C115BCC /* Build configuration list for PBXNativeTarget "Quick" */ = { + 4EF026BA15229B8086DFCED1EC4A9F70 /* Build configuration list for PBXNativeTarget "Pods-LeeGoTests" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9FF28EF49597B9B1CE6B9FD7532961B9 /* Debug */, - 9809813E151BE9C6D02E3229FD57F085 /* Release */, + 1038F2258833E747292026A51736F0C6 /* Debug */, + 91F19D51C32619EFA354D60F4E844B94 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - B1DBAFB75A3AF98C8C6B0863BDC7A2E3 /* Build configuration list for PBXNativeTarget "Nimble" */ = { + 6EEF7E90D133428B1CF21B2B6C115BCC /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - D7B9076A9C78E18A8605B3758EEE0B71 /* Debug */, - 04020B9E0797A7C9CA7A101EA9312572 /* Release */, + 3229EE22958E2216C172C9C713A1B1CE /* Debug */, + EE51D49F06DB1754728FAE9B08215246 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Quick/README.md b/Pods/Quick/README.md index 5c94cef..e6dc0ad 100644 --- a/Pods/Quick/README.md +++ b/Pods/Quick/README.md @@ -1,6 +1,9 @@ ![](http://f.cl.ly/items/0r1E192C1R0b2g2Q3h2w/QuickLogo_Color.png) [![Build Status](https://travis-ci.org/Quick/Quick.svg?branch=master)](https://travis-ci.org/Quick/Quick) +[![CocoaPods](https://img.shields.io/cocoapods/v/Quick.svg)](https://cocoapods.org/pods/Quick) +[![Carthage Compatible](https://img.shields.io/badge/Carthage-compatible-4BC51D.svg?style=flat)](https://github.com/Carthage/Carthage) +[![Platforms](https://img.shields.io/cocoapods/p/Quick.svg)](https://cocoapods.org/pods/Quick) Quick is a behavior-driven development framework for Swift and Objective-C. Inspired by [RSpec](https://github.com/rspec/rspec), [Specta](https://github.com/specta/specta), and [Ginkgo](https://github.com/onsi/ginkgo). @@ -35,6 +38,15 @@ class TableOfContentsSpec: QuickSpec { #### Nimble Quick comes together with [Nimble](https://github.com/Quick/Nimble) — a matcher framework for your tests. You can learn why `XCTAssert()` statements make your expectations unclear and how to fix that using Nimble assertions [here](./Documentation/en-us/NimbleAssertions.md). +## Swift Version + +Certain versions of Quick and Nimble only support certain versions of Swift. Depending on which version of Swift your project uses, you should use specific versions of Quick and Nimble. Use the table below to determine which versions of Quick and Nimble are compatible with your project. + +|Swift version |Quick version |Nimble version | +|:--------------------|:---------------|:--------------| +|Swift 3 |v1.0.0 or later |v5.0.0 or later| +|Swift 2.2 / Swift 2.3|v0.9.3 |v4.1.0 | + ## Documentation All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your Podfile: @@ -44,26 +56,33 @@ All documentation can be found in the [Documentation folder](./Documentation), i use_frameworks! -def testing_pods - pod 'Quick' - pod 'Nimble' -end +target "MyApp" do + # Normal libraries -target 'MyTests' do - testing_pods -end + abstract_target 'Tests' do + inherit! :search_paths + target "MyAppTests" + target "MyAppUITests" -target 'MyUITests' do - testing_pods + pod 'Quick' + pod 'Nimble' + end end ``` ## Projects using Quick -Many apps use both Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. +Over ten-thousand apps use either Quick and Nimble however, as they are not included in the app binary, neither appear in “Top Used Libraries” blog posts. Therefore, it would be greatly appreciated to remind contributors that their efforts are valued by compiling a list of organizations and projects that use them. Does your organization or project use Quick and Nimble? If yes, [please add your project to the list](https://github.com/Quick/Quick/wiki/Projects-using-Quick). +## Who uses Quick + +Similar to projects using Quick, it would be nice to hear why people use Quick and Nimble. Are there features you love? Are there features that are just okay? Are there some features we have that no one uses? + +Have something positive to say about Quick (or Nimble)? If yes, [provide a testimonial here](https://github.com/Quick/Quick/wiki/Who-uses-Quick). + + ## License Apache 2.0 license. See the [`LICENSE`](LICENSE) file for details. diff --git a/Pods/Quick/Sources/Quick/Behavior.swift b/Pods/Quick/Sources/Quick/Behavior.swift new file mode 100644 index 0000000..1d98702 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Behavior.swift @@ -0,0 +1,17 @@ +/** + A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` function with a context instance of the generic type. + */ + +open class Behavior { + + open static var name: String { return String(describing: self) } + /** + override this method in your behavior to define a set of reusable examples. + + This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + + - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. + */ + open class func spec(_ aContext: @escaping () -> Context) {} +} diff --git a/Pods/Quick/Sources/Quick/Callsite.swift b/Pods/Quick/Sources/Quick/Callsite.swift index 53496cd..f5e3711 100644 --- a/Pods/Quick/Sources/Quick/Callsite.swift +++ b/Pods/Quick/Sources/Quick/Callsite.swift @@ -1,10 +1,23 @@ import Foundation +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _CallsiteBase: NSObject {} + #else + public class _CallsiteBase: NSObject {} + #endif +#else +public class _CallsiteBase: NSObject {} +#endif + /** An object encapsulating the file and line number at which a particular example is defined. */ -final public class Callsite: NSObject { +final public class Callsite: _CallsiteBase { /** The absolute path of the file in which an example is defined. */ @@ -21,10 +34,12 @@ final public class Callsite: NSObject { } } -/** - Returns a boolean indicating whether two Callsite objects are equal. - If two callsites are in the same file and on the same line, they must be equal. -*/ -public func ==(lhs: Callsite, rhs: Callsite) -> Bool { - return lhs.file == rhs.file && lhs.line == rhs.line +extension Callsite { + /** + Returns a boolean indicating whether two Callsite objects are equal. + If two callsites are in the same file and on the same line, they must be equal. + */ + @nonobjc public static func == (lhs: Callsite, rhs: Callsite) -> Bool { + return lhs.file == rhs.file && lhs.line == rhs.line + } } diff --git a/Pods/Quick/Sources/Quick/Configuration/Configuration.swift b/Pods/Quick/Sources/Quick/Configuration/Configuration.swift index 9836fef..dbb95f1 100644 --- a/Pods/Quick/Sources/Quick/Configuration/Configuration.swift +++ b/Pods/Quick/Sources/Quick/Configuration/Configuration.swift @@ -4,7 +4,7 @@ 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) -> Void /** A closure that, given metadata about an example, returns a boolean value @@ -19,14 +19,14 @@ public typealias ExampleFilter = (_ example: Example) -> Bool final public class Configuration: NSObject { internal let exampleHooks = ExampleHooks() internal let suiteHooks = SuiteHooks() - internal var exclusionFilters: [ExampleFilter] = [{ example in + internal var exclusionFilters: [ExampleFilter] = [ { example in if let pending = example.filterFlags[Filter.pending] { return pending } else { return false } }] - internal var inclusionFilters: [ExampleFilter] = [{ example in + internal var inclusionFilters: [ExampleFilter] = [ { example in if let focused = example.filterFlags[Filter.focused] { return focused } else { @@ -72,7 +72,7 @@ final public class Configuration: NSObject { provided with metadata on the example that the closure is being run prior to. */ -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) @objc(beforeEachWithMetadata:) public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) @@ -109,7 +109,7 @@ final public class Configuration: NSObject { is provided with metadata on the example that the closure is being run after. */ -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) @objc(afterEachWithMetadata:) public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) diff --git a/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Pods/Quick/Sources/Quick/DSL/DSL.swift index b514b82..94f20c5 100644 --- a/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/DSL.swift @@ -36,8 +36,8 @@ public func afterSuite(_ closure: @escaping 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: @escaping () -> ()) { - World.sharedWorld.sharedExamples(name, closure: { (NSDictionary) in closure() }) +public func sharedExamples(_ name: String, closure: @escaping () -> Void) { + World.sharedWorld.sharedExamples(name) { _ in closure() } } /** @@ -65,14 +65,14 @@ public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosu - 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: () -> Void) { 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: () -> Void) { World.sharedWorld.context(description, flags: flags, closure: closure) } @@ -127,7 +127,7 @@ public func afterEach(_ closure: @escaping 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: @escaping () -> ()) { +public func it(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { World.sharedWorld.it(description, flags: flags, file: file, line: line, closure: closure) } @@ -167,6 +167,22 @@ public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) } +/** + Inserts the examples defined using a `Behavior` into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. + + - parameter behavior: The type of `Behavior` class defining the example group to be executed. + - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. + - parameter flags: A mapping of string keys to booleans that can be used to filter examples or example groups. + Empty by default. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. + */ +public func itBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.itBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} + /** Defines an example or example group that should not be executed. Use `pending` to temporarily disable examples or groups that should not be run yet. @@ -174,7 +190,7 @@ public func itBehavesLike(_ name: String, flags: FilterFlags = [:], file: String - parameter description: An arbitrary string describing the example or example group. - parameter closure: A closure that will not be evaluated. */ -public func pending(_ description: String, closure: () -> ()) { +public func pending(_ description: String, closure: () -> Void) { World.sharedWorld.pending(description, closure: closure) } @@ -182,7 +198,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: () -> Void) { World.sharedWorld.xdescribe(description, flags: flags, closure: closure) } @@ -190,7 +206,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: () -> Void) { xdescribe(description, flags: flags, closure: closure) } @@ -198,23 +214,30 @@ 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: @escaping () -> ()) { +public func xit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { World.sharedWorld.xit(description, flags: flags, file: file, line: line, closure: closure) } +/** + Use this to quicklu mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. +*/ +public func xitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.xitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} /** Use this to quickly focus a `describe` closure, focusing the examples in the closure. If any examples in the test suite are focused, only those examples are executed. This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. */ -public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> ()) { +public func fdescribe(_ description: String, flags: FilterFlags = [:], closure: () -> Void) { 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: () -> Void) { fdescribe(description, flags: flags, closure: closure) } @@ -222,6 +245,27 @@ 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: @escaping () -> ()) { +public func fit(_ description: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, closure: @escaping () -> Void) { World.sharedWorld.fit(description, flags: flags, file: file, line: line, closure: closure) } + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line) { + fitBehavesLike(name, flags: flags, file: file, line: line, sharedExampleContext: { return [:] }) +} + +/** + Use this to quickly focus an `itBehavesLike` closure. +*/ +public func fitBehavesLike(_ name: String, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: flags, file: file, line: line) +} + +/** + Use this to quickly focus on `itBehavesLike` closure. + */ +public func fitBehavesLike(_ behavior: Behavior.Type, flags: FilterFlags = [:], file: String = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.fitBehavesLike(behavior, context: context, flags: flags, file: file, line: line) +} diff --git a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift index ab35341..5249027 100644 --- a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -18,7 +18,7 @@ extension World { registerSharedExample(name, closure: closure) } - internal func describe(_ description: String, flags: FilterFlags, closure: () -> ()) { + internal func describe(_ description: String, flags: FilterFlags, closure: () -> Void) { guard currentExampleMetadata == nil else { raiseError("'describe' cannot be used inside '\(currentPhase)', 'describe' may only be used inside 'context' or 'describe'. ") } @@ -30,20 +30,20 @@ extension World { performWithCurrentExampleGroup(group, closure: closure) } - internal func context(_ description: String, flags: FilterFlags, closure: () -> ()) { + internal func context(_ description: String, flags: FilterFlags, closure: () -> Void) { guard currentExampleMetadata == nil else { raiseError("'context' cannot be used inside '\(currentPhase)', 'context' may only be used inside 'context' or 'describe'. ") } self.describe(description, flags: flags, closure: closure) } - internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> ()) { + internal func fdescribe(_ description: String, flags: FilterFlags, closure: () -> Void) { 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: () -> Void) { var pendingFlags = flags pendingFlags[Filter.pending] = true self.describe(description, flags: pendingFlags, closure: closure) @@ -56,7 +56,7 @@ extension World { currentExampleGroup.hooks.appendBefore(closure) } -#if _runtime(_ObjC) +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE @objc(beforeEachWithMetadata:) internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { currentExampleGroup.hooks.appendBefore(closure) @@ -74,7 +74,7 @@ extension World { currentExampleGroup.hooks.appendAfter(closure) } -#if _runtime(_ObjC) +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE @objc(afterEachWithMetadata:) internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { currentExampleGroup.hooks.appendAfter(closure) @@ -85,7 +85,7 @@ extension World { } #endif - internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { + internal func it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { if beforesCurrentlyExecuting { raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'. ") } @@ -100,13 +100,13 @@ extension World { currentExampleGroup.appendExample(example) } - internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { + internal func fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { 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: @escaping () -> ()) { + internal func xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { var pendingFlags = flags pendingFlags[Filter.pending] = true self.it(description, flags: pendingFlags, file: file, line: line, closure: closure) @@ -131,19 +131,55 @@ extension World { } } -#if _runtime(_ObjC) + internal func fitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags, file: String, line: UInt) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.itBehavesLike(name, sharedExampleContext: sharedExampleContext, flags: focusedFlags, file: file, line: line) + } + + internal func itBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, 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'. ") + } + let callsite = Callsite(file: file, line: line) + let closure = behavior.spec + let group = ExampleGroup(description: behavior.name, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group) { + closure(context) + } + + group.walkDownExamples { (example: Example) in + example.isSharedExample = true + example.callsite = callsite + } + } + + internal func fitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { + var focusedFlags = flags + focusedFlags[Filter.focused] = true + self.itBehavesLike(behavior, context: context, flags: focusedFlags, file: file, line: line) + } + + internal func xitBehavesLike(_ behavior: Behavior.Type, context: @escaping () -> C, flags: FilterFlags, file: String, line: UInt) { + var pendingFlags = flags + pendingFlags[Filter.pending] = true + self.itBehavesLike(behavior, context: context, flags: pendingFlags, file: file, line: line) + } + +#if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE @objc(itWithDescription:flags:file:line:closure:) - private func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> ()) { + private func objc_it(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { 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: @escaping () -> ()) { + private func objc_fit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { 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: @escaping () -> ()) { + private func objc_xit(_ description: String, flags: FilterFlags, file: String, line: UInt, closure: @escaping () -> Void) { xit(description, flags: flags, file: file, line: line, closure: closure) } @@ -153,7 +189,7 @@ extension World { } #endif - internal func pending(_ description: String, closure: () -> ()) { + internal func pending(_ description: String, closure: () -> Void) { print("Pending: \(description)") } diff --git a/Pods/Quick/Sources/Quick/ErrorUtility.swift b/Pods/Quick/Sources/Quick/ErrorUtility.swift index 8405a81..155fefd 100644 --- a/Pods/Quick/Sources/Quick/ErrorUtility.swift +++ b/Pods/Quick/Sources/Quick/ErrorUtility.swift @@ -1,7 +1,7 @@ import Foundation internal func raiseError(_ message: String) -> Never { -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) NSException(name: .internalInconsistencyException, reason: message, userInfo: nil).raise() #endif diff --git a/Pods/Quick/Sources/Quick/Example.swift b/Pods/Quick/Sources/Quick/Example.swift index 844bf3f..c15b31a 100644 --- a/Pods/Quick/Sources/Quick/Example.swift +++ b/Pods/Quick/Sources/Quick/Example.swift @@ -1,12 +1,26 @@ import Foundation private var numberOfExamplesRun = 0 +private var numberOfIncludedExamples = 0 + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _ExampleBase: NSObject {} + #else + public class _ExampleBase: NSObject {} + #endif +#else +public class _ExampleBase: NSObject {} +#endif /** Examples, defined with the `it` function, use assertions to demonstrate how code should behave. These are like "tests" in XCTest. */ -final public class Example: NSObject { +final public class Example: _ExampleBase { /** A boolean indicating whether the example is a shared example; i.e.: whether it is an example defined with `itBehavesLike`. @@ -23,16 +37,16 @@ final public class Example: NSObject { weak internal var group: ExampleGroup? private let internalDescription: String - private let closure: () -> () + private let closure: () -> Void private let flags: FilterFlags - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> ()) { + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () -> Void) { self.internalDescription = description self.closure = closure self.callsite = callsite self.flags = flags } - + public override var description: String { return internalDescription } @@ -57,6 +71,10 @@ final public class Example: NSObject { public func run() { let world = World.sharedWorld + if numberOfIncludedExamples == 0 { + numberOfIncludedExamples = world.includedExampleCount + } + if numberOfExamplesRun == 0 { world.suiteHooks.executeBefores() } @@ -82,7 +100,7 @@ final public class Example: NSObject { numberOfExamplesRun += 1 - if !world.isRunningAdditionalSuites && numberOfExamplesRun >= world.includedExampleCount { + if !world.isRunningAdditionalSuites && numberOfExamplesRun >= numberOfIncludedExamples { world.suiteHooks.executeAfters() } } @@ -102,10 +120,12 @@ final public class Example: NSObject { } } -/** - Returns a boolean indicating whether two Example objects are equal. - If two examples are defined at the exact same callsite, they must be equal. -*/ -public func ==(lhs: Example, rhs: Example) -> Bool { - return lhs.callsite == rhs.callsite +extension Example { + /** + Returns a boolean indicating whether two Example objects are equal. + If two examples are defined at the exact same callsite, they must be equal. + */ + @nonobjc public static func == (lhs: Example, rhs: Example) -> Bool { + return lhs.callsite == rhs.callsite + } } diff --git a/Pods/Quick/Sources/Quick/ExampleGroup.swift b/Pods/Quick/Sources/Quick/ExampleGroup.swift index b0b8be4..129bed0 100644 --- a/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ b/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -8,7 +8,7 @@ import Foundation final public class ExampleGroup: NSObject { weak internal var parent: ExampleGroup? internal let hooks = ExampleHooks() - + internal var phase: HooksPhase = .nothingExecuted private let internalDescription: String @@ -32,25 +32,21 @@ final public class ExampleGroup: NSObject { or to any of its descendant example groups. */ public var examples: [Example] { - var examples = childExamples - for group in childGroups { - examples.append(contentsOf: group.examples) - } - return examples + return childExamples + childGroups.flatMap { $0.examples } } internal var name: String? { - if let parent = parent { - guard let name = parent.name else { return description } - return "\(name), \(description)" - } else { + guard let parent = parent else { return isInternalRootExampleGroup ? nil : description } + + guard let name = parent.name else { return description } + return "\(name), \(description)" } internal var filterFlags: FilterFlags { var aggregateFlags = flags - walkUp() { (group: ExampleGroup) -> () in + walkUp { group in for (key, value) in group.flags { aggregateFlags[key] = value } @@ -60,7 +56,7 @@ final public class ExampleGroup: NSObject { internal var befores: [BeforeExampleWithMetadataClosure] { var closures = Array(hooks.befores.reversed()) - walkUp() { (group: ExampleGroup) -> () in + walkUp { group in closures.append(contentsOf: Array(group.hooks.befores.reversed())) } return Array(closures.reversed()) @@ -68,13 +64,13 @@ final public class ExampleGroup: NSObject { internal var afters: [AfterExampleWithMetadataClosure] { var closures = hooks.afters - walkUp() { (group: ExampleGroup) -> () in + walkUp { group in closures.append(contentsOf: group.hooks.afters) } return closures } - internal func walkDownExamples(_ callback: (_ example: Example) -> ()) { + internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { for example in childExamples { callback(example) } @@ -93,7 +89,7 @@ final public class ExampleGroup: NSObject { childExamples.append(example) } - private func walkUp(_ callback: (_ group: ExampleGroup) -> ()) { + private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { var group = self while let parent = group.parent { callback(parent) diff --git a/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Pods/Quick/Sources/Quick/ExampleMetadata.swift index e7510f7..3dd28ab 100644 --- a/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ b/Pods/Quick/Sources/Quick/ExampleMetadata.swift @@ -1,11 +1,24 @@ import Foundation +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _ExampleMetadataBase: NSObject {} + #else + public class _ExampleMetadataBase: NSObject {} + #endif +#else +public class _ExampleMetadataBase: NSObject {} +#endif + /** A class that encapsulates information about an example, including the index at which the example was executed, as well as the example itself. */ -final public class ExampleMetadata: NSObject { +final public class ExampleMetadata: _ExampleMetadataBase { /** The example for which this metadata was collected. */ diff --git a/Pods/Quick/Sources/Quick/Filter.swift b/Pods/Quick/Sources/Quick/Filter.swift index d452efe..da137f8 100644 --- a/Pods/Quick/Sources/Quick/Filter.swift +++ b/Pods/Quick/Sources/Quick/Filter.swift @@ -1,5 +1,18 @@ import Foundation +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + public class _FilterBase: NSObject {} + #else + public class _FilterBase: NSObject {} + #endif +#else +public class _FilterBase: NSObject {} +#endif + /** A mapping of string keys to booleans that can be used to filter examples or example groups. For example, a "focused" @@ -11,7 +24,7 @@ public typealias FilterFlags = [String: Bool] A namespace for filter flag keys, defined primarily to make the keys available in Objective-C. */ -final public class Filter: NSObject { +final public class Filter: _FilterBase { /** Example and example groups with [Focused: true] are included in test runs, excluding all other examples without this flag. Use this to only run one or diff --git a/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Pods/Quick/Sources/Quick/Hooks/Closures.swift index a241b33..9c7d310 100644 --- a/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ b/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -3,13 +3,13 @@ /** A closure executed before an example is run. */ -public typealias BeforeExampleClosure = () -> () +public typealias BeforeExampleClosure = () -> Void /** A closure executed before an example is run. The closure is given example metadata, which contains information about the example that is about to be run. */ -public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> () +public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void /** A closure executed after an example is run. @@ -27,7 +27,7 @@ public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClos /** A closure executed before any examples are run. */ -public typealias BeforeSuiteClosure = () -> () +public typealias BeforeSuiteClosure = () -> Void /** A closure executed after all examples have finished running. diff --git a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift index ef6d53e..449cbfc 100644 --- a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -11,7 +11,7 @@ final internal class ExampleHooks { } internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { - befores.append { (exampleMetadata: ExampleMetadata) in closure() } + befores.append { (_: ExampleMetadata) in closure() } } internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { @@ -19,7 +19,7 @@ final internal class ExampleHooks { } internal func appendAfter(_ closure: @escaping AfterExampleClosure) { - afters.append { (exampleMetadata: ExampleMetadata) in closure() } + afters.append { (_: ExampleMetadata) in closure() } } internal func executeBefores(_ exampleMetadata: ExampleMetadata) { @@ -27,7 +27,7 @@ final internal class ExampleHooks { for before in befores { before(exampleMetadata) } - + phase = .beforesFinished } diff --git a/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift b/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift index 730843e..d7a1442 100644 --- a/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift +++ b/Pods/Quick/Sources/Quick/NSBundle+CurrentTestBundle.swift @@ -1,4 +1,4 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) import Foundation @@ -11,6 +11,15 @@ extension Bundle { return allBundles.first { $0.bundlePath.hasSuffix(".xctest") } } + /** + Return the module name of the bundle. + Uses the bundle filename and transform it to match Xcode's transformation. + Module name has to be a valid "C99 extended identifier". + */ + internal var moduleName: String { + let fileName = bundleURL.fileName as NSString + return fileName.c99ExtendedIdentifier + } } #endif diff --git a/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift b/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift new file mode 100644 index 0000000..ef73762 --- /dev/null +++ b/Pods/Quick/Sources/Quick/NSString+C99ExtendedIdentifier.swift @@ -0,0 +1,33 @@ +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) +import Foundation + +public extension NSString { + + private static var invalidCharacters: CharacterSet = { + var invalidCharacters = CharacterSet() + + let invalidCharacterSets: [CharacterSet] = [ + .whitespacesAndNewlines, + .illegalCharacters, + .controlCharacters, + .punctuationCharacters, + .nonBaseCharacters, + .symbols + ] + + for invalidSet in invalidCharacterSets { + invalidCharacters.formUnion(invalidSet) + } + + return invalidCharacters + }() + + @objc(qck_c99ExtendedIdentifier) + var c99ExtendedIdentifier: String { + let validComponents = components(separatedBy: NSString.invalidCharacters) + let result = validComponents.joined(separator: "_") + + return result.isEmpty ? "_" : result + } +} +#endif diff --git a/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift b/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift index 63b55e1..415b680 100644 --- a/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift +++ b/Pods/Quick/Sources/Quick/QuickSelectedTestSuiteBuilder.swift @@ -1,4 +1,4 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) import Foundation /** @@ -66,7 +66,7 @@ private func testCaseClassForTestCaseWithName(_ name: String) -> AnyClass? { if let testCaseClass = bundle.classNamed(className) { return testCaseClass } - guard let moduleName = bundle.bundlePath.fileName else { return nil } + let moduleName = bundle.moduleName return NSClassFromString("\(moduleName).\(className)") } diff --git a/Pods/Quick/Sources/Quick/QuickTestSuite.swift b/Pods/Quick/Sources/Quick/QuickTestSuite.swift index 0cb5187..0fe76a7 100644 --- a/Pods/Quick/Sources/Quick/QuickTestSuite.swift +++ b/Pods/Quick/Sources/Quick/QuickTestSuite.swift @@ -1,4 +1,4 @@ -#if os(OSX) || os(iOS) || os(watchOS) || os(tvOS) +#if os(macOS) || os(iOS) || os(watchOS) || os(tvOS) import XCTest @@ -36,17 +36,17 @@ public class QuickTestSuite: XCTestSuite { It is expected that the first call should return a valid test suite, and all subsequent calls should return `nil`. */ + @objc public static func selectedTestSuite(forTestCaseWithName name: String) -> QuickTestSuite? { guard let builder = QuickSelectedTestSuiteBuilder(forTestCaseWithName: name) else { return nil } - if builtTestSuites.contains(builder.testSuiteClassName) { - return nil - } else { - builtTestSuites.insert(builder.testSuiteClassName) + let (inserted, _) = builtTestSuites.insert(builder.testSuiteClassName) + if inserted { return builder.buildTestSuite() + } else { + return nil } } - } #endif diff --git a/Pods/Quick/Sources/Quick/String+FileName.swift b/Pods/Quick/Sources/Quick/String+FileName.swift deleted file mode 100644 index 83cdfcf..0000000 --- a/Pods/Quick/Sources/Quick/String+FileName.swift +++ /dev/null @@ -1,12 +0,0 @@ -import Foundation - -extension String { - - /** - If the receiver represents a path, returns its file name with a file extension. - */ - var fileName: String? { - return NSURL(string: self)?.deletingPathExtension?.lastPathComponent - } - -} diff --git a/Pods/Quick/Sources/Quick/URL+FileName.swift b/Pods/Quick/Sources/Quick/URL+FileName.swift new file mode 100644 index 0000000..23c4781 --- /dev/null +++ b/Pods/Quick/Sources/Quick/URL+FileName.swift @@ -0,0 +1,12 @@ +import Foundation + +extension URL { + + /** + Returns the path file name without file extension. + */ + var fileName: String { + return self.deletingPathExtension().lastPathComponent + } + +} diff --git a/Pods/Quick/Sources/Quick/World.swift b/Pods/Quick/Sources/Quick/World.swift index 56dae51..127239a 100644 --- a/Pods/Quick/Sources/Quick/World.swift +++ b/Pods/Quick/Sources/Quick/World.swift @@ -4,13 +4,26 @@ import Foundation A closure that, when evaluated, returns a dictionary of key-value pairs that can be accessed from within a group of shared examples. */ -public typealias SharedExampleContext = () -> (NSDictionary) +public typealias SharedExampleContext = () -> [String: Any] /** A closure that is used to define a group of shared examples. This closure may contain any number of example and example groups. */ -public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () +public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> Void + +// `#if swift(>=3.2) && (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE` +// does not work as expected. +#if swift(>=3.2) + #if (os(macOS) || os(iOS) || os(tvOS) || os(watchOS)) && !SWIFT_PACKAGE + @objcMembers + internal class _WorldBase: NSObject {} + #else + internal class _WorldBase: NSObject {} + #endif +#else +internal class _WorldBase: NSObject {} +#endif /** A collection of state Quick builds up in order to work its magic. @@ -23,7 +36,7 @@ public typealias SharedExampleClosure = (@escaping SharedExampleContext) -> () You may configure how Quick behaves by calling the -[World configure:] method from within an overridden +[QuickConfiguration configure:] method. */ -final internal class World: NSObject { +final internal class World: _WorldBase { /** The example group that is currently being run. The DSL requires that this group is correctly set in order to build a @@ -44,7 +57,7 @@ final internal class World: NSObject { within this test suite. This is only true within the context of Quick functional tests. */ -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) // Convention of generating Objective-C selector has been changed on Swift 3 @objc(isRunningAdditionalSuites) internal var isRunningAdditionalSuites = false @@ -52,10 +65,11 @@ final internal class World: NSObject { internal var isRunningAdditionalSuites = false #endif - private var specs: Dictionary = [:] + private var specs: [String: ExampleGroup] = [:] private var sharedExamples: [String: SharedExampleClosure] = [:] private let configuration = Configuration() - private var isConfigurationFinalized = false + + internal private(set) var isConfigurationFinalized = false internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } @@ -63,6 +77,7 @@ final internal class World: NSObject { // MARK: Singleton Constructor private override init() {} + static let sharedWorld = World() // MARK: Public Interface @@ -143,7 +158,7 @@ final internal class World: NSObject { } } -#if _runtime(_ObjC) +#if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) @objc(examplesForSpecClass:) private func objc_examples(_ specClass: AnyClass) -> [Example] { return examples(specClass) @@ -165,7 +180,7 @@ final internal class World: NSObject { internal var includedExampleCount: Int { return includedExamples.count } - + internal var beforesCurrentlyExecuting: Bool { let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting @@ -173,10 +188,10 @@ final internal class World: NSObject { if let runningExampleGroup = currentExampleMetadata?.example.group { groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting } - + return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting } - + internal var aftersCurrentlyExecuting: Bool { let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting @@ -184,7 +199,7 @@ final internal class World: NSObject { if let runningExampleGroup = currentExampleMetadata?.example.group { groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting } - + return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting } diff --git a/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h b/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h deleted file mode 100644 index 2da524e..0000000 --- a/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.h +++ /dev/null @@ -1,17 +0,0 @@ -#import - -/** - QuickSpec converts example names into test methods. - Those test methods need valid selector names, which means no whitespace, - control characters, etc. This category gives NSString objects an easy way - to replace those illegal characters with underscores. - */ -@interface NSString (QCKSelectorName) - -/** - Returns a string with underscores in place of all characters that cannot - be included in a selector (SEL) name. - */ -@property (nonatomic, readonly) NSString *qck_selectorName; - -@end diff --git a/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m b/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m deleted file mode 100644 index d374be6..0000000 --- a/Pods/Quick/Sources/QuickObjectiveC/NSString+QCKSelectorName.m +++ /dev/null @@ -1,37 +0,0 @@ -#import "NSString+QCKSelectorName.h" - -@implementation NSString (QCKSelectorName) - -- (NSString *)qck_selectorName { - static NSMutableCharacterSet *invalidCharacters = nil; - static dispatch_once_t onceToken; - dispatch_once(&onceToken, ^{ - invalidCharacters = [NSMutableCharacterSet new]; - - NSCharacterSet *whitespaceCharacterSet = [NSCharacterSet whitespaceCharacterSet]; - NSCharacterSet *newlineCharacterSet = [NSCharacterSet newlineCharacterSet]; - NSCharacterSet *illegalCharacterSet = [NSCharacterSet illegalCharacterSet]; - NSCharacterSet *controlCharacterSet = [NSCharacterSet controlCharacterSet]; - NSCharacterSet *punctuationCharacterSet = [NSCharacterSet punctuationCharacterSet]; - NSCharacterSet *nonBaseCharacterSet = [NSCharacterSet nonBaseCharacterSet]; - NSCharacterSet *symbolCharacterSet = [NSCharacterSet symbolCharacterSet]; - - [invalidCharacters formUnionWithCharacterSet:whitespaceCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:newlineCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:illegalCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:controlCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:punctuationCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:nonBaseCharacterSet]; - [invalidCharacters formUnionWithCharacterSet:symbolCharacterSet]; - }); - - NSArray *validComponents = [self componentsSeparatedByCharactersInSet:invalidCharacters]; - - NSString *result = [validComponents componentsJoinedByString:@"_"]; - - return ([result length] == 0 - ? @"_" - : result); -} - -@end diff --git a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m index ea64934..4891679 100644 --- a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m +++ b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m @@ -1,13 +1,10 @@ #import "QuickSpec.h" #import "QuickConfiguration.h" -#import "NSString+QCKSelectorName.h" #import "World.h" -#import +#import static QuickSpec *currentSpec = nil; -const void * const QCKExampleKey = &QCKExampleKey; - @interface QuickSpec () @property (nonatomic, strong) Example *example; @end @@ -63,24 +60,17 @@ + (NSArray *)testInvocations { for (Example *example in examples) { SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; - NSInvocation *invocation = [self invocationForInstanceMethodWithSelector:selector - example:example]; + + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + [invocations addObject:invocation]; } return invocations; } -/** - XCTest sets the invocation for the current test case instance using this setter. - QuickSpec hooks into this event to give the test case a reference to the current example. - It will need this reference to correctly report its name to XCTest. - */ -- (void)setInvocation:(NSInvocation *)invocation { - self.example = objc_getAssociatedObject(invocation, QCKExampleKey); - [super setInvocation:invocation]; -} - #pragma mark - Public Interface - (void)spec { } @@ -105,21 +95,14 @@ - (void)spec { } */ + (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ + self.example = example; currentSpec = self; [example run]; }); - NSCharacterSet *characterSet = [NSCharacterSet alphanumericCharacterSet]; - NSMutableString *sanitizedFileName = [NSMutableString string]; - for (NSUInteger i = 0; i < example.callsite.file.length; i++) { - unichar ch = [example.callsite.file characterAtIndex:i]; - if ([characterSet characterIsMember:ch]) { - [sanitizedFileName appendFormat:@"%c", ch]; - } - } - const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(id), @encode(id), @encode(SEL)] UTF8String]; + const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; - NSString *originalName = example.name.qck_selectorName; + NSString *originalName = example.name.qck_c99ExtendedIdentifier; NSString *selectorName = originalName; NSUInteger i = 2; @@ -135,18 +118,6 @@ + (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMuta return selector; } -+ (NSInvocation *)invocationForInstanceMethodWithSelector:(SEL)selector - example:(Example *)example { - NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; - NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; - invocation.selector = selector; - objc_setAssociatedObject(invocation, - QCKExampleKey, - example, - OBJC_ASSOCIATION_RETAIN_NONATOMIC); - return invocation; -} - /** This method is used to record failures, whether they represent example expectations that were not met, or exceptions raised during test setup diff --git a/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m b/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m new file mode 100644 index 0000000..10b6f7e --- /dev/null +++ b/Pods/Quick/Sources/QuickSpecBase/QuickSpecBase.m @@ -0,0 +1,55 @@ +#import "QuickSpecBase.h" + +#pragma mark - _QuickSelectorWrapper + +@interface _QuickSelectorWrapper () +@property(nonatomic, assign) SEL selector; +@end + +@implementation _QuickSelectorWrapper + +- (instancetype)initWithSelector:(SEL)selector { + self = [super init]; + _selector = selector; + return self; +} + +@end + + +#pragma mark - _QuickSpecBase + +@implementation _QuickSpecBase + +- (instancetype)init { + self = [super initWithInvocation: nil]; + return self; +} + +/** + Invocations for each test method in the test case. QuickSpec overrides this method to define a + new method for each example defined in +[QuickSpec spec]. + + @return An array of invocations that execute the newly defined example methods. + */ ++ (NSArray *)testInvocations { + NSArray<_QuickSelectorWrapper *> *wrappers = [self _qck_testMethodSelectors]; + NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:wrappers.count]; + + for (_QuickSelectorWrapper *wrapper in wrappers) { + SEL selector = wrapper.selector; + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + + [invocations addObject:invocation]; + } + + return invocations; +} + ++ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors { + return @[]; +} + +@end diff --git a/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h b/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h new file mode 100644 index 0000000..8881ca0 --- /dev/null +++ b/Pods/Quick/Sources/QuickSpecBase/include/QuickSpecBase.h @@ -0,0 +1,11 @@ +#import +#import + +@interface _QuickSelectorWrapper : NSObject +- (instancetype)initWithSelector:(SEL)selector; +@end + +@interface _QuickSpecBase : XCTestCase ++ (NSArray<_QuickSelectorWrapper *> *)_qck_testMethodSelectors; +- (instancetype)init NS_DESIGNATED_INITIALIZER; +@end diff --git a/Pods/Target Support Files/Nimble/Info.plist b/Pods/Target Support Files/Nimble/Info.plist index 5cbb290..3de71dd 100644 --- a/Pods/Target Support Files/Nimble/Info.plist +++ b/Pods/Target Support Files/Nimble/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.1.1 + 7.0.3 CFBundleSignature ???? CFBundleVersion diff --git a/Pods/Target Support Files/Nimble/Nimble-prefix.pch b/Pods/Target Support Files/Nimble/Nimble-prefix.pch index aa992a4..beb2a24 100644 --- a/Pods/Target Support Files/Nimble/Nimble-prefix.pch +++ b/Pods/Target Support Files/Nimble/Nimble-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Pods/Target Support Files/Nimble/Nimble-umbrella.h index 773c023..3a2c2c8 100644 --- a/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ b/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -1,14 +1,23 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif -#import "CwlCatchException.h" -#import "CwlCatchBadInstruction.h" -#import "mach_excServer.h" #import "Nimble.h" #import "DSL.h" #import "NMBExceptionCapture.h" #import "NMBStringify.h" +#import "CwlCatchException.h" +#import "CwlMachBadInstructionHandler.h" +#import "mach_excServer.h" +#import "CwlPreconditionTesting.h" FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Pods/Target Support Files/Nimble/Nimble.xcconfig b/Pods/Target Support Files/Nimble/Nimble.xcconfig index bc9e893..3eb970f 100644 --- a/Pods/Target Support Files/Nimble/Nimble.xcconfig +++ b/Pods/Target Support Files/Nimble/Nimble.xcconfig @@ -1,12 +1,13 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Nimble +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble ENABLE_BITCODE = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_LDFLAGS = -weak-lswiftXCTest -weak_framework "XCTest" -OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +OTHER_SWIFT_FLAGS = $(inherited) -suppress-warnings $(inherited) "-D" "COCOAPODS" +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.markdown index 5444c67..c2cb63e 100644 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.markdown @@ -191,7 +191,7 @@ Apache License same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.plist b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.plist index 3051e9b..252bf55 100644 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-acknowledgements.plist @@ -202,7 +202,7 @@ same "printed page" as the copyright notice for easier identification within third-party archives. - Copyright 2014 Quick Team + Copyright 2016 Quick Team Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-frameworks.sh b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-frameworks.sh index 3e8d2e4..9f3ce79 100755 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-frameworks.sh +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-frameworks.sh @@ -6,6 +6,14 @@ mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +# Used as a return value for each invocation of `strip_invalid_archs` function. +STRIP_BINARY_RETVAL=0 + +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + +# Copies and strips a vendored framework install_framework() { if [ -r "${BUILT_PRODUCTS_DIR}/$1" ]; then @@ -23,9 +31,9 @@ install_framework() source="$(readlink "${source}")" fi - # use filter instead of exclude so missing patterns dont' throw errors - echo "rsync -av --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" - rsync -av --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" + # Use filter instead of exclude so missing patterns don't throw errors. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${destination}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${destination}" local basename basename="$(basename -s .framework "$1")" @@ -54,24 +62,65 @@ install_framework() fi } +# Copies and strips a vendored dSYM +install_dsym() { + local source="$1" + if [ -r "$source" ]; then + # Copy the dSYM into a the targets temp dir. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${source}\" \"${DERIVED_FILES_DIR}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${source}" "${DERIVED_FILES_DIR}" + + local basename + basename="$(basename -s .framework.dSYM "$source")" + binary="${DERIVED_FILES_DIR}/${basename}.framework.dSYM/Contents/Resources/DWARF/${basename}" + + # Strip invalid architectures so "fat" simulator / device frameworks work on device + if [[ "$(file "$binary")" == *"Mach-O dSYM companion"* ]]; then + strip_invalid_archs "$binary" + fi + + if [[ $STRIP_BINARY_RETVAL == 1 ]]; then + # Move the stripped file into its final destination. + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter \"- CVS/\" --filter \"- .svn/\" --filter \"- .git/\" --filter \"- .hg/\" --filter \"- Headers\" --filter \"- PrivateHeaders\" --filter \"- Modules\" \"${DERIVED_FILES_DIR}/${basename}.framework.dSYM\" \"${DWARF_DSYM_FOLDER_PATH}\"" + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" --filter "- CVS/" --filter "- .svn/" --filter "- .git/" --filter "- .hg/" --filter "- Headers" --filter "- PrivateHeaders" --filter "- Modules" "${DERIVED_FILES_DIR}/${basename}.framework.dSYM" "${DWARF_DSYM_FOLDER_PATH}" + else + # The dSYM was not stripped at all, in this case touch a fake folder so the input/output paths from Xcode do not reexecute this script because the file is missing. + touch "${DWARF_DSYM_FOLDER_PATH}/${basename}.framework.dSYM" + fi + fi +} + # Signs a framework with the provided identity code_sign_if_enabled() { if [ -n "${EXPANDED_CODE_SIGN_IDENTITY}" -a "${CODE_SIGNING_REQUIRED}" != "NO" -a "${CODE_SIGNING_ALLOWED}" != "NO" ]; then # Use the current code_sign_identitiy echo "Code Signing $1 with Identity ${EXPANDED_CODE_SIGN_IDENTITY_NAME}" - echo "/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements \"$1\"" - /usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements "$1" + local code_sign_cmd="/usr/bin/codesign --force --sign ${EXPANDED_CODE_SIGN_IDENTITY} ${OTHER_CODE_SIGN_FLAGS} --preserve-metadata=identifier,entitlements '$1'" + + if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + code_sign_cmd="$code_sign_cmd &" + fi + echo "$code_sign_cmd" + eval "$code_sign_cmd" fi } # Strip invalid architectures strip_invalid_archs() { binary="$1" - # Get architectures for current file - archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | rev)" + # Get architectures for current target binary + binary_archs="$(lipo -info "$binary" | rev | cut -d ':' -f1 | awk '{$1=$1;print}' | rev)" + # Intersect them with the architectures we are building for + intersected_archs="$(echo ${ARCHS[@]} ${binary_archs[@]} | tr ' ' '\n' | sort | uniq -d)" + # If there are no archs supported by this binary then warn the user + if [[ -z "$intersected_archs" ]]; then + echo "warning: [CP] Vendored binary '$binary' contains architectures ($binary_archs) none of which match the current build architectures ($ARCHS)." + STRIP_BINARY_RETVAL=0 + return + fi stripped="" - for arch in $archs; do - if ! [[ "${VALID_ARCHS}" == *"$arch"* ]]; then + for arch in $binary_archs; do + if ! [[ "${ARCHS}" == *"$arch"* ]]; then # Strip non-valid architectures in-place lipo -remove "$arch" -output "$binary" "$binary" || exit 1 stripped="$stripped $arch" @@ -80,14 +129,18 @@ strip_invalid_archs() { if [[ "$stripped" ]]; then echo "Stripped $binary of architectures:$stripped" fi + STRIP_BINARY_RETVAL=1 } if [[ "$CONFIGURATION" == "Debug" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" fi if [[ "$CONFIGURATION" == "Release" ]]; then - install_framework "$BUILT_PRODUCTS_DIR/Nimble/Nimble.framework" - install_framework "$BUILT_PRODUCTS_DIR/Quick/Quick.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" + install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" +fi +if [ "${COCOAPODS_PARALLEL_CODE_SIGN}" == "true" ]; then + wait fi diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-resources.sh b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-resources.sh index 25e9d37..a7df440 100755 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-resources.sh +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-resources.sh @@ -8,6 +8,10 @@ RESOURCES_TO_COPY=${PODS_ROOT}/resources-to-copy-${TARGETNAME}.txt XCASSET_FILES=() +# This protects against multiple targets copying the same framework dependency at the same time. The solution +# was originally proposed here: https://lists.samba.org/archive/rsync/2008-February/020158.html +RSYNC_PROTECT_TMP_FILES=(--filter "P .*.??????") + case "${TARGETED_DEVICE_FAMILY}" in 1,2) TARGET_DEVICE_ARGS="--target-device ipad --target-device iphone" @@ -18,6 +22,12 @@ case "${TARGETED_DEVICE_FAMILY}" in 2) TARGET_DEVICE_ARGS="--target-device ipad" ;; + 3) + TARGET_DEVICE_ARGS="--target-device tv" + ;; + 4) + TARGET_DEVICE_ARGS="--target-device watch" + ;; *) TARGET_DEVICE_ARGS="--target-device mac" ;; @@ -38,29 +48,29 @@ EOM fi case $RESOURCE_PATH in *.storyboard) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .storyboard`.storyboardc" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.xib) - echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" + echo "ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile ${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib $RESOURCE_PATH --sdk ${SDKROOT} ${TARGET_DEVICE_ARGS}" || true ibtool --reference-external-strings-file --errors --warnings --notices --minimum-deployment-target ${!DEPLOYMENT_TARGET_SETTING_NAME} --output-format human-readable-text --compile "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename \"$RESOURCE_PATH\" .xib`.nib" "$RESOURCE_PATH" --sdk "${SDKROOT}" ${TARGET_DEVICE_ARGS} ;; *.framework) - echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "mkdir -p ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true mkdir -p "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - echo "rsync -av $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" - rsync -av "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" + echo "rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" $RESOURCE_PATH ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" || true + rsync --delete -av "${RSYNC_PROTECT_TMP_FILES[@]}" "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" ;; *.xcdatamodel) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH"`.mom\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodel`.mom" ;; *.xcdatamodeld) - echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" + echo "xcrun momc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd\"" || true xcrun momc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcdatamodeld`.momd" ;; *.xcmappingmodel) - echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" + echo "xcrun mapc \"$RESOURCE_PATH\" \"${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm\"" || true xcrun mapc "$RESOURCE_PATH" "${TARGET_BUILD_DIR}/${UNLOCALIZED_RESOURCES_FOLDER_PATH}/`basename "$RESOURCE_PATH" .xcmappingmodel`.cdm" ;; *.xcassets) @@ -68,7 +78,7 @@ EOM XCASSET_FILES+=("$ABSOLUTE_XCASSET_FILE") ;; *) - echo "$RESOURCE_PATH" + echo "$RESOURCE_PATH" || true echo "$RESOURCE_PATH" >> "$RESOURCES_TO_COPY" ;; esac diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-umbrella.h b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-umbrella.h index c433b67..0bb2a1b 100644 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-umbrella.h +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.debug.xcconfig b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.debug.xcconfig index cc8dfce..ca9bbb4 100644 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.release.xcconfig b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.release.xcconfig index cc8dfce..ca9bbb4 100644 --- a/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.release.xcconfig +++ b/Pods/Target Support Files/Pods-LeeGoTests/Pods-LeeGoTests.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES -EMBEDDED_CONTENT_CONTAINS_SWIFT = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "$PODS_CONFIGURATION_BUILD_DIR/Nimble" "$PODS_CONFIGURATION_BUILD_DIR/Quick" +FRAMEWORK_SEARCH_PATHS = $(inherited) $(PLATFORM_DIR)/Developer/Library/Frameworks "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 LD_RUNPATH_SEARCH_PATHS = $(inherited) '@executable_path/Frameworks' '@loader_path/Frameworks' -OTHER_CFLAGS = $(inherited) -iquote "$PODS_CONFIGURATION_BUILD_DIR/Nimble/Nimble.framework/Headers" -iquote "$PODS_CONFIGURATION_BUILD_DIR/Quick/Quick.framework/Headers" +OTHER_CFLAGS = $(inherited) -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" -iquote "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_PODFILE_DIR_PATH = ${SRCROOT}/. PODS_ROOT = ${SRCROOT}/Pods diff --git a/Pods/Target Support Files/Quick/Info.plist b/Pods/Target Support Files/Quick/Info.plist index 994ffe8..2a9158a 100644 --- a/Pods/Target Support Files/Quick/Info.plist +++ b/Pods/Target Support Files/Quick/Info.plist @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 0.10.0 + 1.2.0 CFBundleSignature ???? CFBundleVersion diff --git a/Pods/Target Support Files/Quick/Quick-prefix.pch b/Pods/Target Support Files/Quick/Quick-prefix.pch index aa992a4..beb2a24 100644 --- a/Pods/Target Support Files/Quick/Quick-prefix.pch +++ b/Pods/Target Support Files/Quick/Quick-prefix.pch @@ -1,4 +1,12 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif diff --git a/Pods/Target Support Files/Quick/Quick-umbrella.h b/Pods/Target Support Files/Quick/Quick-umbrella.h index c0a657c..1de6bf3 100644 --- a/Pods/Target Support Files/Quick/Quick-umbrella.h +++ b/Pods/Target Support Files/Quick/Quick-umbrella.h @@ -1,5 +1,13 @@ #ifdef __OBJC__ #import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif #endif #import "QuickConfiguration.h" diff --git a/Pods/Target Support Files/Quick/Quick.xcconfig b/Pods/Target Support Files/Quick/Quick.xcconfig index f25ce83..6c4e8fd 100644 --- a/Pods/Target Support Files/Quick/Quick.xcconfig +++ b/Pods/Target Support Files/Quick/Quick.xcconfig @@ -1,12 +1,13 @@ -CONFIGURATION_BUILD_DIR = $PODS_CONFIGURATION_BUILD_DIR/Quick +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Quick ENABLE_BITCODE = NO FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 HEADER_SEARCH_PATHS = "${PODS_ROOT}/Headers/Private" "${PODS_ROOT}/Headers/Public" OTHER_LDFLAGS = -framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) "-D" "COCOAPODS" -PODS_BUILD_DIR = $BUILD_DIR -PODS_CONFIGURATION_BUILD_DIR = $PODS_BUILD_DIR/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES diff --git a/Sources/Conveniences.swift b/Sources/Conveniences.swift index 180bbe8..bab55fb 100644 --- a/Sources/Conveniences.swift +++ b/Sources/Conveniences.swift @@ -23,15 +23,15 @@ internal func + (left: [K: V], right: [K: V]) -> [K: V] { extension Dictionary { - internal func filter(includeElement: (Key, Value) throws -> Bool) rethrows -> Dictionary { - var result = self - for (key, value) in result { - if try !includeElement(key, value) { - result.removeValue(forKey: key) - } - } - return result - } +// internal func filter(includeElement: (Key, Value) throws -> Bool) rethrows -> Dictionary { +// var result = self +// for (key, value) in result { +// if try !includeElement(key, value) { +// result.removeValue(forKey: key) +// } +// } +// return result +// } } extension Dictionary { @@ -127,10 +127,17 @@ extension UIView { return nil } - let attributedStrings = attributesArray.enumerated().flatMap({ (index, attribute) -> NSAttributedString? in + let attributedStrings = attributesArray.enumerated().flatMap({ (index, attribute) -> NSAttributedString? in if let idx = Int(String(index)) { let text = texts[idx] ?? "" - return NSAttributedString(string: text, attributes: attribute) + + var attributes = [NSAttributedStringKey: Any]() + + attribute.forEach { (key, value) in + attributes[NSAttributedStringKey(rawValue: key)] = value + } + + return NSAttributedString(string: text, attributes: attributes) } return nil }) diff --git a/Sources/Core/Appearance.swift b/Sources/Core/Appearance.swift index 1f2477a..39c4787 100644 --- a/Sources/Core/Appearance.swift +++ b/Sources/Core/Appearance.swift @@ -309,7 +309,7 @@ extension Appearance { if !useDefaultValue { let constraint = NSLayoutConstraint(item: image, attribute: NSLayoutAttribute.width, relatedBy: NSLayoutRelation.equal, toItem: image, attribute: NSLayoutAttribute.height, multiplier: ratioValue, constant: 0) constraint.lg_setIdentifier(with: .ratio) - constraint.priority = 990 + constraint.priority = UILayoutPriority(rawValue: 990) image.addConstraint(constraint) } @@ -856,7 +856,7 @@ extension Appearance { var attributesEncoded: Attributes = [:] for value in attributes.enumerated() { - if let font = value.element.1 as? UIFont, value.element.0 == NSFontAttributeName { + if let font = value.element.1 as? UIFont, value.element.0 == NSAttributedStringKey.font.rawValue { attributesEncoded.updateValue(font.lg_encode(), forKey: value.element.0) } else if let color = value.element.1 as? UIColor { attributesEncoded.updateValue(color.lg_encode(), forKey: value.element.0) @@ -873,12 +873,12 @@ extension Appearance { var attributesDecoded: Attributes = [:] for value in attributes.enumerated() { - if let json = value.element.1 as? JSONDictionary, value.element.0 == NSFontAttributeName, + if let json = value.element.1 as? JSONDictionary, value.element.0 == NSAttributedStringKey.font.rawValue, let font = UIFont(json: json) { attributesDecoded.updateValue(font, forKey: value.element.0) - } else if let hexString = value.element.1 as? String, value.element.0 == NSForegroundColorAttributeName || value.element.0 == NSBackgroundColorAttributeName { + } else if let hexString = value.element.1 as? String, value.element.0 == NSAttributedStringKey.foregroundColor.rawValue || value.element.0 == NSAttributedStringKey.backgroundColor.rawValue { attributesDecoded.updateValue(UIColor(rawValue: hexString), forKey: value.element.0) - } else if let urlPath = value.element.1 as? String, value.element.0 == NSLinkAttributeName, let url = URL(string: urlPath) { + } else if let urlPath = value.element.1 as? String, value.element.0 == NSAttributedStringKey.link.rawValue, let url = URL(string: urlPath) { attributesDecoded.updateValue(url, forKey: value.element.0) } } diff --git a/Sources/Core/Brick.swift b/Sources/Core/Brick.swift index 54e8dba..e0bb82e 100644 --- a/Sources/Core/Brick.swift +++ b/Sources/Core/Brick.swift @@ -414,7 +414,7 @@ extension Brick: JSONConvertible { self.width = try? json.parse(JSONKey.width) self.height = try? json.parse(JSONKey.height) self.LGOutletKey = try? json.parse(JSONKey.outlet) - + self.heightResolver = nil } @@ -422,7 +422,7 @@ extension Brick: JSONConvertible { /// /// - returns: a `JSONDictionary` instance encoded from `self` public func encode() -> JSONDictionary { - + var json: JSONDictionary = [JSONKey.name.asString: self.name, JSONKey.targetClass.asString: String(describing: self.targetClass)] if let nibName = self.nibName { diff --git a/Sources/Core/Composable.swift b/Sources/Core/Composable.swift index 6ecde5d..b5cd948 100644 --- a/Sources/Core/Composable.swift +++ b/Sources/Core/Composable.swift @@ -9,6 +9,7 @@ import Foundation protocol Composable { + func composite(_ bricks: [Brick], to targetView: View, with layout: Layout) where View: UIView, View: BrickDescribable } diff --git a/Sources/Core/Configurable.swift b/Sources/Core/Configurable.swift index ffdfd29..2a5ef38 100644 --- a/Sources/Core/Configurable.swift +++ b/Sources/Core/Configurable.swift @@ -9,6 +9,7 @@ import Foundation protocol Configurable { + func setup(_ view: View, currentStyle: [Appearance], newStyle: [Appearance]) } diff --git a/Sources/Core/Layout.swift b/Sources/Core/Layout.swift index 0a6e2b4..e94fe78 100644 --- a/Sources/Core/Layout.swift +++ b/Sources/Core/Layout.swift @@ -75,7 +75,7 @@ public struct LayoutMetrics: Equatable { self.spaceV = customMetrics[JSONKey.spaceV.asString] ?? spaceV - self.customMetrics = customMetrics.filter(includeElement: { (key, value) -> Bool in + self.customMetrics = customMetrics.filter( { (key, value) -> Bool in let top = key != JSONKey.top.asString let left = key != JSONKey.left.asString let bottom = key != JSONKey.bottom.asString @@ -87,7 +87,7 @@ public struct LayoutMetrics: Equatable { } internal func encode() -> JSONDictionary { - return (customMetrics + standardMetrics.filter { (key, value) -> Bool in + return (customMetrics + standardMetrics.filter { (key: String, value: CGFloat) -> Bool in return value != 0.0 }) } diff --git a/Sources/View.swift b/Sources/View.swift index e4ca988..13c5d33 100644 --- a/Sources/View.swift +++ b/Sources/View.swift @@ -117,7 +117,7 @@ extension UIView { // leaf brick -> dynamic height return self.sizeThatFits(CGSize(width: self.frame.width, height: CGFloat.greatestFiniteMagnitude)).height } else { - return self.systemLayoutSizeFitting(CGSize(width: self.frame.width, height: 0), withHorizontalFittingPriority: UILayoutPriorityRequired, verticalFittingPriority: UILayoutPriorityFittingSizeLevel).height + return self.systemLayoutSizeFitting(CGSize(width: self.frame.width, height: 0), withHorizontalFittingPriority: UILayoutPriority.required, verticalFittingPriority: UILayoutPriority.fittingSizeLevel).height } }