diff --git a/.github/workflows/github_actions.yml b/.github/workflows/github_actions.yml index 3b97251..be62980 100644 --- a/.github/workflows/github_actions.yml +++ b/.github/workflows/github_actions.yml @@ -10,25 +10,45 @@ on: jobs: test: name: Unit-Tests - runs-on: macos-latest - + runs-on: macos-14 steps: - name: Checkout - uses: actions/checkout@v1 + uses: actions/checkout@v4 + + - name: Setup Java 17 + uses: actions/setup-java@v4 + with: + distribution: 'zulu' + java-version: '17' + + - name: Set up XCode + run: sudo xcode-select --switch /Applications/Xcode_15.1.app + - name: Bundle Install run: bundle install + + - name: Install Cocoapods + run: bundle exec pod install + + - name: Link SwiftLint or install it + run: brew link --overwrite swiftlint || brew install swiftlint || brew link --overwrite swiftlint + - name: Unit tests run: bundle exec fastlane unit_tests env: SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }} + - name: Code Coverage run: bundle exec fastlane coverage + - name: Lint run: bundle exec fastlane lint + - name: Setup sonarqube - uses: warchant/setup-sonar-scanner@v3 + uses: warchant/setup-sonar-scanner@v8 + - name: Send to Sonarcloud run: bundle exec fastlane sonarqube env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - SONAR_TOKEN: ${{ secrets.SONARCLOUD_KEY }} + SONAR_TOKEN: ${{ secrets.SONARCLOUD_KEY }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 330d167..e87dc17 100644 --- a/.gitignore +++ b/.gitignore @@ -88,3 +88,5 @@ fastlane/test_output # https://github.com/johnno1962/injectionforxcode iOSInjectionProject/ +Podfile.lock +Gemfile.lock diff --git a/Gemfile b/Gemfile index a80b326..03554d1 100644 --- a/Gemfile +++ b/Gemfile @@ -1,4 +1,5 @@ source "https://rubygems.org" -gem "fastlane" -gem "slather" \ No newline at end of file +gem 'cocoapods', '1.14.3' +gem 'fastlane' +gem 'slather' \ No newline at end of file diff --git a/OSPaymentsLib.xcodeproj/project.pbxproj b/OSPaymentsLib.xcodeproj/project.pbxproj index a988bd8..d4bbedb 100644 --- a/OSPaymentsLib.xcodeproj/project.pbxproj +++ b/OSPaymentsLib.xcodeproj/project.pbxproj @@ -13,6 +13,7 @@ 7509DC7F28996482005BA0D4 /* OSPMTApplePayConfigurationSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7509DC7E28996482005BA0D4 /* OSPMTApplePayConfigurationSpec.swift */; }; 7509DC81289967A6005BA0D4 /* PKPaymentNetwork+Adapter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7509DC80289967A6005BA0D4 /* PKPaymentNetwork+Adapter.swift */; }; 751B1DB2293A2744009A00B2 /* OSPMTStripeRequestParametersModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 751B1DB1293A2744009A00B2 /* OSPMTStripeRequestParametersModel.swift */; }; + 753CDB1C2BC55BEE005EAA76 /* PrivacyInfo.xcprivacy in Resources */ = {isa = PBXBuildFile; fileRef = 753CDB1B2BC55BEE005EAA76 /* PrivacyInfo.xcprivacy */; }; 7556EA952934DAC600FF4044 /* OSPMTRequestParametersModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7556EA942934DAC600FF4044 /* OSPMTRequestParametersModel.swift */; }; 7556EA982934E10D00FF4044 /* OSPMTStripeAPIDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7556EA972934E10D00FF4044 /* OSPMTStripeAPIDelegate.swift */; }; 7556EA9A2934E4AB00FF4044 /* OSPMTStripeWrapperSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7556EA992934E4AB00FF4044 /* OSPMTStripeWrapperSpec.swift */; }; @@ -51,8 +52,8 @@ 75EC4D2228942C3800CF50E2 /* OSPMTConfigurationModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC4D2128942C3800CF50E2 /* OSPMTConfigurationModel.swift */; }; 75EC4D242894449700CF50E2 /* OSPMTApplePayHandlerSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC4D232894449700CF50E2 /* OSPMTApplePayHandlerSpec.swift */; }; 75EC4D262894478200CF50E2 /* OSPMTTestConfigurations.swift in Sources */ = {isa = PBXBuildFile; fileRef = 75EC4D252894478200CF50E2 /* OSPMTTestConfigurations.swift */; }; - 7E9C30CBBF9DFE5A747787FF /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F6BD4033DE465D38CA50CA9E /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */; }; - 8DB1869BE6C7A0D7D44D4C34 /* Pods_OSPaymentsLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = BADB3E4C7C4507E01CF0631B /* Pods_OSPaymentsLib.framework */; }; + 9A22CA283CDB70B8C41FBC5D /* Pods_OSPaymentsLib.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 752FE3B2187E49AE64D2AF6A /* Pods_OSPaymentsLib.framework */; }; + F1F07342D3669F8BEE182A62 /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = ECCF8D57E0746BECFBAD62A3 /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -66,9 +67,9 @@ /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ - 40D834C2696187B32BEA6115 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig"; sourceTree = ""; }; - 6E048C72FF94991BB4DC4977 /* Pods-OSPaymentsLib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib.debug.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.debug.xcconfig"; sourceTree = ""; }; - 7063BC573F58EB7154E9975F /* Pods-OSPaymentsLib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib.release.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.release.xcconfig"; sourceTree = ""; }; + 3BE3E2E1BB3AE01A99F48EB7 /* Pods-OSPaymentsLib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib.debug.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.debug.xcconfig"; sourceTree = ""; }; + 40CA66DD4A7A35AB02442A38 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig"; sourceTree = ""; }; + 57AAE7155609C4A92E0BF198 /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig"; sourceTree = ""; }; 7507FC1227FC2AAE003809F6 /* OSPaymentsLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = OSPaymentsLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 7507FC1A27FC2AAE003809F6 /* OSPaymentsLibTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = OSPaymentsLibTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; }; 7509DC7628993C4C005BA0D4 /* PKMerchantCapability+Adapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PKMerchantCapability+Adapter.swift"; sourceTree = ""; }; @@ -76,6 +77,8 @@ 7509DC7E28996482005BA0D4 /* OSPMTApplePayConfigurationSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTApplePayConfigurationSpec.swift; sourceTree = ""; }; 7509DC80289967A6005BA0D4 /* PKPaymentNetwork+Adapter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "PKPaymentNetwork+Adapter.swift"; sourceTree = ""; }; 751B1DB1293A2744009A00B2 /* OSPMTStripeRequestParametersModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTStripeRequestParametersModel.swift; sourceTree = ""; }; + 752FE3B2187E49AE64D2AF6A /* Pods_OSPaymentsLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OSPaymentsLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 753CDB1B2BC55BEE005EAA76 /* PrivacyInfo.xcprivacy */ = {isa = PBXFileReference; lastKnownFileType = text.xml; path = PrivacyInfo.xcprivacy; sourceTree = ""; }; 7556EA942934DAC600FF4044 /* OSPMTRequestParametersModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTRequestParametersModel.swift; sourceTree = ""; }; 7556EA972934E10D00FF4044 /* OSPMTStripeAPIDelegate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTStripeAPIDelegate.swift; sourceTree = ""; }; 7556EA992934E4AB00FF4044 /* OSPMTStripeWrapperSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTStripeWrapperSpec.swift; sourceTree = ""; }; @@ -113,9 +116,8 @@ 75EC4D2128942C3800CF50E2 /* OSPMTConfigurationModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTConfigurationModel.swift; sourceTree = ""; }; 75EC4D232894449700CF50E2 /* OSPMTApplePayHandlerSpec.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTApplePayHandlerSpec.swift; sourceTree = ""; }; 75EC4D252894478200CF50E2 /* OSPMTTestConfigurations.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OSPMTTestConfigurations.swift; sourceTree = ""; }; - 8CDB829B99BC8A28609750EF /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig"; sourceTree = ""; }; - BADB3E4C7C4507E01CF0631B /* Pods_OSPaymentsLib.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OSPaymentsLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - F6BD4033DE465D38CA50CA9E /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OSPaymentsLib_OSPaymentsLibTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 928122E17A8AC44565E5BF13 /* Pods-OSPaymentsLib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-OSPaymentsLib.release.xcconfig"; path = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.release.xcconfig"; sourceTree = ""; }; + ECCF8D57E0746BECFBAD62A3 /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Pods_OSPaymentsLib_OSPaymentsLibTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -124,7 +126,7 @@ buildActionMask = 2147483647; files = ( 755DF3F0297FF02800140860 /* StripePayments in Frameworks */, - 8DB1869BE6C7A0D7D44D4C34 /* Pods_OSPaymentsLib.framework in Frameworks */, + 9A22CA283CDB70B8C41FBC5D /* Pods_OSPaymentsLib.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -133,7 +135,7 @@ buildActionMask = 2147483647; files = ( 7507FC1B27FC2AAE003809F6 /* OSPaymentsLib.framework in Frameworks */, - 7E9C30CBBF9DFE5A747787FF /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework in Frameworks */, + F1F07342D3669F8BEE182A62 /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -143,10 +145,10 @@ 498027A500160B5AE9639B6C /* Pods */ = { isa = PBXGroup; children = ( - 6E048C72FF94991BB4DC4977 /* Pods-OSPaymentsLib.debug.xcconfig */, - 7063BC573F58EB7154E9975F /* Pods-OSPaymentsLib.release.xcconfig */, - 8CDB829B99BC8A28609750EF /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */, - 40D834C2696187B32BEA6115 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */, + 3BE3E2E1BB3AE01A99F48EB7 /* Pods-OSPaymentsLib.debug.xcconfig */, + 928122E17A8AC44565E5BF13 /* Pods-OSPaymentsLib.release.xcconfig */, + 57AAE7155609C4A92E0BF198 /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */, + 40CA66DD4A7A35AB02442A38 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */, ); path = Pods; sourceTree = ""; @@ -158,7 +160,7 @@ 7507FC1E27FC2AAE003809F6 /* OSPaymentsLibTests */, 7507FC1327FC2AAE003809F6 /* Products */, 498027A500160B5AE9639B6C /* Pods */, - F0654FC64B2A887C3DD3CDAD /* Frameworks */, + 97A5767C6F114B357B5D5E1B /* Frameworks */, ); sourceTree = ""; }; @@ -181,6 +183,7 @@ 75EC4D132894142000CF50E2 /* Protocols */, 75EC4D1D289416B600CF50E2 /* OSPMTApplePayHandler.swift */, 75EC4D112893FC3C00CF50E2 /* OSPMTPayments.swift */, + 753CDB1B2BC55BEE005EAA76 /* PrivacyInfo.xcprivacy */, ); path = OSPaymentsLib; sourceTree = ""; @@ -283,11 +286,11 @@ path = Error; sourceTree = ""; }; - F0654FC64B2A887C3DD3CDAD /* Frameworks */ = { + 97A5767C6F114B357B5D5E1B /* Frameworks */ = { isa = PBXGroup; children = ( - BADB3E4C7C4507E01CF0631B /* Pods_OSPaymentsLib.framework */, - F6BD4033DE465D38CA50CA9E /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */, + 752FE3B2187E49AE64D2AF6A /* Pods_OSPaymentsLib.framework */, + ECCF8D57E0746BECFBAD62A3 /* Pods_OSPaymentsLib_OSPaymentsLibTests.framework */, ); name = Frameworks; sourceTree = ""; @@ -309,12 +312,12 @@ isa = PBXNativeTarget; buildConfigurationList = 7507FC2427FC2AAE003809F6 /* Build configuration list for PBXNativeTarget "OSPaymentsLib" */; buildPhases = ( - 12C6F4AA764D0987CE42C9F8 /* [CP] Check Pods Manifest.lock */, + 5BB2EF15ED875E7A792AB1A8 /* [CP] Check Pods Manifest.lock */, 7507FC0D27FC2AAE003809F6 /* Headers */, 7507FC0E27FC2AAE003809F6 /* Sources */, 7507FC0F27FC2AAE003809F6 /* Frameworks */, 7507FC1027FC2AAE003809F6 /* Resources */, - 75895022289989D200670171 /* ShellScript */, + 75895022289989D200670171 /* Run Script */, ); buildRules = ( ); @@ -332,11 +335,11 @@ isa = PBXNativeTarget; buildConfigurationList = 7507FC2727FC2AAE003809F6 /* Build configuration list for PBXNativeTarget "OSPaymentsLibTests" */; buildPhases = ( - 8B8B158E2E1E8736A3AE4BF3 /* [CP] Check Pods Manifest.lock */, + 58392A6A63DB75C1160FDA31 /* [CP] Check Pods Manifest.lock */, 7507FC1627FC2AAE003809F6 /* Sources */, 7507FC1727FC2AAE003809F6 /* Frameworks */, 7507FC1827FC2AAE003809F6 /* Resources */, - 0374DD04752215E17216FFFD /* [CP] Embed Pods Frameworks */, + 40F454F1E7C5AC1BD5A9723B /* [CP] Embed Pods Frameworks */, ); buildRules = ( ); @@ -356,7 +359,7 @@ attributes = { BuildIndependentTargetsInParallel = 1; LastSwiftUpdateCheck = 1330; - LastUpgradeCheck = 1330; + LastUpgradeCheck = 1510; TargetAttributes = { 7507FC1127FC2AAE003809F6 = { CreatedOnToolsVersion = 13.3; @@ -394,6 +397,7 @@ isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( + 753CDB1C2BC55BEE005EAA76 /* PrivacyInfo.xcprivacy in Resources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -407,7 +411,7 @@ /* End PBXResourcesBuildPhase section */ /* Begin PBXShellScriptBuildPhase section */ - 0374DD04752215E17216FFFD /* [CP] Embed Pods Frameworks */ = { + 40F454F1E7C5AC1BD5A9723B /* [CP] Embed Pods Frameworks */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -424,7 +428,7 @@ shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh\"\n"; showEnvVarsInLog = 0; }; - 12C6F4AA764D0987CE42C9F8 /* [CP] Check Pods Manifest.lock */ = { + 58392A6A63DB75C1160FDA31 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; buildActionMask = 2147483647; files = ( @@ -439,52 +443,53 @@ outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OSPaymentsLib-checkManifestLockResult.txt", + "$(DERIVED_FILE_DIR)/Pods-OSPaymentsLib-OSPaymentsLibTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; 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; }; - 75895022289989D200670171 /* ShellScript */ = { + 5BB2EF15ED875E7A792AB1A8 /* [CP] Check Pods Manifest.lock */ = { isa = PBXShellScriptBuildPhase; - alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( + "${PODS_PODFILE_DIR_PATH}/Podfile.lock", + "${PODS_ROOT}/Manifest.lock", ); + name = "[CP] Check Pods Manifest.lock"; outputFileListPaths = ( ); outputPaths = ( + "$(DERIVED_FILE_DIR)/Pods-OSPaymentsLib-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: Swiftlint not installed, download from https://github.com/realm/SwiftLint\"\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; }; - 8B8B158E2E1E8736A3AE4BF3 /* [CP] Check Pods Manifest.lock */ = { + 75895022289989D200670171 /* Run Script */ = { isa = PBXShellScriptBuildPhase; + alwaysOutOfDate = 1; buildActionMask = 2147483647; files = ( ); inputFileListPaths = ( ); inputPaths = ( - "${PODS_PODFILE_DIR_PATH}/Podfile.lock", - "${PODS_ROOT}/Manifest.lock", ); - name = "[CP] Check Pods Manifest.lock"; + name = "Run Script"; outputFileListPaths = ( ); outputPaths = ( - "$(DERIVED_FILE_DIR)/Pods-OSPaymentsLib-OSPaymentsLibTests-checkManifestLockResult.txt", ); runOnlyForDeploymentPostprocessing = 0; shellPath = /bin/sh; - 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; + shellScript = "if which swiftlint >/dev/null; then\nswiftlint\nelse\necho \"warning: Swiftlint not installed, download from https://github.com/realm/SwiftLint\"\nfi\n"; }; /* End PBXShellScriptBuildPhase section */ @@ -593,6 +598,7 @@ DEBUG_INFORMATION_FORMAT = dwarf; ENABLE_STRICT_OBJC_MSGSEND = YES; ENABLE_TESTABILITY = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_DYNAMIC_NO_PIC = NO; GCC_NO_COMMON_BLOCKS = YES; @@ -656,6 +662,7 @@ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; ENABLE_NS_ASSERTIONS = NO; ENABLE_STRICT_OBJC_MSGSEND = YES; + ENABLE_USER_SCRIPT_SANDBOXING = NO; GCC_C_LANGUAGE_STANDARD = gnu11; GCC_NO_COMMON_BLOCKS = YES; GCC_WARN_64_TO_32_BIT_CONVERSION = YES; @@ -678,10 +685,11 @@ }; 7507FC2527FC2AAE003809F6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 6E048C72FF94991BB4DC4977 /* Pods-OSPaymentsLib.debug.xcconfig */; + baseConfigurationReference = 3BE3E2E1BB3AE01A99F48EB7 /* Pods-OSPaymentsLib.debug.xcconfig */; buildSettings = { BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -689,19 +697,25 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.2.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.payments.OSPaymentsLib; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_OPTIMIZATION_LEVEL = "-Onone"; SWIFT_VERSION = 5.0; @@ -711,10 +725,11 @@ }; 7507FC2627FC2AAE003809F6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 7063BC573F58EB7154E9975F /* Pods-OSPaymentsLib.release.xcconfig */; + baseConfigurationReference = 928122E17A8AC44565E5BF13 /* Pods-OSPaymentsLib.release.xcconfig */; buildSettings = { BUILD_LIBRARY_FOR_DISTRIBUTION = YES; CLANG_ENABLE_MODULES = YES; + CODE_SIGN_IDENTITY = ""; CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEFINES_MODULE = YES; @@ -722,19 +737,25 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_MODULE_VERIFIER = YES; GENERATE_INFOPLIST_FILE = YES; INFOPLIST_KEY_NSHumanReadableCopyright = ""; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MARKETING_VERSION = 1.0; + MARKETING_VERSION = 1.2.0; + MODULE_VERIFIER_SUPPORTED_LANGUAGES = "objective-c objective-c++"; + MODULE_VERIFIER_SUPPORTED_LANGUAGE_STANDARDS = "gnu11 gnu++17"; PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.rd.payments.OSPaymentsLib; PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SKIP_INSTALL = YES; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = YES; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -743,15 +764,19 @@ }; 7507FC2827FC2AAE003809F6 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8CDB829B99BC8A28609750EF /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */; + baseConfigurationReference = 57AAE7155609C4A92E0BF198 /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = EVSWK8BA55; GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.payments.OSPaymentsLibTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -760,15 +785,19 @@ }; 7507FC2927FC2AAE003809F6 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 40D834C2696187B32BEA6115 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */; + baseConfigurationReference = 40CA66DD4A7A35AB02442A38 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */; buildSettings = { CODE_SIGN_STYLE = Automatic; CURRENT_PROJECT_VERSION = 1; DEVELOPMENT_TEAM = EVSWK8BA55; GENERATE_INFOPLIST_FILE = YES; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MARKETING_VERSION = 1.0; PRODUCT_BUNDLE_IDENTIFIER = com.outsystems.payments.OSPaymentsLibTests; PRODUCT_NAME = "$(TARGET_NAME)"; + SUPPORTED_PLATFORMS = "iphoneos iphonesimulator"; + SUPPORTS_MACCATALYST = NO; + SUPPORTS_MAC_DESIGNED_FOR_IPHONE_IPAD = NO; SWIFT_EMIT_LOC_STRINGS = NO; SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; @@ -813,7 +842,7 @@ repositoryURL = "https://github.com/stripe/stripe-ios-spm"; requirement = { kind = exactVersion; - version = 23.2.0; + version = 23.26.0; }; }; /* End XCRemoteSwiftPackageReference section */ diff --git a/OSPaymentsLib.xcodeproj/xcshareddata/xcschemes/OSPaymentsLib.xcscheme b/OSPaymentsLib.xcodeproj/xcshareddata/xcschemes/OSPaymentsLib.xcscheme index d875850..7361bb5 100644 --- a/OSPaymentsLib.xcodeproj/xcshareddata/xcschemes/OSPaymentsLib.xcscheme +++ b/OSPaymentsLib.xcodeproj/xcshareddata/xcschemes/OSPaymentsLib.xcscheme @@ -1,6 +1,6 @@ + + + + NSPrivacyTracking + + + NSPrivacyTrackingDomains + + + NSPrivacyCollectedDataTypes + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeName + + NSPrivacyCollectedDataTypeLinked + + + NSPrivacyCollectedDataTypeTracking + + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypeEmailAddress + + NSPrivacyCollectedDataTypeLinked + + + NSPrivacyCollectedDataTypeTracking + + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhoneNumber + + NSPrivacyCollectedDataTypeLinked + + + NSPrivacyCollectedDataTypeTracking + + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePhysicalAddress + + NSPrivacyCollectedDataTypeLinked + + + NSPrivacyCollectedDataTypeTracking + + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + + NSPrivacyCollectedDataType + NSPrivacyCollectedDataTypePaymentInfo + + NSPrivacyCollectedDataTypeLinked + + + NSPrivacyCollectedDataTypeTracking + + + NSPrivacyCollectedDataTypePurposes + + NSPrivacyCollectedDataTypePurposeAppFunctionality + + + + + NSPrivacyAccessedAPITypes + + + diff --git a/OSPaymentsLib/Protocols/OSPMTRequestDelegate.swift b/OSPaymentsLib/Protocols/OSPMTRequestDelegate.swift index b4dce30..5922531 100644 --- a/OSPaymentsLib/Protocols/OSPMTRequestDelegate.swift +++ b/OSPaymentsLib/Protocols/OSPMTRequestDelegate.swift @@ -110,8 +110,6 @@ extension OSPMTApplePayRequestBehaviour { // MARK: - Set up PKPaymentAuthorizationControllerDelegate conformance extension OSPMTApplePayRequestBehaviour: PKPaymentAuthorizationControllerDelegate { - /// Tells the delegate that payment authorization finished. - /// - Parameter controller: The payment authorization view controller. func paymentAuthorizationControllerDidFinish(_ controller: PKPaymentAuthorizationController) { controller.dismiss() // The payment sheet doesn't automatically dismiss once it has finished. Dismiss the payment sheet. @@ -124,11 +122,6 @@ extension OSPMTApplePayRequestBehaviour: PKPaymentAuthorizationControllerDelegat } } - /// Tells the delegate that the user authorized the payment request, and asks for a result. - /// - Parameters: - /// - controller: The payment authorization view controller. - /// - payment: The authorized payment. This object contains the payment token you need to submit to your payment processor, as well as the billing and shipping information required by the payment request. - /// - completion: The completion handler to call with the result of authorizing the payment. func paymentAuthorizationController(_ controller: PKPaymentAuthorizationController, didAuthorizePayment payment: PKPayment, handler completion: @escaping (PKPaymentAuthorizationResult) -> Void) { func setPaymentResults(with errorArray: [OSPMTError], and scopeModel: OSPMTScopeModel?, _ completion: @escaping (PKPaymentAuthorizationResult) -> Void) { if errorArray.isEmpty, let scopeModel = scopeModel { @@ -172,4 +165,10 @@ extension OSPMTApplePayRequestBehaviour: PKPaymentAuthorizationControllerDelegat setPaymentResults(with: [], and: payment.createScopeModel(), completion) } } + + /** + Despite the need to implement the method, this is not required by app's functionality. + For that reason, we're returning `nil` as the presentation window. + */ + func presentationWindow(for controller: PKPaymentAuthorizationController) -> UIWindow? { nil } } diff --git a/OSPaymentsLibTests/ModelSpecs/OSPMTAddressModelSpec.swift b/OSPaymentsLibTests/ModelSpecs/OSPMTAddressModelSpec.swift index 5048f1c..ba53556 100644 --- a/OSPaymentsLibTests/ModelSpecs/OSPMTAddressModelSpec.swift +++ b/OSPaymentsLibTests/ModelSpecs/OSPMTAddressModelSpec.swift @@ -80,7 +80,7 @@ class OSPMTAddressModelSpec: QuickSpec { ) } - override func spec() { + override class func spec() { describe("Given a full configuration") { context("When decoding the Address Model") { it("Should return a filled object") { diff --git a/OSPaymentsLibTests/ModelSpecs/OSPMTContactInfoModelSpec.swift b/OSPaymentsLibTests/ModelSpecs/OSPMTContactInfoModelSpec.swift index fc4c0c5..d0c6583 100644 --- a/OSPaymentsLibTests/ModelSpecs/OSPMTContactInfoModelSpec.swift +++ b/OSPaymentsLibTests/ModelSpecs/OSPMTContactInfoModelSpec.swift @@ -60,7 +60,7 @@ class OSPMTContactInfoModelSpec: QuickSpec { ) } - override func spec() { + override class func spec() { describe("Given a full configuration") { context("When decoding the Contact Info Model") { it("Should return a filled object") { diff --git a/OSPaymentsLibTests/ModelSpecs/OSPMTDataModelSpec.swift b/OSPaymentsLibTests/ModelSpecs/OSPMTDataModelSpec.swift index dd4c715..cd6a248 100644 --- a/OSPaymentsLibTests/ModelSpecs/OSPMTDataModelSpec.swift +++ b/OSPaymentsLibTests/ModelSpecs/OSPMTDataModelSpec.swift @@ -45,7 +45,7 @@ class OSPMTDataModelSpec: QuickSpec { ) } - override func spec() { + override class func spec() { describe("Given a full configuration") { context("When decoding the Data Model") { it("Should return a filled object") { diff --git a/OSPaymentsLibTests/ModelSpecs/OSPMTScopeModelSpec.swift b/OSPaymentsLibTests/ModelSpecs/OSPMTScopeModelSpec.swift index 7545dea..42aa7ad 100644 --- a/OSPaymentsLibTests/ModelSpecs/OSPMTScopeModelSpec.swift +++ b/OSPaymentsLibTests/ModelSpecs/OSPMTScopeModelSpec.swift @@ -22,7 +22,7 @@ class OSPMTScopeModelSpec: QuickSpec { static let paymentRequest = PKPaymentRequest() } - override func spec() { + override class func spec() { describe("Given a full configuration") { context("When decoding the Data Model") { it("Should return a filled object") { diff --git a/OSPaymentsLibTests/ModelSpecs/OSPMTTokenInfoModelSpec.swift b/OSPaymentsLibTests/ModelSpecs/OSPMTTokenInfoModelSpec.swift index 6bce82b..0ec8e34 100644 --- a/OSPaymentsLibTests/ModelSpecs/OSPMTTokenInfoModelSpec.swift +++ b/OSPaymentsLibTests/ModelSpecs/OSPMTTokenInfoModelSpec.swift @@ -15,7 +15,7 @@ class OSPMTTokenInfoModelSpec: QuickSpec { static let fullModel = OSPMTTokenInfoModel(token: OSPMTTestConfigurations.dummyString, type: OSPMTTestConfigurations.dummyString) } - override func spec() { + override class func spec() { describe("Given a full configuration") { context("When decoding the Token Info Model") { it("Should return a filled object") { diff --git a/OSPaymentsLibTests/OSPMTApplePayAvailabilityBehaviourSpec.swift b/OSPaymentsLibTests/OSPMTApplePayAvailabilityBehaviourSpec.swift index 2a8a20f..0c7e6f3 100644 --- a/OSPaymentsLibTests/OSPMTApplePayAvailabilityBehaviourSpec.swift +++ b/OSPaymentsLibTests/OSPMTApplePayAvailabilityBehaviourSpec.swift @@ -25,7 +25,7 @@ class MockSetupAvailableBehaviour: OSPMTApplePaySetupAvailabilityDelegate { } class OSPMTApplePayAvailabilityBehaviourSpec: QuickSpec { - override func spec() { + override class func spec() { var applePayAvailabilityBehaviour: OSPMTApplePayAvailabilityBehaviour! let mockConfiguration = OSPMTApplePayConfiguration(source: OSPMTTestConfigurations.validNetworkCapabilityConfig) diff --git a/OSPaymentsLibTests/OSPMTApplePayConfigurationSpec.swift b/OSPaymentsLibTests/OSPMTApplePayConfigurationSpec.swift index 54bc9b1..d889705 100644 --- a/OSPaymentsLibTests/OSPMTApplePayConfigurationSpec.swift +++ b/OSPaymentsLibTests/OSPMTApplePayConfigurationSpec.swift @@ -4,7 +4,7 @@ import Quick @testable import OSPaymentsLib class OSPMTApplePayConfigurationSpec: QuickSpec { - override func spec() { + override class func spec() { var applePayConfiguration: OSPMTApplePayConfiguration! describe("Given a correct configuration") { diff --git a/OSPaymentsLibTests/OSPMTApplePayHandlerSpec.swift b/OSPaymentsLibTests/OSPMTApplePayHandlerSpec.swift index 4cc7b20..64bfb0f 100644 --- a/OSPaymentsLibTests/OSPMTApplePayHandlerSpec.swift +++ b/OSPaymentsLibTests/OSPMTApplePayHandlerSpec.swift @@ -41,7 +41,7 @@ class OSPMTMockRequestBehaviour: OSPMTRequestDelegate { } class OSPMTApplePayHandlerSpec: QuickSpec { - override func spec() { + override class func spec() { var applePayHandler: OSPMTApplePayHandler! var mockAvailabilityBehaviour: OSPMTMockAvailabilityBehaviour! var mockRequestBehaviour: OSPMTMockRequestBehaviour! diff --git a/OSPaymentsLibTests/OSPMTApplePayRequestBehaviourSpec.swift b/OSPaymentsLibTests/OSPMTApplePayRequestBehaviourSpec.swift index 9ae1667..1347bd5 100644 --- a/OSPaymentsLibTests/OSPMTApplePayRequestBehaviourSpec.swift +++ b/OSPaymentsLibTests/OSPMTApplePayRequestBehaviourSpec.swift @@ -25,7 +25,7 @@ class MockRequestTriggerBehaviour: OSPMTApplePayRequestTriggerDelegate { } class OSPMTApplePayRequestBehaviourSpec: QuickSpec { - override func spec() { + override class func spec() { var applePayRequestBehaviour: OSPMTApplePayRequestBehaviour! var mockConfiguration: OSPMTApplePayConfiguration! diff --git a/OSPaymentsLibTests/OSPMTGatewayFactorySpec.swift b/OSPaymentsLibTests/OSPMTGatewayFactorySpec.swift index c6ddd2a..03f727b 100644 --- a/OSPaymentsLibTests/OSPMTGatewayFactorySpec.swift +++ b/OSPaymentsLibTests/OSPMTGatewayFactorySpec.swift @@ -3,7 +3,7 @@ import Quick @testable import OSPaymentsLib class OSPMTGatewayFactorySpec: QuickSpec { - override func spec() { + override class func spec() { var model: OSPMTGatewayModel! var wrapper: OSPMTGatewayDelegate! diff --git a/OSPaymentsLibTests/OSPMTPaymentsSpec.swift b/OSPaymentsLibTests/OSPMTPaymentsSpec.swift index 4cc8a00..037467d 100644 --- a/OSPaymentsLibTests/OSPMTPaymentsSpec.swift +++ b/OSPaymentsLibTests/OSPMTPaymentsSpec.swift @@ -45,7 +45,7 @@ class OSPMTMockHandler: OSPMTHandlerDelegate { } class OSPMTPaymentsSpec: QuickSpec { - override func spec() { + override class func spec() { var mockDelegate: OSPMTMockCallback! var mockHandler: OSPMTMockHandler! var payments: OSPMTPayments! @@ -86,8 +86,12 @@ class OSPMTPaymentsSpec: QuickSpec { expect(mockDelegate.error).to(beNil()) let result = payments.encode(OSPMTTestConfigurations.dummyScopeModel) - if case let .success(scopeText) = result { - expect(mockDelegate.successText).to(equal(scopeText)) + if case let .success(scopeText) = result, + let scopeTextData = scopeText.data(using: .utf8), + let successTextData = mockDelegate.successText?.data(using: .utf8), + let scopeObject = try? JSONSerialization.jsonObject(with: scopeTextData) as? [String: Any], + let successTextObject = try? JSONSerialization.jsonObject(with: successTextData) as? [String: Any] { + expect(NSDictionary(dictionary: scopeObject)).to(equal(NSDictionary(dictionary: successTextObject))) } else { fail() } @@ -118,9 +122,14 @@ class OSPMTPaymentsSpec: QuickSpec { payments.set(detailsString) expect(mockDelegate.error).to(beNil()) + let result = payments.encode(OSPMTTestConfigurations.useConfigurationBillingScopeModel) - if case let .success(scopeText) = result { - expect(mockDelegate.successText).to(equal(scopeText)) + if case let .success(scopeText) = result, + let scopeTextData = scopeText.data(using: .utf8), + let successTextData = mockDelegate.successText?.data(using: .utf8), + let scopeObject = try? JSONSerialization.jsonObject(with: scopeTextData) as? [String: Any], + let successTextObject = try? JSONSerialization.jsonObject(with: successTextData) as? [String: Any] { + expect(NSDictionary(dictionary: scopeObject)).to(equal(NSDictionary(dictionary: successTextObject))) } else { fail() } diff --git a/OSPaymentsLibTests/OSPMTStripeWrapperSpec.swift b/OSPaymentsLibTests/OSPMTStripeWrapperSpec.swift index 5d6c066..1fc6718 100644 --- a/OSPaymentsLibTests/OSPMTStripeWrapperSpec.swift +++ b/OSPaymentsLibTests/OSPMTStripeWrapperSpec.swift @@ -56,7 +56,7 @@ class MockURLProtocol: URLProtocol { } class OSPMTStripeWrapperSpec: QuickSpec { - override func spec() { + override class func spec() { var mockAPIDelegate: MockStripeAPIDelegate! var mockPayment: PKPayment! var mockDetailsModel: OSPMTDetailsModel! diff --git a/Podfile b/Podfile index 518c232..e758791 100644 --- a/Podfile +++ b/Podfile @@ -1,4 +1,4 @@ -platform :ios, '13.0' +platform :ios, '14.0' target 'OSPaymentsLib' do use_frameworks! @@ -6,8 +6,8 @@ target 'OSPaymentsLib' do # Pods for OSPaymentsLib target 'OSPaymentsLibTests' do - pod 'Quick', '5.0.1' - pod 'Nimble', '10.0.0' + pod 'Quick', '7.5.0' + pod 'Nimble', '13.2.1' end end diff --git a/Podfile.lock b/Podfile.lock deleted file mode 100644 index eccd046..0000000 --- a/Podfile.lock +++ /dev/null @@ -1,20 +0,0 @@ -PODS: - - Nimble (10.0.0) - - Quick (5.0.1) - -DEPENDENCIES: - - Nimble (= 10.0.0) - - Quick (= 5.0.1) - -SPEC REPOS: - trunk: - - Nimble - - Quick - -SPEC CHECKSUMS: - Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84 - Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179 - -PODFILE CHECKSUM: 573766210a1468eb831a29c19f8af7f8f1800801 - -COCOAPODS: 1.11.3 diff --git a/Pods/CwlCatchException/LICENSE.txt b/Pods/CwlCatchException/LICENSE.txt new file mode 100644 index 0000000..693a2fe --- /dev/null +++ b/Pods/CwlCatchException/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright © 2017 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. diff --git a/Pods/CwlCatchException/README.md b/Pods/CwlCatchException/README.md new file mode 100644 index 0000000..ef38cab --- /dev/null +++ b/Pods/CwlCatchException/README.md @@ -0,0 +1,31 @@ +# CwlCatchException + +A simple Swift wrapper around an Objective-C `@try`/`@catch` statement that selectively catches Objective-C exceptions by `NSException` subtype, rethrowing if any caught exception is not the expected subtype. + +Look at [CwlCatchExceptionTests.swift](https://github.com/mattgallagher/CwlCatchException/blob/master/Tests/CwlCatchExceptionTests/CwlCatchExceptionTests.swift) for syntax. + +## Requirements + +From version 2.0.0-beta.1, building CwlCatchException requires Swift 5 or newer, Swift Package Manager or CocoaPods. + +For use with older versions of Swift or other package managers, [use version 1.2.0 or older](https://github.com/mattgallagher/CwlCatchException/tree/1.2.0). + +## Adding to your project + +### Swift Package Manager + +Add the following to the `dependencies` array in your "Package.swift" file: + + .package(url: "https://github.com/mattgallagher/CwlCatchException.git", from: Version("2.0.0")) + +Or by adding `https://github.com/mattgallagher/CwlCatchException.git`, version 2.0.0 or later, to the list of Swift packages for any project in Xcode. + +### CocoaPods + +CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CwlCatchException into your Xcode project using CocoaPods, specify it in your Podfile: + +pod 'CwlCatchException', '~> 2.0' + +## Thanks + +Includes contributions from @alexbaev, @dnkoutso and @ejensen. \ No newline at end of file diff --git a/Pods/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift b/Pods/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift new file mode 100644 index 0000000..d6dbe4a --- /dev/null +++ b/Pods/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift @@ -0,0 +1,70 @@ +// +// CwlCatchException.swift +// CwlAssertionTesting +// +// Created by Matt Gallagher on 2016/01/10. +// Copyright © 2016 Matt Gallagher ( https://www.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 SWIFT_PACKAGE || COCOAPODS +import CwlCatchExceptionSupport +#endif + +private func catchReturnTypeConverter(_ type: Exception.Type, block: () -> Void) -> Exception? { + return catchExceptionOfKind(type, block) as? Exception +} + +extension NSException { + public static func catchException(in block: () -> Void) -> Self? { + return catchReturnTypeConverter(self, block: block) + } +} + +public func catchExceptionAsError(in block: (() throws -> Output)) throws -> Output { + var result: Result? + + let exception = NSException.catchException { + result = Result(catching: block) + } + + if let exception = exception { + throw ExceptionError(exception) + } + + return try result!.get() +} + +// Adding conformance so that ExceptionError is fully Sendable as part of CustomNSError +extension NSException: @unchecked Sendable { } + +public struct ExceptionError: CustomNSError { + public let exception: NSException + public let domain = "com.cocoawithlove.catch-exception" + public let errorUserInfo: [String: Any] + + public init(_ exception: NSException) { + self.exception = exception + + if let userInfo = exception.userInfo { + self.errorUserInfo = [String: Any](uniqueKeysWithValues: userInfo.map { pair in + (pair.key.description, pair.value) + }) + } else { + self.errorUserInfo = [:] + } + } +} diff --git a/Pods/CwlCatchExceptionSupport/LICENSE.txt b/Pods/CwlCatchExceptionSupport/LICENSE.txt new file mode 100644 index 0000000..693a2fe --- /dev/null +++ b/Pods/CwlCatchExceptionSupport/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright © 2017 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. diff --git a/Pods/CwlCatchExceptionSupport/README.md b/Pods/CwlCatchExceptionSupport/README.md new file mode 100644 index 0000000..ef38cab --- /dev/null +++ b/Pods/CwlCatchExceptionSupport/README.md @@ -0,0 +1,31 @@ +# CwlCatchException + +A simple Swift wrapper around an Objective-C `@try`/`@catch` statement that selectively catches Objective-C exceptions by `NSException` subtype, rethrowing if any caught exception is not the expected subtype. + +Look at [CwlCatchExceptionTests.swift](https://github.com/mattgallagher/CwlCatchException/blob/master/Tests/CwlCatchExceptionTests/CwlCatchExceptionTests.swift) for syntax. + +## Requirements + +From version 2.0.0-beta.1, building CwlCatchException requires Swift 5 or newer, Swift Package Manager or CocoaPods. + +For use with older versions of Swift or other package managers, [use version 1.2.0 or older](https://github.com/mattgallagher/CwlCatchException/tree/1.2.0). + +## Adding to your project + +### Swift Package Manager + +Add the following to the `dependencies` array in your "Package.swift" file: + + .package(url: "https://github.com/mattgallagher/CwlCatchException.git", from: Version("2.0.0")) + +Or by adding `https://github.com/mattgallagher/CwlCatchException.git`, version 2.0.0 or later, to the list of Swift packages for any project in Xcode. + +### CocoaPods + +CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CwlCatchException into your Xcode project using CocoaPods, specify it in your Podfile: + +pod 'CwlCatchException', '~> 2.0' + +## Thanks + +Includes contributions from @alexbaev, @dnkoutso and @ejensen. \ No newline at end of file diff --git a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m b/Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/CwlCatchException.m similarity index 93% rename from Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m rename to Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/CwlCatchException.m index ff35465..4530e92 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m +++ b/Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/CwlCatchException.m @@ -18,9 +18,9 @@ // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // -#import "CwlCatchException.h" +#import -NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)) { +NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ NS_NOESCAPE __nonnull inBlock)(void)) { @try { inBlock(); } @catch (NSException *exception) { diff --git a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h b/Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h similarity index 95% rename from Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h rename to Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h index eb42378..b93dcd2 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h +++ b/Pods/CwlCatchExceptionSupport/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h @@ -20,4 +20,4 @@ #import -NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ __nonnull inBlock)(void)); +NSException* __nullable catchExceptionOfKind(Class __nonnull type, void (^ NS_NOESCAPE __nonnull inBlock)(void)); diff --git a/Pods/CwlMachBadInstructionHandler/LICENSE.txt b/Pods/CwlMachBadInstructionHandler/LICENSE.txt new file mode 100644 index 0000000..693a2fe --- /dev/null +++ b/Pods/CwlMachBadInstructionHandler/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright © 2017 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. diff --git a/Pods/CwlMachBadInstructionHandler/README.md b/Pods/CwlMachBadInstructionHandler/README.md new file mode 100644 index 0000000..dd3fef1 --- /dev/null +++ b/Pods/CwlMachBadInstructionHandler/README.md @@ -0,0 +1,59 @@ +# CwlPreconditionTesting + +A Mach exception handler, written in Swift and Objective-C, that allows `EXC_BAD_INSTRUCTION` (as raised by Swift's `assertionFailure`/`preconditionFailure`/`fatalError`) to be caught and tested. + +NOTE: the iOS code runs in the simulator *only*. It is for logic testing and cannot be deployed to the device due to the Mach exception API being private on iOS. + +For an extended discussion of this code, please see the Cocoa with Love article: + +[Partial functions in Swift, Part 2: Catching precondition failures](http://cocoawithlove.com/blog/2016/02/02/partial-functions-part-two-catching-precondition-failures.html) + +## Requirements + +From version 2.0.0-beta.1, building CwlPreconditionTesting requires Swift 5 or newer and the Swift Package Manager, or CocoaPods. + +For use with older versions of Swift or other package managers, [use version 1.2.0 or older](https://github.com/mattgallagher/CwlPreconditionTesting/tree/1.2.0). + +## Adding to your project + +### Swift Package Manager + +Add the following to the `dependencies` array in your "Package.swift" file: + + .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: Version("2.0.0")) + +Or by adding `https://github.com/mattgallagher/CwlPreconditionTesting.git`, version 2.0.0 or later, to the list of Swift packages for any project in Xcode. + +### CocoaPods + +CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CwlPreconditionTesting into your Xcode project using CocoaPods, specify it in your Podfile: + +pod 'CwlPreconditionTesting', '~> 2.0' + +## Usage + +On macOS and iOS you can use the regular version: + +```swift +import CwlPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +on tvOS, Linux and other platforms, you can use the POSIX version: + +```swift +import CwlPosixPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +**Warning**: this POSIX version can't be used when lldb is attached since lldb's Mach exception handler blocks the SIGILL from ever occurring. You should disable the "Debug Executable" setting for the tests in Xcode. The POSIX version of the signal handler is also whole process (rather than correctly scoped to the thread where the "catch" occurs). + +## Thanks + +Includes contributions from @abbeycode, @dnkoutso, @jeffh and @ikesyo. Extra thanks to @saagarjha for help with the ARM64 additions. \ No newline at end of file diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m similarity index 98% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m rename to Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m index 168fa5b..0af0e8e 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m +++ b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m @@ -20,7 +20,7 @@ #ifdef __APPLE__ #import "TargetConditionals.h" -#if TARGET_OS_OSX || TARGET_OS_IOS +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_VISION #import "mach_excServer.h" #import "CwlMachBadInstructionHandler.h" diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h similarity index 98% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h rename to Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h index 6feabe5..ade03df 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h +++ b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h @@ -20,7 +20,7 @@ #import -#if TARGET_OS_OSX || TARGET_OS_IOS +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_VISION #import diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.c similarity index 99% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c rename to Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.c index ccd8f84..c6f4141 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c +++ b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.c @@ -10,7 +10,7 @@ #define __MIG_check__Request__mach_exc_subsystem__ 1 #import "mach_excServer.h" -#if TARGET_OS_OSX || TARGET_OS_IOS +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_VISION #ifndef mig_internal #define mig_internal static __inline__ diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.h similarity index 99% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h rename to Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.h index 1f03d66..941b227 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.h +++ b/Pods/CwlMachBadInstructionHandler/Sources/CwlMachBadInstructionHandler/mach_excServer.h @@ -1,6 +1,6 @@ #ifdef __APPLE__ #import "TargetConditionals.h" -#if TARGET_OS_OSX || TARGET_OS_IOS +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_VISION #ifndef _mach_exc_server_ #define _mach_exc_server_ diff --git a/Pods/CwlPosixPreconditionTesting/LICENSE.txt b/Pods/CwlPosixPreconditionTesting/LICENSE.txt new file mode 100644 index 0000000..693a2fe --- /dev/null +++ b/Pods/CwlPosixPreconditionTesting/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright © 2017 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. diff --git a/Pods/CwlPosixPreconditionTesting/README.md b/Pods/CwlPosixPreconditionTesting/README.md new file mode 100644 index 0000000..dd3fef1 --- /dev/null +++ b/Pods/CwlPosixPreconditionTesting/README.md @@ -0,0 +1,59 @@ +# CwlPreconditionTesting + +A Mach exception handler, written in Swift and Objective-C, that allows `EXC_BAD_INSTRUCTION` (as raised by Swift's `assertionFailure`/`preconditionFailure`/`fatalError`) to be caught and tested. + +NOTE: the iOS code runs in the simulator *only*. It is for logic testing and cannot be deployed to the device due to the Mach exception API being private on iOS. + +For an extended discussion of this code, please see the Cocoa with Love article: + +[Partial functions in Swift, Part 2: Catching precondition failures](http://cocoawithlove.com/blog/2016/02/02/partial-functions-part-two-catching-precondition-failures.html) + +## Requirements + +From version 2.0.0-beta.1, building CwlPreconditionTesting requires Swift 5 or newer and the Swift Package Manager, or CocoaPods. + +For use with older versions of Swift or other package managers, [use version 1.2.0 or older](https://github.com/mattgallagher/CwlPreconditionTesting/tree/1.2.0). + +## Adding to your project + +### Swift Package Manager + +Add the following to the `dependencies` array in your "Package.swift" file: + + .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: Version("2.0.0")) + +Or by adding `https://github.com/mattgallagher/CwlPreconditionTesting.git`, version 2.0.0 or later, to the list of Swift packages for any project in Xcode. + +### CocoaPods + +CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CwlPreconditionTesting into your Xcode project using CocoaPods, specify it in your Podfile: + +pod 'CwlPreconditionTesting', '~> 2.0' + +## Usage + +On macOS and iOS you can use the regular version: + +```swift +import CwlPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +on tvOS, Linux and other platforms, you can use the POSIX version: + +```swift +import CwlPosixPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +**Warning**: this POSIX version can't be used when lldb is attached since lldb's Mach exception handler blocks the SIGILL from ever occurring. You should disable the "Debug Executable" setting for the tests in Xcode. The POSIX version of the signal handler is also whole process (rather than correctly scoped to the thread where the "catch" occurs). + +## Thanks + +Includes contributions from @abbeycode, @dnkoutso, @jeffh and @ikesyo. Extra thanks to @saagarjha for help with the ARM64 additions. \ No newline at end of file diff --git a/Pods/CwlPosixPreconditionTesting/Sources/CwlPosixPreconditionTesting/CwlCatchBadInstructionPosix.swift b/Pods/CwlPosixPreconditionTesting/Sources/CwlPosixPreconditionTesting/CwlCatchBadInstructionPosix.swift new file mode 100644 index 0000000..0ee63e5 --- /dev/null +++ b/Pods/CwlPosixPreconditionTesting/Sources/CwlPosixPreconditionTesting/CwlCatchBadInstructionPosix.swift @@ -0,0 +1,119 @@ +// +// CwlCatchBadInstructionPosix.swift +// CwlPreconditionTesting +// +// Created by Matt Gallagher on 8/02/2016. +// Copyright © 2016 Matt Gallagher ( https://www.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 arch(x86_64) || arch(arm64) + +import Foundation + +// This file is an alternative implementation to CwlCatchBadInstruction.swift that uses a SIGILL signal action and setenv/longjmp instead of a Mach exception handler and Objective-C exception raising. +// +// WARNING: +// This code is quick and dirty. It's a proof of concept for using a SIGILL handler and setjmp/longjmp where Mach exceptions and the Obj-C runtime aren't available. I ran the automated tests when I first wrote this code but I don't personally use it at all so by the time you're reading this comment, it probably broke and I didn't notice. +// Obvious limitations: +// * It doesn't work when debugging with lldb. +// * It doesn't scope correctly to the thread (it's global) +// * In violation of rules for signal handlers, it writes to the "red zone" on the stack +// * It isn't re-entrant +// * Plus all of the same caveats as the Mach exceptions version (doesn't play well with other handlers, probably leaks ARC memory, etc) +// Treat it like a loaded shotgun. Don't point it at your face. + +// This function is called from the signal handler to shut down the thread and return 1 (indicating a SIGILL was received). +let callThreadExit = { + pthread_exit(UnsafeMutableRawPointer(bitPattern: 1)) +} as @convention(c) () -> Void + +// When called, this signal handler simulates a function call to `callThreadExit` +private func sigIllHandler(code: Int32, info: UnsafeMutablePointer<__siginfo>?, uap: UnsafeMutableRawPointer?) -> Void { + guard let context = uap?.bindMemory(to: ucontext64_t.self, capacity: 1) else { return } + + #if arch(x86_64) + // 1. Decrement the stack pointer + context.pointee.uc_mcontext64.pointee.__ss.__rsp -= UInt64(MemoryLayout.size) + + // 2. Save the old Instruction Pointer to the stack. + let rsp = context.pointee.uc_mcontext64.pointee.__ss.__rsp + if let ump = UnsafeMutablePointer(bitPattern: UInt(rsp)) { + ump.pointee = rsp + } + + // 3. Set the Instruction Pointer to the new function's address + context.pointee.uc_mcontext64.pointee.__ss.__rip = unsafeBitCast(callThreadExit, to: UInt64.self) + #elseif arch(arm64) + // 1. Set the link register to the current address. + context.pointee.uc_mcontext64.pointee.__ss.__lr = context.pointee.uc_mcontext64.pointee.__ss.__pc + + // 2. Set the Instruction Pointer to the new function's address. + context.pointee.uc_mcontext64.pointee.__ss.__pc = unsafeBitCast(callThreadExit, to: UInt64.self) + #endif +} + +/// Without Mach exceptions or the Objective-C runtime, there's nothing to put in the exception object. It's really just a boolean – either a SIGILL was caught or not. +public class BadInstructionException { +} + +#if arch(x86_64) +public let nativeSignal = SIGILL +#elseif arch(arm64) +public let nativeSignal = SIGTRAP +#endif + +/// Run the provided block. If a POSIX SIGILL is received, handle it and return a BadInstructionException (which is just an empty object in this POSIX signal version). Otherwise return nil. +/// NOTE: This function is only intended for use in test harnesses – use in a distributed build is almost certainly a bad choice. If a SIGILL is received, the block will be interrupted using a C `longjmp`. The risks associated with abrupt jumps apply here: most Swift functions are *not* interrupt-safe. Memory may be leaked and the program will not necessarily be left in a safe state. +/// - parameter block: a function without parameters that will be run +/// - returns: if an SIGILL is raised during the execution of `block` then a BadInstructionException will be returned, otherwise `nil`. +public func catchBadInstruction(block: @escaping () -> Void) -> BadInstructionException? { + // Construct the signal action + var sigActionPrev = sigaction() + let action = __sigaction_u(__sa_sigaction: sigIllHandler) + var sigActionNew = sigaction(__sigaction_u: action, sa_mask: sigset_t(), sa_flags: SA_SIGINFO) + + // Install the signal action + if sigaction(nativeSignal, &sigActionNew, &sigActionPrev) != 0 { + fatalError("Sigaction error: \(errno)") + } + + defer { + // Restore the previous signal action + if sigaction(nativeSignal, &sigActionPrev, nil) != 0 { + fatalError("Sigaction error: \(errno)") + } + } + + var b = block + let caught: Bool = withUnsafeMutablePointer(to: &b) { blockPtr in + // Run the block on its own thread + var handlerThread: pthread_t? = nil + let e = pthread_create(&handlerThread, nil, { arg in + arg.bindMemory(to: (() -> Void).self, capacity: 1).pointee() + return nil + }, blockPtr) + precondition(e == 0, "Unable to create thread") + + // Wait for completion and get the result. It will be either `nil` or bitPattern 1 + var rawResult: UnsafeMutableRawPointer? = nil + let e2 = pthread_join(handlerThread!, &rawResult) + precondition(e2 == 0, "Thread join failed") + return Int(bitPattern: rawResult) != 0 + } + + return caught ? BadInstructionException() : nil +} + +#endif diff --git a/Pods/CwlPreconditionTesting/LICENSE.txt b/Pods/CwlPreconditionTesting/LICENSE.txt new file mode 100644 index 0000000..693a2fe --- /dev/null +++ b/Pods/CwlPreconditionTesting/LICENSE.txt @@ -0,0 +1,15 @@ +ISC License + +Copyright © 2017 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. diff --git a/Pods/CwlPreconditionTesting/README.md b/Pods/CwlPreconditionTesting/README.md new file mode 100644 index 0000000..dd3fef1 --- /dev/null +++ b/Pods/CwlPreconditionTesting/README.md @@ -0,0 +1,59 @@ +# CwlPreconditionTesting + +A Mach exception handler, written in Swift and Objective-C, that allows `EXC_BAD_INSTRUCTION` (as raised by Swift's `assertionFailure`/`preconditionFailure`/`fatalError`) to be caught and tested. + +NOTE: the iOS code runs in the simulator *only*. It is for logic testing and cannot be deployed to the device due to the Mach exception API being private on iOS. + +For an extended discussion of this code, please see the Cocoa with Love article: + +[Partial functions in Swift, Part 2: Catching precondition failures](http://cocoawithlove.com/blog/2016/02/02/partial-functions-part-two-catching-precondition-failures.html) + +## Requirements + +From version 2.0.0-beta.1, building CwlPreconditionTesting requires Swift 5 or newer and the Swift Package Manager, or CocoaPods. + +For use with older versions of Swift or other package managers, [use version 1.2.0 or older](https://github.com/mattgallagher/CwlPreconditionTesting/tree/1.2.0). + +## Adding to your project + +### Swift Package Manager + +Add the following to the `dependencies` array in your "Package.swift" file: + + .package(url: "https://github.com/mattgallagher/CwlPreconditionTesting.git", from: Version("2.0.0")) + +Or by adding `https://github.com/mattgallagher/CwlPreconditionTesting.git`, version 2.0.0 or later, to the list of Swift packages for any project in Xcode. + +### CocoaPods + +CocoaPods is a dependency manager for Cocoa projects. For usage and installation instructions, visit their website. To integrate CwlPreconditionTesting into your Xcode project using CocoaPods, specify it in your Podfile: + +pod 'CwlPreconditionTesting', '~> 2.0' + +## Usage + +On macOS and iOS you can use the regular version: + +```swift +import CwlPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +on tvOS, Linux and other platforms, you can use the POSIX version: + +```swift +import CwlPosixPreconditionTesting + +let e = catchBadInstruction { + precondition(false, "THIS PRECONDITION FAILURE IS EXPECTED") +} +``` + +**Warning**: this POSIX version can't be used when lldb is attached since lldb's Mach exception handler blocks the SIGILL from ever occurring. You should disable the "Debug Executable" setting for the tests in Xcode. The POSIX version of the signal handler is also whole process (rather than correctly scoped to the thread where the "catch" occurs). + +## Thanks + +Includes contributions from @abbeycode, @dnkoutso, @jeffh and @ikesyo. Extra thanks to @saagarjha for help with the ARM64 additions. \ No newline at end of file diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift similarity index 97% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift rename to Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift index 9ec85da..002219d 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift +++ b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift @@ -18,11 +18,11 @@ // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // -#if (os(macOS) || os(iOS)) && (arch(x86_64) || arch(arm64)) +#if (os(macOS) || os(iOS) || os(visionOS)) && (arch(x86_64) || arch(arm64)) import Foundation -#if SWIFT_PACKAGE +#if SWIFT_PACKAGE || COCOAPODS import CwlMachBadInstructionHandler #endif diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift similarity index 77% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift rename to Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift index 7232c24..833abc1 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift +++ b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift @@ -18,12 +18,13 @@ // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // -#if (os(macOS) || os(iOS)) && (arch(x86_64) || arch(arm64)) +#if (os(macOS) || os(iOS) || os(visionOS)) && (arch(x86_64) || arch(arm64)) import Foundation import Swift -#if SWIFT_PACKAGE +#if SWIFT_PACKAGE || COCOAPODS + import CwlCatchException import CwlMachBadInstructionHandler #endif @@ -90,51 +91,8 @@ private struct MachContext { /// 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) - let requestSize = request.Head.msgh_size - try kernCheck { request.withMsgHeaderPointer { requestPtr in - mach_msg(requestPtr, MACH_RCV_MSG | MACH_RCV_INTERRUPT, 0, requestSize, 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 = mach_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 - let replySize = reply.Head.msgh_size - try kernCheck { reply.withMsgHeaderPointer { replyPtr in - mach_msg(replyPtr, MACH_SEND_MSG, replySize, 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 + mach_msg_server(unsafeBitCast(mach_exc_server as (@convention(c) (UnsafeMutablePointer, UnsafeMutablePointer) -> boolean_t), to: (@convention(c) (UnsafeMutablePointer?, UnsafeMutablePointer?) -> boolean_t).self), 4096, context.currentExceptionPort, MACH_MSG_OPTION_NONE) + return nil } /// 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. @@ -170,7 +128,10 @@ public func catchBadInstruction(in block: @escaping () -> Void) -> BadInstructio } defer { // 7. Cleanup the mach port - mach_port_destroy(mach_task_self_, context.currentExceptionPort) + // When the reference count for the right goes down to 0, it triggers the right to be deallocated + mach_port_mod_refs(mach_task_self_, context.currentExceptionPort, MACH_PORT_RIGHT_RECEIVE, -1) + // All rights deallocated, can deallocate the name/port + mach_port_deallocate(mach_task_self_, context.currentExceptionPort) } try kernCheck { diff --git a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift similarity index 97% rename from Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift rename to Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift index ccce5c5..ad01ccf 100644 --- a/Pods/Nimble/Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift +++ b/Pods/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift @@ -18,7 +18,7 @@ // IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. // -#if (os(macOS) || os(iOS)) && (arch(x86_64) || arch(arm64)) +#if (os(macOS) || os(iOS) || os(visionOS)) && (arch(x86_64) || arch(arm64)) import Darwin diff --git a/Pods/Manifest.lock b/Pods/Manifest.lock index eccd046..c24fbd1 100644 --- a/Pods/Manifest.lock +++ b/Pods/Manifest.lock @@ -1,20 +1,40 @@ PODS: - - Nimble (10.0.0) - - Quick (5.0.1) + - CwlCatchException (2.2.0): + - CwlCatchExceptionSupport (~> 2.2.0) + - CwlCatchExceptionSupport (2.2.0) + - CwlMachBadInstructionHandler (2.2.0) + - CwlPosixPreconditionTesting (2.2.0) + - CwlPreconditionTesting (2.2.1): + - CwlCatchException (~> 2.2.0) + - CwlMachBadInstructionHandler (~> 2.2.0) + - CwlPosixPreconditionTesting (~> 2.2.0) + - Nimble (13.2.1): + - CwlPreconditionTesting (~> 2.2.0) + - Quick (7.5.0) DEPENDENCIES: - - Nimble (= 10.0.0) - - Quick (= 5.0.1) + - Nimble (= 13.2.1) + - Quick (= 7.5.0) SPEC REPOS: trunk: + - CwlCatchException + - CwlCatchExceptionSupport + - CwlMachBadInstructionHandler + - CwlPosixPreconditionTesting + - CwlPreconditionTesting - Nimble - Quick SPEC CHECKSUMS: - Nimble: 5316ef81a170ce87baf72dd961f22f89a602ff84 - Quick: 749aa754fd1e7d984f2000fe051e18a3a9809179 + CwlCatchException: 51bf8319009a31104ea6f0568730d1ecc25b6454 + CwlCatchExceptionSupport: 1345d6adb01a505933f2bc972dab60dcb9ce3e50 + CwlMachBadInstructionHandler: ea1030428925d9bf340882522af30712fb4bf356 + CwlPosixPreconditionTesting: a125dee731883f2582715f548c6b6c92c7fde145 + CwlPreconditionTesting: ccfd08aca58d14e04062b2a3dd2fd52e09857453 + Nimble: 9e81a67096dab1d1f5160d7a3f8fa7a1eeec38fd + Quick: 2b651168441479b949ba987f3cee41a9cc53aa32 -PODFILE CHECKSUM: 573766210a1468eb831a29c19f8af7f8f1800801 +PODFILE CHECKSUM: 5e290fe0b5d1284128dec7e8e8c54647d651c52c -COCOAPODS: 1.11.3 +COCOAPODS: 1.15.2 diff --git a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift b/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift deleted file mode 100644 index 2cb9b29..0000000 --- a/Pods/Nimble/Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift +++ /dev/null @@ -1,35 +0,0 @@ -// -// CwlCatchException.swift -// CwlAssertionTesting -// -// Created by Matt Gallagher on 2016/01/10. -// Copyright © 2016 Matt Gallagher ( https://www.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 SWIFT_PACKAGE -import CwlCatchExceptionSupport -#endif - -private func catchReturnTypeConverter(_ type: T.Type, block: @escaping () -> Void) -> T? { - return catchExceptionOfKind(type, block) as? T -} - -extension NSException { - public static func catchException(in block: @escaping () -> Void) -> Self? { - return catchReturnTypeConverter(self, block: block) - } -} diff --git a/Pods/Nimble/README.md b/Pods/Nimble/README.md index e92cbb2..8137a10 100644 --- a/Pods/Nimble/README.md +++ b/Pods/Nimble/README.md @@ -32,9 +32,23 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Operator Overloads](#operator-overloads) - [Lazily Computed Values](#lazily-computed-values) - [C Primitives](#c-primitives) - - [Asynchronous Expectations](#asynchronous-expectations) + - [Async/Await Support](#asyncawait-support) + - [Async Matchers](#async-matchers) + - [Polling Expectations](#polling-expectations) + - [Using Polling Expectations in Async Tests](#using-polling-expectations-in-async-tests) + - [Verifying a Matcher will Never or Always Match](#verifying-a-matcher-will-never-or-always-match) + - [Waiting for a Callback to be Called](#waiting-for-a-callback-to-be-called) + - [Changing the Timeout and Polling Intervals](#changing-the-timeout-and-polling-intervals) + - [Changing default Timeout and Poll Intervals](#changing-default-timeout-and-poll-intervals) + - [Quick](#quick) + - [XCTest](#xctest) - [Objective-C Support](#objective-c-support) - [Disabling Objective-C Shorthand](#disabling-objective-c-shorthand) +- [Using `require` to demand that a matcher pass before continuing](#using-require-to-demand-that-a-matcher-pass-before-continuing) + - [Polling with `require`.](#polling-with-require) + - [Using `require` with Async expressions and Async matchers](#using-require-with-async-expressions-and-async-matchers) + - [Using `unwrap` to replace `require(...).toNot(beNil())`](#using-unwrap-to-replace-requiretonotbenil) + - [Throwing a Custom Error from Require](#throwing-a-custom-error-from-require) - [Built-in Matcher Functions](#built-in-matcher-functions) - [Type Checking](#type-checking) - [Equivalence](#equivalence) @@ -48,25 +62,32 @@ expect(ocean.isClean).toEventually(beTruthy()) - [Collection Membership](#collection-membership) - [Strings](#strings) - [Collection Elements](#collection-elements) + - [Swift](#swift) + - [Objective-C](#objective-c) - [Collection Count](#collection-count) - [Notifications](#notifications) - [Result](#result) - [Matching a value to any of a group of matchers](#matching-a-value-to-any-of-a-group-of-matchers) - [Custom Validation](#custom-validation) + - [Mapping a Value to Another Value](#mapping-a-value-to-another-value) - [Writing Your Own Matchers](#writing-your-own-matchers) - - [PredicateResult](#predicateresult) + - [MatcherResult](#matcherresult) - [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) + - [Asynchronous Matchers](#asynchronous-matchers) - [Supporting Objective-C](#supporting-objective-c) - [Properly Handling `nil` in Objective-C Matchers](#properly-handling-nil-in-objective-c-matchers) - - [Migrating from the Old Matcher API](#migrating-from-the-old-matcher-api) - [Installing Nimble](#installing-nimble) - [Installing Nimble as a Submodule](#installing-nimble-as-a-submodule) - [Installing Nimble via CocoaPods](#installing-nimble-via-cocoapods) + - [Installing Nimble via Swift Package Manager](#installing-nimble-via-swift-package-manager) + - [Xcode](#xcode) + - [Package.Swift](#packageswift) - [Using Nimble without XCTest](#using-nimble-without-xctest) + - [Privacy Statement](#privacy-statement) @@ -297,7 +318,66 @@ expect(1 as CInt).to(equal(1)) expect(@(1 + 1)).to(equal(@2)); ``` -## Asynchronous Expectations +## Async/Await Support + +Nimble makes it easy to await for an async function to complete. Simply pass +the async function in to `expect`: + +```swift +// Swift +await expect { await aFunctionReturning1() }.to(equal(1)) +``` + +The async function is awaited on first, before passing it to the matcher. This +enables the matcher to run synchronous code like before, without caring about +whether the value it's processing was abtained async or not. + +Async support is Swift-only, and it requires that you execute the test in an +async context. For XCTest, this is as simple as marking your test function with +`async`. If you use Quick, all tests in Quick 6 are executed in an async context. +In Quick 7 and later, only tests that are in an `AsyncSpec` subclass will be +executed in an async context. + +To avoid a compiler errors when using synchronous `expect` in asynchronous contexts, +`expect` with async expressions does not support autoclosures. However, the `expecta` +(expect async) function is provided as an alternative, which does support autoclosures. + +```swift +// Swift +await expecta(await aFunctionReturning1()).to(equal(1))) +``` + +Similarly, if you're ever in a situation where you want to force the compiler to +produce a `SyncExpectation`, you can use the `expects` (expect sync) function to +produce a `SyncExpectation`. Like so: + +```swift +// Swift +expects(someNonAsyncFunction()).to(equal(1))) + +expects(await someAsyncFunction()).to(equal(1)) // Compiler error: 'async' call in an autoclosure that does not support concurrency +``` + +### Async Matchers + +In addition to asserting on async functions prior to passing them to a +synchronous matcher, you can also write matchers that directly take in an +async value. These are called `AsyncMatcher`s. This is most obviously useful +when directly asserting against an actor. In addition to writing your own +async matchers, Nimble currently ships with async versions of the following +matchers: + +- `allPass` +- `containElementSatisfying` +- `satisfyAllOf` and the `&&` operator overload accept both `AsyncMatcher` and + synchronous `Matcher`s. +- `satisfyAnyOf` and the `||` operator overload accept both `AsyncMatcher` and + synchronous `Matcher`s. + +Note: Async/Await support is different than the `toEventually`/`toEventuallyNot` +feature described below. + +## Polling Expectations In Nimble, it's easy to make expectations on values that are updated asynchronously. Just use `toEventually` or `toEventuallyNot`: @@ -333,6 +413,39 @@ contains dolphins and whales, the expectation passes. If `ocean` still doesn't contain them, even after being continuously re-evaluated for one whole second, the expectation fails. +### Using Polling Expectations in Async Tests + +You can easily use `toEventually` or `toEventuallyNot` in async contexts as +well. You only need to add an `await` statement to the beginning of the line: + +```swift +// Swift +DispatchQueue.main.async { + ocean.add("dolphins") + ocean.add("whales") +} +await expect(ocean).toEventually(contain("dolphens", "whiles")) +``` + +Starting in Nimble 12, `toEventually` et. al. now also supports async +expectations. For example, the following test is now supported: + +```swift +actor MyActor { + private var counter = 0 + + func access() -> Int { + counter += 1 + return counter + } +} + +let subject = MyActor() +await expect { await subject.access() }.toEventually(equal(2)) +``` + +### Verifying a Matcher will Never or Always Match + You can also test that a value always or never matches throughout the length of the timeout. Use `toNever` and `toAlways` for this: ```swift @@ -349,25 +462,7 @@ expect(ocean).toAlways(contain(@"dolphins")) expect(ocean).toNever(contain(@"hares")) ``` -Sometimes it takes more than a second for a value to update. In those -cases, use the `timeout` parameter: - -```swift -// Swift - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).toEventually(contain("starfish"), timeout: .seconds(3)) - -// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. -expect(someValue).toEventually(equal(100), timeout: .milliseconds(5500), pollInterval: .milliseconds(200)) -``` - -```objc -// Objective-C - -// Waits three seconds for ocean to contain "starfish": -expect(ocean).withTimeout(3).toEventually(contain(@"starfish")); -``` +### Waiting for a Callback to be Called You can also provide a callback by using the `waitUntil` function: @@ -423,6 +518,30 @@ 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(), deadlocks, and synchronous IPC. +### Changing the Timeout and Polling Intervals + +Sometimes it takes more than a second for a value to update. In those +cases, use the `timeout` parameter: + +```swift +// Swift + +// Waits three seconds for ocean to contain "starfish": +expect(ocean).toEventually(contain("starfish"), timeout: .seconds(3)) + +// Evaluate someValue every 0.2 seconds repeatedly until it equals 100, or fails if it timeouts after 5.5 seconds. +expect(someValue).toEventually(equal(100), timeout: .milliseconds(5500), pollInterval: .milliseconds(200)) +``` + +```objc +// Objective-C + +// Waits three seconds for ocean to contain "starfish": +expect(ocean).withTimeout(3).toEventually(contain(@"starfish")); +``` + +### Changing default Timeout and Poll Intervals + In some cases (e.g. when running on slower machines) it can be useful to modify the default timeout and poll interval values. This can be done as follows: @@ -430,12 +549,73 @@ the default timeout and poll interval values. This can be done as follows: // Swift // Increase the global timeout to 5 seconds: -Nimble.AsyncDefaults.timeout = .seconds(5) +Nimble.PollingDefaults.timeout = .seconds(5) // Slow the polling interval to 0.1 seconds: -Nimble.AsyncDefaults.pollInterval = .milliseconds(100) +Nimble.PollingDefaults.pollInterval = .milliseconds(100) +``` + +You can set these globally at test startup in two ways: + +#### Quick + +If you use [Quick](https://github.com/Quick/Quick), add a [`QuickConfiguration` subclass](https://github.com/Quick/Quick/blob/main/Documentation/en-us/ConfiguringQuick.md) which sets your desired `PollingDefaults`. + +```swift +import Quick +import Nimble + +class PollingConfiguration: QuickConfiguration { + override class func configure(_ configuration: QCKConfiguration) { + Nimble.PollingDefaults.timeout = .seconds(5) + Nimble.PollingDefaults.pollInterval = .milliseconds(100) + } +} +``` + +#### XCTest + +If you use [XCTest](https://developer.apple.com/documentation/xctest), add an object that conforms to [`XCTestObservation`](https://developer.apple.com/documentation/xctest/xctestobservation) and implement [`testBundleWillStart(_:)`](https://developer.apple.com/documentation/xctest/xctestobservation/1500772-testbundlewillstart). + +Additionally, you will need to register this observer with the [`XCTestObservationCenter`](https://developer.apple.com/documentation/xctest/xctestobservationcenter) at test startup. To do this, set the `NSPrincipalClass` key in your test bundle's Info.plist and implement a class with that same name. + +For example + +```xml + + + + + + + NSPrincipalClass + MyTests.TestSetup + + +``` + +```swift +// TestSetup.swift +import XCTest +import Nimble + +@objc +class TestSetup: NSObject { + override init() { + XCTestObservationCenter.shared.register(PollingConfigurationTestObserver()) + } +} + +class PollingConfigurationTestObserver: NSObject, XCTestObserver { + func testBundleWillStart(_ testBundle: Bundle) { + Nimble.PollingDefaults.timeout = .seconds(5) + Nimble.PollingDefaults.pollInterval = .milliseconds(100) + } +} ``` +In Linux, you can implement `LinuxMain` to set the PollingDefaults before calling `XCTMain`. + ## Objective-C Support Nimble has full support for Objective-C. However, there are two things @@ -495,6 +675,7 @@ For the following matchers: - `beFalsy` - `haveCount` + If you would like to see more, [file an issue](https://github.com/Quick/Nimble/issues). ## Disabling Objective-C Shorthand @@ -516,6 +697,89 @@ NMB_expect(^{ return seagull.squawk; }, __FILE__, __LINE__).to(NMB_equal(@"Squee names that conflict with Nimble functions, such as `expect` or `equal`. If that's not the case, there's no point in disabling the shorthand. + +# Using `require` to demand that a matcher pass before continuing + +Nimble 13.1 added the `require` dsl to complement `expect`. `require` +looks similar to `expect` and works with matchers just like `expect` does. The +difference is that `require` requires that the matcher passes - if the matcher +doesn't pass, then `require` will throw an error. Additionally, if `require` +does pass, then it'll return the result of running the expression. + +For example, in testing a function that returns an array, you might need to +first guarantee that there are exactly 3 items in the array before continuing +to assert on it. Instead of writing code that needlessly duplicates an assertion +and a conditional like so: + +```swift +let collection = myFunction() +expect(collection).to(haveCount(3)) +guard collection.count == 3 else { return } +// ... +``` + +You can replace that with: + +```swift +let collection = try require(myFunction()).to(haveCount(3)) +// ... +``` + +## Polling with `require`. + +Because `require` does everything you can do with `expect`, you can also use +`require` to [poll matchers](#polling-expectations) using `toEventually`, +`eventuallyTo`, `toEventuallyNot`, `toNotEventually`, `toNever`, `neverTo`, +`toAlways`, and `alwaysTo`. These work exactly the same as they do when using +`expect`, except that they throw if they fail, and they return the value of the +expression when they pass. + +## Using `require` with Async expressions and Async matchers + +`require` also works with both async expressions +(`require { await someExpression() }.to(...)`), and async matchers +(`require().to(someAsyncMatcher())`). + +Note that to prevent compiler confusion, +you cannot use `require` with async autoclosures. That is, +`require(await someExpression())` will not compile. You can instead either +make the closure explicit (`require { await someExpression() }`), or use the +`requirea` function, which does accept autoclosures. +Similarly, if you ever wish to use the sync version of `require` when the +compiler is trying to force you to use the async version, you can use the +`requires` function, which only allows synchronous expressions. + +## Using `unwrap` to replace `require(...).toNot(beNil())` + +It's very common to require that a value not be nil. Instead of writing +`try require(...).toNot(beNil())`, Nimble provides the `unwrap` function. This +expression throws an error if the expression evaluates to nil, or returns the +non-nil result when it passes. For example: + +```swift +let value = try unwrap(nil as Int?) // throws +let value = try unwrap(1 as Int?) // returns 1 +``` + +Additionally, there is also the `pollUnwrap` function, which aliases to +`require(...).toEventuallyNot(beNil())`. This is extremely useful for verifying +that a value that is updated on a background thread was eventually set to a +non-nil value. + +Note: As with `require`, there are `unwraps`, `unwrapa`, `pollUnwraps`, and +`pollUnwrapa` variants for allowing you to use autoclosures specifically with +synchronous or asynchronous code. + +## Throwing a Custom Error from Require + +By default, if the matcher fails in a `require`, then a `RequireError` will be +thrown. You can override this behavior and throw a custom error by passing a +non-nil `Error` value to the `customError` parameter: + +```swift +try require(1).to(equal(2)) // throws a `RequireError` +try require(customError: MyCustomError(), 1).to(equal(2)) // throws a `MyCustomError` +``` # Built-in Matcher Functions @@ -1048,6 +1312,9 @@ expect(turtles).to(containElementSatisfying({ turtle in // should it fail ``` +Note: in Swift, `containElementSatisfying` also has a variant that takes in an +async function. + ```objc // Objective-C @@ -1142,6 +1409,19 @@ expect([1, 2, 3, 4]).to(allPass { $0 < 5 }) expect([1, 2, 3, 4]).to(allPass(beLessThan(5))) ``` +There are also variants of `allPass` that check against async matchers, and +that take in async functions: + +```swift +// Swift + +// Providing a custom function: +expect([1, 2, 3, 4]).to(allPass { await asyncFunctionReturningBool($0) }) + +// Composing the expectation with another matcher: +expect([1, 2, 3, 4]).to(allPass(someAsyncMatcher())) +``` + ### Objective-C In Objective-C, the collection must be an instance of a type which implements @@ -1269,6 +1549,9 @@ expect(6).to(satisfyAnyOf(equal(2), equal(3), equal(4), equal(5), equal(6), equa expect(82).to(beLessThan(50) || beGreaterThan(80)) ``` +Note: In swift, you can mix and match synchronous and asynchronous matchers +using by `satisfyAnyOf`/`||`. + ```objc // Objective-C @@ -1313,28 +1596,60 @@ 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. +## Mapping a Value to Another Value + +Sometimes, you only want to match against a property or group of properties. +For example, if you wanted to check that only one or a few properties of a value +are equal to something else. For this, use the `map` matcher to convert a value +to another value and check it with a matcher. + +```swift +// Swift + +expect(someValue).to(map(\.someProperty, equal(expectedProperty))) + +// or, for checking multiple different properties: + +expect(someValue).to(satisfyAllOf( + map(\.firstProperty, equal(expectedFirstProperty)), + map({ $0.secondProperty }, equal(expectedSecondProperty)) +)) +``` + +The `map` matcher takes in either a closure or a keypath literal, and a matcher +to compose with. It also works with async closures and async matchers. + +In most cases, it is simpler and easier to not use map (that is, prefer +`expect(someValue.property).to(equal(1))` to +`expect(someValue).to(map(\.property, equal(1)))`). But `map` is incredibly +useful when combined with `satisfyAllOf`/`satisfyAnyOf`, especially for checking +a value that cannot conform to `Equatable` (or you don't want to make it +conform to `Equatable`). However, if you find yourself reusing `map` many times +to do a fuzzy-equals of a given type, you will find writing a custom matcher to +be much easier to use and maintain. + # Writing Your Own Matchers In Nimble, matchers are Swift functions that take an expected -value and return a `Predicate` closure. Take `equal`, for example: +value and return a `Matcher` closure. Take `equal`, for example: ```swift // Swift -public func equal(expectedValue: T?) -> Predicate { +public func equal(expectedValue: T?) -> Matcher { // Can be shortened to: - // Predicate { actual in ... } + // Matcher { actual in ... } // // But shown with types here for clarity. - return Predicate { (actualExpression: Expression) throws -> PredicateResult in + return Matcher { (actualExpression: Expression) throws -> MatcherResult in let msg = ExpectationMessage.expectedActualValueTo("equal <\(expectedValue)>") if let actualValue = try actualExpression.evaluate() { - return PredicateResult( + return MatcherResult( bool: actualValue == expectedValue!, message: msg ) } else { - return PredicateResult( + return MatcherResult( status: .fail, message: msg.appendedBeNilHint() ) @@ -1343,7 +1658,7 @@ public func equal(expectedValue: T?) -> Predicate { } ``` -The return value of a `Predicate` closure is a `PredicateResult` that indicates +The return value of a `Matcher` closure is a `MatcherResult` that indicates whether the actual value matches the expectation and what error message to display on failure. @@ -1363,27 +1678,27 @@ 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 +## MatcherResult -`PredicateResult` is the return struct that `Predicate` return to indicate -success and failure. A `PredicateResult` is made up of two values: -`PredicateStatus` and `ExpectationMessage`. +`MatcherResult` is the return struct that `Matcher` return to indicate +success and failure. A `MatcherResult` is made up of two values: +`MatcherStatus` and `ExpectationMessage`. -Instead of a boolean, `PredicateStatus` captures a trinary set of values: +Instead of a boolean, `MatcherStatus` captures a trinary set of values: ```swift // Swift -public enum PredicateStatus { -// The predicate "passes" with the given expression +public enum MatcherStatus { +// The matcher "passes" with the given expression // eg - expect(1).to(equal(1)) case matches -// The predicate "fails" with the given expression +// The matcher "fails" with the given expression // eg - expect(1).toNot(equal(1)) case doesNotMatch -// The predicate never "passes" with the given expression, even if negated +// The matcher never "passes" with the given expression, even if negated // eg - expect(nil as Int?).toNot(equal(1)) case fail @@ -1409,11 +1724,11 @@ case fail(/* message: */ String) } ``` -Predicates should usually depend on either `.expectedActualValueTo(..)` or +Matchers 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 +Finally, if your Matcher utilizes other Matchers, you can utilize `.appended(details:)` and `.appended(message:)` methods to annotate an existing error with more details. @@ -1430,15 +1745,15 @@ custom matchers should call `actualExpression.evaluate()`: ```swift // Swift -public func beNil() -> Predicate { - // Predicate.simpleNilable(..) automatically generates ExpectationMessage for +public func beNil() -> Matcher { + // Matcher.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 + // that this Matcher supports matching against nil actualExpressions, instead of + // always resulting in a MatcherStatus.fail result -- which is true for + // Matcher.simple(..) + return Matcher.simpleNilable("be nil") { actualExpression in let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == nil) + return MatcherStatus(bool: actualValue == nil) } } ``` @@ -1460,16 +1775,16 @@ against the one provided to the matcher function, and passes if they are the sam ```swift // Swift -public func haveDescription(description: String) -> Predicate { - return Predicate.simple("have description") { actual in - return PredicateStatus(bool: actual.evaluate().description == description) +public func haveDescription(description: String) -> Matcher { + return Matcher.simple("have description") { actual in + return MatcherStatus(bool: actual.evaluate().description == description) } } ``` ## Customizing Failure Messages -When using `Predicate.simple(..)` or `Predicate.simpleNilable(..)`, Nimble +When using `Matcher.simple(..)` or `Matcher.simpleNilable(..)`, Nimble outputs the following failure message when an expectation fails: ```swift @@ -1478,36 +1793,36 @@ outputs the following failure message when an expectation fails: "expected to \(message), got <\(actual)>" ``` -You can customize this message by modifying the way you create a `Predicate`. +You can customize this message by modifying the way you create a `Matcher`. ### Basic Customization For slightly more complex error messaging, receive the created failure message -with `Predicate.define(..)`: +with `Matcher.define(..)`: ```swift // Swift -public func equal(_ expectedValue: T?) -> Predicate { - return Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in +public func equal(_ expectedValue: T?) -> Matcher { + return Matcher.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( + return MatcherResult( status: .fail, message: msg.appendedBeNilHint() ) } - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) } - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } ``` In the example above, `msg` is defined based on the string given to -`Predicate.define`. The code looks akin to: +`Matcher.define`. The code looks akin to: ```swift // Swift @@ -1517,10 +1832,10 @@ let msg = ExpectationMessage.expectedActualValueTo("equal <\(stringify(expectedV ### Full Customization -To fully customize the behavior of the Predicate, use the overload that expects -a `PredicateResult` to be returned. +To fully customize the behavior of the Matcher, use the overload that expects +a `MatcherResult` to be returned. -Along with `PredicateResult`, there are other `ExpectationMessage` enum values you can use: +Along with `MatcherResult`, there are other `ExpectationMessage` enum values you can use: ```swift public indirect enum ExpectationMessage { @@ -1564,19 +1879,52 @@ For a more comprehensive message that spans multiple lines, use .expectedActualValueTo("be true").appended(details: "use beFalse() for inverse\nor use beNil()") ``` +## Asynchronous Matchers + +To write matchers against async expressions, return an instance of +`AsyncMatcher`. The closure passed to `AsyncMatcher` is async, and the +expression you evaluate is also asynchronous and needs to be awaited on. + +```swift +// Swift + +actor CallRecorder { + private(set) var calls: [Arguments] = [] + + func record(call: Arguments) { + calls.append(call) + } +} + +func beCalled(with arguments: Argument) -> AsyncMatcher> { + AsyncMatcher { (expression: AsyncExpression>) in + let message = ExpectationMessage.expectedActualValueTo("be called with \(arguments)") + guard let calls = try await expression.evaluate()?.calls else { + return MatcherResult(status: .fail, message: message.appendedBeNilHint()) + } + + return MatcherResult(bool: calls.contains(args), message: message.appended(details: "called with \(calls)")) + } +} +``` + +In this example, we created an actor to act as an object to record calls to an +async function. Then, we created the `beCalled(with:)` matcher to check if the +actor has received a call with the given arguments. + ## Supporting Objective-C To use a custom matcher written in Swift from Objective-C, you'll have -to extend the `NMBPredicate` class, adding a new class method for your +to extend the `NMBMatcher` class, adding a new class method for your custom matcher. The example below defines the class method -`+[NMBPredicate beNilMatcher]`: +`+[NMBMatcher beNilMatcher]`: ```swift // Swift -extension NMBPredicate { - @objc public class func beNilMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beNilMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in return try beNil().satisfies(actualExpression).toObjectiveC() } } @@ -1588,7 +1936,7 @@ The above allows you to use the matcher from Objective-C: ```objc // Objective-C -expect(actual).to([NMBPredicate beNilMatcher]()); +expect(actual).to([NMBMatcher beNilMatcher]()); ``` To make the syntax easier to use, define a C function that calls the @@ -1597,8 +1945,8 @@ class method: ```objc // Objective-C -FOUNDATION_EXPORT NMBPredicate *beNil() { - return [NMBPredicate beNilMatcher]; +FOUNDATION_EXPORT NMBMatcher *beNil() { + return [NMBMatcher beNilMatcher]; } ``` @@ -1620,22 +1968,22 @@ expect(nil).to(equal(nil)); // fails expect(nil).to(beNil()); // passes ``` -If your matcher does not want to match with nil, you use `Predicate.define` or `Predicate.simple`. +If your matcher does not want to match with nil, you use `Matcher.define` or `Matcher.simple`. Using those factory methods will automatically generate expected value failure messages when they're nil. ```swift -public func beginWith(_ startingElement: S.Element) -> Predicate where S.Element: Equatable { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in +public func beginWith(_ startingElement: S.Element) -> Matcher where S.Element: Equatable { + return Matcher.simple("begin with <\(startingElement)>") { actualExpression in guard let actualValue = try actualExpression.evaluate() else { return .fail } var actualGenerator = actualValue.makeIterator() - return PredicateStatus(bool: actualGenerator.next() == startingElement) + return MatcherStatus(bool: actualGenerator.next() == startingElement) } } -extension NMBPredicate { - @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBMatcher { + return NMBMatcher { actualExpression in let actual = try actualExpression.evaluate() let expr = actualExpression.cast { $0 as? NMBOrderedCollection } return try beginWith(expected).satisfies(expr).toObjectiveC() @@ -1644,17 +1992,6 @@ extension NMBPredicate { } ``` -## Migrating from the Old Matcher API - -Previously (`<7.0.0`), Nimble supported matchers via the following types: - -- `Matcher` -- `NonNilMatcherFunc` -- `MatcherFunc` - -All of those types have been replaced by `Predicate`. The old API has been -removed completely in Nimble v10. - # Installing Nimble > Nimble can be used on its own, or in conjunction with its sister @@ -1682,7 +2019,7 @@ install just Nimble. ## Installing Nimble via CocoaPods -To use Nimble in CocoaPods to test your macOS, iOS or tvOS applications, add +To use Nimble in CocoaPods to test your macOS, iOS, tvOS or watchOS applications, add Nimble to your podfile and add the ```use_frameworks!``` line to enable Swift support for CocoaPods. @@ -1701,6 +2038,51 @@ end Finally run `pod install`. +## Installing Nimble via Swift Package Manager + +### Xcode + +To install Nimble via Xcode's Swift Package Manager Integration: +Select your project configuration, then the project tab, then the Package +Dependencies tab. Click on the "plus" button at the bottom of the list, +then follow the wizard to add Quick to your project. Specify +`https://github.com/Quick/Nimble.git` as the url, and be sure to add +Nimble as a dependency of your unit test target, not your app target. + +### Package.Swift + +To use Nimble with Swift Package Manager to test your applications, add Nimble +to your `Package.Swift` and link it with your test target: + +```swift +// swift-tools-version:5.5 + +import PackageDescription + +let package = Package( + name: "MyAwesomeLibrary", + products: [ + // ... + ], + dependencies: [ + // ... + .package(url: "https://github.com/Quick/Nimble.git", from: "12.0.0"), + ], + targets: [ + // Targets are the basic building blocks of a package. A target can define a module or a test suite. + // Targets can depend on other targets in this package, and on products in packages this package depends on. + .target( + name: "MyAwesomeLibrary", + dependencies: ...), + .testTarget( + name: "MyAwesomeLibraryTests", + dependencies: ["MyAwesomeLibrary", "Nimble"]), + ] +) +``` + +Please note that if you install Nimble using Swift Package Manager, then `raiseException` is not available. + ## Using Nimble without XCTest Nimble is integrated with XCTest to allow it work well when used in Xcode test @@ -1737,3 +2119,11 @@ rm "${SWIFT_STDLIB_TOOL_DESTINATION_DIR}/libswiftXCTest.dylib" You can now use Nimble assertions in your code and handle failures as you see fit. + +## Privacy Statement + +Nimble is a library that is only used for testing and should never be included +in the binary submitted to App Store Connect. + +Despite not being shipped to Apple, Nimble does not and will never collect any +kind of analytics or tracking. diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder+Async.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder+Async.swift new file mode 100644 index 0000000..8633444 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder+Async.swift @@ -0,0 +1,79 @@ +/// Allows you to temporarily replace the current Nimble assertion handler with +/// the one provided for the scope of the closure. +/// +/// Once the closure finishes, then the original Nimble assertion handler is restored. +/// +/// @warning +/// Unlike the synchronous version of this call, this does not support catching Objective-C exceptions. +/// +/// @see AssertionHandler +public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, + file: FileString = #file, + line: UInt = #line, + closure: () async throws -> Void) async { + let environment = NimbleEnvironment.activeInstance + let oldRecorder = environment.assertionHandler + _ = NMBExceptionCapture(handler: nil, finally: ({ + environment.assertionHandler = oldRecorder + })) + environment.assertionHandler = tempAssertionHandler + + do { + try await closure() + } catch { + let failureMessage = FailureMessage() + failureMessage.stringValue = "unexpected error thrown: <\(error)>" + let location = SourceLocation(file: file, line: line) + tempAssertionHandler.assert(false, message: failureMessage, location: location) + } +} + +/// Captures expectations that occur in the given closure. Note that all +/// expectations will still go through to the default Nimble handler. +/// +/// This can be useful if you want to gather information about expectations +/// that occur within a closure. +/// +/// @warning +/// Unlike the synchronous version of this call, this does not support catching Objective-C exceptions. +/// +/// @param silently expectations are no longer send to the default Nimble +/// assertion handler when this is true. Defaults to false. +/// +/// @see gatherFailingExpectations +public func gatherExpectations(silently: Bool = false, closure: () async -> Void) async -> [AssertionRecord] { + let previousRecorder = NimbleEnvironment.activeInstance.assertionHandler + let recorder = AssertionRecorder() + let handlers: [AssertionHandler] + + if silently { + handlers = [recorder] + } else { + handlers = [recorder, previousRecorder] + } + + let dispatcher = AssertionDispatcher(handlers: handlers) + await withAssertionHandler(dispatcher, closure: closure) + return recorder.assertions +} + +/// Captures failed expectations that occur in the given closure. Note that all +/// expectations will still go through to the default Nimble handler. +/// +/// This can be useful if you want to gather information about failed +/// expectations that occur within a closure. +/// +/// @warning +/// Unlike the synchronous version of this call, this does not support catching Objective-C exceptions. +/// +/// @param silently expectations are no longer send to the default Nimble +/// assertion handler when this is true. Defaults to false. +/// +/// @see gatherExpectations +/// @see raiseException source for an example use case. +public func gatherFailingExpectations(silently: Bool = false, closure: () async -> Void) async -> [AssertionRecord] { + let assertions = await gatherExpectations(silently: silently, closure: closure) + return assertions.filter { assertion in + !assertion.success + } +} diff --git a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift index ac75467..239393e 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/AssertionRecorder.swift @@ -54,6 +54,11 @@ extension NMBExceptionCapture { /// Allows you to temporarily replace the current Nimble assertion handler with /// the one provided for the scope of the closure. /// +/// @warning +/// This form of `withAssertionHandler` does not work in any kind of +/// async context. Use the async form of `withAssertionHandler` +/// if you are running tests in an async context. +/// /// Once the closure finishes, then the original Nimble assertion handler is restored. /// /// @see AssertionHandler @@ -86,6 +91,11 @@ public func withAssertionHandler(_ tempAssertionHandler: AssertionHandler, /// This can be useful if you want to gather information about expectations /// that occur within a closure. /// +/// @warning +/// This form of `gatherExpectations` does not work in any kind of +/// async context. Use the async form of `gatherExpectations` +/// if you are running tests in an async context. +/// /// @param silently expectations are no longer send to the default Nimble /// assertion handler when this is true. Defaults to false. /// @@ -112,6 +122,11 @@ public func gatherExpectations(silently: Bool = false, closure: () -> Void) -> [ /// This can be useful if you want to gather information about failed /// expectations that occur within a closure. /// +/// @warning +/// This form of `gatherFailingExpectations` does not work in any kind of +/// async context. Use the async form of `gatherFailingExpectations` +/// if you are running tests in an async context. +/// /// @param silently expectations are no longer send to the default Nimble /// assertion handler when this is true. Defaults to false. /// diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift index 6d7d9b9..44ced65 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NMBExpectation.swift @@ -1,13 +1,12 @@ #if !os(WASI) -#if canImport(Darwin) && !SWIFT_PACKAGE +#if canImport(Darwin) import class Foundation.NSObject import typealias Foundation.TimeInterval -import enum Dispatch.DispatchTimeInterval -private func from(objcPredicate: NMBPredicate) -> Predicate { - return Predicate { actualExpression in - let result = objcPredicate.satisfies(({ try actualExpression.evaluate() }), +private func from(objcMatcher: NMBMatcher) -> Matcher { + return Matcher { actualExpression in + let result = objcMatcher.satisfies(({ try actualExpression.evaluate() }), location: actualExpression.location) return result.toSwift() } @@ -19,7 +18,7 @@ public class NMBExpectation: NSObject { internal var _negative: Bool internal let _file: FileString internal let _line: UInt - internal var _timeout: DispatchTimeInterval = .seconds(1) + internal var _timeout: NimbleTimeInterval = .seconds(1) @objc public init(actualBlock: @escaping () -> NSObject?, negative: Bool, file: FileString, line: UInt) { self._actualBlock = actualBlock @@ -28,149 +27,149 @@ public class NMBExpectation: NSObject { self._line = line } - private var expectValue: Expectation { + private var expectValue: SyncExpectation { return expect(file: _file, line: _line, self._actualBlock() as NSObject?) } @objc public var withTimeout: (TimeInterval) -> NMBExpectation { - return { timeout in self._timeout = timeout.dispatchInterval + return { timeout in self._timeout = timeout.nimbleInterval return self } } - @objc public var to: (NMBPredicate) -> NMBExpectation { - return { predicate in - self.expectValue.to(from(objcPredicate: predicate)) + @objc public var to: (NMBMatcher) -> NMBExpectation { + return { matcher in + self.expectValue.to(from(objcMatcher: matcher)) return self } } - @objc public var toWithDescription: (NMBPredicate, String) -> NMBExpectation { - return { predicate, description in - self.expectValue.to(from(objcPredicate: predicate), description: description) + @objc public var toWithDescription: (NMBMatcher, String) -> NMBExpectation { + return { matcher, description in + self.expectValue.to(from(objcMatcher: matcher), description: description) return self } } - @objc public var toNot: (NMBPredicate) -> NMBExpectation { - return { predicate in - self.expectValue.toNot(from(objcPredicate: predicate)) + @objc public var toNot: (NMBMatcher) -> NMBExpectation { + return { matcher in + self.expectValue.toNot(from(objcMatcher: matcher)) return self } } - @objc public var toNotWithDescription: (NMBPredicate, String) -> NMBExpectation { - return { predicate, description in - self.expectValue.toNot(from(objcPredicate: predicate), description: description) + @objc public var toNotWithDescription: (NMBMatcher, String) -> NMBExpectation { + return { matcher, description in + self.expectValue.toNot(from(objcMatcher: matcher), description: description) return self } } - @objc public var notTo: (NMBPredicate) -> NMBExpectation { return toNot } + @objc public var notTo: (NMBMatcher) -> NMBExpectation { return toNot } - @objc public var notToWithDescription: (NMBPredicate, String) -> NMBExpectation { return toNotWithDescription } + @objc public var notToWithDescription: (NMBMatcher, String) -> NMBExpectation { return toNotWithDescription } - @objc public var toEventually: (NMBPredicate) -> Void { - return { predicate in + @objc public var toEventually: (NMBMatcher) -> Void { + return { matcher in self.expectValue.toEventually( - from(objcPredicate: predicate), + from(objcMatcher: matcher), timeout: self._timeout, description: nil ) } } - @objc public var toEventuallyWithDescription: (NMBPredicate, String) -> Void { - return { predicate, description in + @objc public var toEventuallyWithDescription: (NMBMatcher, String) -> Void { + return { matcher, description in self.expectValue.toEventually( - from(objcPredicate: predicate), + from(objcMatcher: matcher), timeout: self._timeout, description: description ) } } - @objc public var toEventuallyNot: (NMBPredicate) -> Void { - return { predicate in + @objc public var toEventuallyNot: (NMBMatcher) -> Void { + return { matcher in self.expectValue.toEventuallyNot( - from(objcPredicate: predicate), + from(objcMatcher: matcher), timeout: self._timeout, description: nil ) } } - @objc public var toEventuallyNotWithDescription: (NMBPredicate, String) -> Void { - return { predicate, description in + @objc public var toEventuallyNotWithDescription: (NMBMatcher, String) -> Void { + return { matcher, description in self.expectValue.toEventuallyNot( - from(objcPredicate: predicate), + from(objcMatcher: matcher), timeout: self._timeout, description: description ) } } - @objc public var toNotEventually: (NMBPredicate) -> Void { + @objc public var toNotEventually: (NMBMatcher) -> Void { return toEventuallyNot } - @objc public var toNotEventuallyWithDescription: (NMBPredicate, String) -> Void { + @objc public var toNotEventuallyWithDescription: (NMBMatcher, String) -> Void { return toEventuallyNotWithDescription } - @objc public var toNever: (NMBPredicate) -> Void { - return { predicate in + @objc public var toNever: (NMBMatcher) -> Void { + return { matcher in self.expectValue.toNever( - from(objcPredicate: predicate), + from(objcMatcher: matcher), until: self._timeout, description: nil ) } } - @objc public var toNeverWithDescription: (NMBPredicate, String) -> Void { - return { predicate, description in + @objc public var toNeverWithDescription: (NMBMatcher, String) -> Void { + return { matcher, description in self.expectValue.toNever( - from(objcPredicate: predicate), + from(objcMatcher: matcher), until: self._timeout, description: description ) } } - @objc public var neverTo: (NMBPredicate) -> Void { + @objc public var neverTo: (NMBMatcher) -> Void { return toNever } - @objc public var neverToWithDescription: (NMBPredicate, String) -> Void { + @objc public var neverToWithDescription: (NMBMatcher, String) -> Void { return toNeverWithDescription } - @objc public var toAlways: (NMBPredicate) -> Void { - return { predicate in + @objc public var toAlways: (NMBMatcher) -> Void { + return { matcher in self.expectValue.toAlways( - from(objcPredicate: predicate), + from(objcMatcher: matcher), until: self._timeout, description: nil ) } } - @objc public var toAlwaysWithDescription: (NMBPredicate, String) -> Void { - return { predicate, description in + @objc public var toAlwaysWithDescription: (NMBMatcher, String) -> Void { + return { matcher, description in self.expectValue.toAlways( - from(objcPredicate: predicate), + from(objcMatcher: matcher), until: self._timeout, description: description ) } } - @objc public var alwaysTo: (NMBPredicate) -> Void { + @objc public var alwaysTo: (NMBMatcher) -> Void { return toAlways } - @objc public var alwaysToWithDescription: (NMBPredicate, String) -> Void { + @objc public var alwaysToWithDescription: (NMBMatcher, String) -> Void { return toAlwaysWithDescription } diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift index d20dd31..aa515f2 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleEnvironment.swift @@ -35,6 +35,7 @@ internal class NimbleEnvironment: NSObject { } var suppressTVOSAssertionWarning: Bool = false + var suppressWatchOSAssertionWarning: Bool = false #if !os(WASI) var awaiter: Awaiter #endif diff --git a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift index 18ec18b..286ae7e 100644 --- a/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift +++ b/Pods/Nimble/Sources/Nimble/Adapters/NimbleXCTestHandler.swift @@ -35,17 +35,17 @@ class NimbleXCTestUnavailableHandler: AssertionHandler { } } -#if !SWIFT_PACKAGE +#if canImport(Darwin) /// Helper class providing access to the currently executing XCTestCase instance, if any -@objc final internal class CurrentTestCaseTracker: NSObject, XCTestObservation { - @objc static let sharedInstance = CurrentTestCaseTracker() +@objc final public class CurrentTestCaseTracker: NSObject, XCTestObservation { + @objc public static let sharedInstance = CurrentTestCaseTracker() private(set) var currentTestCase: XCTestCase? private var stashed_swift_reportFatalErrorsToDebugger: Bool = false - @objc func testCaseWillStart(_ testCase: XCTestCase) { - #if os(macOS) || os(iOS) + @objc public func testCaseWillStart(_ testCase: XCTestCase) { + #if (os(macOS) || os(iOS) || os(visionOS)) && !SWIFT_PACKAGE stashed_swift_reportFatalErrorsToDebugger = _swift_reportFatalErrorsToDebugger _swift_reportFatalErrorsToDebugger = false #endif @@ -53,10 +53,10 @@ class NimbleXCTestUnavailableHandler: AssertionHandler { currentTestCase = testCase } - @objc func testCaseDidFinish(_ testCase: XCTestCase) { + @objc public func testCaseDidFinish(_ testCase: XCTestCase) { currentTestCase = nil - #if os(macOS) || os(iOS) + #if (os(macOS) || os(iOS) || os(visionOS)) && !SWIFT_PACKAGE _swift_reportFatalErrorsToDebugger = stashed_swift_reportFatalErrorsToDebugger #endif } @@ -73,7 +73,7 @@ func isXCTestAvailable() -> Bool { } public func recordFailure(_ message: String, location: SourceLocation) { -#if SWIFT_PACKAGE +#if !canImport(Darwin) XCTFail("\(message)", file: location.file, line: location.line) #else if let testCase = CurrentTestCaseTracker.sharedInstance.currentTestCase { diff --git a/Pods/Nimble/Sources/Nimble/AsyncExpression.swift b/Pods/Nimble/Sources/Nimble/AsyncExpression.swift new file mode 100644 index 0000000..b669d5a --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/AsyncExpression.swift @@ -0,0 +1,130 @@ +// Memoizes the given closure, only calling the passed +// closure once; even if repeat calls to the returned closure +private func memoizedClosure(_ closure: @escaping () async throws -> T) -> (Bool) async throws -> T { + var cache: T? + return { withoutCaching in + if withoutCaching || cache == nil { + cache = try await closure() + } + return cache! + } +} + +/// Expression represents the closure of the value inside expect(...). +/// Expressions are memoized by default. This makes them safe to call +/// evaluate() multiple times without causing a re-evaluation of the underlying +/// closure. +/// +/// - Warning: Since the closure can be any code, Objective-C code may choose +/// to raise an exception. Currently, SyncExpression does not memoize +/// exception raising. +/// +/// This provides a common consumable API for matchers to utilize to allow +/// Nimble to change internals to how the captured closure is managed. +public struct AsyncExpression { + internal let _expression: (Bool) async throws -> Value? + internal let _withoutCaching: Bool + public let location: SourceLocation + public let isClosure: Bool + + /// Creates a new expression struct. Normally, expect(...) will manage this + /// creation process. The expression is memoized. + /// + /// - Parameter expression: The closure that produces a given value. + /// - Parameter location: The source location that this closure originates from. + /// - Parameter isClosure: A bool indicating if the captured expression is a + /// closure or internally produced closure. Some matchers + /// may require closures. For example, toEventually() + /// requires an explicit closure. This gives Nimble + /// flexibility if @autoclosure behavior changes between + /// Swift versions. Nimble internals always sets this true. + public init(expression: @escaping () async throws -> Value?, location: SourceLocation, isClosure: Bool = true) { + self._expression = memoizedClosure(expression) + self.location = location + self._withoutCaching = false + self.isClosure = isClosure + } + + /// Creates a new expression struct. Normally, expect(...) will manage this + /// creation process. + /// + /// - Parameter expression: The closure that produces a given value. + /// - Parameter location: The source location that this closure originates from. + /// - Parameter withoutCaching: Indicates if the struct should memoize the given + /// closure's result. Subsequent evaluate() calls will + /// not call the given closure if this is true. + /// - Parameter isClosure: A bool indicating if the captured expression is a + /// closure or internally produced closure. Some matchers + /// may require closures. For example, toEventually() + /// requires an explicit closure. This gives Nimble + /// flexibility if @autoclosure behavior changes between + /// Swift versions. Nimble internals always sets this true. + public init(memoizedExpression: @escaping (Bool) async throws -> Value?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { + self._expression = memoizedExpression + self.location = location + self._withoutCaching = withoutCaching + self.isClosure = isClosure + } + + /// Creates a new synchronous expression, for use in Matchers. + public func toSynchronousExpression() async -> Expression { + let value: Result + do { + value = .success(try await _expression(self._withoutCaching)) + } catch { + value = .failure(error) + } + return Expression( + memoizedExpression: { _ in try value.get() }, + location: location, + withoutCaching: false, + isClosure: isClosure + ) + } + + /// Returns a new Expression from the given expression. Identical to a map() + /// on this type. This should be used only to typecast the Expression's + /// closure value. + /// + /// The returned expression will preserve location and isClosure. + /// + /// - Parameter block: The block that can cast the current Expression value to a + /// new type. + public func cast(_ block: @escaping (Value?) throws -> U?) -> AsyncExpression { + AsyncExpression( + expression: ({ try await block(self.evaluate()) }), + location: self.location, + isClosure: self.isClosure + ) + } + + public func cast(_ block: @escaping (Value?) async throws -> U?) -> AsyncExpression { + AsyncExpression( + expression: ({ try await block(self.evaluate()) }), + location: self.location, + isClosure: self.isClosure + ) + } + + public func evaluate() async throws -> Value? { + try await self._expression(_withoutCaching) + } + + public func withoutCaching() -> AsyncExpression { + AsyncExpression( + memoizedExpression: self._expression, + location: location, + withoutCaching: true, + isClosure: isClosure + ) + } + + public func withCaching() -> AsyncExpression { + AsyncExpression( + memoizedExpression: memoizedClosure { try await self.evaluate() }, + location: self.location, + withoutCaching: false, + isClosure: isClosure + ) + } +} diff --git a/Pods/Nimble/Sources/Nimble/DSL+AsyncAwait.swift b/Pods/Nimble/Sources/Nimble/DSL+AsyncAwait.swift new file mode 100644 index 0000000..3c4c1de --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/DSL+AsyncAwait.swift @@ -0,0 +1,149 @@ +#if !os(WASI) +import Dispatch +#endif + +/// Make an ``AsyncExpectation`` on a given actual value. The value given is lazily evaluated. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @escaping () async throws -> T?) -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: () -> (() async throws -> T)) -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: () -> (() async throws -> T?)) -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: () -> (() async throws -> Void)) -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The value given is lazily evaluated. +/// This is provided to avoid confusion between `expect -> SyncExpectation` and `expect -> AsyncExpectation`. +public func expecta(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () async throws -> T?) async -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided to avoid confusion between `expect -> SyncExpectation` and `expect -> AsyncExpectation` +public func expecta(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() async throws -> T)) async -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided to avoid confusion between `expect -> SyncExpectation` and `expect -> AsyncExpectation` +public func expecta(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() async throws -> T?)) async -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make an ``AsyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided to avoid confusion between `expect -> SyncExpectation` and `expect -> AsyncExpectation` +public func expecta(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() async throws -> Void)) async -> AsyncExpectation { + return AsyncExpectation( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +#if !os(WASI) + +/// Wait asynchronously until the done closure is called or the timeout has been reached. +/// +/// @discussion +/// Call the done() closure to indicate the waiting has completed. +/// +/// @warning +/// Unlike the synchronous version of this call, this does not support catching Objective-C exceptions. +public func waitUntil(timeout: NimbleTimeInterval = PollingDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) async -> Void) async { + await throwableUntil(timeout: timeout) { done in + await action(done) + } +} + +/// Wait asynchronously until the done closure is called or the timeout has been reached. +/// +/// @discussion +/// Call the done() closure to indicate the waiting has completed. +/// +/// @warning +/// Unlike the synchronous version of this call, this does not support catching Objective-C exceptions. +public func waitUntil(timeout: NimbleTimeInterval = PollingDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) async { + await throwableUntil(timeout: timeout, file: file, line: line) { done in + action(done) + } +} + +private enum ErrorResult { + case error(Error) + case none +} + +private func throwableUntil( + timeout: NimbleTimeInterval, + file: FileString = #file, + line: UInt = #line, + action: @escaping (@escaping () -> Void) async throws -> Void) async { + let leeway = timeout.divided + let result = await performBlock( + timeoutInterval: timeout, + leeway: leeway, + file: file, line: line) { @MainActor (done: @escaping (ErrorResult) -> Void) async throws -> Void in + do { + try await action { + done(.none) + } + } catch let e { + done(.error(e)) + } + } + + switch result { + case .incomplete: internalError("Reached .incomplete state for waitUntil(...).") + case .blockedRunLoop: + fail(blockedRunLoopErrorMessageFor("-waitUntil()", leeway: leeway), + file: file, line: line) + case .timedOut: + fail("Waited more than \(timeout.description)", file: file, line: line) + case let .errorThrown(error): + fail("Unexpected error thrown: \(error)") + case .completed(.error(let error)): + fail("Unexpected error thrown: \(error)") + case .completed(.none): // success + break + } +} + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/DSL+Require.swift b/Pods/Nimble/Sources/Nimble/DSL+Require.swift new file mode 100644 index 0000000..d21c39f --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/DSL+Require.swift @@ -0,0 +1,291 @@ +/// Make a ``SyncRequirement`` on a given actual value. The value given is lazily evaluated. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () throws -> T?) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T?)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> Void)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The value given is lazily evaluated. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``. +@discardableResult +public func requires(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () throws -> T?) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``. +@discardableResult +public func requires(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``. +@discardableResult +public func requires(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T?)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make a ``SyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided as an alternative to ``require``, for when you want to be specific about whether you're using ``SyncRequirement`` or ``AsyncRequirement``. +@discardableResult +public func requires(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> Void)) -> SyncRequirement { + return SyncRequirement( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The value given is lazily evaluated. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @escaping () async throws -> T?) -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: () -> (() async throws -> T)) -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func require(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: () -> (() async throws -> T?)) -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The value given is lazily evaluated. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided to avoid confusion between `require -> SyncRequirement` and `require -> AsyncRequirement`. +@discardableResult +public func requirea(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () async throws -> T?) async -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided to avoid confusion between `require -> SyncRequirement` and `require -> AsyncRequirement` +@discardableResult +public func requirea(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() async throws -> T)) async -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +/// Make an ``AsyncRequirement`` on a given actual value. The closure is lazily invoked. +/// +/// `require` will return the result of the expression if the matcher passes, and throw an error if not. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +/// +/// This is provided to avoid confusion between `require -> SyncRequirement` and `require -> AsyncRequirement` +@discardableResult +public func requirea(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() async throws -> T?)) async -> AsyncRequirement { + return AsyncRequirement( + expression: AsyncExpression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true), + customError: customError) +} + +// MARK: - Unwrap + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toNot(beNil())`. +/// +/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrap(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () throws -> T?) throws -> T { + try requires(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toNot(beNil())`. +/// +/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrap(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T?)) throws -> T { + try requires(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toNot(beNil())`. +/// +/// `unwraps` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwraps(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () throws -> T?) throws -> T { + try requires(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toNot(beNil())`. +/// +/// `unwraps` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwraps(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() throws -> T?)) throws -> T { + try requires(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toNot(beNil())`. +/// +/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrap(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @escaping () async throws -> T?) async throws -> T { + try await requirea(file: file, line: line, customError: customError, try await expression()).toNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toNot(beNil())`. +/// +/// `unwrap` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrap(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: () -> (() async throws -> T?)) async throws -> T { + try await requirea(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toNot(beNil())`. +/// +/// `unwrapa` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrapa(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure @escaping () async throws -> T?) async throws -> T { + try await requirea(file: file, line: line, customError: customError, try await expression()).toNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toNot(beNil())`. +/// +/// `unwrapa` will return the result of the expression if it is non-nil, and throw an error if the value is nil. +/// if a `customError` is given, then that will be thrown. Otherwise, a ``RequireError`` will be thrown. +@discardableResult +public func unwrapa(file: FileString = #file, line: UInt = #line, customError: Error? = nil, _ expression: @autoclosure () -> (() async throws -> T?)) async throws -> T { + try await requirea(file: file, line: line, customError: customError, expression()).toNot(beNil()) +} diff --git a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift index a1b51c3..7fc5089 100644 --- a/Pods/Nimble/Sources/Nimble/DSL+Wait.swift +++ b/Pods/Nimble/Sources/Nimble/DSL+Wait.swift @@ -12,24 +12,23 @@ private enum ErrorResult { /// Only classes, protocols, methods, properties, and subscript declarations can be /// 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 { +public class NMBWait: NSObject { // About these kind of lines, `@objc` attributes are only required for Objective-C -// support, so that should be conditional on Darwin platforms and normal Xcode builds -// (non-SwiftPM builds). -#if canImport(Darwin) && !SWIFT_PACKAGE +// support, so that should be conditional on Darwin platforms. +#if canImport(Darwin) @objc - internal class func until( + public class func until( timeout: TimeInterval, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { - // Convert TimeInterval to DispatchTimeInterval - until(timeout: timeout.dispatchInterval, file: file, line: line, action: action) + // Convert TimeInterval to NimbleTimeInterval + until(timeout: timeout.nimbleInterval, file: file, line: line, action: action) } #endif - internal class func until( - timeout: DispatchTimeInterval, + public class func until( + timeout: NimbleTimeInterval, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { @@ -39,8 +38,8 @@ internal class NMBWait: NSObject { } // Using a throwable closure makes this method not objc compatible. - internal class func throwableUntil( - timeout: DispatchTimeInterval, + public class func throwableUntil( + timeout: NimbleTimeInterval, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) throws -> Void) { @@ -86,16 +85,16 @@ internal class NMBWait: NSObject { } } -#if canImport(Darwin) && !SWIFT_PACKAGE +#if canImport(Darwin) @objc(untilFile:line:action:) - internal class func until( + public class func until( _ file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { until(timeout: .seconds(1), file: file, line: line, action: action) } #else - internal class func until( + public class func until( _ file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { @@ -104,7 +103,7 @@ internal class NMBWait: NSObject { #endif } -internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: DispatchTimeInterval) -> String { +internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: NimbleTimeInterval) -> String { // swiftlint:disable:next line_length return "\(fnName) timed out but was unable to run the timeout handler because the main thread is unresponsive (\(leeway.description) is allow after the wait times out). Conditions that may cause this include processing blocking IO on the main thread, calls to sleep(), deadlocks, and synchronous IPC. Nimble forcefully stopped run loop which may cause future failures in test run." } @@ -116,7 +115,8 @@ internal func blockedRunLoopErrorMessageFor(_ fnName: String, leeway: DispatchTi /// /// 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: DispatchTimeInterval = AsyncDefaults.timeout, file: FileString = #file, line: UInt = #line, action: @escaping (@escaping () -> Void) -> Void) { +@available(*, noasync, message: "the sync variant of `waitUntil` does not work in async contexts. Use the async variant as a drop-in replacement") +public func waitUntil(timeout: NimbleTimeInterval = PollingDefaults.timeout, 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 4df36a4..d61ac60 100644 --- a/Pods/Nimble/Sources/Nimble/DSL.swift +++ b/Pods/Nimble/Sources/Nimble/DSL.swift @@ -1,33 +1,73 @@ -/// Make an expectation on a given actual value. The value given is lazily evaluated. -public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> Expectation { - return Expectation( +/// Make a ``SyncExpectation`` on a given actual value. The value given is lazily evaluated. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> SyncExpectation { + return SyncExpectation( expression: Expression( expression: expression, location: SourceLocation(file: file, line: line), isClosure: true)) } -/// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> Expectation { - return Expectation( +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> SyncExpectation { + return SyncExpectation( expression: Expression( expression: expression(), location: SourceLocation(file: file, line: line), isClosure: true)) } -/// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> Expectation { - return Expectation( +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> SyncExpectation { + return SyncExpectation( expression: Expression( expression: expression(), location: SourceLocation(file: file, line: line), isClosure: true)) } -/// Make an expectation on a given actual value. The closure is lazily invoked. -public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> Expectation { - return Expectation( +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +public func expect(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> SyncExpectation { + return SyncExpectation( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make a ``SyncExpectation`` on a given actual value. The value given is lazily evaluated. +/// This is provided as an alternative to `expect` which avoids overloading with `expect -> AsyncExpectation`. +public func expects(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) -> SyncExpectation { + return SyncExpectation( + expression: Expression( + expression: expression, + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided as an alternative to `expect` which avoids overloading with `expect -> AsyncExpectation`. +public func expects(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T)) -> SyncExpectation { + return SyncExpectation( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided as an alternative to `expect` which avoids overloading with `expect -> AsyncExpectation`. +public func expects(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) -> SyncExpectation { + return SyncExpectation( + expression: Expression( + expression: expression(), + location: SourceLocation(file: file, line: line), + isClosure: true)) +} + +/// Make a ``SyncExpectation`` on a given actual value. The closure is lazily invoked. +/// This is provided as an alternative to `expect` which avoids overloading with `expect -> AsyncExpectation`. +public func expects(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> Void)) -> SyncExpectation { + return SyncExpectation( expression: Expression( expression: expression(), location: SourceLocation(file: file, line: line), @@ -71,7 +111,6 @@ internal func internalError(_ msg: String, file: FileString = #file, line: UInt Please file a bug to Nimble: https://github.com/Quick/Nimble/issues with the code snippet that caused this error. """ ) - // swiftlint:enable line_length } #if canImport(Darwin) diff --git a/Pods/Nimble/Sources/Nimble/Expectation.swift b/Pods/Nimble/Sources/Nimble/Expectation.swift index e4a12fa..732e0c5 100644 --- a/Pods/Nimble/Sources/Nimble/Expectation.swift +++ b/Pods/Nimble/Sources/Nimble/Expectation.swift @@ -1,10 +1,10 @@ -internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ predicate: Predicate, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage) { +internal func execute(_ expression: Expression, _ style: ExpectationStyle, _ matcher: Matcher, 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) + let result = try matcher.satisfies(expression) result.message.update(failureMessage: msg) if msg.actualValue == "" { msg.actualValue = "<\(stringify(try expression.evaluate()))>" @@ -33,44 +33,300 @@ internal func execute(_ expression: Expression, _ style: ExpectationStyle, return result } -public struct Expectation { +internal func execute(_ expression: AsyncExpression, _ style: ExpectationStyle, _ matcher: AsyncMatcher, to: String, description: String?) async -> (Bool, FailureMessage) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let result = try await matcher.satisfies(expression) + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try await expression.evaluate()))>" + } + return (result.toBoolean(expectation: style), msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } +} + +public enum ExpectationStatus: Equatable { + + /// No matchers have been performed. + case pending + + /// All matchers have passed. + case passed + + /// All matchers have failed. + case failed - public let expression: Expression + /// Multiple matchers have been peformed, with at least one passing and one failing. + case mixed +} - public init(expression: Expression) { +extension ExpectationStatus { + /// Applies a new status to the current one to produce a combined status. + /// + /// This method is meant to advance the state from `.pending` to either `.passed` or`.failed`. + /// When called multiple times with different values, the result will be `.mixed`. + /// E.g., `status.applying(.passed).applying(.failed) == .mixed`. + func applying(_ newerStatus: ExpectationStatus) -> ExpectationStatus { + if newerStatus == .pending { return self } + if self == .pending || self == newerStatus { return newerStatus } + return .mixed + } +} + +public protocol Expectation { + var location: SourceLocation { get } + + /// The status of the test after matchers have been evaluated. + /// + /// This property can be used for changing test behavior based whether an expectation has + /// passed. + /// + /// In the below example, we perform additional tests on an array only if it has enough + /// elements. + /// + /// ``` + /// if expect(array).to(haveCount(10)).status == .passed { + /// expect(array[9]).to(...) + /// } + /// ``` + /// + /// - Remark: Similar functionality can be achieved using the `onFailure(throw:)` method. + var status: ExpectationStatus { get } + + /// Takes the result of a test and passes it to the assertion handler. + /// + /// - Returns: An updated `Expression` with the result of the test applied to the `status` + /// property. + @discardableResult + func verify(_ pass: Bool, _ message: FailureMessage) -> Self +} + +extension Expectation { + /// Throws the supplied error if the expectation has previously failed. + /// + /// This provides a mechanism for halting tests when a failure occurs. This can be used in + /// conjunction with `Quick.StopTest` to halt a test when a failure would cause subsequent test + /// code to fail. + /// + /// In the below example, the test will stop in the first line if `array.count == 5` rather + /// than crash on the second line. + /// + /// ``` + /// try expect(array).to(haveCount(10)).onFailure(throw: StopTest.silently) + /// expect(array[9]).to(...) + /// ``` + /// + /// - Warning: This method **MUST** be called after a matcher method like `to` or `not`. + /// Otherwise, this expectation will be in an indeterminate state and will + /// unconditionally log an error. + /// + /// - Remark: Similar functionality can be achieved using the `status` property. + /// - Attention: This is deprecated in favor of the `require` dsl (``require``, ``unwrap``, + /// ``pollUnwrap``), which integrates the matcher seemlessly, or, in the case of + /// `unwrap` and `pollUnwrap`, acts as a shorthand when you require that an + /// expression evaluate to some non-nil value. `onFailure` will be removed in + /// Nimble 15. + @available(*, deprecated, message: "Use the require dsl") + public func onFailure(`throw` error: Error) throws { + switch status { + case .pending: + let msg = """ + Attempted to call `Expectation.onFailure(throw:) before a matcher has been applied. + Try using `expect(...).to(...).onFailure(throw: ...`) instead. + """ + + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(false, message: .init(stringValue: msg), location: location) + case .passed: + break + case .failed, .mixed: + throw error + } + } +} + +public struct SyncExpectation: Expectation { + public let expression: Expression + + /// The status of the test after matchers have been evaluated. + /// + /// This property can be used for changing test behavior based whether an expectation has + /// passed. + /// + /// In the below example, we perform additional tests on an array only if it has enough + /// elements. + /// + /// ``` + /// if expect(array).to(haveCount(10)).status == .passed { + /// expect(array[9]).to(...) + /// } + /// ``` + /// + /// - Remark: Similar functionality can be achieved using the `onFailure(throw:)` method. + public let status: ExpectationStatus + + private init(expression: Expression, status: ExpectationStatus) { self.expression = expression + self.status = status + } + + public init(expression: Expression) { + self.init(expression: expression, status: .pending) } - public func verify(_ pass: Bool, _ message: FailureMessage) { + /// Takes the result of a test and passes it to the assertion handler. + /// + /// - Returns: An updated `Expression` with the result of the test applied to the `status` + /// property. + @discardableResult + public func verify(_ pass: Bool, _ message: FailureMessage) -> Self { let handler = NimbleEnvironment.activeInstance.assertionHandler handler.assert(pass, message: message, location: expression.location) + + return .init(expression: expression, status: status.applying(pass ? .passed : .failed)) + } + + public var location: SourceLocation { expression.location } + + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: Matcher, description: String? = nil) -> Self { + let (pass, msg) = execute(expression, .toMatch, matcher, to: "to", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: Matcher, description: String? = nil) -> Self { + let (pass, msg) = execute(expression, .toNotMatch, matcher, to: "to not", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: Matcher, description: String? = nil) -> Self { + toNot(matcher, description: description) } + // MARK: - AsyncMatchers /// Tests the actual value using a matcher to match. @discardableResult - public func to(_ predicate: Predicate, description: String? = nil) -> Self { - let (pass, msg) = execute(expression, .toMatch, predicate, to: "to", description: description) - verify(pass, msg) - return self + public func to(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + let (pass, msg) = await execute(expression.toAsyncExpression(), .toMatch, matcher, to: "to", description: description) + return verify(pass, msg) } /// Tests the actual value using a matcher to not match. @discardableResult - public func toNot(_ predicate: Predicate, description: String? = nil) -> Self { - let (pass, msg) = execute(expression, .toNotMatch, predicate, to: "to not", description: description) - verify(pass, msg) - return self + public func toNot(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + let (pass, msg) = await execute(expression.toAsyncExpression(), .toNotMatch, matcher, to: "to not", description: description) + return verify(pass, msg) } /// Tests the actual value using a matcher to not match. /// /// Alias to toNot(). @discardableResult - public func notTo(_ predicate: Predicate, description: String? = nil) -> Self { - return toNot(predicate, description: description) + public func notTo(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + await toNot(matcher, description: description) } // see: - // - `async` for extension + // - `Polling.swift` for toEventually and older-style polling-based approach to "async" // - NMBExpectation for Objective-C interface } + +public struct AsyncExpectation: Expectation { + public let expression: AsyncExpression + + /// The status of the test after matchers have been evaluated. + /// + /// This property can be used for changing test behavior based whether an expectation has + /// passed. + /// + /// In the below example, we perform additional tests on an array only if it has enough + /// elements. + /// + /// ``` + /// if expect(array).to(haveCount(10)).status == .passed { + /// expect(array[9]).to(...) + /// } + /// ``` + /// + /// - Remark: Similar functionality can be achieved using the `onFailure(throw:)` method. + public let status: ExpectationStatus + + private init(expression: AsyncExpression, status: ExpectationStatus) { + self.expression = expression + self.status = status + } + + public init(expression: AsyncExpression) { + self.init(expression: expression, status: .pending) + } + + public var location: SourceLocation { expression.location } + + /// Takes the result of a test and passes it to the assertion handler. + /// + /// - Returns: An updated `Expression` with the result of the test applied to the `status` + /// property. + @discardableResult + public func verify(_ pass: Bool, _ message: FailureMessage) -> Self { + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(pass, message: message, location: expression.location) + + return .init(expression: expression, status: status.applying(pass ? .passed : .failed)) + } + + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: Matcher, description: String? = nil) async -> Self { + let (pass, msg) = execute(await expression.toSynchronousExpression(), .toMatch, matcher, to: "to", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: Matcher, description: String? = nil) async -> Self { + let (pass, msg) = execute(await expression.toSynchronousExpression(), .toNotMatch, matcher, to: "to not", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: Matcher, description: String? = nil) async -> Self { + await toNot(matcher, description: description) + } + + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + let (pass, msg) = await execute(expression, .toMatch, matcher, to: "to", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + let (pass, msg) = await execute(expression, .toNotMatch, matcher, to: "to not", description: description) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: AsyncMatcher, description: String? = nil) async -> Self { + await toNot(matcher, description: description) + } +} diff --git a/Pods/Nimble/Sources/Nimble/Expression.swift b/Pods/Nimble/Sources/Nimble/Expression.swift index ecef26f..1bab44f 100644 --- a/Pods/Nimble/Sources/Nimble/Expression.swift +++ b/Pods/Nimble/Sources/Nimble/Expression.swift @@ -1,6 +1,6 @@ // Memoizes the given closure, only calling the passed // closure once; even if repeat calls to the returned closure -internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { +private func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) throws -> T { var cache: T? return { withoutCaching in if withoutCaching || cache == nil { @@ -15,14 +15,14 @@ internal func memoizedClosure(_ closure: @escaping () throws -> T) -> (Bool) /// evaluate() multiple times without causing a re-evaluation of the underlying /// closure. /// -/// @warning Since the closure can be any code, Objective-C code may choose -/// to raise an exception. Currently, Expression does not memoize +/// - Warning: Since the closure can be any code, Objective-C code may choose +/// to raise an exception. Currently, SyncExpression does not memoize /// exception raising. /// /// This provides a common consumable API for matchers to utilize to allow /// Nimble to change internals to how the captured closure is managed. -public struct Expression { - internal let _expression: (Bool) throws -> T? +public struct Expression { + internal let _expression: (Bool) throws -> Value? internal let _withoutCaching: Bool public let location: SourceLocation public let isClosure: Bool @@ -30,15 +30,15 @@ public struct Expression { /// Creates a new expression struct. Normally, expect(...) will manage this /// creation process. The expression is memoized. /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param isClosure A bool indicating if the captured expression is a + /// - Parameter expression: The closure that produces a given value. + /// - Parameter location: The source location that this closure originates from. + /// - Parameter isClosure: A bool indicating if the captured expression is a /// closure or internally produced closure. Some matchers /// may require closures. For example, toEventually() /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(expression: @escaping () throws -> T?, location: SourceLocation, isClosure: Bool = true) { + public init(expression: @escaping () throws -> Value?, location: SourceLocation, isClosure: Bool = true) { self._expression = memoizedClosure(expression) self.location = location self._withoutCaching = false @@ -48,18 +48,18 @@ public struct Expression { /// Creates a new expression struct. Normally, expect(...) will manage this /// creation process. /// - /// @param expression The closure that produces a given value. - /// @param location The source location that this closure originates from. - /// @param withoutCaching Indicates if the struct should memoize the given + /// - Parameter expression: The closure that produces a given value. + /// - Parameter location: The source location that this closure originates from. + /// - Parameter withoutCaching: Indicates if the struct should memoize the given /// closure's result. Subsequent evaluate() calls will /// not call the given closure if this is true. - /// @param isClosure A bool indicating if the captured expression is a + /// - Parameter isClosure: A bool indicating if the captured expression is a /// closure or internally produced closure. Some matchers /// may require closures. For example, toEventually() /// requires an explicit closure. This gives Nimble /// flexibility if @autoclosure behavior changes between /// Swift versions. Nimble internals always sets this true. - public init(memoizedExpression: @escaping (Bool) throws -> T?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { + public init(memoizedExpression: @escaping (Bool) throws -> Value?, location: SourceLocation, withoutCaching: Bool, isClosure: Bool = true) { self._expression = memoizedExpression self.location = location self._withoutCaching = withoutCaching @@ -72,26 +72,44 @@ public struct Expression { /// /// The returned expression will preserve location and isClosure. /// - /// @param block The block that can cast the current Expression value to a + /// - Parameter 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( + public func cast(_ block: @escaping (Value?) throws -> U?) -> Expression { + Expression( expression: ({ try block(self.evaluate()) }), location: self.location, isClosure: self.isClosure ) } - public func evaluate() throws -> T? { - return try self._expression(_withoutCaching) + public func evaluate() throws -> Value? { + try self._expression(_withoutCaching) } - public func withoutCaching() -> Expression { - return Expression( + public func withoutCaching() -> Expression { + Expression( memoizedExpression: self._expression, location: location, withoutCaching: true, isClosure: isClosure ) } + + public func withCaching() -> Expression { + Expression( + memoizedExpression: memoizedClosure { try self.evaluate() }, + location: self.location, + withoutCaching: false, + isClosure: isClosure + ) + } + + public func toAsyncExpression() -> AsyncExpression { + AsyncExpression( + memoizedExpression: { @MainActor memoize in try _expression(memoize) }, + location: location, + withoutCaching: _withoutCaching, + isClosure: isClosure + ) + } } diff --git a/Pods/Nimble/Sources/Nimble/FailureMessage.swift b/Pods/Nimble/Sources/Nimble/FailureMessage.swift index 2bc57eb..8b60b9c 100644 --- a/Pods/Nimble/Sources/Nimble/FailureMessage.swift +++ b/Pods/Nimble/Sources/Nimble/FailureMessage.swift @@ -56,7 +56,7 @@ public class FailureMessage: NSObject { value = stripNewlines(value) if let extendedMessage = extendedMessage { - value += "\n\(stripNewlines(extendedMessage))" + value += "\n\(extendedMessage)" } if let userDescription = userDescription { diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift index 104fc9f..133c21e 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/AllPass.swift @@ -1,36 +1,36 @@ public func allPass( _ passFunc: @escaping (S.Element) throws -> Bool -) -> Predicate { - let matcher = Predicate.define("pass a condition") { actualExpression, message in +) -> Matcher { + let matcher = Matcher.define("pass a condition") { actualExpression, message in guard let actual = try actualExpression.evaluate() else { - return PredicateResult(status: .fail, message: message) + return MatcherResult(status: .fail, message: message) } - return PredicateResult(bool: try passFunc(actual), message: message) + return MatcherResult(bool: try passFunc(actual), message: message) } - return createPredicate(matcher) + return createMatcher(matcher) } public func allPass( _ passName: String, _ passFunc: @escaping (S.Element) throws -> Bool -) -> Predicate { - let matcher = Predicate.define(passName) { actualExpression, message in +) -> Matcher { + let matcher = Matcher.define(passName) { actualExpression, message in guard let actual = try actualExpression.evaluate() else { - return PredicateResult(status: .fail, message: message) + return MatcherResult(status: .fail, message: message) } - return PredicateResult(bool: try passFunc(actual), message: message) + return MatcherResult(bool: try passFunc(actual), message: message) } - return createPredicate(matcher) + return createMatcher(matcher) } -public func allPass(_ elementPredicate: Predicate) -> Predicate { - return createPredicate(elementPredicate) +public func allPass(_ elementMatcher: Matcher) -> Matcher { + return createMatcher(elementMatcher) } -private func createPredicate(_ elementMatcher: Predicate) -> Predicate { - return Predicate { actualExpression in +private func createMatcher(_ elementMatcher: Matcher) -> Matcher { + return Matcher { actualExpression in guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( + return MatcherResult( status: .fail, message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") ) @@ -42,24 +42,24 @@ private func createPredicate(_ elementMatcher: Predicate expression: { currentElement }, location: actualExpression.location ) - let predicateResult = try elementMatcher.satisfies(exp) - if predicateResult.status == .matches { - failure = predicateResult.message.prepended(expectation: "all ") + let matcherResult = try elementMatcher.satisfies(exp) + if matcherResult.status == .matches { + failure = matcherResult.message.prepended(expectation: "all ") } else { - failure = predicateResult.message + failure = matcherResult.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) + return MatcherResult(status: .doesNotMatch, message: failure) } } failure = failure.replacedExpectation({ expectation in return .expectedTo(expectation.expectedMessage) }) - return PredicateResult(status: .matches, message: failure) + return MatcherResult(status: .matches, message: failure) } } @@ -68,9 +68,9 @@ import class Foundation.NSObject import struct Foundation.NSFastEnumerationIterator import protocol Foundation.NSFastEnumeration -extension NMBPredicate { - @objc public class func allPassMatcher(_ predicate: NMBPredicate) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func allPassMatcher(_ matcher: NMBMatcher) -> NMBMatcher { + return NMBMatcher { actualExpression in let location = actualExpression.location let actualValue = try actualExpression.evaluate() var nsObjects = [NSObject]() @@ -91,8 +91,8 @@ extension NMBPredicate { } if !collectionIsUsable { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, + return NMBMatcherResult( + status: NMBMatcherStatus.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")>" @@ -101,8 +101,8 @@ extension NMBPredicate { } let expr = Expression(expression: ({ nsObjects }), location: location) - let pred: Predicate<[NSObject]> = createPredicate(Predicate { expr in - return predicate.satisfies(({ try expr.evaluate() }), location: expr.location).toSwift() + let pred: Matcher<[NSObject]> = createMatcher(Matcher { expr in + return matcher.satisfies(({ try expr.evaluate() }), location: expr.location).toSwift() }) return try pred.satisfies(expr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Async.swift b/Pods/Nimble/Sources/Nimble/Matchers/Async.swift deleted file mode 100644 index 2f86e32..0000000 --- a/Pods/Nimble/Sources/Nimble/Matchers/Async.swift +++ /dev/null @@ -1,232 +0,0 @@ -#if !os(WASI) - -import Foundation -import Dispatch - -/// If you are running on a slower machine, it could be useful to increase the default timeout value -/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. -public struct AsyncDefaults { - public static var timeout: DispatchTimeInterval = .seconds(1) - public static var pollInterval: DispatchTimeInterval = .milliseconds(10) -} - -private enum AsyncMatchStyle { - case eventually, never, always -} - -// swiftlint:disable:next function_parameter_count -private func async( - style: ExpectationStyle, - matchStyle: AsyncMatchStyle, - predicate: Predicate, - timeout: DispatchTimeInterval, - poll: DispatchTimeInterval, - fnName: String -) -> Predicate { - return Predicate { actualExpression in - let uncachedExpression = actualExpression.withoutCaching() - let fnName = "expect(...).\(fnName)(...)" - var lastPredicateResult: PredicateResult? - let result = pollBlock( - pollInterval: poll, - timeoutInterval: timeout, - file: actualExpression.location.file, - line: actualExpression.location.line, - fnName: fnName) { - lastPredicateResult = try predicate.satisfies(uncachedExpression) - return lastPredicateResult!.toBoolean(expectation: style) - } - switch result { - case .completed: - switch matchStyle { - case .eventually: - return lastPredicateResult! - case .never: - return PredicateResult( - status: .fail, - message: lastPredicateResult?.message ?? .fail("matched the predicate when it shouldn't have") - ) - case .always: - return PredicateResult( - status: .fail, - message: lastPredicateResult?.message ?? .fail("didn't match the predicate when it should have") - ) - } - case .timedOut: - switch matchStyle { - case .eventually: - let message = lastPredicateResult?.message ?? .fail("timed out before returning a value") - return PredicateResult(status: .fail, message: message) - case .never: - return PredicateResult(status: .doesNotMatch, message: .expectedTo("never match the predicate")) - case .always: - return PredicateResult(status: .matches, message: .expectedTo("always match the predicate")) - } - case let .errorThrown(error): - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) - case let .raisedException(exception): - return PredicateResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) - case .blockedRunLoop: - let message = lastPredicateResult?.message.appended(message: " (timed out, but main run loop was unresponsive).") ?? - .fail("main run loop was unresponsive") - return PredicateResult(status: .fail, message: message) - case .incomplete: - internalError("Reached .incomplete state for \(fnName)(...).") - } - } -} - -private let toEventuallyRequiresClosureError = FailureMessage( - stringValue: """ - expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) ) - Swift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function - """ -) - -extension Expectation { - /// Tests the actual value using a matcher to match by checking continuously - /// at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventually(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toMatch, - async( - style: .toMatch, - matchStyle: .eventually, - predicate: predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventually" - ), - to: "to eventually", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toEventuallyNot(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toNotMatch, - async( - style: .toNotMatch, - matchStyle: .eventually, - predicate: predicate, - timeout: timeout, - poll: pollInterval, - fnName: "toEventuallyNot" - ), - to: "to eventually not", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to not match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toEventuallyNot() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNotEventually(_ predicate: Predicate, timeout: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - return toEventuallyNot(predicate, timeout: timeout, pollInterval: pollInterval, description: description) - } - - /// Tests the actual value using a matcher to never match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toNever(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toNotMatch, - async( - style: .toMatch, - matchStyle: .never, - predicate: predicate, - timeout: until, - poll: pollInterval, - fnName: "toNever" - ), - to: "to never", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to never match by checking - /// continuously at each pollInterval until the timeout is reached. - /// - /// Alias of toNever() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func neverTo(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - return toNever(predicate, until: until, pollInterval: pollInterval, description: description) - } - - /// Tests the actual value using a matcher to always match by checking - /// continusouly at each pollInterval until the timeout is reached - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func toAlways(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) - - let (pass, msg) = execute( - expression, - .toMatch, - async( - style: .toNotMatch, - matchStyle: .always, - predicate: predicate, - timeout: until, - poll: pollInterval, - fnName: "toAlways" - ), - to: "to always", - description: description, - captureExceptions: false - ) - verify(pass, msg) - } - - /// Tests the actual value using a matcher to always match by checking - /// continusouly at each pollInterval until the timeout is reached - /// - /// Alias of toAlways() - /// - /// @discussion - /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function - /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. - public func alwaysTo(_ predicate: Predicate, until: DispatchTimeInterval = AsyncDefaults.timeout, pollInterval: DispatchTimeInterval = AsyncDefaults.pollInterval, description: String? = nil) { - return toAlways(predicate, until: until, pollInterval: pollInterval, description: description) - } -} - -#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AsyncAllPass.swift b/Pods/Nimble/Sources/Nimble/Matchers/AsyncAllPass.swift new file mode 100644 index 0000000..ec04f9e --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/AsyncAllPass.swift @@ -0,0 +1,64 @@ +public func allPass( + _ passFunc: @escaping (S.Element) async throws -> Bool +) -> AsyncMatcher { + let matcher = AsyncMatcher.define("pass a condition") { actualExpression, message in + guard let actual = try await actualExpression.evaluate() else { + return MatcherResult(status: .fail, message: message) + } + return MatcherResult(bool: try await passFunc(actual), message: message) + } + return createMatcher(matcher) +} + +public func allPass( + _ passName: String, + _ passFunc: @escaping (S.Element) async throws -> Bool +) -> AsyncMatcher { + let matcher = AsyncMatcher.define(passName) { actualExpression, message in + guard let actual = try await actualExpression.evaluate() else { + return MatcherResult(status: .fail, message: message) + } + return MatcherResult(bool: try await passFunc(actual), message: message) + } + return createMatcher(matcher) +} + +public func allPass(_ elementMatcher: AsyncMatcher) -> AsyncMatcher { + return createMatcher(elementMatcher) +} + +private func createMatcher(_ elementMatcher: AsyncMatcher) -> AsyncMatcher { + return AsyncMatcher { actualExpression in + guard let actualValue = try await actualExpression.evaluate() else { + return MatcherResult( + status: .fail, + message: .appends(.expectedTo("all pass"), " (use beNil() to match nils)") + ) + } + + var failure: ExpectationMessage = .expectedTo("all pass") + for currentElement in actualValue { + let exp = AsyncExpression( + expression: { currentElement }, + location: actualExpression.location + ) + let matcherResult = try await elementMatcher.satisfies(exp) + if matcherResult.status == .matches { + failure = matcherResult.message.prepended(expectation: "all ") + } else { + failure = matcherResult.message + .replacedExpectation({ .expectedTo($0.expectedMessage) }) + .wrappedExpectation( + before: "all ", + after: ", but failed first at element <\(stringify(currentElement))>" + + " in <\(stringify(actualValue))>" + ) + return MatcherResult(status: .doesNotMatch, message: failure) + } + } + failure = failure.replacedExpectation({ expectation in + return .expectedTo(expectation.expectedMessage) + }) + return MatcherResult(status: .matches, message: failure) + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcher.swift b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcher.swift new file mode 100644 index 0000000..96b118a --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/AsyncMatcher.swift @@ -0,0 +1,118 @@ +public protocol AsyncableMatcher { + associatedtype Value + func satisfies(_ expression: AsyncExpression) async throws -> MatcherResult +} + +extension Matcher: AsyncableMatcher { + public func satisfies(_ expression: AsyncExpression) async throws -> MatcherResult { + try satisfies(await expression.toSynchronousExpression()) + } +} + +/// An AsyncMatcher 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 Matcher. +/// +/// The Matcher provide the heavy lifting on how to assert against a given value. Internally, +/// matchers are simple wrappers around closures to provide static type information and +/// allow composition and wrapping of existing behaviors. +/// +/// `AsyncMatcher`s serve to allow writing matchers that must be run in async contexts. +/// These can also be used with either `Expectation`s or `AsyncExpectation`s. +/// But these can only be used from async contexts, and are unavailable in Objective-C. +/// You can, however, call regular Matchers from an AsyncMatcher, if you wish to compose one like that. +public struct AsyncMatcher: AsyncableMatcher { + fileprivate var matcher: (AsyncExpression) async throws -> MatcherResult + + public init(_ matcher: @escaping (AsyncExpression) async throws -> MatcherResult) { + self.matcher = matcher + } + + /// Uses a matcher on a given value to see if it passes the matcher. + /// + /// @param expression The value to run the matcher's logic against + /// @returns A matcher result indicate passing or failing and an associated error message. + public func satisfies(_ expression: AsyncExpression) async throws -> MatcherResult { + return try await matcher(expression) + } +} + +@available(*, deprecated, renamed: "AsyncMatcher") +public typealias AsyncPredicate = AsyncMatcher + +/// Provides convenience helpers to defining matchers +extension AsyncMatcher { + /// Like Matcher() constructor, but automatically guard against nil (actual) values + public static func define(matcher: @escaping (AsyncExpression) async throws -> MatcherResult) -> AsyncMatcher { + return AsyncMatcher { actual in + return try await matcher(actual) + }.requireNonNil + } + + /// Defines a matcher with a default message that can be returned in the closure + /// Also ensures the matcher's actual value cannot pass with `nil` given. + public static func define(_ message: String = "match", matcher: @escaping (AsyncExpression, ExpectationMessage) async throws -> MatcherResult) -> AsyncMatcher { + return AsyncMatcher { actual in + return try await matcher(actual, .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Defines a matcher with a default message that can be returned in the closure + /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. + public static func defineNilable(_ message: String = "match", matcher: @escaping (AsyncExpression, ExpectationMessage) async throws -> MatcherResult) -> AsyncMatcher { + return AsyncMatcher { actual in + return try await matcher(actual, .expectedActualValueTo(message)) + } + } + + /// Provides a simple matcher definition that provides no control over the predefined + /// error message. + /// + /// Also ensures the matcher's actual value cannot pass with `nil` given. + public static func simple(_ message: String = "match", matcher: @escaping (AsyncExpression) async throws -> MatcherStatus) -> AsyncMatcher { + return AsyncMatcher { actual in + return MatcherResult(status: try await matcher(actual), message: .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Provides a simple matcher definition that provides no control over the predefined + /// error message. + /// + /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. + public static func simpleNilable(_ message: String = "match", matcher: @escaping (AsyncExpression) async throws -> MatcherStatus) -> AsyncMatcher { + return AsyncMatcher { actual in + return MatcherResult(status: try await matcher(actual), message: .expectedActualValueTo(message)) + } + } +} + +extension AsyncMatcher { + // Someday, make this public? Needs documentation + internal func after(f: @escaping (AsyncExpression, MatcherResult) async throws -> MatcherResult) -> AsyncMatcher { + // swiftlint:disable:previous identifier_name + return AsyncMatcher { actual -> MatcherResult in + let result = try await self.satisfies(actual) + return try await f(actual, result) + } + } + + /// Returns a new Matcher based on the current one that always fails if nil is given as + /// the actual value. + public var requireNonNil: AsyncMatcher { + return after { actual, result in + if try await actual.evaluate() == nil { + return MatcherResult( + status: .fail, + message: result.message.appendedBeNilHint() + ) + } + return result + } + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift index f01ca77..6b010ec 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAKindOf.swift @@ -6,21 +6,21 @@ private func matcherMessage(forClass expectedClass: AnyClass) -> String { } /// 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 +public func beAKindOf(_ expectedType: T.Type) -> Matcher { + return Matcher.define { actualExpression in let message: ExpectationMessage let instance = try actualExpression.evaluate() guard let validInstance = instance else { message = .expectedCustomValueTo(matcherMessage(forType: expectedType), actual: "") - return PredicateResult(status: .fail, message: message) + return MatcherResult(status: .fail, message: message) } message = .expectedCustomValueTo( "be a kind of \(String(describing: expectedType))", actual: "<\(String(describing: type(of: validInstance))) instance>" ) - return PredicateResult( + return MatcherResult( bool: validInstance is T, message: message ) @@ -32,14 +32,14 @@ import class Foundation.NSObject /// A Nimble matcher that succeeds when the actual value is an instance of the given class. /// @see beAnInstanceOf if you want to match against the exact class -public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { - return Predicate.define { actualExpression in +public func beAKindOf(_ expectedClass: AnyClass) -> Matcher { + return Matcher.define { actualExpression in let message: ExpectationMessage - let status: PredicateStatus + let status: MatcherStatus let instance = try actualExpression.evaluate() if let validInstance = instance { - status = PredicateStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) + status = MatcherStatus(bool: instance != nil && instance!.isKind(of: expectedClass)) message = .expectedCustomValueTo( matcherMessage(forClass: expectedClass), actual: "<\(String(describing: type(of: validInstance))) instance>" @@ -52,13 +52,13 @@ public func beAKindOf(_ expectedClass: AnyClass) -> Predicate { ) } - return PredicateResult(status: status, message: message) + return MatcherResult(status: status, message: message) } } -extension NMBPredicate { - @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beAKindOfMatcher(_ expected: AnyClass) -> NMBMatcher { + return NMBMatcher { actualExpression in return try beAKindOf(expected).satisfies(actualExpression).toObjectiveC() } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift index 47ea663..d8a1311 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeAnInstanceOf.swift @@ -1,12 +1,12 @@ import Foundation /// A Nimble matcher that succeeds when the actual value is an _exact_ instance of the given class. -public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { +public func beAnInstanceOf(_ expectedType: T.Type) -> Matcher { let errorMessage = "be an instance of \(String(describing: expectedType))" - return Predicate.define { actualExpression in + return Matcher.define { actualExpression in let instance = try actualExpression.evaluate() guard let validInstance = instance else { - return PredicateResult( + return MatcherResult( status: .doesNotMatch, message: .expectedActualValueTo(errorMessage) ) @@ -14,8 +14,8 @@ public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { let actualString = "<\(String(describing: type(of: validInstance))) instance>" - return PredicateResult( - status: PredicateStatus(bool: type(of: validInstance) == expectedType), + return MatcherResult( + status: MatcherStatus(bool: type(of: validInstance) == expectedType), message: .expectedCustomValueTo(errorMessage, actual: actualString) ) } @@ -23,9 +23,9 @@ public func beAnInstanceOf(_ expectedType: T.Type) -> Predicate { /// 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) -> Predicate { +public func beAnInstanceOf(_ expectedClass: AnyClass) -> Matcher { let errorMessage = "be an instance of \(String(describing: expectedClass))" - return Predicate.define { actualExpression in + return Matcher.define { actualExpression in let instance = try actualExpression.evaluate() let actualString: String if let validInstance = instance { @@ -38,17 +38,17 @@ public func beAnInstanceOf(_ expectedClass: AnyClass) -> Predicate { #else let matches = instance != nil && type(of: instance!) == expectedClass #endif - return PredicateResult( - status: PredicateStatus(bool: matches), + return MatcherResult( + status: MatcherStatus(bool: matches), message: .expectedCustomValueTo(errorMessage, actual: actualString) ) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beAnInstanceOfMatcher(_ expected: AnyClass) -> NMBMatcher { + return NMBMatcher { actualExpression in return try beAnInstanceOf(expected).satisfies(actualExpression).toObjectiveC() } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift index e7fd2d1..36dc0e0 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeCloseTo.swift @@ -9,9 +9,9 @@ internal func isCloseTo( _ actualValue: Value?, expectedValue: Value, delta: Value -) -> PredicateResult { +) -> MatcherResult { let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - return PredicateResult( + return MatcherResult( bool: actualValue != nil && abs(actualValue! - expectedValue) < delta, message: .expectedCustomValueTo(errorMessage, actual: "<\(stringify(actualValue))>") @@ -22,9 +22,9 @@ internal func isCloseTo( _ actualValue: NMBDoubleConvertible?, expectedValue: NMBDoubleConvertible, delta: Double -) -> PredicateResult { +) -> MatcherResult { let errorMessage = "be close to <\(stringify(expectedValue))> (within \(stringify(delta)))" - return PredicateResult( + return MatcherResult( bool: actualValue != nil && abs(actualValue!.doubleValue - expectedValue.doubleValue) < delta, message: .expectedCustomValueTo(errorMessage, actual: "<\(stringify(actualValue))>") @@ -38,8 +38,8 @@ internal func isCloseTo( public func beCloseTo( _ expectedValue: Value, within delta: Value = defaultDelta() -) -> Predicate { - return Predicate.define { actualExpression in +) -> Matcher { + return Matcher.define { actualExpression in return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } @@ -51,8 +51,8 @@ public func beCloseTo( public func beCloseTo( _ expectedValue: Value, within delta: Double = DefaultDelta -) -> Predicate { - return Predicate.define { actualExpression in +) -> Matcher { + return Matcher.define { actualExpression in return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } @@ -60,38 +60,38 @@ public func beCloseTo( private func beCloseTo( _ expectedValue: NMBDoubleConvertible, within delta: Double = DefaultDelta -) -> Predicate { - return Predicate.define { actualExpression in +) -> Matcher { + return Matcher.define { actualExpression in return isCloseTo(try actualExpression.evaluate(), expectedValue: expectedValue, delta: delta) } } #if canImport(Darwin) -public class NMBObjCBeCloseToPredicate: NMBPredicate { +public class NMBObjCBeCloseToMatcher: NMBMatcher { private let _expected: NSNumber fileprivate init(expected: NSNumber, within: CDouble) { _expected = expected - let predicate = beCloseTo(expected, within: within) - let predicateBlock: PredicateBlock = { actualExpression in + let matcher = beCloseTo(expected, within: within) + let matcherBlock: MatcherBlock = { actualExpression in let expr = actualExpression.cast { $0 as? NMBDoubleConvertible } - return try predicate.satisfies(expr).toObjectiveC() + return try matcher.satisfies(expr).toObjectiveC() } - super.init(predicate: predicateBlock) + super.init(matcher: matcherBlock) } - @objc public var within: (CDouble) -> NMBObjCBeCloseToPredicate { + @objc public var within: (CDouble) -> NMBObjCBeCloseToMatcher { let expected = _expected return { delta in - return NMBObjCBeCloseToPredicate(expected: expected, within: delta) + return NMBObjCBeCloseToMatcher(expected: expected, within: delta) } } } -extension NMBPredicate { - @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToPredicate { - return NMBObjCBeCloseToPredicate(expected: expected, within: within) +extension NMBMatcher { + @objc public class func beCloseToMatcher(_ expected: NSNumber, within: CDouble) -> NMBObjCBeCloseToMatcher { + return NMBObjCBeCloseToMatcher(expected: expected, within: within) } } #endif @@ -99,9 +99,9 @@ extension NMBPredicate { public func beCloseTo( _ expectedValues: Values, within delta: Value = defaultDelta() -) -> Predicate where Values.Element == Value { +) -> Matcher where Values.Element == Value { let errorMessage = "be close to <\(stringify(expectedValues))> (each within \(stringify(delta)))" - return Predicate.simple(errorMessage) { actualExpression in + return Matcher.simple(errorMessage) { actualExpression in guard let actualValues = try actualExpression.evaluate() else { return .doesNotMatch } @@ -110,10 +110,8 @@ public func beCloseTo( return .doesNotMatch } - for index in actualValues.indices { - if abs(actualValues[index] - expectedValues[index]) > delta { - return .doesNotMatch - } + for index in actualValues.indices where abs(actualValues[index] - expectedValues[index]) > delta { + return .doesNotMatch } return .matches } @@ -123,43 +121,61 @@ public func beCloseTo( infix operator ≈ : ComparisonPrecedence -extension Expectation where T: Collection, T.Element: FloatingPoint { - // swiftlint:disable:next identifier_name - public static func ≈(lhs: Expectation, rhs: T) { - lhs.to(beCloseTo(rhs)) - } +// swiftlint:disable identifier_name +public func ≈ (lhs: SyncExpectation, rhs: Value) where Value: Collection, Value.Element: FloatingPoint { + lhs.to(beCloseTo(rhs)) } -extension Expectation where T: FloatingPoint { - // swiftlint:disable:next identifier_name - public static func ≈(lhs: Expectation, rhs: T) { - lhs.to(beCloseTo(rhs)) - } +public func ≈ (lhs: AsyncExpectation, rhs: Value) async where Value: Collection, Value.Element: FloatingPoint { + await lhs.to(beCloseTo(rhs)) +} - // swiftlint:disable:next identifier_name - public static func ≈(lhs: Expectation, rhs: (expected: T, delta: T)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) - } +public func ≈ (lhs: SyncExpectation, rhs: Value) { + lhs.to(beCloseTo(rhs)) +} - public static func == (lhs: Expectation, rhs: (expected: T, delta: T)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) - } +public func ≈ (lhs: AsyncExpectation, rhs: Value) async { + await lhs.to(beCloseTo(rhs)) } -extension Expectation where T: NMBDoubleConvertible { - // swiftlint:disable:next identifier_name - public static func ≈(lhs: Expectation, rhs: T) { - lhs.to(beCloseTo(rhs)) - } +public func ≈ (lhs: SyncExpectation, rhs: (expected: Value, delta: Value)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} - // swiftlint:disable:next identifier_name - public static func ≈(lhs: Expectation, rhs: (expected: T, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) - } +public func ≈ (lhs: AsyncExpectation, rhs: (expected: Value, delta: Value)) async { + await lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} - public static func == (lhs: Expectation, rhs: (expected: T, delta: Double)) { - lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) - } +public func == (lhs: SyncExpectation, rhs: (expected: Value, delta: Value)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func == (lhs: AsyncExpectation, rhs: (expected: Value, delta: Value)) async { + await lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func ≈ (lhs: SyncExpectation, rhs: Value) { + lhs.to(beCloseTo(rhs)) +} + +public func ≈ (lhs: AsyncExpectation, rhs: Value) async { + await lhs.to(beCloseTo(rhs)) +} + +public func ≈ (lhs: SyncExpectation, rhs: (expected: Value, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func ≈ (lhs: AsyncExpectation, rhs: (expected: Value, delta: Double)) async { + await lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func == (lhs: SyncExpectation, rhs: (expected: Value, delta: Double)) { + lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) +} + +public func == (lhs: AsyncExpectation, rhs: (expected: Value, delta: Double)) async { + await lhs.to(beCloseTo(rhs.expected, within: rhs.delta)) } // make this higher precedence than exponents so the Doubles either end aren't pulled in @@ -169,11 +185,11 @@ precedencegroup PlusMinusOperatorPrecedence { } infix operator ± : PlusMinusOperatorPrecedence -// swiftlint:disable:next identifier_name -public func ±(lhs: Value, rhs: Value) -> (expected: Value, delta: Value) { +public func ± (lhs: Value, rhs: Value) -> (expected: Value, delta: Value) { return (expected: lhs, delta: rhs) } -// swiftlint:disable:next identifier_name -public func ±(lhs: Value, rhs: Double) -> (expected: Value, delta: Double) { +public func ± (lhs: Value, rhs: Double) -> (expected: Value, delta: Double) { return (expected: lhs, delta: rhs) } + +// swiftlint:enable identifier_name diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift index 4036471..571797c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeEmpty.swift @@ -2,48 +2,48 @@ import Foundation /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } var generator = actual.makeIterator() - return PredicateStatus(bool: generator.next() == nil) + return MatcherStatus(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() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.isEmpty) + return MatcherStatus(bool: actual.isEmpty) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.isEmpty) + return MatcherStatus(bool: actual.isEmpty) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.isEmpty) + return MatcherStatus(bool: actual.isEmpty) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For NSString instances, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.length == 0) + return MatcherStatus(bool: actual.length == 0) } } @@ -52,35 +52,35 @@ public func beEmpty() -> Predicate { /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.count == 0) + return MatcherStatus(bool: actual.count == 0) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.count == 0) + return MatcherStatus(bool: actual.count == 0) } } /// A Nimble matcher that succeeds when a value is "empty". For collections, this /// means the are no items in that collection. For strings, it is an empty string. -public func beEmpty() -> Predicate { - return Predicate.simple("be empty") { actualExpression in +public func beEmpty() -> Matcher { + return Matcher.simple("be empty") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.count == 0) + return MatcherStatus(bool: actual.count == 0) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func beEmptyMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beEmptyMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in let location = actualExpression.location let actualValue = try actualExpression.evaluate() @@ -92,16 +92,16 @@ extension NMBPredicate { return try beEmpty().satisfies(expr).toObjectiveC() } else if let actualValue = actualValue { let badTypeErrorMsg = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" - return NMBPredicateResult( - status: NMBPredicateStatus.fail, + return NMBMatcherResult( + status: NMBMatcherStatus.fail, message: NMBExpectationMessage( expectedActualValueTo: badTypeErrorMsg, customActualValue: "\(String(describing: type(of: actualValue))) type" ) ) } - return NMBPredicateResult( - status: NMBPredicateStatus.fail, + return NMBMatcherResult( + status: NMBMatcherStatus.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 a8d1212..dc96d58 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThan.swift @@ -1,38 +1,46 @@ /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: T?) -> Predicate { +public func beGreaterThan(_ expectedValue: T?) -> Matcher { let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in + return Matcher.simple(errorMessage) { actualExpression in guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } - return PredicateStatus(bool: actual > expected) + return MatcherStatus(bool: actual > expected) } } -public func >(lhs: Expectation, rhs: T) { +public func > (lhs: SyncExpectation, rhs: T) { lhs.to(beGreaterThan(rhs)) } +public func > (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(beGreaterThan(rhs)) +} + #if canImport(Darwin) import enum Foundation.ComparisonResult /// A Nimble matcher that succeeds when the actual value is greater than the expected value. -public func beGreaterThan(_ expectedValue: NMBComparable?) -> Predicate { +public func beGreaterThan(_ expectedValue: T?) -> Matcher { let errorMessage = "be greater than <\(stringify(expectedValue))>" - return Predicate.simple(errorMessage) { actualExpression in + return Matcher.simple(errorMessage) { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedDescending - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } -public func > (lhs: Expectation, rhs: NMBComparable?) { +public func > (lhs: SyncExpectation, rhs: T?) { lhs.to(beGreaterThan(rhs)) } -extension NMBPredicate { - @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBPredicate { - return NMBPredicate { actualExpression in +public func > (lhs: AsyncExpectation, rhs: T?) async { + await lhs.to(beGreaterThan(rhs)) +} + +extension NMBMatcher { + @objc public class func beGreaterThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } return try beGreaterThan(expected).satisfies(expr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift index affa58c..14821de 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift @@ -1,39 +1,47 @@ /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Matcher { let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in + return Matcher.simple(message) { actualExpression in guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } - return PredicateStatus(bool: actual >= expected) + return MatcherStatus(bool: actual >= expected) } } -public func >=(lhs: Expectation, rhs: T) { +public func >= (lhs: SyncExpectation, rhs: T) { lhs.to(beGreaterThanOrEqualTo(rhs)) } +public func >= (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(beGreaterThanOrEqualTo(rhs)) +} + #if canImport(Darwin) import enum Foundation.ComparisonResult /// A Nimble matcher that succeeds when the actual value is greater than /// or equal to the expected value. -public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Predicate { +public func beGreaterThanOrEqualTo(_ expectedValue: T?) -> Matcher { let message = "be greater than or equal to <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in + return Matcher.simple(message) { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) != ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } -public func >=(lhs: Expectation, rhs: T) { +public func >= (lhs: SyncExpectation, rhs: T) { lhs.to(beGreaterThanOrEqualTo(rhs)) } -extension NMBPredicate { - @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate { - return NMBPredicate { actualExpression in +public func >= (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(beGreaterThanOrEqualTo(rhs)) +} + +extension NMBMatcher { + @objc public class func beGreaterThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } return try beGreaterThanOrEqualTo(expected).satisfies(expr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift index f3db774..3f00b18 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeIdenticalTo.swift @@ -1,11 +1,11 @@ /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. -public func beIdenticalTo(_ expected: AnyObject?) -> Predicate { - return Predicate.define { actualExpression in +public func beIdenticalTo(_ expected: AnyObject?) -> Matcher { + return Matcher.define { actualExpression in let actual = try actualExpression.evaluate() let bool = actual === expected && actual !== nil - return PredicateResult( + return MatcherResult( bool: bool, message: .expectedCustomValueTo( "be identical to \(identityAsString(expected))", @@ -15,30 +15,36 @@ public func beIdenticalTo(_ expected: AnyObject?) -> Predicate { } } -extension Expectation where T == AnyObject { - public static func === (lhs: Expectation, rhs: AnyObject?) { - lhs.to(beIdenticalTo(rhs)) - } +public func === (lhs: SyncExpectation, rhs: AnyObject?) { + lhs.to(beIdenticalTo(rhs)) +} - public static func !== (lhs: Expectation, rhs: AnyObject?) { - lhs.toNot(beIdenticalTo(rhs)) - } +public func === (lhs: AsyncExpectation, rhs: AnyObject?) async { + await lhs.to(beIdenticalTo(rhs)) +} + +public func !== (lhs: SyncExpectation, rhs: AnyObject?) { + lhs.toNot(beIdenticalTo(rhs)) +} + +public func !== (lhs: AsyncExpectation, rhs: AnyObject?) async { + await lhs.toNot(beIdenticalTo(rhs)) } /// A Nimble matcher that succeeds when the actual value is the same instance /// as the expected instance. /// /// Alias for "beIdenticalTo". -public func be(_ expected: AnyObject?) -> Predicate { +public func be(_ expected: AnyObject?) -> Matcher { return beIdenticalTo(expected) } #if canImport(Darwin) import class Foundation.NSObject -extension NMBPredicate { - @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beIdenticalToMatcher(_ expected: NSObject?) -> NMBMatcher { + return NMBMatcher { actualExpression in let aExpr = actualExpression.cast { $0 as AnyObject? } return try beIdenticalTo(expected).satisfies(aExpr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift index 256f3a6..4be83c9 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThan.swift @@ -1,37 +1,45 @@ /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: T?) -> Predicate { +public func beLessThan(_ expectedValue: T?) -> Matcher { let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in + return Matcher.simple(message) { actualExpression in guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } - return PredicateStatus(bool: actual < expected) + return MatcherStatus(bool: actual < expected) } } -public func <(lhs: Expectation, rhs: T) { +public func < (lhs: SyncExpectation, rhs: V) { lhs.to(beLessThan(rhs)) } +public func < (lhs: AsyncExpectation, rhs: V) async { + await lhs.to(beLessThan(rhs)) +} + #if canImport(Darwin) import enum Foundation.ComparisonResult /// A Nimble matcher that succeeds when the actual value is less than the expected value. -public func beLessThan(_ expectedValue: NMBComparable?) -> Predicate { +public func beLessThan(_ expectedValue: T?) -> Matcher { let message = "be less than <\(stringify(expectedValue))>" - return Predicate.simple(message) { actualExpression in + return Matcher.simple(message) { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue != nil && actualValue!.NMB_compare(expectedValue) == ComparisonResult.orderedAscending - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } -public func < (lhs: Expectation, rhs: NMBComparable?) { +public func < (lhs: SyncExpectation, rhs: V?) { lhs.to(beLessThan(rhs)) } -extension NMBPredicate { - @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBPredicate { - return NMBPredicate { actualExpression in +public func < (lhs: AsyncExpectation, rhs: V?) async { + await lhs.to(beLessThan(rhs)) +} + +extension NMBMatcher { + @objc public class func beLessThanMatcher(_ expected: NMBComparable?) -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } return try beLessThan(expected).satisfies(expr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift index 6174be5..830e9e6 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLessThanOrEqual.swift @@ -1,37 +1,45 @@ /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Matcher { + return Matcher.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in guard let actual = try actualExpression.evaluate(), let expected = expectedValue else { return .fail } - return PredicateStatus(bool: actual <= expected) + return MatcherStatus(bool: actual <= expected) } } -public func <=(lhs: Expectation, rhs: T) { +public func <= (lhs: SyncExpectation, rhs: T) { lhs.to(beLessThanOrEqualTo(rhs)) } +public func <= (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(beLessThanOrEqualTo(rhs)) +} + #if canImport(Darwin) import enum Foundation.ComparisonResult /// A Nimble matcher that succeeds when the actual value is less than /// or equal to the expected value. -public func beLessThanOrEqualTo(_ expectedValue: T?) -> Predicate { - return Predicate.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in +public func beLessThanOrEqualTo(_ expectedValue: T?) -> Matcher { + return Matcher.simple("be less than or equal to <\(stringify(expectedValue))>") { actualExpression in let actualValue = try actualExpression.evaluate() let matches = actualValue.map { $0.NMB_compare(expectedValue) != .orderedDescending } ?? false - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } -public func <=(lhs: Expectation, rhs: T) { +public func <= (lhs: SyncExpectation, rhs: T) { lhs.to(beLessThanOrEqualTo(rhs)) } -extension NMBPredicate { - @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBPredicate { - return NMBPredicate { actualExpression in +public func <= (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(beLessThanOrEqualTo(rhs)) +} + +extension NMBMatcher { + @objc public class func beLessThanOrEqualToMatcher(_ expected: NMBComparable?) -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { $0 as? NMBComparable } return try beLessThanOrEqualTo(expected).satisfies(expr).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift index a4094d5..5170299 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeLogical.swift @@ -72,10 +72,10 @@ extension UInt: ExpressibleByBooleanLiteral { } } -internal func rename(_ matcher: Predicate, failureMessage message: ExpectationMessage) -> Predicate { - return Predicate { actualExpression in +internal func rename(_ matcher: Matcher, failureMessage message: ExpectationMessage) -> Matcher { + return Matcher { actualExpression in let result = try matcher.satisfies(actualExpression) - return PredicateResult(status: result.status, message: message) + return MatcherResult(status: result.status, message: message) }.requireNonNil } @@ -83,60 +83,60 @@ internal func rename(_ matcher: Predicate, failureMessage message: Expecta /// A Nimble matcher that succeeds when the actual value is exactly true. /// This matcher will not match against nils. -public func beTrue() -> Predicate { +public func beTrue() -> Matcher { 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() -> Predicate { +public func beFalse() -> Matcher { 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() -> Predicate { - return Predicate.simpleNilable("be truthy") { actualExpression in +public func beTruthy() -> Matcher { + return Matcher.simpleNilable("be truthy") { actualExpression in let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue == (true as T)) + return MatcherStatus(bool: actualValue == (true as T)) } } /// A Nimble matcher that succeeds when the actual value is logically false. /// This matcher will match against nils. -public func beFalsy() -> Predicate { - return Predicate.simpleNilable("be falsy") { actualExpression in +public func beFalsy() -> Matcher { + return Matcher.simpleNilable("be falsy") { actualExpression in let actualValue = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue != (true as T)) + return MatcherStatus(bool: actualValue != (true as T)) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func beTruthyMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beTruthyMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try beTruthy().satisfies(expr).toObjectiveC() } } - @objc public class func beFalsyMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in + @objc public class func beFalsyMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try beFalsy().satisfies(expr).toObjectiveC() } } - @objc public class func beTrueMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in + @objc public class func beTrueMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { ($0 as? NSNumber)?.boolValue ?? false } return try beTrue().satisfies(expr).toObjectiveC() } } - @objc public class func beFalseMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in + @objc public class func beFalseMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in let expr = actualExpression.cast { value -> Bool? in guard let value = value else { return nil } return (value as? NSNumber)?.boolValue ?? false diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift index c87099d..eea1440 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeNil.swift @@ -8,37 +8,47 @@ extension Optional: _OptionalProtocol { } /// A Nimble matcher that succeeds when the actual value is nil. -public func beNil() -> Predicate { - return Predicate.simpleNilable("be nil") { actualExpression in +public func beNil() -> Matcher { + return Matcher.simpleNilable("be nil") { actualExpression in let actualValue = try actualExpression.evaluate() if let actual = actualValue, let nestedOptionl = actual as? _OptionalProtocol { - return PredicateStatus(bool: nestedOptionl.isNil) + return MatcherStatus(bool: nestedOptionl.isNil) } - return PredicateStatus(bool: actualValue == nil) + return MatcherStatus(bool: actualValue == nil) } } -extension Expectation { - /// Represents `nil` value to be used with the operator overloads for `beNil`. - public struct Nil: ExpressibleByNilLiteral { - public init(nilLiteral: ()) {} - } +/// Represents `nil` value to be used with the operator overloads for `beNil`. +public struct ExpectationNil: ExpressibleByNilLiteral { + public init(nilLiteral: ()) {} +} - public static func == (lhs: Expectation, rhs: Expectation.Nil) { +extension SyncExpectation { + public static func == (lhs: SyncExpectation, rhs: ExpectationNil) { lhs.to(beNil()) } - public static func != (lhs: Expectation, rhs: Expectation.Nil) { + public static func != (lhs: SyncExpectation, rhs: ExpectationNil) { lhs.toNot(beNil()) } } +extension AsyncExpectation { + public static func == (lhs: AsyncExpectation, rhs: ExpectationNil) async { + await lhs.to(beNil()) + } + + public static func != (lhs: AsyncExpectation, rhs: ExpectationNil) async { + await lhs.toNot(beNil()) + } +} + #if canImport(Darwin) import Foundation -extension NMBPredicate { - @objc public class func beNilMatcher() -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beNilMatcher() -> NMBMatcher { + return NMBMatcher { actualExpression in return try beNil().satisfies(actualExpression).toObjectiveC() } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift index b05db7f..7f90dfc 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeResult.swift @@ -6,8 +6,8 @@ import Foundation /// The closure only gets called when the result is success. public func beSuccess( test: ((Success) -> Void)? = nil -) -> Predicate> { - return Predicate.define { expression in +) -> Matcher> { + return Matcher.define { expression in var rawMessage = "be " if test != nil { rawMessage += " that satisfies block" @@ -15,7 +15,7 @@ public func beSuccess( let message = ExpectationMessage.expectedActualValueTo(rawMessage) guard case let .success(value)? = try expression.evaluate() else { - return PredicateResult(status: .doesNotMatch, message: message) + return MatcherResult(status: .doesNotMatch, message: message) } var matches = true @@ -29,7 +29,7 @@ public func beSuccess( } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -39,8 +39,8 @@ public func beSuccess( /// The closure only gets called when the result is failure. public func beFailure( test: ((Failure) -> Void)? = nil -) -> Predicate> { - return Predicate.define { expression in +) -> Matcher> { + return Matcher.define { expression in var rawMessage = "be " if test != nil { rawMessage += " that satisfies block" @@ -48,7 +48,7 @@ public func beFailure( let message = ExpectationMessage.expectedActualValueTo(rawMessage) guard case let .failure(error)? = try expression.evaluate() else { - return PredicateResult(status: .doesNotMatch, message: message) + return MatcherResult(status: .doesNotMatch, message: message) } var matches = true @@ -62,6 +62,6 @@ public func beFailure( } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift index c4bbaf6..19bf4e9 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeVoid.swift @@ -1,17 +1,23 @@ /// A Nimble matcher that succeeds when the actual value is Void. -public func beVoid() -> Predicate<()> { - return Predicate.simpleNilable("be void") { actualExpression in +public func beVoid() -> Matcher<()> { + return Matcher.simpleNilable("be void") { actualExpression in let actualValue: ()? = try actualExpression.evaluate() - return PredicateStatus(bool: actualValue != nil) + return MatcherStatus(bool: actualValue != nil) } } -extension Expectation where T == () { - public static func == (lhs: Expectation<()>, rhs: ()) { - lhs.to(beVoid()) - } +public func == (lhs: SyncExpectation<()>, rhs: ()) { + lhs.to(beVoid()) +} - public static func != (lhs: Expectation<()>, rhs: ()) { - lhs.toNot(beVoid()) - } +public func == (lhs: AsyncExpectation<()>, rhs: ()) async { + await lhs.to(beVoid()) +} + +public func != (lhs: SyncExpectation<()>, rhs: ()) { + lhs.toNot(beVoid()) +} + +public func != (lhs: AsyncExpectation<()>, rhs: ()) async { + await lhs.toNot(beVoid()) } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift index 9c56e9e..a4e2d7c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeWithin.swift @@ -1,20 +1,20 @@ /// A Nimble matcher that succeeds when the actual value is within given range. -public func beWithin(_ range: Range) -> Predicate { +public func beWithin(_ range: Range) -> Matcher { let errorMessage = "be within range <(\(range.lowerBound)..<\(range.upperBound))>" - return Predicate.simple(errorMessage) { actualExpression in + return Matcher.simple(errorMessage) { actualExpression in if let actual = try actualExpression.evaluate() { - return PredicateStatus(bool: range.contains(actual)) + return MatcherStatus(bool: range.contains(actual)) } return .fail } } /// A Nimble matcher that succeeds when the actual value is within given range. -public func beWithin(_ range: ClosedRange) -> Predicate { +public func beWithin(_ range: ClosedRange) -> Matcher { let errorMessage = "be within range <(\(range.lowerBound)...\(range.upperBound))>" - return Predicate.simple(errorMessage) { actualExpression in + return Matcher.simple(errorMessage) { actualExpression in if let actual = try actualExpression.evaluate() { - return PredicateStatus(bool: range.contains(actual)) + return MatcherStatus(bool: range.contains(actual)) } return .fail } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift index 90b6b5d..05e1b82 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeginWith.swift @@ -2,46 +2,46 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence's first element /// is equal to the expected value. -public func beginWith(_ startingElement: S.Element) -> Predicate where S.Element: Equatable { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in +public func beginWith(_ startingElement: S.Element) -> Matcher where S.Element: Equatable { + return Matcher.simple("begin with <\(startingElement)>") { actualExpression in guard let actualValue = try actualExpression.evaluate() else { return .fail } var actualGenerator = actualValue.makeIterator() - return PredicateStatus(bool: actualGenerator.next() == startingElement) + return MatcherStatus(bool: actualGenerator.next() == startingElement) } } /// A Nimble matcher that succeeds when the actual collection's first element /// is equal to the expected object. -public func beginWith(_ startingElement: Any) -> Predicate { - return Predicate.simple("begin with <\(startingElement)>") { actualExpression in +public func beginWith(_ startingElement: Any) -> Matcher { + return Matcher.simple("begin with <\(startingElement)>") { actualExpression in guard let collection = try actualExpression.evaluate() else { return .fail } guard collection.count > 0 else { return .doesNotMatch } - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) let collectionValue = collection.object(at: 0) as AnyObject #else guard let collectionValue = collection.object(at: 0) as? NSObject else { return .fail } #endif - return PredicateStatus(bool: collectionValue.isEqual(startingElement)) + return MatcherStatus(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) -> Predicate { - return Predicate.simple("begin with <\(startingSubstring)>") { actualExpression in +public func beginWith(_ startingSubstring: String) -> Matcher { + return Matcher.simple("begin with <\(startingSubstring)>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: actual.hasPrefix(startingSubstring)) + return MatcherStatus(bool: actual.hasPrefix(startingSubstring)) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func beginWithMatcher(_ expected: Any) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func beginWithMatcher(_ expected: Any) -> NMBMatcher { + return NMBMatcher { actualExpression in let actual = try actualExpression.evaluate() if actual is String { let expr = actualExpression.cast { $0 as? String } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift b/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift index c3a79b1..8ff068d 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/BeginWithPrefix.swift @@ -2,38 +2,38 @@ /// /// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854218-starts public func beginWith(prefix expectedPrefix: Seq2?) - -> Predicate where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { - return Predicate.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in + -> Matcher where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { + return Matcher.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in let actualPrefix = try actualExpression.evaluate() switch (expectedPrefix, actualPrefix) { case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + return MatcherResult(status: .fail, message: msg.appendedBeNilHint()) case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) case (let expected?, let actual?): let matches = actual.starts(with: expected) - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } } -/// A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given predicate as the equivalence test. +/// A Nimble matcher that succeeds when the expected sequence is the prefix of the actual sequence, using the given matcher as the equivalence test. /// /// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2996828-starts public func beginWith( prefix expectedPrefix: Seq2?, by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool -) -> Predicate { - return Predicate.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in +) -> Matcher { + return Matcher.define("begin with <\(stringify(expectedPrefix))>") { (actualExpression, msg) in let actualPrefix = try actualExpression.evaluate() switch (expectedPrefix, actualPrefix) { case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + return MatcherResult(status: .fail, message: msg.appendedBeNilHint()) case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) case (let expected?, let actual?): let matches = actual.starts(with: expected, by: areEquivalent) - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift index 38d1dab..555d4d1 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Contain.swift @@ -3,109 +3,109 @@ import Foundation #endif /// A Nimble matcher that succeeds when the actual sequence contains the expected values. -public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { +public func contain(_ items: S.Element...) -> Matcher where S.Element: Equatable { return contain(items) } /// A Nimble matcher that succeeds when the actual sequence contains the expected values. -public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in +public func contain(_ items: [S.Element]) -> Matcher where S.Element: Equatable { + return Matcher.simple("contain <\(arrayAsString(items))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = items.allSatisfy { return actual.contains($0) } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } /// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { +public func contain(_ items: S.Element...) -> Matcher where S.Element: Equatable { return contain(items) } /// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in +public func contain(_ items: [S.Element]) -> Matcher where S.Element: Equatable { + return Matcher.simple("contain <\(arrayAsString(items))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = items.allSatisfy { return actual.contains($0) } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } /// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: S.Element...) -> Predicate where S.Element: Equatable { +public func contain(_ items: S.Element...) -> Matcher where S.Element: Equatable { return contain(items) } /// A Nimble matcher that succeeds when the actual set contains the expected values. -public func contain(_ items: [S.Element]) -> Predicate where S.Element: Equatable { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in +public func contain(_ items: [S.Element]) -> Matcher where S.Element: Equatable { + return Matcher.simple("contain <\(arrayAsString(items))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = items.allSatisfy { return actual.contains($0) } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: String...) -> Predicate { +public func contain(_ substrings: String...) -> Matcher { return contain(substrings) } -public func contain(_ substrings: [String]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in +public func contain(_ substrings: [String]) -> Matcher { + return Matcher.simple("contain <\(arrayAsString(substrings))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = substrings.allSatisfy { let range = actual.range(of: $0) return range != nil && !range!.isEmpty } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } #if canImport(Foundation) /// A Nimble matcher that succeeds when the actual string contains the expected substring. -public func contain(_ substrings: NSString...) -> Predicate { +public func contain(_ substrings: NSString...) -> Matcher { return contain(substrings) } -public func contain(_ substrings: [NSString]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(substrings))>") { actualExpression in +public func contain(_ substrings: [NSString]) -> Matcher { + return Matcher.simple("contain <\(arrayAsString(substrings))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = substrings.allSatisfy { actual.range(of: $0.description).length != 0 } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } #endif /// A Nimble matcher that succeeds when the actual collection contains the expected object. -public func contain(_ items: Any?...) -> Predicate { +public func contain(_ items: Any?...) -> Matcher { return contain(items) } -public func contain(_ items: [Any?]) -> Predicate { - return Predicate.simple("contain <\(arrayAsString(items))>") { actualExpression in +public func contain(_ items: [Any?]) -> Matcher { + return Matcher.simple("contain <\(arrayAsString(items))>") { actualExpression in guard let actual = try actualExpression.evaluate() else { return .fail } let matches = items.allSatisfy { item in return item.map { actual.contains($0) } ?? false } - return PredicateStatus(bool: matches) + return MatcherStatus(bool: matches) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func containMatcher(_ expected: [NSObject]) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func containMatcher(_ expected: [NSObject]) -> NMBMatcher { + return NMBMatcher { actualExpression in let location = actualExpression.location let actualValue = try actualExpression.evaluate() if let value = actualValue as? NMBContainer { @@ -130,7 +130,7 @@ extension NMBPredicate { .expectedActualValueTo("contain <\(arrayAsString(expected))>") .appendedBeNilHint() } - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) + return NMBMatcherResult(status: .fail, message: message.toObjectiveC()) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift b/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift index 2e7875b..68cc753 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ContainElementSatisfying.swift @@ -1,25 +1,46 @@ public func containElementSatisfying( - _ predicate: @escaping ((S.Element) -> Bool), _ predicateDescription: String = "" -) -> Predicate { - return Predicate.define { actualExpression in + _ matcher: @escaping ((S.Element) -> Bool), _ matcherDescription: String = "" +) -> Matcher { + return Matcher.define { actualExpression in let message: ExpectationMessage - if predicateDescription == "" { - message = .expectedTo("find object in collection that satisfies predicate") + if matcherDescription == "" { + message = .expectedTo("find object in collection that satisfies matcher") } else { - message = .expectedTo("find object in collection \(predicateDescription)") + message = .expectedTo("find object in collection \(matcherDescription)") } if let sequence = try actualExpression.evaluate() { - for object in sequence { - if predicate(object) { - return PredicateResult(bool: true, message: message) - } + for object in sequence where matcher(object) { + return MatcherResult(bool: true, message: message) + } + + return MatcherResult(bool: false, message: message) + } + + return MatcherResult(status: .fail, message: message) + } +} + +public func containElementSatisfying( + _ matcher: @escaping ((S.Element) async -> Bool), _ matcherDescription: String = "" +) -> AsyncMatcher { + return AsyncMatcher.define { actualExpression in + let message: ExpectationMessage + if matcherDescription == "" { + message = .expectedTo("find object in collection that satisfies matcher") + } else { + message = .expectedTo("find object in collection \(matcherDescription)") + } + + if let sequence = try await actualExpression.evaluate() { + for object in sequence where await matcher(object) { + return MatcherResult(bool: true, message: message) } - return PredicateResult(bool: false, message: message) + return MatcherResult(bool: false, message: message) } - return PredicateResult(status: .fail, message: message) + return MatcherResult(status: .fail, message: message) } } @@ -28,19 +49,19 @@ import class Foundation.NSObject import struct Foundation.NSFastEnumerationIterator import protocol Foundation.NSFastEnumeration -extension NMBPredicate { - @objc public class func containElementSatisfyingMatcher(_ predicate: @escaping ((NSObject) -> Bool)) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func containElementSatisfyingMatcher(_ matcher: @escaping ((NSObject) -> Bool)) -> NMBMatcher { + return NMBMatcher { actualExpression in let value = try actualExpression.evaluate() guard let enumeration = value as? NSFastEnumeration else { let message = ExpectationMessage.fail( "containElementSatisfying must be provided an NSFastEnumeration object" ) - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) + return NMBMatcherResult(status: .fail, message: message.toObjectiveC()) } let message = ExpectationMessage - .expectedTo("find object in collection that satisfies predicate") + .expectedTo("find object in collection that satisfies matcher") .toObjectiveC() var iterator = NSFastEnumerationIterator(enumeration) @@ -49,12 +70,12 @@ extension NMBPredicate { continue } - if predicate(object) { - return NMBPredicateResult(status: .matches, message: message) + if matcher(object) { + return NMBMatcherResult(status: .matches, message: message) } } - return NMBPredicateResult(status: .doesNotMatch, message: message) + return NMBMatcherResult(status: .doesNotMatch, message: message) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift b/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift index 708cf1c..39b2dbf 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ElementsEqual.swift @@ -4,39 +4,39 @@ /// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2854213-elementsequal public func elementsEqual( _ expectedValue: Seq2? -) -> Predicate where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { - return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in +) -> Matcher where Seq1.Element: Equatable, Seq1.Element == Seq2.Element { + return Matcher.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in let actualValue = try actualExpression.evaluate() switch (expectedValue, actualValue) { case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + return MatcherResult(status: .fail, message: msg.appendedBeNilHint()) case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) case (let expected?, let actual?): let matches = expected.elementsEqual(actual) - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } } /// A Nimble matcher that succeeds when the actual sequence and the exepected sequence contain equivalent elements in -/// the same order, using the given predicate as the equivalence test. +/// the same order, using the given matcher as the equivalence test. /// /// This is a matcher abstraction for https://developer.apple.com/documentation/swift/sequence/2949668-elementsequal public func elementsEqual( _ expectedValue: Seq2?, by areEquivalent: @escaping (Seq1.Element, Seq2.Element) -> Bool -) -> Predicate { - return Predicate.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in +) -> Matcher { + return Matcher.define("elementsEqual <\(stringify(expectedValue))>") { (actualExpression, msg) in let actualValue = try actualExpression.evaluate() switch (expectedValue, actualValue) { case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + return MatcherResult(status: .fail, message: msg.appendedBeNilHint()) case (nil, nil), (_, nil): - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) case (let expected?, let actual?): let matches = actual.elementsEqual(expected, by: areEquivalent) - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift index 950d9d5..0b61da9 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/EndWith.swift @@ -2,8 +2,8 @@ import Foundation /// A Nimble matcher that succeeds when the actual sequence's last element /// is equal to the expected value. -public func endWith(_ endingElement: S.Element) -> Predicate where S.Element: Equatable { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in +public func endWith(_ endingElement: S.Element) -> Matcher where S.Element: Equatable { + return Matcher.simple("end with <\(endingElement)>") { actualExpression in guard let actualValue = try actualExpression.evaluate() else { return .fail } var actualGenerator = actualValue.makeIterator() @@ -14,18 +14,18 @@ public func endWith(_ endingElement: S.Element) -> Predicate whe item = actualGenerator.next() } while(item != nil) - return PredicateStatus(bool: lastItem == endingElement) + return MatcherStatus(bool: lastItem == endingElement) } } /// A Nimble matcher that succeeds when the actual collection's last element /// is equal to the expected object. -public func endWith(_ endingElement: Any) -> Predicate { - return Predicate.simple("end with <\(endingElement)>") { actualExpression in +public func endWith(_ endingElement: Any) -> Matcher { + return Matcher.simple("end with <\(endingElement)>") { actualExpression in guard let collection = try actualExpression.evaluate() else { return .fail } - guard collection.count > 0 else { return PredicateStatus(bool: false) } - #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) + guard collection.count > 0 else { return MatcherStatus(bool: false) } + #if os(macOS) || os(iOS) || os(tvOS) || os(watchOS) || os(visionOS) let collectionValue = collection.object(at: collection.count - 1) as AnyObject #else guard let collectionValue = collection.object(at: collection.count - 1) as? NSObject else { @@ -33,25 +33,25 @@ public func endWith(_ endingElement: Any) -> Predicate { } #endif - return PredicateStatus(bool: collectionValue.isEqual(endingElement)) + return MatcherStatus(bool: collectionValue.isEqual(endingElement)) } } /// A Nimble matcher that succeeds when the actual string contains the expected substring /// where the expected substring's location is the actual string's length minus the /// expected substring's length. -public func endWith(_ endingSubstring: String) -> Predicate { - return Predicate.simple("end with <\(endingSubstring)>") { actualExpression in +public func endWith(_ endingSubstring: String) -> Matcher { + return Matcher.simple("end with <\(endingSubstring)>") { actualExpression in guard let collection = try actualExpression.evaluate() else { return .fail } - return PredicateStatus(bool: collection.hasSuffix(endingSubstring)) + return MatcherStatus(bool: collection.hasSuffix(endingSubstring)) } } #if canImport(Darwin) -extension NMBPredicate { - @objc public class func endWithMatcher(_ expected: Any) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func endWithMatcher(_ expected: Any) -> NMBMatcher { + return NMBMatcher { actualExpression in let actual = try actualExpression.evaluate() if actual is String { let expr = actualExpression.cast { $0 as? String } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift b/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift index 0d05ba9..17b2f2e 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Equal+Tuple.swift @@ -6,24 +6,37 @@ /// Values can support equal by supporting the Equatable protocol. public func equal( _ expectedValue: (T1, T2)? -) -> Predicate<(T1, T2)> { +) -> Matcher<(T1, T2)> { equal(expectedValue, by: ==) } -public func ==( - lhs: Expectation<(T1, T2)>, +public func == ( + lhs: SyncExpectation<(T1, T2)>, rhs: (T1, T2)? ) { lhs.to(equal(rhs)) } -public func !=( - lhs: Expectation<(T1, T2)>, +public func == ( + lhs: AsyncExpectation<(T1, T2)>, + rhs: (T1, T2)? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<(T1, T2)>, rhs: (T1, T2)? ) { lhs.toNot(equal(rhs)) } +public func != ( + lhs: AsyncExpectation<(T1, T2)>, + rhs: (T1, T2)? +) async { + await lhs.toNot(equal(rhs)) +} // MARK: Tuple3 @@ -31,24 +44,39 @@ public func !=( /// Values can support equal by supporting the Equatable protocol. public func equal( _ expectedValue: (T1, T2, T3)? -) -> Predicate<(T1, T2, T3)> { +) -> Matcher<(T1, T2, T3)> { equal(expectedValue, by: ==) } -public func ==( - lhs: Expectation<(T1, T2, T3)>, +public func == ( + lhs: SyncExpectation<(T1, T2, T3)>, rhs: (T1, T2, T3)? ) { lhs.to(equal(rhs)) } -public func !=( - lhs: Expectation<(T1, T2, T3)>, +public func == ( + lhs: AsyncExpectation<(T1, T2, T3)>, + rhs: (T1, T2, T3)? +) async { + await lhs.to(equal(rhs)) +} + + +public func != ( + lhs: SyncExpectation<(T1, T2, T3)>, rhs: (T1, T2, T3)? ) { lhs.toNot(equal(rhs)) } +public func != ( + lhs: AsyncExpectation<(T1, T2, T3)>, + rhs: (T1, T2, T3)? +) async { + await lhs.toNot(equal(rhs)) +} + // MARK: Tuple4 @@ -56,24 +84,38 @@ public func !=( /// Values can support equal by supporting the Equatable protocol. public func equal( _ expectedValue: (T1, T2, T3, T4)? -) -> Predicate<(T1, T2, T3, T4)> { +) -> Matcher<(T1, T2, T3, T4)> { equal(expectedValue, by: ==) } -public func ==( - lhs: Expectation<(T1, T2, T3, T4)>, +public func == ( + lhs: SyncExpectation<(T1, T2, T3, T4)>, rhs: (T1, T2, T3, T4)? ) { lhs.to(equal(rhs)) } -public func !=( - lhs: Expectation<(T1, T2, T3, T4)>, +public func == ( + lhs: AsyncExpectation<(T1, T2, T3, T4)>, + rhs: (T1, T2, T3, T4)? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<(T1, T2, T3, T4)>, rhs: (T1, T2, T3, T4)? ) { lhs.toNot(equal(rhs)) } +public func != ( + lhs: AsyncExpectation<(T1, T2, T3, T4)>, + rhs: (T1, T2, T3, T4)? +) async { + await lhs.toNot(equal(rhs)) +} + // MARK: Tuple5 @@ -81,24 +123,39 @@ public func !=( /// Values can support equal by supporting the Equatable protocol. public func equal( _ expectedValue: (T1, T2, T3, T4, T5)? -) -> Predicate<(T1, T2, T3, T4, T5)> { +) -> Matcher<(T1, T2, T3, T4, T5)> { equal(expectedValue, by: ==) } -public func ==( - lhs: Expectation<(T1, T2, T3, T4, T5)>, +public func == ( + lhs: SyncExpectation<(T1, T2, T3, T4, T5)>, rhs: (T1, T2, T3, T4, T5)? ) { lhs.to(equal(rhs)) } -public func !=( - lhs: Expectation<(T1, T2, T3, T4, T5)>, +public func == ( + lhs: AsyncExpectation<(T1, T2, T3, T4, T5)>, + rhs: (T1, T2, T3, T4, T5)? +) async { + await lhs.to(equal(rhs)) +} + + +public func != ( + lhs: SyncExpectation<(T1, T2, T3, T4, T5)>, rhs: (T1, T2, T3, T4, T5)? ) { lhs.toNot(equal(rhs)) } +public func != ( + lhs: AsyncExpectation<(T1, T2, T3, T4, T5)>, + rhs: (T1, T2, T3, T4, T5)? +) async { + await lhs.toNot(equal(rhs)) +} + // MARK: Tuple6 @@ -106,22 +163,36 @@ public func !=( _ expectedValue: (T1, T2, T3, T4, T5, T6)? -) -> Predicate<(T1, T2, T3, T4, T5, T6)> { +) -> Matcher<(T1, T2, T3, T4, T5, T6)> { equal(expectedValue, by: ==) } -public func ==( - lhs: Expectation<(T1, T2, T3, T4, T5, T6)>, +public func == ( + lhs: SyncExpectation<(T1, T2, T3, T4, T5, T6)>, rhs: (T1, T2, T3, T4, T5, T6)? ) { lhs.to(equal(rhs)) } -public func !=( - lhs: Expectation<(T1, T2, T3, T4, T5, T6)>, +public func == ( + lhs: AsyncExpectation<(T1, T2, T3, T4, T5, T6)>, + rhs: (T1, T2, T3, T4, T5, T6)? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<(T1, T2, T3, T4, T5, T6)>, rhs: (T1, T2, T3, T4, T5, T6)? ) { lhs.toNot(equal(rhs)) } +public func != ( + lhs: AsyncExpectation<(T1, T2, T3, T4, T5, T6)>, + rhs: (T1, T2, T3, T4, T5, T6)? +) async { + await lhs.toNot(equal(rhs)) +} + // swiftlint:enable large_tuple vertical_whitespace diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Equal+TupleArray.swift b/Pods/Nimble/Sources/Nimble/Matchers/Equal+TupleArray.swift new file mode 100644 index 0000000..eff6168 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/Equal+TupleArray.swift @@ -0,0 +1,204 @@ +// swiftlint:disable large_tuple + +// MARK: Tuple2 Array + +/// A Nimble matcher that succeeds when the actual array of tuples is equal to the expected array of tuples. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: [(T1, T2)]? +) -> Matcher<[(T1, T2)]> { + equalTupleArray(expectedValue, by: ==) +} + +public func == ( + lhs: SyncExpectation<[(T1, T2)]>, + rhs: [(T1, T2)]? +) { + lhs.to(equal(rhs)) +} + +public func == ( + lhs: AsyncExpectation<[(T1, T2)]>, + rhs: [(T1, T2)]? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<[(T1, T2)]>, + rhs: [(T1, T2)]? +) { + lhs.toNot(equal(rhs)) +} + +public func != ( + lhs: AsyncExpectation<[(T1, T2)]>, + rhs: [(T1, T2)]? +) async { + await lhs.toNot(equal(rhs)) +} + +// MARK: Tuple3 Array + +/// A Nimble matcher that succeeds when the actual array of tuples is equal to the expected array of tuples. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: [(T1, T2, T3)]? +) -> Matcher<[(T1, T2, T3)]> { + equalTupleArray(expectedValue, by: ==) +} + +public func == ( + lhs: SyncExpectation<[(T1, T2, T3)]>, + rhs: [(T1, T2, T3)]? +) { + lhs.to(equal(rhs)) +} + +public func == ( + lhs: AsyncExpectation<[(T1, T2, T3)]>, + rhs: [(T1, T2, T3)]? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<[(T1, T2, T3)]>, + rhs: [(T1, T2, T3)]? +) { + lhs.toNot(equal(rhs)) +} + +public func != ( + lhs: AsyncExpectation<[(T1, T2, T3)]>, + rhs: [(T1, T2, T3)]? +) async { + await lhs.toNot(equal(rhs)) +} + +// MARK: Tuple4 Array + +/// A Nimble matcher that succeeds when the actual array of tuples is equal to the expected array of tuples. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: [(T1, T2, T3, T4)]? +) -> Matcher<[(T1, T2, T3, T4)]> { + equalTupleArray(expectedValue, by: ==) +} + +public func == ( + lhs: SyncExpectation<[(T1, T2, T3, T4)]>, + rhs: [(T1, T2, T3, T4)]? +) { + lhs.to(equal(rhs)) +} + +public func == ( + lhs: AsyncExpectation<[(T1, T2, T3, T4)]>, + rhs: [(T1, T2, T3, T4)]? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<[(T1, T2, T3, T4)]>, + rhs: [(T1, T2, T3, T4)]? +) { + lhs.toNot(equal(rhs)) +} + +public func != ( + lhs: AsyncExpectation<[(T1, T2, T3, T4)]>, + rhs: [(T1, T2, T3, T4)]? +) async { + await lhs.toNot(equal(rhs)) +} + +// MARK: Tuple5 Array + +/// A Nimble matcher that succeeds when the actual array of tuples is equal to the expected array of tuples. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: [(T1, T2, T3, T4, T5)]? +) -> Matcher<[(T1, T2, T3, T4, T5)]> { + equalTupleArray(expectedValue, by: ==) +} + +public func == ( + lhs: SyncExpectation<[(T1, T2, T3, T4, T5)]>, + rhs: [(T1, T2, T3, T4, T5)]? +) { + lhs.to(equal(rhs)) +} + +public func == ( + lhs: AsyncExpectation<[(T1, T2, T3, T4, T5)]>, + rhs: [(T1, T2, T3, T4, T5)]? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<[(T1, T2, T3, T4, T5)]>, + rhs: [(T1, T2, T3, T4, T5)]? +) { + lhs.toNot(equal(rhs)) +} + +public func != ( + lhs: AsyncExpectation<[(T1, T2, T3, T4, T5)]>, + rhs: [(T1, T2, T3, T4, T5)]? +) async { + await lhs.toNot(equal(rhs)) +} + +// MARK: Tuple6 Array + +/// A Nimble matcher that succeeds when the actual array of tuples is equal to the expected array of tuples. +/// Values can support equal by supporting the Equatable protocol. +public func equal( + _ expectedValue: [(T1, T2, T3, T4, T5, T6)]? +) -> Matcher<[(T1, T2, T3, T4, T5, T6)]> { + equalTupleArray(expectedValue, by: ==) +} + +public func == ( + lhs: SyncExpectation<[(T1, T2, T3, T4, T5, T6)]>, + rhs: [(T1, T2, T3, T4, T5, T6)]? +) { + lhs.to(equal(rhs)) +} + +public func == ( + lhs: AsyncExpectation<[(T1, T2, T3, T4, T5, T6)]>, + rhs: [(T1, T2, T3, T4, T5, T6)]? +) async { + await lhs.to(equal(rhs)) +} + +public func != ( + lhs: SyncExpectation<[(T1, T2, T3, T4, T5, T6)]>, + rhs: [(T1, T2, T3, T4, T5, T6)]? +) { + lhs.toNot(equal(rhs)) +} + +public func != ( + lhs: AsyncExpectation<[(T1, T2, T3, T4, T5, T6)]>, + rhs: [(T1, T2, T3, T4, T5, T6)]? +) async { + await lhs.toNot(equal(rhs)) +} + +// swiftlint:enable large_tuple + +// MARK: Implementation Helpers + +private func equalTupleArray( + _ expectedValue: [(Tuple)]?, + by areTuplesEquivalent: @escaping (Tuple, Tuple) -> Bool +) -> Matcher<[Tuple]> { + equal(expectedValue) { + $0.elementsEqual($1, by: areTuplesEquivalent) + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift index 7b89860..4ec21e3 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Equal.swift @@ -1,17 +1,17 @@ internal func equal( _ expectedValue: T?, by areEquivalent: @escaping (T, T) -> Bool -) -> Predicate { - Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in +) -> Matcher { + Matcher.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in let actualValue = try actualExpression.evaluate() switch (expectedValue, actualValue) { case (nil, _?): - return PredicateResult(status: .fail, message: msg.appendedBeNilHint()) + return MatcherResult(status: .fail, message: msg.appendedBeNilHint()) case (_, nil): - return PredicateResult(status: .fail, message: msg) + return MatcherResult(status: .fail, message: msg) case (let expected?, let actual?): let matches = areEquivalent(expected, actual) - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } } @@ -20,22 +20,22 @@ internal func equal( /// 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) -> Predicate { +public func equal(_ expectedValue: T) -> Matcher { equal(expectedValue as T?) } /// A Nimble matcher allowing comparison of collection with optional type -public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { - Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in +public func equal(_ expectedValue: [T?]) -> Matcher<[T?]> { + Matcher.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( + return MatcherResult( status: .fail, message: msg.appendedBeNilHint() ) } let matches = expectedValue == actualValue - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } @@ -43,46 +43,46 @@ public func equal(_ expectedValue: [T?]) -> Predicate<[T?]> { /// 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?) -> Predicate { +public func equal(_ expectedValue: T?) -> Matcher { equal(expectedValue, by: ==) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set) -> Predicate> { +public func equal(_ expectedValue: Set) -> Matcher> { equal(expectedValue as Set?) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { +public func equal(_ expectedValue: Set?) -> Matcher> { 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) -> Predicate> { +public func equal(_ expectedValue: Set) -> Matcher> { equal(expectedValue as Set?) } /// A Nimble matcher that succeeds when the actual set is equal to the expected set. -public func equal(_ expectedValue: Set?) -> Predicate> { +public func equal(_ expectedValue: Set?) -> Matcher> { equal(expectedValue, stringify: { set in stringify(set.map { Array($0).sorted(by: <) }) }) } -private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Predicate> { - Predicate { actualExpression in +private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) -> String) -> Matcher> { + Matcher { actualExpression in var errorMessage: ExpectationMessage = .expectedActualValueTo("equal <\(stringify(expectedValue))>") guard let expectedValue = expectedValue else { - return PredicateResult( + return MatcherResult( status: .fail, message: errorMessage.appendedBeNilHint() ) } guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( + return MatcherResult( status: .fail, message: errorMessage.appendedBeNilHint() ) @@ -94,7 +94,7 @@ private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) - ) if expectedValue == actualValue { - return PredicateResult( + return MatcherResult( status: .matches, message: errorMessage ) @@ -109,7 +109,7 @@ private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) - if extra.count > 0 { errorMessage = errorMessage.appended(message: ", extra <\(stringify(extra))>") } - return PredicateResult( + return MatcherResult( status: .doesNotMatch, message: errorMessage ) @@ -117,90 +117,154 @@ private func equal(_ expectedValue: Set?, stringify: @escaping (Set?) - } /// A Nimble matcher that succeeds when the actual dictionary is equal to the expected dictionary -public func equal(_ expectedValue: [K: V?]) -> Predicate<[K: V]> { - Predicate.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in +public func equal(_ expectedValue: [K: V?]) -> Matcher<[K: V]> { + Matcher.define("equal <\(stringify(expectedValue))>") { actualExpression, msg in guard let actualValue = try actualExpression.evaluate() else { - return PredicateResult( + return MatcherResult( status: .fail, message: msg.appendedBeNilHint() ) } let matches = expectedValue == actualValue - return PredicateResult(bool: matches, message: msg) + return MatcherResult(bool: matches, message: msg) } } -public func ==(lhs: Expectation, rhs: T) { +public func == (lhs: SyncExpectation, rhs: T) { lhs.to(equal(rhs)) } -public func ==(lhs: Expectation, rhs: T?) { +public func == (lhs: SyncExpectation, rhs: T?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation, rhs: T) { +public func != (lhs: SyncExpectation, rhs: T) { lhs.toNot(equal(rhs)) } -public func !=(lhs: Expectation, rhs: T?) { +public func != (lhs: SyncExpectation, rhs: T?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation<[T]>, rhs: [T]?) { +public func == (lhs: SyncExpectation<[T]>, rhs: [T]?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation<[T]>, rhs: [T]?) { +public func != (lhs: SyncExpectation<[T]>, rhs: [T]?) { lhs.toNot(equal(rhs)) } -public func == (lhs: Expectation>, rhs: Set) { +public func == (lhs: SyncExpectation>, rhs: Set) { lhs.to(equal(rhs)) } -public func == (lhs: Expectation>, rhs: Set?) { +public func == (lhs: SyncExpectation>, rhs: Set?) { lhs.to(equal(rhs)) } -public func != (lhs: Expectation>, rhs: Set) { +public func != (lhs: SyncExpectation>, rhs: Set) { lhs.toNot(equal(rhs)) } -public func != (lhs: Expectation>, rhs: Set?) { +public func != (lhs: SyncExpectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation>, rhs: Set) { +public func == (lhs: SyncExpectation>, rhs: Set) { lhs.to(equal(rhs)) } -public func ==(lhs: Expectation>, rhs: Set?) { +public func == (lhs: SyncExpectation>, rhs: Set?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation>, rhs: Set) { +public func != (lhs: SyncExpectation>, rhs: Set) { lhs.toNot(equal(rhs)) } -public func !=(lhs: Expectation>, rhs: Set?) { +public func != (lhs: SyncExpectation>, rhs: Set?) { lhs.toNot(equal(rhs)) } -public func ==(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func == (lhs: SyncExpectation<[T: C]>, rhs: [T: C]?) { lhs.to(equal(rhs)) } -public func !=(lhs: Expectation<[T: C]>, rhs: [T: C]?) { +public func != (lhs: SyncExpectation<[T: C]>, rhs: [T: C]?) { lhs.toNot(equal(rhs)) } +public func == (lhs: AsyncExpectation, rhs: T) async { + await lhs.to(equal(rhs)) +} + +public func == (lhs: AsyncExpectation, rhs: T?) async { + await lhs.to(equal(rhs)) +} + +public func != (lhs: AsyncExpectation, rhs: T) async { + await lhs.toNot(equal(rhs)) +} + +public func != (lhs: AsyncExpectation, rhs: T?) async { + await lhs.toNot(equal(rhs)) +} + +public func == (lhs: AsyncExpectation<[T]>, rhs: [T]?) async { + await lhs.to(equal(rhs)) +} + +public func != (lhs: AsyncExpectation<[T]>, rhs: [T]?) async { + await lhs.toNot(equal(rhs)) +} + +public func == (lhs: AsyncExpectation>, rhs: Set) async { + await lhs.to(equal(rhs)) +} + +public func == (lhs: AsyncExpectation>, rhs: Set?) async { + await lhs.to(equal(rhs)) +} + +public func != (lhs: AsyncExpectation>, rhs: Set) async { + await lhs.toNot(equal(rhs)) +} + +public func != (lhs: AsyncExpectation>, rhs: Set?) async { + await lhs.toNot(equal(rhs)) +} + +public func == (lhs: AsyncExpectation>, rhs: Set) async { + await lhs.to(equal(rhs)) +} + +public func == (lhs: AsyncExpectation>, rhs: Set?) async { + await lhs.to(equal(rhs)) +} + +public func != (lhs: AsyncExpectation>, rhs: Set) async { + await lhs.toNot(equal(rhs)) +} + +public func != (lhs: AsyncExpectation>, rhs: Set?) async { + await lhs.toNot(equal(rhs)) +} + +public func == (lhs: AsyncExpectation<[T: C]>, rhs: [T: C]?) async { + await lhs.to(equal(rhs)) +} + +public func != (lhs: AsyncExpectation<[T: C]>, rhs: [T: C]?) async { + await lhs.toNot(equal(rhs)) +} + #if canImport(Darwin) import class Foundation.NSObject -extension NMBPredicate { - @objc public class func equalMatcher(_ expected: NSObject) -> NMBPredicate { - NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func equalMatcher(_ expected: NSObject) -> NMBMatcher { + NMBMatcher { actualExpression in try equal(expected).satisfies(actualExpression).toObjectiveC() } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift index 20397f5..7b476d7 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/HaveCount.swift @@ -5,8 +5,8 @@ /// A Nimble matcher that succeeds when the actual Collection's count equals /// the expected value -public func haveCount(_ expectedValue: Int) -> Predicate { - return Predicate.define { actualExpression in +public func haveCount(_ expectedValue: Int) -> Matcher { + return Matcher.define { actualExpression in if let actualValue = try actualExpression.evaluate() { let message = ExpectationMessage .expectedCustomValueTo( @@ -16,29 +16,28 @@ public func haveCount(_ expectedValue: Int) -> Predicate { .appended(details: "Actual Value: \(stringify(actualValue))") let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) + return MatcherResult(bool: result, message: message) } else { - return PredicateResult(status: .fail, message: .fail("")) + return MatcherResult(status: .fail, message: .fail("")) } } } /// A Nimble matcher that succeeds when the actual collection's count equals /// the expected value -public func haveCount(_ expectedValue: Int) -> Predicate { - return Predicate { actualExpression in +public func haveCount(_ expectedValue: Int) -> Matcher { + return Matcher { actualExpression in if let actualValue = try actualExpression.evaluate() { let message = ExpectationMessage .expectedCustomValueTo( "have \(prettyCollectionType(actualValue)) with count \(stringify(expectedValue))", - actual: "\(actualValue.count)" + actual: "\(actualValue.count). Actual Value: \(stringify(actualValue))" ) - .appended(details: "Actual Value: \(stringify(actualValue))") let result = expectedValue == actualValue.count - return PredicateResult(bool: result, message: message) + return MatcherResult(bool: result, message: message) } else { - return PredicateResult(status: .fail, message: .fail("")) + return MatcherResult(status: .fail, message: .fail("")) } } } @@ -46,9 +45,9 @@ public func haveCount(_ expectedValue: Int) -> Predicate { #if canImport(Darwin) import Foundation -extension NMBPredicate { - @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func haveCountMatcher(_ expected: NSNumber) -> NMBMatcher { + return NMBMatcher { actualExpression in let location = actualExpression.location let actualValue = try actualExpression.evaluate() if let value = actualValue as? NMBCollection { @@ -67,7 +66,7 @@ extension NMBPredicate { .expectedActualValueTo("have a collection with count \(stringify(expected.intValue))") .appendedBeNilHint() } - return NMBPredicateResult(status: .fail, message: message.toObjectiveC()) + return NMBMatcherResult(status: .fail, message: message.toObjectiveC()) } } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Map.swift b/Pods/Nimble/Sources/Nimble/Matchers/Map.swift new file mode 100644 index 0000000..7132ab3 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/Map.swift @@ -0,0 +1,27 @@ +/// `map` works by transforming the expression to a value that the given matcher uses. +/// +/// For example, you might only care that a particular property on a method equals some other value. +/// So, you could write `expect(myObject).to(lens(\.someIntValue, equal(3))`. +/// This is also useful in conjunction with ``satisfyAllOf`` to do a partial equality of an object. +public func map(_ transform: @escaping (T) throws -> U, _ matcher: Matcher) -> Matcher { + Matcher { (received: Expression) in + try matcher.satisfies(received.cast { value in + guard let value else { return nil } + return try transform(value) + }) + } +} + +/// `map` works by transforming the expression to a value that the given matcher uses. +/// +/// For example, you might only care that a particular property on a method equals some other value. +/// So, you could write `expect(myObject).to(lens(\.someIntValue, equal(3))`. +/// This is also useful in conjunction with ``satisfyAllOf`` to do a partial equality of an object. +public func map(_ transform: @escaping (T) async throws -> U, _ matcher: some AsyncableMatcher) -> AsyncMatcher { + AsyncMatcher { (received: AsyncExpression) in + try await matcher.satisfies(received.cast { value in + guard let value else { return nil } + return try await transform(value) + }) + } +} diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift index 93363b3..b634ad3 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/Match.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/Match.swift @@ -1,20 +1,20 @@ /// A Nimble matcher that succeeds when the actual string satisfies the regular expression /// described by the expected string. -public func match(_ expectedValue: String?) -> Predicate { - return Predicate.simple("match <\(stringify(expectedValue))>") { actualExpression in +public func match(_ expectedValue: String?) -> Matcher { + return Matcher.simple("match <\(stringify(expectedValue))>") { actualExpression in guard let actual = try actualExpression.evaluate(), let regexp = expectedValue else { return .fail } let bool = actual.range(of: regexp, options: .regularExpression) != nil - return PredicateStatus(bool: bool) + return MatcherStatus(bool: bool) } } #if canImport(Darwin) import class Foundation.NSString -extension NMBPredicate { - @objc public class func matchMatcher(_ expected: NSString) -> NMBPredicate { - return NMBPredicate { actualExpression in +extension NMBMatcher { + @objc public class func matchMatcher(_ expected: NSString) -> NMBMatcher { + return NMBMatcher { actualExpression in let actual = actualExpression.cast { $0 as? String } return try match(expected.description).satisfies(actual).toObjectiveC() } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift index 3edc99b..10ed86b 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/MatchError.swift @@ -3,8 +3,8 @@ /// /// Errors are tried to be compared by their implementation of Equatable, /// otherwise they fallback to comparison by _domain and _code. -public func matchError(_ error: T) -> Predicate { - return Predicate.define { actualExpression in +public func matchError(_ error: T) -> Matcher { + return Matcher.define { actualExpression in let actualError = try actualExpression.evaluate() let message = messageForError( @@ -18,7 +18,7 @@ public func matchError(_ error: T) -> Predicate { matches = true } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -27,8 +27,8 @@ public func matchError(_ error: T) -> Predicate { /// /// 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) -> Predicate { - return Predicate.define { actualExpression in +public func matchError(_ error: T) -> Matcher { + return Matcher.define { actualExpression in let actualError = try actualExpression.evaluate() let message = messageForError( @@ -42,14 +42,14 @@ public func matchError(_ error: T) -> Predicate { matches = true } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } /// A Nimble matcher that succeeds when the actual expression evaluates to an /// error of the specified type -public func matchError(_ errorType: T.Type) -> Predicate { - return Predicate.define { actualExpression in +public func matchError(_ errorType: T.Type) -> Matcher { + return Matcher.define { actualExpression in let actualError = try actualExpression.evaluate() let message = messageForError( @@ -63,6 +63,6 @@ public func matchError(_ errorType: T.Type) -> Predicate { matches = true } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Matcher.swift b/Pods/Nimble/Sources/Nimble/Matchers/Matcher.swift new file mode 100644 index 0000000..375419e --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Matchers/Matcher.swift @@ -0,0 +1,324 @@ +// New Matcher API +// + +/// A Matcher 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 Matcher. +/// +/// The Matcher provide the heavy lifting on how to assert against a given value. Internally, +/// matchers are simple wrappers around closures to provide static type information and +/// allow composition and wrapping of existing behaviors. +/// +/// In the 2023 Apple Platform releases (macOS 14, iOS 17, watchOS 10, tvOS 17, visionOS 1), Apple +/// renamed `NSMatcher` to `Matcher`. In response, we decided to rename `Matcher` to +/// `Matcher`. +public struct Matcher { + fileprivate var matcher: (Expression) throws -> MatcherResult + + /// Constructs a matcher that knows how take a given value + public init(_ matcher: @escaping (Expression) throws -> MatcherResult) { + self.matcher = matcher + } + + /// Uses a matcher on a given value to see if it passes the matcher. + /// + /// @param expression The value to run the matcher's logic against + /// @returns A matcher result indicate passing or failing and an associated error message. + public func satisfies(_ expression: Expression) throws -> MatcherResult { + return try matcher(expression) + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "Matcher") +public typealias Predicate = Matcher + +/// Provides convenience helpers to defining matchers +extension Matcher { + /// Like Matcher() constructor, but automatically guard against nil (actual) values + public static func define(matcher: @escaping (Expression) throws -> MatcherResult) -> Matcher { + return Matcher { actual in + return try matcher(actual) + }.requireNonNil + } + + /// Defines a matcher with a default message that can be returned in the closure + /// Also ensures the matcher's actual value cannot pass with `nil` given. + public static func define(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> MatcherResult) -> Matcher { + return Matcher { actual in + return try matcher(actual, .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Defines a matcher with a default message that can be returned in the closure + /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. + public static func defineNilable(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> MatcherResult) -> Matcher { + return Matcher { actual in + return try matcher(actual, .expectedActualValueTo(message)) + } + } +} + +extension Matcher { + /// Provides a simple matcher definition that provides no control over the predefined + /// error message. + /// + /// Also ensures the matcher's actual value cannot pass with `nil` given. + public static func simple(_ message: String = "match", matcher: @escaping (Expression) throws -> MatcherStatus) -> Matcher { + return Matcher { actual in + return MatcherResult(status: try matcher(actual), message: .expectedActualValueTo(message)) + }.requireNonNil + } + + /// Provides a simple matcher definition that provides no control over the predefined + /// error message. + /// + /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. + public static func simpleNilable(_ message: String = "match", matcher: @escaping (Expression) throws -> MatcherStatus) -> Matcher { + return Matcher { actual in + return MatcherResult(status: try matcher(actual), message: .expectedActualValueTo(message)) + } + } +} + +/// The Expectation style intended for comparison to a MatcherStatus. +public enum ExpectationStyle { + case toMatch, toNotMatch +} + +/// The value that a Matcher returns to describe if the given (actual) value matches the +/// matcher. +public struct MatcherResult { + /// Status indicates if the matcher matches, does not match, or fails. + public var status: MatcherStatus + /// The error message that can be displayed if it does not match + public var message: ExpectationMessage + + /// Constructs a new MatcherResult with a given status and error message + public init(status: MatcherStatus, message: ExpectationMessage) { + self.status = status + self.message = message + } + + /// Shorthand to MatcherResult(status: MatcherStatus(bool: bool), message: message) + public init(bool: Bool, message: ExpectationMessage) { + self.status = MatcherStatus(bool: bool) + self.message = message + } + + /// Converts the result to a boolean based on what the expectation intended + public func toBoolean(expectation style: ExpectationStyle) -> Bool { + return status.toBoolean(expectation: style) + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "MatcherResult") +public typealias PredicateResult = MatcherResult + +/// MatcherStatus is a trinary that indicates if a Matcher matches a given value or not +public enum MatcherStatus { + /// Matches indicates if the matcher / matcher passes with the given value + /// + /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. + case matches + /// DoesNotMatch indicates if the 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 matcher 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: Matcher's `requireNonNil` property will also provide this feature mostly for free. + /// Your matcher 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 MatcherStatus 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() + } + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "MatcherStatus") +public typealias PredicateStatus = MatcherStatus + +extension Matcher { + // Someday, make this public? Needs documentation + internal func after(f: @escaping (Expression, MatcherResult) throws -> MatcherResult) -> Matcher { + // swiftlint:disable:previous identifier_name + return Matcher { actual -> MatcherResult in + let result = try self.satisfies(actual) + return try f(actual, result) + } + } + + /// Returns a new Matcher based on the current one that always fails if nil is given as + /// the actual value. + public var requireNonNil: Matcher { + return after { actual, result in + if try actual.evaluate() == nil { + return MatcherResult( + status: .fail, + message: result.message.appendedBeNilHint() + ) + } + return result + } + } +} + +#if canImport(Darwin) +import class Foundation.NSObject + +public typealias MatcherBlock = (_ actualExpression: Expression) throws -> NMBMatcherResult + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "MatcherBlock") +public typealias PredicateBlock = MatcherBlock + +public class NMBMatcher: NSObject { + private let matcher: MatcherBlock + + public init(matcher: @escaping MatcherBlock) { + self.matcher = matcher + } + + @available(*, deprecated, renamed: "init(matcher:)") + public convenience init(predicate: @escaping MatcherBlock) { + self.init(matcher: predicate) + } + + func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBMatcherResult { + let expr = Expression(expression: expression, location: location) + do { + return try self.matcher(expr) + } catch let error { + return MatcherResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() + } + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "NMBMatcher") +public typealias NMBPredicate = NMBMatcher + +final public class NMBMatcherResult: NSObject { + public var status: NMBMatcherStatus + public var message: NMBExpectationMessage + + public init(status: NMBMatcherStatus, message: NMBExpectationMessage) { + self.status = status + self.message = message + } + + public init(bool success: Bool, message: NMBExpectationMessage) { + self.status = NMBMatcherStatus.from(bool: success) + self.message = message + } + + public func toSwift() -> MatcherResult { + return MatcherResult(status: status.toSwift(), + message: message.toSwift()) + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "NMBMatcherResult") +public typealias NMBPredicateResult = NMBMatcherResult + +extension MatcherResult { + public func toObjectiveC() -> NMBMatcherResult { + return NMBMatcherResult(status: status.toObjectiveC(), message: message.toObjectiveC()) + } +} + +final public class NMBMatcherStatus: NSObject { + private let status: Int + private init(status: Int) { + self.status = status + } + + public static let matches: NMBMatcherStatus = NMBMatcherStatus(status: 0) + public static let doesNotMatch: NMBMatcherStatus = NMBMatcherStatus(status: 1) + public static let fail: NMBMatcherStatus = NMBMatcherStatus(status: 2) + + public override var hash: Int { return self.status.hashValue } + + public override func isEqual(_ object: Any?) -> Bool { + guard let otherMatcher = object as? NMBMatcherStatus else { + return false + } + return self.status == otherMatcher.status + } + + public static func from(status: MatcherStatus) -> NMBMatcherStatus { + switch status { + case .matches: return self.matches + case .doesNotMatch: return self.doesNotMatch + case .fail: return self.fail + } + } + + public static func from(bool success: Bool) -> NMBMatcherStatus { + return self.from(status: MatcherStatus(bool: success)) + } + + public func toSwift() -> MatcherStatus { + switch status { + case NMBMatcherStatus.matches.status: return .matches + case NMBMatcherStatus.doesNotMatch.status: return .doesNotMatch + case NMBMatcherStatus.fail.status: return .fail + default: + internalError("Unhandle status for NMBMatcherStatus") + } + } +} + +/// Provides an easy upgrade path for custom Matchers to be renamed to Matchers +@available(*, deprecated, renamed: "NMBMatcherStatus") +public typealias NMBPredicateStatus = NMBMatcherStatus + +extension MatcherStatus { + public func toObjectiveC() -> NMBMatcherStatus { + return NMBMatcherStatus.from(status: self) + } +} + +#endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift index e04bf55..5144cc1 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/PostNotification.swift @@ -5,6 +5,7 @@ import Foundation internal class NotificationCollector { private(set) var observedNotifications: [Notification] + private(set) var observedNotificationDescriptions: [String] private let notificationCenter: NotificationCenter private let names: Set private var tokens: [NSObjectProtocol] @@ -12,6 +13,7 @@ internal class NotificationCollector { required init(notificationCenter: NotificationCenter, names: Set = []) { self.notificationCenter = notificationCenter self.observedNotifications = [] + self.observedNotificationDescriptions = [] self.names = names self.tokens = [] } @@ -21,6 +23,7 @@ internal class NotificationCollector { return notificationCenter.addObserver(forName: name, object: nil, queue: nil) { [weak self] notification in // linux-swift gets confused by .append(n) self?.observedNotifications.append(notification) + self?.observedNotificationDescriptions.append(stringify(notification)) } } @@ -40,19 +43,23 @@ internal class NotificationCollector { } } +#if !os(Windows) private let mainThread = pthread_self() +#else +private let mainThread = Thread.mainThread +#endif private func _postNotifications( - _ predicate: Predicate<[Notification]>, + _ matcher: Matcher<[Notification]>, from center: NotificationCenter, names: Set = [] -) -> Predicate { +) -> Matcher { _ = mainThread // Force lazy-loading of this value let collector = NotificationCollector(notificationCenter: center, names: names) collector.startObserving() var once: Bool = false - return Predicate { actualExpression in + return Matcher { actualExpression in let collectorNotificationsExpression = Expression( memoizedExpression: { _ in return collector.observedNotifications @@ -61,7 +68,7 @@ private func _postNotifications( withoutCaching: true ) - assert(pthread_equal(mainThread, pthread_self()) != 0, "Only expecting closure to be evaluated on main thread.") + assert(Thread.isMainThread, "Only expecting closure to be evaluated on main thread.") if !once { once = true _ = try actualExpression.evaluate() @@ -71,10 +78,10 @@ private func _postNotifications( if collector.observedNotifications.isEmpty { actualValue = "no notifications" } else { - actualValue = "<\(stringify(collector.observedNotifications))>" + actualValue = "<\(stringify(collector.observedNotificationDescriptions))>" } - var result = try predicate.satisfies(collectorNotificationsExpression) + var result = try matcher.satisfies(collectorNotificationsExpression) result.message = result.message.replacedExpectation { message in return .expectedCustomValueTo(message.expectedMessage, actual: actualValue) } @@ -83,19 +90,19 @@ private func _postNotifications( } public func postNotifications( - _ predicate: Predicate<[Notification]>, + _ matcher: Matcher<[Notification]>, from center: NotificationCenter = .default -) -> Predicate { - _postNotifications(predicate, from: center) +) -> Matcher { + _postNotifications(matcher, from: center) } #if os(macOS) public func postDistributedNotifications( - _ predicate: Predicate<[Notification]>, + _ matcher: Matcher<[Notification]>, from center: DistributedNotificationCenter = .default(), names: Set -) -> Predicate { - _postNotifications(predicate, from: center, names: names) +) -> Matcher { + _postNotifications(matcher, from: center, names: names) } #endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift b/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift deleted file mode 100644 index ce20c6b..0000000 --- a/Pods/Nimble/Sources/Nimble/Matchers/Predicate.swift +++ /dev/null @@ -1,289 +0,0 @@ -// New Matcher API -// - -/// A Predicate is part of the new matcher API that provides assertions to expectations. -/// -/// Given a code snippet: -/// -/// expect(1).to(equal(2)) -/// ^^^^^^^^ -/// Called a "matcher" -/// -/// A matcher consists of two parts a constructor function and the Predicate. The term Predicate -/// is used as a separate name from Matcher to help transition custom matchers to the new Nimble -/// matcher API. -/// -/// The Predicate provide the heavy lifting on how to assert against a given value. Internally, -/// predicates are simple wrappers around closures to provide static type information and -/// allow composition and wrapping of existing behaviors. -public struct Predicate { - fileprivate var matcher: (Expression) throws -> PredicateResult - - /// Constructs a predicate that knows how take a given value - public init(_ matcher: @escaping (Expression) throws -> PredicateResult) { - self.matcher = matcher - } - - /// Uses a predicate on a given value to see if it passes the predicate. - /// - /// @param expression The value to run the predicate's logic against - /// @returns A predicate result indicate passing or failing and an associated error message. - public func satisfies(_ expression: Expression) throws -> PredicateResult { - return try matcher(expression) - } -} - -/// Provides convenience helpers to defining predicates -extension Predicate { - /// Like Predicate() constructor, but automatically guard against nil (actual) values - public static func define(matcher: @escaping (Expression) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func define(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(message)) - }.requireNonNil - } - - /// Defines a predicate with a default message that can be returned in the closure - /// Unlike `define`, this allows nil values to succeed if the given closure chooses to. - public static func defineNilable(_ message: String = "match", matcher: @escaping (Expression, ExpectationMessage) throws -> PredicateResult) -> Predicate { - return Predicate { actual in - return try matcher(actual, .expectedActualValueTo(message)) - } - } -} - -extension Predicate { - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Also ensures the predicate's actual value cannot pass with `nil` given. - public static func simple(_ message: String = "match", matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(message)) - }.requireNonNil - } - - /// Provides a simple predicate definition that provides no control over the predefined - /// error message. - /// - /// Unlike `simple`, this allows nil values to succeed if the given closure chooses to. - public static func simpleNilable(_ message: String = "match", matcher: @escaping (Expression) throws -> PredicateStatus) -> Predicate { - return Predicate { actual in - return PredicateResult(status: try matcher(actual), message: .expectedActualValueTo(message)) - } - } -} - -// The Expectation style intended for comparison to a PredicateStatus. -public enum ExpectationStyle { - case toMatch, toNotMatch -} - -/// The value that a Predicates return to describe if the given (actual) value matches the -/// predicate. -public struct PredicateResult { - /// Status indicates if the predicate matches, does not match, or fails. - public var status: PredicateStatus - /// The error message that can be displayed if it does not match - public var message: ExpectationMessage - - /// Constructs a new PredicateResult with a given status and error message - public init(status: PredicateStatus, message: ExpectationMessage) { - self.status = status - self.message = message - } - - /// Shorthand to PredicateResult(status: PredicateStatus(bool: bool), message: message) - public init(bool: Bool, message: ExpectationMessage) { - self.status = PredicateStatus(bool: bool) - self.message = message - } - - /// Converts the result to a boolean based on what the expectation intended - public func toBoolean(expectation style: ExpectationStyle) -> Bool { - return status.toBoolean(expectation: style) - } -} - -/// PredicateStatus is a trinary that indicates if a Predicate matches a given value or not -public enum PredicateStatus { - /// Matches indicates if the predicate / matcher passes with the given value - /// - /// For example, `equals(1)` returns `.matches` for `expect(1).to(equal(1))`. - case matches - /// DoesNotMatch indicates if the predicate / matcher fails with the given value, but *would* - /// succeed if the expectation was inverted. - /// - /// For example, `equals(2)` returns `.doesNotMatch` for `expect(1).toNot(equal(2))`. - case doesNotMatch - /// Fail indicates the predicate will never satisfy with the given value in any case. - /// A perfect example is that most matchers fail whenever given `nil`. - /// - /// Using `equal(1)` fails both `expect(nil).to(equal(1))` and `expect(nil).toNot(equal(1))`. - /// Note: Predicate's `requireNonNil` property will also provide this feature mostly for free. - /// Your predicate will still need to guard against nils, but error messaging will be - /// handled for you. - case fail - - /// Converts a boolean to either .matches (if true) or .doesNotMatch (if false). - public init(bool matches: Bool) { - if matches { - self = .matches - } else { - self = .doesNotMatch - } - } - - private func shouldMatch() -> Bool { - switch self { - case .matches: return true - case .doesNotMatch, .fail: return false - } - } - - private func shouldNotMatch() -> Bool { - switch self { - case .doesNotMatch: return true - case .matches, .fail: return false - } - } - - /// Converts the PredicateStatus result to a boolean based on what the expectation intended - internal func toBoolean(expectation style: ExpectationStyle) -> Bool { - if style == .toMatch { - return shouldMatch() - } else { - return shouldNotMatch() - } - } -} - -extension Predicate { - // Someday, make this public? Needs documentation - internal func after(f: @escaping (Expression, PredicateResult) throws -> PredicateResult) -> Predicate { - // swiftlint:disable:previous identifier_name - return Predicate { actual -> PredicateResult in - let result = try self.satisfies(actual) - return try f(actual, result) - } - } - - /// Returns a new Predicate based on the current one that always fails if nil is given as - /// the actual value. - public var requireNonNil: Predicate { - return after { actual, result in - if try actual.evaluate() == nil { - return PredicateResult( - status: .fail, - message: result.message.appendedBeNilHint() - ) - } - return result - } - } -} - -#if canImport(Darwin) -import class Foundation.NSObject - -public typealias PredicateBlock = (_ actualExpression: Expression) throws -> NMBPredicateResult - -public class NMBPredicate: NSObject { - private let predicate: PredicateBlock - - public init(predicate: @escaping PredicateBlock) { - self.predicate = predicate - } - - func satisfies(_ expression: @escaping () throws -> NSObject?, location: SourceLocation) -> NMBPredicateResult { - let expr = Expression(expression: expression, location: location) - do { - return try self.predicate(expr) - } catch let error { - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")).toObjectiveC() - } - } -} - -final public class NMBPredicateResult: NSObject { - public var status: NMBPredicateStatus - public var message: NMBExpectationMessage - - public init(status: NMBPredicateStatus, message: NMBExpectationMessage) { - self.status = status - self.message = message - } - - public init(bool success: Bool, message: NMBExpectationMessage) { - self.status = NMBPredicateStatus.from(bool: success) - self.message = message - } - - public func toSwift() -> PredicateResult { - return PredicateResult(status: status.toSwift(), - message: message.toSwift()) - } -} - -extension PredicateResult { - public func toObjectiveC() -> NMBPredicateResult { - return NMBPredicateResult(status: status.toObjectiveC(), message: message.toObjectiveC()) - } -} - -final public class NMBPredicateStatus: NSObject { - private let status: Int - private init(status: Int) { - self.status = status - } - - public static let matches: NMBPredicateStatus = NMBPredicateStatus(status: 0) - public static let doesNotMatch: NMBPredicateStatus = NMBPredicateStatus(status: 1) - public static let fail: NMBPredicateStatus = NMBPredicateStatus(status: 2) - - public override var hash: Int { return self.status.hashValue } - - public override func isEqual(_ object: Any?) -> Bool { - guard let otherPredicate = object as? NMBPredicateStatus else { - return false - } - return self.status == otherPredicate.status - } - - public static func from(status: PredicateStatus) -> NMBPredicateStatus { - switch status { - case .matches: return self.matches - case .doesNotMatch: return self.doesNotMatch - case .fail: return self.fail - } - } - - public static func from(bool success: Bool) -> NMBPredicateStatus { - return self.from(status: PredicateStatus(bool: success)) - } - - public func toSwift() -> PredicateStatus { - switch status { - case NMBPredicateStatus.matches.status: return .matches - case NMBPredicateStatus.doesNotMatch.status: return .doesNotMatch - case NMBPredicateStatus.fail.status: return .fail - default: - internalError("Unhandle status for NMBPredicateStatus") - } - } -} - -extension PredicateStatus { - public func toObjectiveC() -> NMBPredicateStatus { - return NMBPredicateStatus.from(status: self) - } -} - -#endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift index 7c1b2b2..2bb9409 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/RaisesException.swift @@ -18,7 +18,7 @@ public func raiseException( reason: String? = nil, userInfo: NSDictionary? = nil, closure: ((NSException) -> Void)? = nil -) -> Predicate { +) -> Matcher { return raiseException(named: named?.rawValue, reason: reason, userInfo: userInfo, closure: closure) } @@ -36,8 +36,8 @@ public func raiseException( reason: String? = nil, userInfo: NSDictionary? = nil, closure: ((NSException) -> Void)? = nil -) -> Predicate { - return Predicate { actualExpression in +) -> Matcher { + return Matcher { actualExpression in var exception: NSException? let capture = NMBExceptionCapture(handler: ({ e in exception = e @@ -48,7 +48,7 @@ public func raiseException( _ = try actualExpression.evaluate() } } catch { - return PredicateResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) + return MatcherResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) } let message = messageForException( @@ -66,7 +66,7 @@ public func raiseException( userInfo: userInfo, closure: closure ) - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -141,7 +141,7 @@ internal func exceptionMatchesNonNilFieldsOrClosure( return matches } -public class NMBObjCRaiseExceptionPredicate: NMBPredicate { +public class NMBObjCRaiseExceptionMatcher: NMBMatcher { private let _name: String? private let _reason: String? private let _userInfo: NSDictionary? @@ -153,22 +153,22 @@ public class NMBObjCRaiseExceptionPredicate: NMBPredicate { _userInfo = userInfo _block = block - let predicate: Predicate = raiseException( + let matcher: Matcher = raiseException( named: name, reason: reason, userInfo: userInfo, closure: block ) - let predicateBlock: PredicateBlock = { actualExpression in - return try predicate.satisfies(actualExpression).toObjectiveC() + let matcherBlock: MatcherBlock = { actualExpression in + return try matcher.satisfies(actualExpression).toObjectiveC() } - super.init(predicate: predicateBlock) + super.init(matcher: matcherBlock) } - @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionPredicate { + @objc public var named: (_ name: String) -> NMBObjCRaiseExceptionMatcher { let (reason, userInfo, block) = (_reason, _userInfo, _block) return { name in - return NMBObjCRaiseExceptionPredicate( + return NMBObjCRaiseExceptionMatcher( name: name, reason: reason, userInfo: userInfo, @@ -177,10 +177,10 @@ public class NMBObjCRaiseExceptionPredicate: NMBPredicate { } } - @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionPredicate { + @objc public var reason: (_ reason: String?) -> NMBObjCRaiseExceptionMatcher { let (name, userInfo, block) = (_name, _userInfo, _block) return { reason in - return NMBObjCRaiseExceptionPredicate( + return NMBObjCRaiseExceptionMatcher( name: name, reason: reason, userInfo: userInfo, @@ -189,10 +189,10 @@ public class NMBObjCRaiseExceptionPredicate: NMBPredicate { } } - @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionPredicate { + @objc public var userInfo: (_ userInfo: NSDictionary?) -> NMBObjCRaiseExceptionMatcher { let (name, reason, block) = (_name, _reason, _block) return { userInfo in - return NMBObjCRaiseExceptionPredicate( + return NMBObjCRaiseExceptionMatcher( name: name, reason: reason, userInfo: userInfo, @@ -201,10 +201,10 @@ public class NMBObjCRaiseExceptionPredicate: NMBPredicate { } } - @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionPredicate { + @objc public var satisfyingBlock: (_ block: ((NSException) -> Void)?) -> NMBObjCRaiseExceptionMatcher { let (name, reason, userInfo) = (_name, _reason, _userInfo) return { block in - return NMBObjCRaiseExceptionPredicate( + return NMBObjCRaiseExceptionMatcher( name: name, reason: reason, userInfo: userInfo, @@ -214,9 +214,9 @@ public class NMBObjCRaiseExceptionPredicate: NMBPredicate { } } -extension NMBPredicate { - @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionPredicate { - return NMBObjCRaiseExceptionPredicate(name: nil, reason: nil, userInfo: nil, block: nil) +extension NMBMatcher { + @objc public class func raiseExceptionMatcher() -> NMBObjCRaiseExceptionMatcher { + return NMBObjCRaiseExceptionMatcher(name: nil, reason: nil, userInfo: nil, block: nil) } } #endif diff --git a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift index 50ab641..30f9045 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAllOf.swift @@ -1,17 +1,18 @@ /// A Nimble matcher that succeeds when the actual value matches with all of the matchers /// provided in the variable list of matchers. -public func satisfyAllOf(_ predicates: Predicate...) -> Predicate { - return satisfyAllOf(predicates) +public func satisfyAllOf(_ matchers: Matcher...) -> Matcher { + return satisfyAllOf(matchers) } /// A Nimble matcher that succeeds when the actual value matches with all of the matchers /// provided in the array of matchers. -public func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in +public func satisfyAllOf(_ matchers: [Matcher]) -> Matcher { + return Matcher.define { actualExpression in + let cachedExpression = actualExpression.withCaching() var postfixMessages = [String]() - var status: PredicateStatus = .matches - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) + var status: MatcherStatus = .matches + for matcher in matchers { + let result = try matcher.satisfies(cachedExpression) if result.status == .fail { status = .fail } else if result.status == .doesNotMatch, status != .fail { @@ -21,7 +22,7 @@ public func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { } var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { + if let actualValue = try cachedExpression.evaluate() { msg = .expectedCustomValueTo( "match all of: " + postfixMessages.joined(separator: ", and "), actual: "\(actualValue)" @@ -32,33 +33,84 @@ public func satisfyAllOf(_ predicates: [Predicate]) -> Predicate { ) } - return PredicateResult(status: status, message: msg) + return MatcherResult(status: status, message: msg) } } -public func && (left: Predicate, right: Predicate) -> Predicate { +public func && (left: Matcher, right: Matcher) -> Matcher { return satisfyAllOf(left, right) } +// There's a compiler bug in swift 5.7.2 and earlier (xcode 14.2 and earlier) +// which causes runtime crashes when you use `[any AsyncableMatcher]`. +// https://github.com/apple/swift/issues/61403 +#if swift(>=5.8.0) +/// A Nimble matcher that succeeds when the actual value matches with all of the matchers +/// provided in the variable list of matchers. +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func satisfyAllOf(_ matchers: any AsyncableMatcher...) -> AsyncMatcher { + return satisfyAllOf(matchers) +} + +/// A Nimble matcher that succeeds when the actual value matches with all of the matchers +/// provided in the array of matchers. +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func satisfyAllOf(_ matchers: [any AsyncableMatcher]) -> AsyncMatcher { + return AsyncMatcher.define { actualExpression in + let cachedExpression = actualExpression.withCaching() + var postfixMessages = [String]() + var status: MatcherStatus = .matches + for matcher in matchers { + let result = try await matcher.satisfies(cachedExpression) + if result.status == .fail { + status = .fail + } else if result.status == .doesNotMatch, status != .fail { + status = .doesNotMatch + } + postfixMessages.append("{\(result.message.expectedMessage)}") + } + + var msg: ExpectationMessage + if let actualValue = try await cachedExpression.evaluate() { + msg = .expectedCustomValueTo( + "match all of: " + postfixMessages.joined(separator: ", and "), + actual: "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match all of: " + postfixMessages.joined(separator: ", and ") + ) + } + + return MatcherResult(status: status, message: msg) + } +} + +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func && (left: some AsyncableMatcher, right: some AsyncableMatcher) -> AsyncMatcher { + return satisfyAllOf(left, right) +} +#endif // swift(>=5.8.0) + #if canImport(Darwin) import class Foundation.NSObject -extension NMBPredicate { - @objc public class func satisfyAllOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if predicates.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, +extension NMBMatcher { + @objc public class func satisfyAllOfMatcher(_ matchers: [NMBMatcher]) -> NMBMatcher { + return NMBMatcher { actualExpression in + if matchers.isEmpty { + return NMBMatcherResult( + status: NMBMatcherStatus.fail, message: NMBExpectationMessage( fail: "satisfyAllOf must be called with at least one matcher" ) ) } - var elementEvaluators = [Predicate]() - for predicate in predicates { - let elementEvaluator = Predicate { expression in - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() + var elementEvaluators = [Matcher]() + for matcher in matchers { + let elementEvaluator = Matcher { expression in + return matcher.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() } elementEvaluators.append(elementEvaluator) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift index bd027d2..56ffdd1 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/SatisfyAnyOf.swift @@ -1,64 +1,116 @@ /// 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(_ predicates: Predicate...) -> Predicate { - return satisfyAnyOf(predicates) +public func satisfyAnyOf(_ matchers: Matcher...) -> Matcher { + return satisfyAnyOf(matchers) } /// A Nimble matcher that succeeds when the actual value matches with any of the matchers /// provided in the array of matchers. -public func satisfyAnyOf(_ predicates: [Predicate]) -> Predicate { - return Predicate.define { actualExpression in - var postfixMessages = [String]() - var status: PredicateStatus = .doesNotMatch - for predicate in predicates { - let result = try predicate.satisfies(actualExpression) - if result.status == .fail { - status = .fail - } else if result.status == .matches, status != .fail { - status = .matches - } - postfixMessages.append("{\(result.message.expectedMessage)}") +public func satisfyAnyOf(_ matchers: [Matcher]) -> Matcher { + return Matcher.define { actualExpression in + let cachedExpression = actualExpression.withCaching() + var postfixMessages = [String]() + var status: MatcherStatus = .doesNotMatch + for matcher in matchers { + let result = try matcher.satisfies(cachedExpression) + if result.status == .fail { + status = .fail + } else if result.status == .matches, status != .fail { + status = .matches } + postfixMessages.append("{\(result.message.expectedMessage)}") + } - var msg: ExpectationMessage - if let actualValue = try actualExpression.evaluate() { - msg = .expectedCustomValueTo( - "match one of: " + postfixMessages.joined(separator: ", or "), - actual: "\(actualValue)" - ) - } else { - msg = .expectedActualValueTo( - "match one of: " + postfixMessages.joined(separator: ", or ") - ) + var msg: ExpectationMessage + if let actualValue = try cachedExpression.evaluate() { + msg = .expectedCustomValueTo( + "match one of: " + postfixMessages.joined(separator: ", or "), + actual: "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match one of: " + postfixMessages.joined(separator: ", or ") + ) + } + + return MatcherResult(status: status, message: msg) + } +} + +public func || (left: Matcher, right: Matcher) -> Matcher { + return satisfyAnyOf(left, right) +} + +// There's a compiler bug in swift 5.7.2 and earlier (xcode 14.2 and earlier) +// which causes runtime crashes when you use `[any AsyncableMatcher]`. +// https://github.com/apple/swift/issues/61403 +#if swift(>=5.8.0) +/// A Nimble matcher that succeeds when the actual value matches with any of the matchers +/// provided in the variable list of matchers. +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func satisfyAnyOf(_ matchers: any AsyncableMatcher...) -> AsyncMatcher { + return satisfyAnyOf(matchers) +} + +/// A Nimble matcher that succeeds when the actual value matches with any of the matchers +/// provided in the array of matchers. +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func satisfyAnyOf(_ matchers: [any AsyncableMatcher]) -> AsyncMatcher { + return AsyncMatcher.define { actualExpression in + let cachedExpression = actualExpression.withCaching() + var postfixMessages = [String]() + var status: MatcherStatus = .doesNotMatch + for matcher in matchers { + let result = try await matcher.satisfies(cachedExpression) + if result.status == .fail { + status = .fail + } else if result.status == .matches, status != .fail { + status = .matches } + postfixMessages.append("{\(result.message.expectedMessage)}") + } - return PredicateResult(status: status, message: msg) + var msg: ExpectationMessage + if let actualValue = try await cachedExpression.evaluate() { + msg = .expectedCustomValueTo( + "match one of: " + postfixMessages.joined(separator: ", or "), + actual: "\(actualValue)" + ) + } else { + msg = .expectedActualValueTo( + "match one of: " + postfixMessages.joined(separator: ", or ") + ) } + + return MatcherResult(status: status, message: msg) + } } -public func || (left: Predicate, right: Predicate) -> Predicate { +@available(macOS 13.0.0, iOS 16.0.0, tvOS 16.0.0, watchOS 9.0.0, *) +public func || (left: some AsyncableMatcher, right: some AsyncableMatcher) -> AsyncMatcher { return satisfyAnyOf(left, right) } +#endif // swift(>=5.8.0) #if canImport(Darwin) import class Foundation.NSObject -extension NMBPredicate { - @objc public class func satisfyAnyOfMatcher(_ predicates: [NMBPredicate]) -> NMBPredicate { - return NMBPredicate { actualExpression in - if predicates.isEmpty { - return NMBPredicateResult( - status: NMBPredicateStatus.fail, +extension NMBMatcher { + @objc public class func satisfyAnyOfMatcher(_ matchers: [NMBMatcher]) -> NMBMatcher { + return NMBMatcher { actualExpression in + if matchers.isEmpty { + return NMBMatcherResult( + status: NMBMatcherStatus.fail, message: NMBExpectationMessage( fail: "satisfyAnyOf must be called with at least one matcher" ) ) } - var elementEvaluators = [Predicate]() - for predicate in predicates { - let elementEvaluator = Predicate { expression in - return predicate.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() + var elementEvaluators = [Matcher]() + for matcher in matchers { + let elementEvaluator = Matcher { expression in + return matcher.satisfies({ try expression.evaluate() }, location: actualExpression.location).toSwift() } elementEvaluators.append(elementEvaluator) diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift index 34a94fb..b0c2245 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowAssertion.swift @@ -1,9 +1,9 @@ -#if canImport(CwlPreconditionTesting) && (os(macOS) || os(iOS)) +// swiftlint:disable all +#if canImport(CwlPreconditionTesting) && (os(macOS) || os(iOS) || os(visionOS)) import CwlPreconditionTesting #elseif canImport(CwlPosixPreconditionTesting) import CwlPosixPreconditionTesting #elseif canImport(Glibc) -// swiftlint:disable all import Glibc // This function is called from the signal handler to shut down the thread and return 1 (indicating a SIGILL was received). @@ -79,14 +79,12 @@ public func catchBadInstruction(block: @escaping () -> Void) -> BadInstructionEx return caught ? BadInstructionException() : nil } -// swiftlint:enable all #endif -public func throwAssertion() -> Predicate { - return Predicate { actualExpression in - #if os(watchOS) - fatalError("Nimble currently doesn't support watchOS.") - #elseif (arch(x86_64) || arch(arm64)) && (canImport(Darwin) || canImport(Glibc)) +public func throwAssertion() -> Matcher { + return Matcher { actualExpression in + #if (arch(x86_64) || arch(arm64)) + #if (canImport(CwlPreconditionTesting) || canImport(CwlPosixPreconditionTesting) || canImport(Glibc)) let message = ExpectationMessage.expectedTo("throw an assertion") var actualError: Error? let caughtException: BadInstructionException? = catchBadInstruction { @@ -105,6 +103,21 @@ public func throwAssertion() -> Predicate { print() NimbleEnvironment.activeInstance.suppressTVOSAssertionWarning = true } + #elseif os(watchOS) + if !NimbleEnvironment.activeInstance.suppressWatchOSAssertionWarning { + print() + print("[Nimble Warning]: If you're getting stuck on a debugger breakpoint for a " + + "fatal error while using throwAssertion(), please disable 'Debug Executable' " + + "in your scheme. Go to 'Edit Scheme > Test > Info' and uncheck " + + "'Debug Executable'. If you've already done that, suppress this warning " + + "by setting `NimbleEnvironment.activeInstance.suppressWatchOSAssertionWarning = true`. " + + "This is required because the standard methods of catching assertions " + + "(mach APIs) are unavailable for watchOS. Instead, the same mechanism the " + + "debugger uses is the fallback method for watchOS." + ) + print() + NimbleEnvironment.activeInstance.suppressWatchOSAssertionWarning = true + } #endif do { _ = try actualExpression.evaluate() @@ -114,13 +127,21 @@ public func throwAssertion() -> Predicate { } if let actualError = actualError { - return PredicateResult( + return MatcherResult( bool: false, message: message.appended(message: "; threw error instead <\(actualError)>") ) } else { - return PredicateResult(bool: caughtException != nil, message: message) + return MatcherResult(bool: caughtException != nil, message: message) } + #else + let message = """ + The throwAssertion Nimble matcher does not support your platform. + Note: throwAssertion no longer works on tvOS or watchOS platforms when you use Nimble with Cocoapods. + You will have to use Nimble with Swift Package Manager or Carthage. + """ + fatalError(message) + #endif #else let message = """ The throwAssertion Nimble matcher can only run on x86_64 and arm64 platforms. @@ -131,3 +152,4 @@ public func throwAssertion() -> Predicate { #endif } } +// swiftlint:enable all diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift index d5ac732..32c2f6c 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ThrowError.swift @@ -9,8 +9,8 @@ /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func throwError() -> Predicate { - return Predicate { actualExpression in +public func throwError() -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -19,12 +19,12 @@ public func throwError() -> Predicate { } if let actualError = actualError { - return PredicateResult( + return MatcherResult( bool: true, message: .expectedCustomValueTo("throw any error", actual: "<\(actualError)>") ) } else { - return PredicateResult( + return MatcherResult( bool: false, message: .expectedCustomValueTo("throw any error", actual: "no error") ) @@ -43,8 +43,8 @@ public func throwError() -> Predicate { /// /// 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 { actualExpression in +public func throwError(_ error: T, closure: ((Error) -> Void)? = nil) -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -74,7 +74,7 @@ public func throwError(_ error: T, closure: ((Error) -> Void)? = } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -89,8 +89,8 @@ public func throwError(_ error: T, closure: ((Error) -> Void)? = /// /// nil arguments indicates that the matcher should not attempt to match against /// that parameter. -public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Predicate { - return Predicate { actualExpression in +public func throwError(_ error: T, closure: ((T) -> Void)? = nil) -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -120,7 +120,7 @@ public func throwError(_ error: T, closure: ((T) -> V } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -138,8 +138,8 @@ public func throwError(_ error: T, closure: ((T) -> V public func throwError( errorType: T.Type, closure: ((T) -> Void)? = nil -) -> Predicate { - return Predicate { actualExpression in +) -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -186,7 +186,7 @@ public func throwError( } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } @@ -197,8 +197,8 @@ 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: @escaping ((Error) -> Void)) -> Predicate { - return Predicate { actualExpression in +public func throwError(closure: @escaping ((Error) -> Void)) -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -221,7 +221,7 @@ public func throwError(closure: @escaping ((Error) -> Void)) -> Predicate(closure: @escaping ((Error) -> Void)) -> Predicate(closure: @escaping ((T) -> Void)) -> Predicate { - return Predicate { actualExpression in +public func throwError(closure: @escaping ((T) -> Void)) -> Matcher { + return Matcher { actualExpression in var actualError: Error? do { _ = try actualExpression.evaluate() @@ -256,6 +256,6 @@ public func throwError(closure: @escaping ((T) -> Void)) -> Predi } } - return PredicateResult(bool: matches, message: message) + return MatcherResult(bool: matches, message: message) } } diff --git a/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift b/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift index d9c616a..2f22991 100644 --- a/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift +++ b/Pods/Nimble/Sources/Nimble/Matchers/ToSucceed.swift @@ -14,21 +14,21 @@ public enum ToSucceedResult { Return `.succeeded` when the validation succeeds. Return `.failed` with a failure reason when the validation fails. */ -public func succeed() -> Predicate { - return Predicate.define { actualExpression in +public func succeed() -> Matcher { + return Matcher.define { actualExpression in let optActual = try actualExpression.evaluate() guard let actual = optActual else { - return PredicateResult(status: .fail, message: .fail("expected a ToSucceedResult, got ")) + return MatcherResult(status: .fail, message: .fail("expected a ToSucceedResult, got ")) } switch actual { case .succeeded: - return PredicateResult( + return MatcherResult( bool: true, message: .expectedCustomValueTo("succeed", actual: "") ) case .failed(let reason): - return PredicateResult( + return MatcherResult( bool: false, message: .expectedCustomValueTo("succeed", actual: " because <\(reason)>") ) diff --git a/Pods/Nimble/Sources/Nimble/Nimble.h b/Pods/Nimble/Sources/Nimble/Nimble.h index dc68ded..9fb6ca3 100644 --- a/Pods/Nimble/Sources/Nimble/Nimble.h +++ b/Pods/Nimble/Sources/Nimble/Nimble.h @@ -1,11 +1,23 @@ #import + +// When running below Xcode 15, TARGET_OS_VISION is not defined. Since the project has TREAT_WARNINGS_AS_ERROS enabled +// we need to workaround this warning. +#ifndef TARGET_OS_VISION + #define TARGET_OS_VISION 0 +#endif /* TARGET_OS_VISION */ + #import #import #import -#if TARGET_OS_OSX || TARGET_OS_IOS - #import - #import +#if TARGET_OS_OSX || TARGET_OS_IOS || TARGET_OS_VISION +#if COCOAPODS + #import + #import +#else + #import "CwlMachBadInstructionHandler.h" + #import "CwlCatchException.h" +#endif #endif FOUNDATION_EXPORT double NimbleVersionNumber; diff --git a/Pods/Nimble/Sources/Nimble/Polling+AsyncAwait.swift b/Pods/Nimble/Sources/Nimble/Polling+AsyncAwait.swift new file mode 100644 index 0000000..6adb153 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Polling+AsyncAwait.swift @@ -0,0 +1,601 @@ +// swiftlint:disable file_length +#if !os(WASI) + +import Dispatch + +@MainActor +internal func execute(_ expression: AsyncExpression, style: ExpectationStyle, to: String, description: String?, matcherExecutor: () async throws -> MatcherResult) async -> (Bool, FailureMessage) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let result = try await matcherExecutor() + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(try await expression.evaluate()))>" + } + return (result.toBoolean(expectation: style), msg) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg) + } +} + +internal actor Poller { + private var lastMatcherResult: MatcherResult? + + init() {} + + // swiftlint:disable:next function_parameter_count + func poll(expression: AsyncExpression, + style: ExpectationStyle, + matchStyle: AsyncMatchStyle, + timeout: NimbleTimeInterval, + poll: NimbleTimeInterval, + fnName: String, + matcherRunner: @escaping () async throws -> MatcherResult) async -> MatcherResult { + let fnName = "expect(...).\(fnName)(...)" + let result = await pollBlock( + pollInterval: poll, + timeoutInterval: timeout, + file: expression.location.file, + line: expression.location.line, + fnName: fnName) { + if self.updateMatcherResult(result: try await matcherRunner()) + .toBoolean(expectation: style) { + if matchStyle.isContinous { + return .incomplete + } + return .finished(true) + } else { + if matchStyle.isContinous { + return .finished(false) + } else { + return .incomplete + } + } + } + return processPollResult(result.toPollResult(), matchStyle: matchStyle, lastMatcherResult: lastMatcherResult, fnName: fnName) + } + + func updateMatcherResult(result: MatcherResult) -> MatcherResult { + self.lastMatcherResult = result + return result + } +} + +// swiftlint:disable:next function_parameter_count +internal func poll( + expression: AsyncExpression, + style: ExpectationStyle, + matchStyle: AsyncMatchStyle, + timeout: NimbleTimeInterval, + poll: NimbleTimeInterval, + fnName: String, + matcherRunner: @escaping () async throws -> MatcherResult +) async -> MatcherResult { + let poller = Poller() + return await poller.poll( + expression: expression, + style: style, + matchStyle: matchStyle, + timeout: timeout, + poll: poll, + fnName: fnName, + matcherRunner: matcherRunner + ) +} + +extension SyncExpectation { + // MARK: - With Synchronous Matchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return 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() + @discardableResult + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } + + // MARK: - With AsyncMatchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return 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() + @discardableResult + public func toNotEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } +} + +extension AsyncExpectation { + // MARK: - With Synchronous Matchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return 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() + @discardableResult + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } + + // MARK: - With AsyncMatchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return 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() + @discardableResult + public func toNotEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async -> Self { + return await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } +} + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Polling+Require.swift b/Pods/Nimble/Sources/Nimble/Polling+Require.swift new file mode 100644 index 0000000..7f9c926 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Polling+Require.swift @@ -0,0 +1,762 @@ +// swiftlint:disable file_length +#if !os(WASI) + +import Dispatch + +extension SyncRequirement { + // MARK: - Dispatch Polling with Synchronous Matchers + /// Require 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. + /// + /// @warning + /// This form of `toEventually` does not work in any kind of async context. Use the async form of `toEventually` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `toEventually` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + poll( + style: .toMatch, + matchStyle: .eventually, + matcher: matcher, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually" + ), + to: "to eventually", + description: description, + captureExceptions: false + ) + return try verify(pass, msg, try expression.evaluate()) + } + + /// 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. + /// + /// @warning + /// This form of `toEventuallyNot` does not work in any kind of async context. + /// Use the async form of `toEventuallyNot` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `toEventuallyNot` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + poll( + style: .toNotMatch, + matchStyle: .eventually, + matcher: matcher, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot" + ), + to: "to eventually not", + description: description, + captureExceptions: false + ) + return try verify(pass, msg, try expression.evaluate()) + } + + /// 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. + /// + /// @warning + /// This form of `toNotEventually` does not work in any kind of async context. + /// Use the async form of `toNotEventually` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `toNotEventually` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + return try toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `toNever` does not work in any kind of async context. + /// Use the async form of `toNever` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `toNever` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + poll( + style: .toNotMatch, + matchStyle: .never, + matcher: matcher, + timeout: until, + poll: pollInterval, + fnName: "toNever" + ), + to: "to never", + description: description, + captureExceptions: false + ) + return try verify(pass, msg, try expression.evaluate()) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `neverTo` does not work in any kind of async context. + /// Use the async form of `neverTo` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `neverTo` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + return try toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `toAlways` does not work in any kind of async context. + /// Use the async form of `toAlways` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `toAlways` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + poll( + style: .toMatch, + matchStyle: .always, + matcher: matcher, + timeout: until, + poll: pollInterval, + fnName: "toAlways" + ), + to: "to always", + description: description, + captureExceptions: false + ) + return try verify(pass, msg, try expression.evaluate()) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `alwaysTo` does not work in any kind of async context. + /// Use the async form of `alwaysTo` if you are running tests in an async context. + @available(*, noasync, message: "the sync variant of `alwaysTo` does not work in async contexts. Use the async variant as a drop-in replacement") + @discardableResult + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) throws -> Value { + return try toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } + + // MARK: - Async Polling with Synchronous Matchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + @discardableResult + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { @MainActor in + try matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } + + // MARK: - Async Polling With AsyncMatchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + @discardableResult + public func toNotEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: asyncExpression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + let asyncExpression = expression.toAsyncExpression() + + let (pass, msg) = await execute( + asyncExpression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: asyncExpression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { @MainActor in + try await matcher.satisfies(expression.withoutCaching().toAsyncExpression()) + } + } + return try verify(pass, msg, try await asyncExpression.evaluate()) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } +} + +extension AsyncRequirement { + // MARK: - Async Polling With Synchronous Matchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + @discardableResult + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { + try matcher.satisfies(await expression.withoutCaching().toSynchronousExpression()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } + + // MARK: - Async Polling With AsyncMatchers + /// Tests the actual value using a matcher to match by checking continuously + /// at each pollInterval until the timeout is reached. + @discardableResult + public func toEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to eventually", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toEventuallyNot(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to eventually not", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .eventually, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to not match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toEventuallyNot() + @discardableResult + public func toNotEventually(_ matcher: AsyncMatcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + @discardableResult + public func toNever(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toNotMatch, + to: "to never", + description: description) { + await poll( + expression: expression, + style: .toNotMatch, + matchStyle: .never, + timeout: until, + poll: pollInterval, + fnName: "toNever") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + @discardableResult + public func neverTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + @discardableResult + public func toAlways(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = await execute( + expression, + style: .toMatch, + to: "to always", + description: description) { + await poll( + expression: expression, + style: .toMatch, + matchStyle: .always, + timeout: until, + poll: pollInterval, + fnName: "toAlways") { + try await matcher.satisfies(expression.withoutCaching()) + } + } + return try verify(pass, msg, try await expression.evaluate()) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + @discardableResult + public func alwaysTo(_ matcher: AsyncMatcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) async throws -> Value { + return try await toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } +} + +// MARK: - UnwrapEventually + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrap(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) throws -> T { + try require(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrap(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) throws -> T { + try require(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwraps(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () throws -> T?) throws -> T { + try require(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `require(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwraps(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() throws -> T?)) throws -> T { + try require(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrap(file: FileString = #file, line: UInt = #line, _ expression: @escaping () async throws -> T?) async throws -> T { + try await requirea(file: file, line: line, try await expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrap(file: FileString = #file, line: UInt = #line, _ expression: () -> (() async throws -> T?)) async throws -> T { + try await requirea(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrapa(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure @escaping () async throws -> T?) async throws -> T { + try await requirea(file: file, line: line, try await expression()).toEventuallyNot(beNil()) +} + +/// Makes sure that the async expression evaluates to a non-nil value, otherwise throw an error. +/// As you can tell, this is a much less verbose equivalent to `requirea(expression).toEventuallyNot(beNil())` +@discardableResult +public func pollUnwrapa(file: FileString = #file, line: UInt = #line, _ expression: @autoclosure () -> (() async throws -> T?)) async throws -> T { + try await requirea(file: file, line: line, expression()).toEventuallyNot(beNil()) +} + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Polling.swift b/Pods/Nimble/Sources/Nimble/Polling.swift new file mode 100644 index 0000000..31a03d7 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Polling.swift @@ -0,0 +1,327 @@ +#if !os(WASI) + +import Foundation +import Dispatch + +/// If you are running on a slower machine, it could be useful to increase the default timeout value +/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. +/// +/// - Warning: This has been renamed to ``PollingDefaults``. Starting in Nimble 14, `AsyncDefaults` will be removed entirely. +/// +/// For the time being, `AsyncDefaults` will function the same. +/// However, `AsyncDefaults` will be removed in a future release. +@available(*, unavailable, renamed: "PollingDefaults") +public struct AsyncDefaults { + public static var timeout: NimbleTimeInterval { + get { + PollingDefaults.timeout + } + set { + PollingDefaults.timeout = newValue + } + } + public static var pollInterval: NimbleTimeInterval { + get { + PollingDefaults.pollInterval + } + set { + PollingDefaults.pollInterval = newValue + } + } +} + +/// If you are running on a slower machine, it could be useful to increase the default timeout value +/// or slow down poll interval. Default timeout interval is 1, and poll interval is 0.01. +/// +/// - Note: This used to be known as ``AsyncDefaults``. +public struct PollingDefaults { + public static var timeout: NimbleTimeInterval = .seconds(1) + public static var pollInterval: NimbleTimeInterval = .milliseconds(10) +} + +internal enum AsyncMatchStyle { + case eventually, never, always + + var isContinous: Bool { + switch self { + case .eventually: + return false + case .never, .always: + return true + } + } +} + +// swiftlint:disable:next function_parameter_count +internal func poll( + style: ExpectationStyle, + matchStyle: AsyncMatchStyle, + matcher: Matcher, + timeout: NimbleTimeInterval, + poll: NimbleTimeInterval, + fnName: String +) -> Matcher { + return Matcher { actualExpression in + let uncachedExpression = actualExpression.withoutCaching() + let fnName = "expect(...).\(fnName)(...)" + var lastMatcherResult: MatcherResult? + let result = pollBlock( + pollInterval: poll, + timeoutInterval: timeout, + file: actualExpression.location.file, + line: actualExpression.location.line, + fnName: fnName) { + lastMatcherResult = try matcher.satisfies(uncachedExpression) + if lastMatcherResult!.toBoolean(expectation: style) { + if matchStyle.isContinous { + return .incomplete + } + return .finished(true) + } else { + if matchStyle.isContinous { + return .finished(false) + } else { + return .incomplete + } + } + } + return processPollResult(result, matchStyle: matchStyle, lastMatcherResult: lastMatcherResult, fnName: fnName) + } +} + +// swiftlint:disable:next cyclomatic_complexity +internal func processPollResult(_ result: PollResult, matchStyle: AsyncMatchStyle, lastMatcherResult: MatcherResult?, fnName: String) -> MatcherResult { + switch result { + case .completed: + switch matchStyle { + case .eventually: + return lastMatcherResult! + case .never: + return MatcherResult( + status: .fail, + message: lastMatcherResult?.message ?? .fail("matched the matcher when it shouldn't have") + ) + case .always: + return MatcherResult( + status: .fail, + message: lastMatcherResult?.message ?? .fail("didn't match the matcher when it should have") + ) + } + case .timedOut: + switch matchStyle { + case .eventually: + let message = lastMatcherResult?.message ?? .fail("timed out before returning a value") + return MatcherResult(status: .fail, message: message) + case .never: + return MatcherResult(status: .doesNotMatch, message: .expectedTo("never match the matcher")) + case .always: + return MatcherResult(status: .matches, message: .expectedTo("always match the matcher")) + } + case let .errorThrown(error): + return MatcherResult(status: .fail, message: .fail("unexpected error thrown: <\(error)>")) + case let .raisedException(exception): + return MatcherResult(status: .fail, message: .fail("unexpected exception raised: \(exception)")) + case .blockedRunLoop: + let message = lastMatcherResult?.message.appended(message: " (timed out, but main run loop was unresponsive).") ?? + .fail("main run loop was unresponsive") + return MatcherResult(status: .fail, message: message) + case .incomplete: + internalError("Reached .incomplete state for \(fnName)(...).") + } +} + +internal let toEventuallyRequiresClosureError = FailureMessage( + stringValue: """ + expect(...).toEventually(...) requires an explicit closure (eg - expect { ... }.toEventually(...) ) + Swift 1.2 @autoclosure behavior has changed in an incompatible way for Nimble to function + """ +) + +extension SyncExpectation { + /// 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. + /// + /// @warning + /// This form of `toEventually` does not work in any kind of async context. Use the async form of `toEventually` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `toEventually` does not work in async contexts. Use the async variant as a drop-in replacement") + public func toEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + poll( + style: .toMatch, + matchStyle: .eventually, + matcher: matcher, + timeout: timeout, + poll: pollInterval, + fnName: "toEventually" + ), + to: "to eventually", + description: description, + captureExceptions: false + ) + return 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. + /// + /// @warning + /// This form of `toEventuallyNot` does not work in any kind of async context. + /// Use the async form of `toEventuallyNot` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `toEventuallyNot` does not work in async contexts. Use the async variant as a drop-in replacement") + public func toEventuallyNot(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + poll( + style: .toNotMatch, + matchStyle: .eventually, + matcher: matcher, + timeout: timeout, + poll: pollInterval, + fnName: "toEventuallyNot" + ), + to: "to eventually not", + description: description, + captureExceptions: false + ) + return 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. + /// + /// @warning + /// This form of `toNotEventually` does not work in any kind of async context. + /// Use the async form of `toNotEventually` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `toNotEventually` does not work in async contexts. Use the async variant as a drop-in replacement") + public func toNotEventually(_ matcher: Matcher, timeout: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + return toEventuallyNot(matcher, timeout: timeout, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `toNever` does not work in any kind of async context. + /// Use the async form of `toNever` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `toNever` does not work in async contexts. Use the async variant as a drop-in replacement") + public func toNever(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toNotMatch, + poll( + style: .toNotMatch, + matchStyle: .never, + matcher: matcher, + timeout: until, + poll: pollInterval, + fnName: "toNever" + ), + to: "to never", + description: description, + captureExceptions: false + ) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to never match by checking + /// continuously at each pollInterval until the timeout is reached. + /// + /// Alias of toNever() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `neverTo` does not work in any kind of async context. + /// Use the async form of `neverTo` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `neverTo` does not work in async contexts. Use the async variant as a drop-in replacement") + public func neverTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + return toNever(matcher, until: until, pollInterval: pollInterval, description: description) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `toAlways` does not work in any kind of async context. + /// Use the async form of `toAlways` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `toAlways` does not work in async contexts. Use the async variant as a drop-in replacement") + public func toAlways(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + nimblePrecondition(expression.isClosure, "NimbleInternalError", toEventuallyRequiresClosureError.stringValue) + + let (pass, msg) = execute( + expression, + .toMatch, + poll( + style: .toMatch, + matchStyle: .always, + matcher: matcher, + timeout: until, + poll: pollInterval, + fnName: "toAlways" + ), + to: "to always", + description: description, + captureExceptions: false + ) + return verify(pass, msg) + } + + /// Tests the actual value using a matcher to always match by checking + /// continusouly at each pollInterval until the timeout is reached + /// + /// Alias of toAlways() + /// + /// @discussion + /// This function manages the main run loop (`NSRunLoop.mainRunLoop()`) while this function + /// is executing. Any attempts to touch the run loop may cause non-deterministic behavior. + /// + /// @warning + /// This form of `alwaysTo` does not work in any kind of async context. + /// Use the async form of `alwaysTo` if you are running tests in an async context. + @discardableResult + @available(*, noasync, message: "the sync variant of `alwaysTo` does not work in async contexts. Use the async variant as a drop-in replacement") + public func alwaysTo(_ matcher: Matcher, until: NimbleTimeInterval = PollingDefaults.timeout, pollInterval: NimbleTimeInterval = PollingDefaults.pollInterval, description: String? = nil) -> Self { + return toAlways(matcher, until: until, pollInterval: pollInterval, description: description) + } +} + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Requirement.swift b/Pods/Nimble/Sources/Nimble/Requirement.swift new file mode 100644 index 0000000..91c8487 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Requirement.swift @@ -0,0 +1,210 @@ +import Foundation + +public struct RequireError: Error, CustomNSError { + let message: String + let location: SourceLocation + + var localizedDescription: String { message } + public var errorUserInfo: [String: Any] { + // Required to prevent Xcode from reporting that we threw an error. + // The default assertionHandlers will report this to XCode for us. + ["XCTestErrorUserInfoKeyShouldIgnore": true] + } + + static func unknown(_ location: SourceLocation) -> RequireError { + RequireError(message: "Nimble error - file a bug if you see this!", location: location) + } +} +internal func executeRequire(_ expression: Expression, _ style: ExpectationStyle, _ matcher: Matcher, to: String, description: String?, captureExceptions: Bool = true) -> (Bool, FailureMessage, T?) { + func run() -> (Bool, FailureMessage, T?) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let cachedExpression = expression.withCaching() + let result = try matcher.satisfies(cachedExpression) + let value = try cachedExpression.evaluate() + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(value))>" + } + return (result.toBoolean(expectation: style), msg, value) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg, nil) + } + } + + var result: (Bool, FailureMessage, T?) = (false, FailureMessage(), nil) + if captureExceptions { + let capture = NMBExceptionCapture(handler: ({ exception -> Void in + let msg = FailureMessage() + msg.stringValue = "unexpected exception raised: \(exception)" + result = (false, msg, nil) + }), finally: nil) + capture.tryBlock { + result = run() + } + } else { + result = run() + } + + return result +} + +internal func executeRequire(_ expression: AsyncExpression, _ style: ExpectationStyle, _ matcher: AsyncMatcher, to: String, description: String?) async -> (Bool, FailureMessage, T?) { + let msg = FailureMessage() + msg.userDescription = description + msg.to = to + do { + let cachedExpression = expression.withCaching() + let result = try await matcher.satisfies(cachedExpression) + let value = try await cachedExpression.evaluate() + result.message.update(failureMessage: msg) + if msg.actualValue == "" { + msg.actualValue = "<\(stringify(value))>" + } + return (result.toBoolean(expectation: style), msg, value) + } catch let error { + msg.stringValue = "unexpected error thrown: <\(error)>" + return (false, msg, nil) + } +} + +public struct SyncRequirement { + public let expression: Expression + + /// A custom error to throw. + /// If nil, then we will throw a ``RequireError`` on failure. + public let customError: Error? + + public var location: SourceLocation { expression.location } + + public init(expression: Expression, customError: Error?) { + self.expression = expression + self.customError = customError + } + + public func verify(_ pass: Bool, _ message: FailureMessage, _ value: Value?) throws -> Value { + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(pass, message: message, location: expression.location) + guard pass, let value else { + throw customError ?? RequireError(message: message.stringValue, location: self.location) + } + return value + } + + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: Matcher, description: String? = nil) throws -> Value { + let (pass, msg, result) = executeRequire(expression, .toMatch, matcher, to: "to", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: Matcher, description: String? = nil) throws -> Value { + let (pass, msg, result) = executeRequire(expression, .toNotMatch, matcher, to: "to not", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: Matcher, description: String? = nil) throws -> Value { + try toNot(matcher, description: description) + } + + // MARK: - AsyncMatchers + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = await executeRequire(expression.toAsyncExpression(), .toMatch, matcher, to: "to", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = await executeRequire(expression.toAsyncExpression(), .toNotMatch, matcher, to: "to not", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + try await toNot(matcher, description: description) + } +} + +public struct AsyncRequirement { + public let expression: AsyncExpression + + /// A custom error to throw. + /// If nil, then we will throw a ``RequireError`` on failure. + public let customError: Error? + + public var location: SourceLocation { expression.location } + + public init(expression: AsyncExpression, customError: Error?) { + self.expression = expression + self.customError = customError + } + + public func verify(_ pass: Bool, _ message: FailureMessage, _ value: Value?) throws -> Value { + let handler = NimbleEnvironment.activeInstance.assertionHandler + handler.assert(pass, message: message, location: expression.location) + guard pass, let value else { + throw customError ?? RequireError(message: message.stringValue, location: self.location) + } + return value + } + + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: Matcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = executeRequire(await expression.toSynchronousExpression(), .toMatch, matcher, to: "to", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: Matcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = executeRequire(await expression.toSynchronousExpression(), .toNotMatch, matcher, to: "to not", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: Matcher, description: String? = nil) async throws -> Value { + try await toNot(matcher, description: description) + } + + // MARK: - AsyncMatchers + /// Tests the actual value using a matcher to match. + @discardableResult + public func to(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = await executeRequire(expression, .toMatch, matcher, to: "to", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + @discardableResult + public func toNot(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + let (pass, msg, result) = await executeRequire(expression, .toNotMatch, matcher, to: "to not", description: description) + return try verify(pass, msg, result) + } + + /// Tests the actual value using a matcher to not match. + /// + /// Alias to toNot(). + @discardableResult + public func notTo(_ matcher: AsyncMatcher, description: String? = nil) async throws -> Value { + try await toNot(matcher, description: description) + } +} diff --git a/Pods/Nimble/Sources/Nimble/Utils/AsyncAwait.swift b/Pods/Nimble/Sources/Nimble/Utils/AsyncAwait.swift new file mode 100644 index 0000000..1e58843 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Utils/AsyncAwait.swift @@ -0,0 +1,336 @@ +#if !os(WASI) + +#if canImport(CoreFoundation) +import CoreFoundation +#endif + +import Dispatch +import Foundation + +private let timeoutLeeway = NimbleTimeInterval.milliseconds(1) +private let pollLeeway = NimbleTimeInterval.milliseconds(1) + +// Like PollResult, except it doesn't support objective-c exceptions. +// Which is tolerable because Swift Concurrency doesn't support recording objective-c exceptions. +internal enum AsyncPollResult { + /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) + case incomplete + /// TimedOut indicates the result reached its defined timeout limit before returning + case timedOut + /// BlockedRunLoop indicates the main runloop is too busy processing other blocks to trigger + /// the timeout code. + /// + /// This may also mean the async code waiting upon may have never actually ran within the + /// required time because other timers & sources are running on the main run loop. + case blockedRunLoop + /// The async block successfully executed and returned a given result + case completed(T) + /// When a Swift Error is thrown + case errorThrown(Error) + + func isIncomplete() -> Bool { + switch self { + case .incomplete: return true + default: return false + } + } + + func isCompleted() -> Bool { + switch self { + case .completed: return true + default: return false + } + } + + func toPollResult() -> PollResult { + switch self { + case .incomplete: return .incomplete + case .timedOut: return .timedOut + case .blockedRunLoop: return .blockedRunLoop + case .completed(let value): return .completed(value) + case .errorThrown(let error): return .errorThrown(error) + } + } +} + +// A mechanism to send a single value between 2 tasks. +// Inspired by swift-async-algorithm's AsyncChannel, but massively simplified +// especially given Nimble's usecase. +// AsyncChannel: https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/Channels/AsyncChannel.swift +internal actor AsyncPromise { + private let storage = Storage() + + private final class Storage { + private var continuations: [UnsafeContinuation] = [] + private var value: T? + // Yes, this is not the fastest lock, but it's platform independent, + // which means we don't have to have a Lock protocol and separate Lock + // implementations for Linux & Darwin (and Windows if we ever add + // support for that). + private let lock = NSLock() + + func await() async -> T { + await withUnsafeContinuation { continuation in + lock.lock() + defer { lock.unlock() } + if let value { + continuation.resume(returning: value) + } else { + continuations.append(continuation) + } + } + } + + func send(_ value: T) { + lock.lock() + defer { lock.unlock() } + if self.value != nil { return } + continuations.forEach { continuation in + continuation.resume(returning: value) + } + continuations = [] + self.value = value + } + } + + nonisolated func send(_ value: T) { + self.storage.send(value) + } + + var value: T { + get async { + await self.storage.await() + } + } +} + +/// Wait until the timeout period, then checks why the matcher might have timed out +/// +/// Why Dispatch? +/// +/// Using Dispatch gives us mechanisms for detecting why the matcher timed out. +/// If it timed out because the main thread was blocked, then we want to report that, +/// as that's a performance concern. If it timed out otherwise, then we need to +/// report that. +/// This **could** be done using mechanisms like locks, but instead we use +/// `DispatchSemaphore`. That's because `DispatchSemaphore` is fast and +/// platform independent. However, while `DispatchSemaphore` itself is +/// `Sendable`, the `wait` method is not safe to use in an async context. +/// To get around that, we must ensure that all usages of +/// `DispatchSemaphore.wait` are in synchronous contexts, which +/// we can ensure by dispatching to a `DispatchQueue`. Unlike directly calling +/// a synchronous closure, or using something ilke `MainActor.run`, using +/// a `DispatchQueue` to run synchronous code will actually run it in a +/// synchronous context. +/// +/// +/// Run Loop Management +/// +/// In order to properly interrupt the waiting behavior performed by this factory class, +/// this timer stops the main run loop to tell the waiter code that the result should be +/// checked. +/// +/// In addition, stopping the run loop is used to halt code executed on the main run loop. +private func timeout(timeoutQueue: DispatchQueue, timeoutInterval: NimbleTimeInterval, forcefullyAbortTimeout: NimbleTimeInterval) async -> AsyncPollResult { + do { + try await Task.sleep(nanoseconds: timeoutInterval.nanoseconds) + } catch {} + + let promise = AsyncPromise>() + + let timedOutSem = DispatchSemaphore(value: 0) + let semTimedOutOrBlocked = DispatchSemaphore(value: 0) + semTimedOutOrBlocked.signal() + + DispatchQueue.main.async { + if semTimedOutOrBlocked.wait(timeout: .now()) == .success { + timedOutSem.signal() + semTimedOutOrBlocked.signal() + promise.send(.timedOut) + } + } + + // potentially interrupt blocking code on run loop to let timeout code run + timeoutQueue.async { + let abortTimeout = DispatchTime.now() + timeoutInterval.divided.dispatchTimeInterval + let didNotTimeOut = timedOutSem.wait(timeout: abortTimeout) != .success + let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success + if didNotTimeOut && timeoutWasNotTriggered { + promise.send(.blockedRunLoop) + } else { + promise.send(.timedOut) + } + } + + return await promise.value +} + +private func poll(_ pollInterval: NimbleTimeInterval, expression: @escaping () async throws -> PollStatus) async -> AsyncPollResult { + for try await _ in AsyncTimerSequence(interval: pollInterval) { + do { + if case .finished(let result) = try await expression() { + return .completed(result) + } + } catch { + return .errorThrown(error) + } + } + return .completed(false) +} + +/// Blocks for an asynchronous result. +/// +/// @discussion +/// This function 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 undesirable behavior. +/// +/// This method will return an AwaitResult in the following cases: +/// +/// - The main run loop is blocked by other operations and the async expectation cannot be +/// be stopped. +/// - The async expectation timed out +/// - The async expectation succeeded +/// - The async expectation raised an unexpected exception (objc) +/// - The async expectation raised an unexpected error (swift) +/// +/// The returned AsyncPollResult will NEVER be .incomplete. +private func runPoller( + timeoutInterval: NimbleTimeInterval, + pollInterval: NimbleTimeInterval, + awaiter: Awaiter, + fnName: String = #function, file: FileString = #file, line: UInt = #line, + expression: @escaping () async throws -> PollStatus +) async -> AsyncPollResult { + awaiter.waitLock.acquireWaitingLock( + fnName, + file: file, + line: line) + + defer { + awaiter.waitLock.releaseWaitingLock() + } + let timeoutQueue = awaiter.timeoutQueue + return await withTaskGroup(of: AsyncPollResult.self) { taskGroup in + taskGroup.addTask { + await timeout( + timeoutQueue: timeoutQueue, + timeoutInterval: timeoutInterval, + forcefullyAbortTimeout: timeoutInterval.divided + ) + } + + taskGroup.addTask { + await poll(pollInterval, expression: expression) + } + + defer { + taskGroup.cancelAll() + } + + return await taskGroup.next() ?? .timedOut + } +} + +private final class Box: @unchecked Sendable { + private var _value: T + var value: T { + lock.lock() + defer { lock.unlock() } + return _value + } + + private let lock = NSLock() + + init(value: T) { + _value = value + } + + func operate(_ closure: @Sendable (T) -> T) { + lock.lock() + defer { lock.unlock() } + _value = closure(_value) + } +} + +// swiftlint:disable:next function_parameter_count +private func runAwaitTrigger( + awaiter: Awaiter, + timeoutInterval: NimbleTimeInterval, + leeway: NimbleTimeInterval, + file: FileString, line: UInt, + _ closure: @escaping (@escaping (T) -> Void) async throws -> Void +) async -> AsyncPollResult { + let timeoutQueue = awaiter.timeoutQueue + let completionCount = Box(value: 0) + return await withTaskGroup(of: AsyncPollResult.self) { taskGroup in + let promise = AsyncPromise() + + taskGroup.addTask { + defer { + promise.send(nil) + } + return await timeout( + timeoutQueue: timeoutQueue, + timeoutInterval: timeoutInterval, + forcefullyAbortTimeout: leeway + ) + } + + taskGroup.addTask { + do { + try await closure { result in + completionCount.operate { $0 + 1 } + if completionCount.value < 2 { + promise.send(result) + } else { + fail("waitUntil(..) expects its completion closure to be only called once", + file: file, line: line) + } + } + if let value = await promise.value { + return .completed(value) + } else { + return .timedOut + } + } catch { + return .errorThrown(error) + } + } + + defer { + taskGroup.cancelAll() + } + + return await taskGroup.next() ?? .timedOut + } +} + +internal func performBlock( + timeoutInterval: NimbleTimeInterval, + leeway: NimbleTimeInterval, + file: FileString, line: UInt, + _ closure: @escaping (@escaping (T) -> Void) async throws -> Void +) async -> AsyncPollResult { + await runAwaitTrigger( + awaiter: NimbleEnvironment.activeInstance.awaiter, + timeoutInterval: timeoutInterval, + leeway: leeway, + file: file, line: line, closure) +} + +internal func pollBlock( + pollInterval: NimbleTimeInterval, + timeoutInterval: NimbleTimeInterval, + file: FileString, + line: UInt, + fnName: String = #function, + expression: @escaping () async throws -> PollStatus) async -> AsyncPollResult { + await runPoller( + timeoutInterval: timeoutInterval, + pollInterval: pollInterval, + awaiter: NimbleEnvironment.activeInstance.awaiter, + expression: expression + ) + } + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Utils/AsyncTimerSequence.swift b/Pods/Nimble/Sources/Nimble/Utils/AsyncTimerSequence.swift new file mode 100644 index 0000000..83c2485 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Utils/AsyncTimerSequence.swift @@ -0,0 +1,140 @@ +#if !os(WASI) + +#if canImport(CoreFoundation) +import CoreFoundation +#endif +import Dispatch +import Foundation + +// Basically a re-implementation of Clock and InstantProtocol. +// This can be removed once we drop support for iOS < 16. +internal protocol NimbleClockProtocol: Sendable { + associatedtype Instant: NimbleInstantProtocol + + func now() -> Instant + + func sleep(until: Instant) async throws +} + +internal protocol NimbleInstantProtocol: Sendable, Comparable { + associatedtype Interval: NimbleIntervalProtocol + + func advanced(byInterval: Interval) -> Self + + func intervalSince(_: Self) -> Interval +} + +internal protocol NimbleIntervalProtocol: Sendable, Comparable { + static func + (lhs: Self, rhs: Self) -> Self + static func - (lhs: Self, rhs: Self) -> Self + static func * (lhs: Self, rhs: Self) -> Self + static func / (lhs: Self, rhs: Self) -> Self + + func rounded(_ rule: FloatingPointRoundingRule) -> Self +} + +internal struct DateClock: NimbleClockProtocol { + typealias Instant = Date + + func now() -> Instant { + Date() + } + + func sleep(until: Instant) async throws { + try await Task.sleep(nanoseconds: UInt64(Swift.max(0, until.timeIntervalSinceNow * 1_000_000_000))) + } +} + +// Date is Sendable as of at least iOS 16. +// But as of Swift 5.9, it's still not Sendable in the open source version. +extension Date: @unchecked Sendable {} + +extension Date: NimbleInstantProtocol { + typealias Interval = NimbleTimeInterval + + func advanced(byInterval interval: NimbleTimeInterval) -> Date { + advanced(by: interval.timeInterval) + } + + func intervalSince(_ other: Date) -> NimbleTimeInterval { + timeIntervalSince(other).nimbleInterval + } +} + +extension NimbleTimeInterval: NimbleIntervalProtocol { + func rounded(_ rule: FloatingPointRoundingRule) -> NimbleTimeInterval { + timeInterval.rounded(rule).nimbleInterval + } + + static func + (lhs: NimbleTimeInterval, rhs: NimbleTimeInterval) -> NimbleTimeInterval { + (lhs.timeInterval + rhs.timeInterval).nimbleInterval + } + + static func - (lhs: NimbleTimeInterval, rhs: NimbleTimeInterval) -> NimbleTimeInterval { + (lhs.timeInterval - rhs.timeInterval).nimbleInterval + } + + static func * (lhs: NimbleTimeInterval, rhs: NimbleTimeInterval) -> NimbleTimeInterval { + (lhs.timeInterval * rhs.timeInterval).nimbleInterval + } + + static func / (lhs: NimbleTimeInterval, rhs: NimbleTimeInterval) -> NimbleTimeInterval { + (lhs.timeInterval / rhs.timeInterval).nimbleInterval + } + + public static func < (lhs: NimbleTimeInterval, rhs: NimbleTimeInterval) -> Bool { + lhs.timeInterval < rhs.timeInterval + } +} + +// Similar to (made by directly referencing) swift-async-algorithm's AsyncTimerSequence. +// https://github.com/apple/swift-async-algorithms/blob/main/Sources/AsyncAlgorithms/AsyncTimerSequence.swift +// Only this one is compatible with OS versions that Nimble supports. +struct AsyncTimerSequence: AsyncSequence { + typealias Element = Void + let clock: Clock + let interval: Clock.Instant.Interval + + struct AsyncIterator: AsyncIteratorProtocol { + let clock: Clock + let interval: Clock.Instant.Interval + + var last: Clock.Instant? + + func nextDeadline() -> Clock.Instant { + let now = clock.now() + + let last = self.last ?? now + let next = last.advanced(byInterval: interval) + if next < now { + let nextTimestep = interval * (now.intervalSince(next) / interval).rounded(.up) + return last.advanced(byInterval: nextTimestep) + } else { + return next + } + } + + mutating func next() async -> Void? { + let next = nextDeadline() + do { + try await clock.sleep(until: next) + } catch { + return nil + } + last = next + return () + } + } + + func makeAsyncIterator() -> AsyncIterator { + return AsyncIterator(clock: clock, interval: interval) + } +} + +extension AsyncTimerSequence { + init(interval: NimbleTimeInterval) { + self.init(clock: DateClock(), interval: interval) + } +} + +#endif // os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift b/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift deleted file mode 100644 index 9583683..0000000 --- a/Pods/Nimble/Sources/Nimble/Utils/DispatchTimeInterval.swift +++ /dev/null @@ -1,45 +0,0 @@ -#if !os(WASI) - -import Dispatch - -#if canImport(CDispatch) -import CDispatch -#endif - -extension DispatchTimeInterval { - // ** Note: We cannot simply divide the time interval because DispatchTimeInterval associated value type is Int - var divided: DispatchTimeInterval { - switch self { - case let .seconds(val): return val < 2 ? .milliseconds(Int(Float(val)/2*1000)) : .seconds(val/2) - case let .milliseconds(val): return .milliseconds(val/2) - case let .microseconds(val): return .microseconds(val/2) - case let .nanoseconds(val): return .nanoseconds(val/2) - case .never: return .never - @unknown default: fatalError("Unknown DispatchTimeInterval value") - } - } - - var description: String { - switch self { - case let .seconds(val): return val == 1 ? "\(Float(val)) second" : "\(Float(val)) seconds" - case let .milliseconds(val): return "\(Float(val)/1_000) seconds" - case let .microseconds(val): return "\(Float(val)/1_000_000) seconds" - case let .nanoseconds(val): return "\(Float(val)/1_000_000_000) seconds" - default: fatalError("Unknown DispatchTimeInterval value") - } - } -} - -#if canImport(Foundation) -import typealias Foundation.TimeInterval - -extension TimeInterval { - var dispatchInterval: DispatchTimeInterval { - let microseconds = Int64(self * TimeInterval(USEC_PER_SEC)) - // perhaps use nanoseconds, though would more often be > Int.max - return microseconds < Int.max ? .microseconds(Int(microseconds)) : .seconds(Int(self)) - } -} -#endif - -#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Utils/NimbleTimeInterval.swift b/Pods/Nimble/Sources/Nimble/Utils/NimbleTimeInterval.swift new file mode 100644 index 0000000..abe0218 --- /dev/null +++ b/Pods/Nimble/Sources/Nimble/Utils/NimbleTimeInterval.swift @@ -0,0 +1,89 @@ +#if !os(WASI) + +import Dispatch + +#if canImport(CDispatch) +import CDispatch +#endif + +/// A reimplementation of `DispatchTimeInterval` without the `never` case, and conforming to `Sendable`. +public enum NimbleTimeInterval: Sendable, Equatable { + case seconds(Int) + case milliseconds(Int) + case microseconds(Int) + case nanoseconds(Int) +} + +extension NimbleTimeInterval: CustomStringConvertible { + public var dispatchTimeInterval: DispatchTimeInterval { + switch self { + case .seconds(let int): + return .seconds(int) + case .milliseconds(let int): + return .milliseconds(int) + case .microseconds(let int): + return .microseconds(int) + case .nanoseconds(let int): + return .nanoseconds(int) + } + } + + // ** Note: We cannot simply divide the time interval because NimbleTimeInterval associated value type is Int + internal var divided: NimbleTimeInterval { + switch self { + case let .seconds(val): return val < 2 ? .milliseconds(Int(Float(val)/2*1000)) : .seconds(val/2) + case let .milliseconds(val): return .milliseconds(val/2) + case let .microseconds(val): return .microseconds(val/2) + case let .nanoseconds(val): return .nanoseconds(val/2) + } + } + + public var nanoseconds: UInt64 { + switch self { + case .seconds(let int): return UInt64(int) * 1_000_000_000 + case .milliseconds(let int): return UInt64(int) * 1_000_000 + case .microseconds(let int): return UInt64(int) * 1_000 + case .nanoseconds(let int): return UInt64(int) + } + } + + public var description: String { + switch self { + case let .seconds(val): return val == 1 ? "\(Float(val)) second" : "\(Float(val)) seconds" + case let .milliseconds(val): return "\(Float(val)/1_000) seconds" + case let .microseconds(val): return "\(Float(val)/1_000_000) seconds" + case let .nanoseconds(val): return "\(Float(val)/1_000_000_000) seconds" + } + } +} + +#if canImport(Foundation) +import Foundation + +extension NimbleTimeInterval { + public var timeInterval: TimeInterval { + switch self { + case .seconds(let int): return TimeInterval(int) + case .milliseconds(let int): return TimeInterval(int) / 1_000 + case .microseconds(let int): return TimeInterval(int) / 1_000_000 + case .nanoseconds(let int): return TimeInterval(int) / 1_000_000_000 + } + } +} + +extension TimeInterval { + public var nimbleInterval: NimbleTimeInterval { + let microseconds = Int64(self * TimeInterval(USEC_PER_SEC)) + // perhaps use nanoseconds, though would more often be > Int.max + return microseconds < Int.max ? .microseconds(Int(microseconds)) : .seconds(Int(self)) + } +} + +extension Date { + public func advanced(by nimbleTimeInterval: NimbleTimeInterval) -> Date { + self.advanced(by: nimbleTimeInterval.timeInterval) + } +} +#endif + +#endif // #if !os(WASI) diff --git a/Pods/Nimble/Sources/Nimble/Utils/Await.swift b/Pods/Nimble/Sources/Nimble/Utils/PollAwait.swift similarity index 65% rename from Pods/Nimble/Sources/Nimble/Utils/Await.swift rename to Pods/Nimble/Sources/Nimble/Utils/PollAwait.swift index 1933d99..9c045c4 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/Await.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/PollAwait.swift @@ -1,14 +1,16 @@ #if !os(WASI) +#if canImport(CoreFoundation) import CoreFoundation +#endif import Dispatch import Foundation -private let timeoutLeeway = DispatchTimeInterval.milliseconds(1) -private let pollLeeway = DispatchTimeInterval.milliseconds(1) +private let timeoutLeeway = NimbleTimeInterval.milliseconds(1) +private let pollLeeway = NimbleTimeInterval.milliseconds(1) /// Stores debugging information about callers -internal struct WaitingInfo: CustomStringConvertible { +internal struct WaitingInfo: CustomStringConvertible, Sendable { let name: String let file: FileString let lineNumber: UInt @@ -24,18 +26,16 @@ internal protocol WaitLock { func isWaitingLocked() -> Bool } -internal class AssertionWaitLock: WaitLock { +internal final class AssertionWaitLock: WaitLock, @unchecked Sendable { private var currentWaiter: WaitingInfo? + private let lock = NSRecursiveLock() + init() { } func acquireWaitingLock(_ fnName: String, file: FileString, line: UInt) { + lock.lock() + defer { lock.unlock() } let info = WaitingInfo(name: fnName, file: file, lineNumber: line) - let isMainThread = Thread.isMainThread - nimblePrecondition( - isMainThread, - "InvalidNimbleAPIUsage", - "\(fnName) can only run on the main thread." - ) nimblePrecondition( currentWaiter == nil, "InvalidNimbleAPIUsage", @@ -53,15 +53,19 @@ internal class AssertionWaitLock: WaitLock { } func isWaitingLocked() -> Bool { + lock.lock() + defer { lock.unlock() } return currentWaiter != nil } func releaseWaitingLock() { + lock.lock() + defer { lock.unlock() } currentWaiter = nil } } -internal enum AwaitResult { +internal enum PollResult { /// Incomplete indicates None (aka - this value hasn't been fulfilled yet) case incomplete /// TimedOut indicates the result reached its defined timeout limit before returning @@ -94,10 +98,15 @@ internal enum AwaitResult { } } +internal enum PollStatus { + case finished(Bool) + case incomplete +} + /// Holds the resulting value from an asynchronous expectation. -/// This class is thread-safe at receiving an "response" to this promise. +/// This class is thread-safe at receiving a "response" to this promise. internal final class AwaitPromise { - private(set) internal var asyncResult: AwaitResult = .incomplete + private(set) internal var asyncResult: PollResult = .incomplete private var signal: DispatchSemaphore init() { @@ -113,7 +122,8 @@ internal final class AwaitPromise { /// /// @returns a Bool that indicates if the async result was accepted or rejected because another /// value was received first. - func resolveResult(_ result: AwaitResult) -> Bool { + @discardableResult + func resolveResult(_ result: PollResult) -> Bool { if signal.wait(timeout: .now()) == .success { self.asyncResult = result return true @@ -123,7 +133,7 @@ internal final class AwaitPromise { } } -internal struct AwaitTrigger { +internal struct PollAwaitTrigger { let timeoutSource: DispatchSourceTimer let actionSource: DispatchSourceTimer? let start: () throws -> Void @@ -136,59 +146,60 @@ internal struct AwaitTrigger { internal class AwaitPromiseBuilder { let awaiter: Awaiter let waitLock: WaitLock - let trigger: AwaitTrigger + let trigger: PollAwaitTrigger let promise: AwaitPromise internal init( awaiter: Awaiter, waitLock: WaitLock, promise: AwaitPromise, - trigger: AwaitTrigger) { + trigger: PollAwaitTrigger) { self.awaiter = awaiter self.waitLock = waitLock self.promise = promise self.trigger = trigger } - func timeout(_ timeoutInterval: DispatchTimeInterval, forcefullyAbortTimeout: DispatchTimeInterval) -> Self { - // = Discussion = - // - // There's a lot of technical decisions here that is useful to elaborate on. This is - // definitely more lower-level than the previous NSRunLoop based implementation. - // - // - // Why Dispatch Source? - // - // - // We're using a dispatch source to have better control of the run loop behavior. - // A timer source gives us deferred-timing control without having to rely as much on - // a run loop's traditional dispatching machinery (eg - NSTimers, DefaultRunLoopMode, etc.) - // which is ripe for getting corrupted by application code. - // - // And unlike dispatch_async(), we can control how likely our code gets prioritized to - // executed (see leeway parameter) + DISPATCH_TIMER_STRICT. - // - // This timer is assumed to run on the HIGH priority queue to ensure it maintains the - // highest priority over normal application / test code when possible. - // - // - // Run Loop Management - // - // In order to properly interrupt the waiting behavior performed by this factory class, - // this timer stops the main run loop to tell the waiter code that the result should be - // checked. - // - // In addition, stopping the run loop is used to halt code executed on the main run loop. + func timeout(_ timeoutInterval: NimbleTimeInterval, forcefullyAbortTimeout: NimbleTimeInterval) -> Self { + /// = Discussion = + /// + /// There's a lot of technical decisions here that is useful to elaborate on. This is + /// definitely more lower-level than the previous NSRunLoop based implementation. + /// + /// + /// Why Dispatch Source? + /// + /// + /// We're using a dispatch source to have better control of the run loop behavior. + /// A timer source gives us deferred-timing control without having to rely as much on + /// a run loop's traditional dispatching machinery (eg - NSTimers, DefaultRunLoopMode, etc.) + /// which is ripe for getting corrupted by application code. + /// + /// And unlike `dispatch_async()`, we can control how likely our code gets prioritized to + /// executed (see leeway parameter) + DISPATCH_TIMER_STRICT. + /// + /// This timer is assumed to run on the HIGH priority queue to ensure it maintains the + /// highest priority over normal application / test code when possible. + /// + /// + /// Run Loop Management + /// + /// In order to properly interrupt the waiting behavior performed by this factory class, + /// this timer stops the main run loop to tell the waiter code that the result should be + /// checked. + /// + /// In addition, stopping the run loop is used to halt code executed on the main run loop. trigger.timeoutSource.schedule( - deadline: DispatchTime.now() + timeoutInterval, + deadline: DispatchTime.now() + timeoutInterval.dispatchTimeInterval, repeating: .never, - leeway: timeoutLeeway + leeway: timeoutLeeway.dispatchTimeInterval ) trigger.timeoutSource.setEventHandler { guard self.promise.asyncResult.isIncomplete() else { return } let timedOutSem = DispatchSemaphore(value: 0) let semTimedOutOrBlocked = DispatchSemaphore(value: 0) semTimedOutOrBlocked.signal() + #if canImport(CoreFoundation) let runLoop = CFRunLoopGetMain() #if canImport(Darwin) let runLoopMode = CFRunLoopMode.defaultMode.rawValue @@ -206,12 +217,30 @@ internal class AwaitPromiseBuilder { } // potentially interrupt blocking code on run loop to let timeout code run CFRunLoopStop(runLoop) - let now = DispatchTime.now() + forcefullyAbortTimeout + #else + let runLoop = RunLoop.main + runLoop.perform(inModes: [.default], block: { + if semTimedOutOrBlocked.wait(timeout: .now()) == .success { + timedOutSem.signal() + semTimedOutOrBlocked.signal() + if self.promise.resolveResult(.timedOut) { + RunLoop.main._stop() + } + } + }) + // potentially interrupt blocking code on run loop to let timeout code run + runLoop._stop() + #endif + let now = DispatchTime.now() + forcefullyAbortTimeout.dispatchTimeInterval let didNotTimeOut = timedOutSem.wait(timeout: now) != .success let timeoutWasNotTriggered = semTimedOutOrBlocked.wait(timeout: .now()) == .success if didNotTimeOut && timeoutWasNotTriggered { if self.promise.resolveResult(.blockedRunLoop) { + #if canImport(CoreFoundation) CFRunLoopStop(CFRunLoopGetMain()) + #else + RunLoop.main._stop() + #endif } } } @@ -221,9 +250,8 @@ internal class AwaitPromiseBuilder { /// Blocks for an asynchronous result. /// /// @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 undesirable behavior. + /// This function 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 undesirable behavior. /// /// This method will return an AwaitResult in the following cases: /// @@ -234,8 +262,8 @@ internal class AwaitPromiseBuilder { /// - The async expectation raised an unexpected exception (objc) /// - The async expectation raised an unexpected error (swift) /// - /// The returned AwaitResult will NEVER be .incomplete. - func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> AwaitResult { + /// The returned PollResult will NEVER be .incomplete. + func wait(_ fnName: String = #function, file: FileString = #file, line: UInt = #line) -> PollResult { waitLock.acquireWaitingLock( fnName, file: file, @@ -282,7 +310,7 @@ internal class Awaiter { self.timeoutQueue = timeoutQueue } - private func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { + internal func createTimerSource(_ queue: DispatchQueue) -> DispatchSourceTimer { return DispatchSource.makeTimerSource(flags: .strict, queue: queue) } @@ -294,13 +322,17 @@ internal class Awaiter { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) var completionCount = 0 - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { + let trigger = PollAwaitTrigger(timeoutSource: timeoutSource, actionSource: nil) { try closure { result in completionCount += 1 if completionCount < 2 { func completeBlock() { if promise.resolveResult(.completed(result)) { + #if canImport(CoreFoundation) CFRunLoopStop(CFRunLoopGetMain()) + #else + RunLoop.main._stop() + #endif } } @@ -323,23 +355,35 @@ internal class Awaiter { trigger: trigger) } - func poll(_ pollInterval: DispatchTimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { + func poll(_ pollInterval: NimbleTimeInterval, closure: @escaping () throws -> T?) -> AwaitPromiseBuilder { let promise = AwaitPromise() let timeoutSource = createTimerSource(timeoutQueue) let asyncSource = createTimerSource(asyncQueue) - let trigger = AwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { + let trigger = PollAwaitTrigger(timeoutSource: timeoutSource, actionSource: asyncSource) { let interval = pollInterval - asyncSource.schedule(deadline: .now(), repeating: interval, leeway: pollLeeway) + asyncSource.schedule( + deadline: .now(), + repeating: interval.dispatchTimeInterval, + leeway: pollLeeway.dispatchTimeInterval + ) asyncSource.setEventHandler { do { if let result = try closure() { if promise.resolveResult(.completed(result)) { + #if canImport(CoreFoundation) CFRunLoopStop(CFRunLoopGetCurrent()) + #else + RunLoop.current._stop() + #endif } } } catch let error { if promise.resolveResult(.errorThrown(error)) { + #if canImport(CoreFoundation) CFRunLoopStop(CFRunLoopGetCurrent()) + #else + RunLoop.current._stop() + #endif } } } @@ -355,19 +399,21 @@ internal class Awaiter { } internal func pollBlock( - pollInterval: DispatchTimeInterval, - timeoutInterval: DispatchTimeInterval, + pollInterval: NimbleTimeInterval, + timeoutInterval: NimbleTimeInterval, file: FileString, line: UInt, fnName: String = #function, - expression: @escaping () throws -> Bool) -> AwaitResult { + expression: @escaping () throws -> PollStatus) -> PollResult { let awaiter = NimbleEnvironment.activeInstance.awaiter let result = awaiter.poll(pollInterval) { () throws -> Bool? in - if try expression() { - return true + if case .finished(let result) = try expression() { + return result } return nil - }.timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval.divided).wait(fnName, file: file, line: line) + } + .timeout(timeoutInterval, forcefullyAbortTimeout: timeoutInterval.divided) + .wait(fnName, file: file, line: line) return result } diff --git a/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift b/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift index 4e37aef..64838ff 100644 --- a/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift +++ b/Pods/Nimble/Sources/Nimble/Utils/SourceLocation.swift @@ -5,7 +5,7 @@ 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 SWIFT_PACKAGE +#if !canImport(Darwin) public typealias FileString = StaticString #else public typealias FileString = String diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m index 6f7572f..2ab37ef 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/DSL.m @@ -1,10 +1,14 @@ -#import +#import "DSL.h" +#if SWIFT_PACKAGE +@import Nimble; +#else #if __has_include("Nimble-Swift.h") #import "Nimble-Swift.h" #else #import #endif +#endif NS_ASSUME_NONNULL_BEGIN @@ -28,71 +32,71 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger return [NMBExpectation failWithMessage:msg file:file line:line]; } -NIMBLE_EXPORT NMBPredicate *NMB_beAnInstanceOf(Class expectedClass) { - return [NMBPredicate beAnInstanceOfMatcher:expectedClass]; +NIMBLE_EXPORT NMBMatcher *NMB_beAnInstanceOf(Class expectedClass) { + return [NMBMatcher beAnInstanceOfMatcher:expectedClass]; } -NIMBLE_EXPORT NMBPredicate *NMB_beAKindOf(Class expectedClass) { - return [NMBPredicate beAKindOfMatcher:expectedClass]; +NIMBLE_EXPORT NMBMatcher *NMB_beAKindOf(Class expectedClass) { + return [NMBMatcher beAKindOfMatcher:expectedClass]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToPredicate *NMB_beCloseTo(NSNumber *expectedValue) { - return [NMBPredicate beCloseToMatcher:expectedValue within:0.001]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue) { + return [NMBMatcher beCloseToMatcher:expectedValue within:0.001]; } -NIMBLE_EXPORT NMBPredicate *NMB_beginWith(id itemElementOrSubstring) { - return [NMBPredicate beginWithMatcher:itemElementOrSubstring]; +NIMBLE_EXPORT NMBMatcher *NMB_beginWith(id itemElementOrSubstring) { + return [NMBMatcher beginWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beGreaterThan(NSNumber *expectedValue) { - return [NMBPredicate beGreaterThanMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_beGreaterThan(NSNumber *expectedValue) { + return [NMBMatcher beGreaterThanMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { - return [NMBPredicate beGreaterThanOrEqualToMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue) { + return [NMBMatcher beGreaterThanOrEqualToMatcher:expectedValue]; } -NIMBLE_EXPORT NMBPredicate *NMB_beIdenticalTo(id expectedInstance) { - return [NMBPredicate beIdenticalToMatcher:expectedInstance]; +NIMBLE_EXPORT NMBMatcher *NMB_beIdenticalTo(id expectedInstance) { + return [NMBMatcher beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT NMBPredicate *NMB_be(id expectedInstance) { - return [NMBPredicate beIdenticalToMatcher:expectedInstance]; +NIMBLE_EXPORT NMBMatcher *NMB_be(id expectedInstance) { + return [NMBMatcher beIdenticalToMatcher:expectedInstance]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beLessThan(NSNumber *expectedValue) { - return [NMBPredicate beLessThanMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_beLessThan(NSNumber *expectedValue) { + return [NMBMatcher beLessThanMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { - return [NMBPredicate beLessThanOrEqualToMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_beLessThanOrEqualTo(NSNumber *expectedValue) { + return [NMBMatcher beLessThanOrEqualToMatcher:expectedValue]; } -NIMBLE_EXPORT NMBPredicate *NMB_beTruthy() { - return [NMBPredicate beTruthyMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beTruthy(void) { + return [NMBMatcher beTruthyMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_beFalsy() { - return [NMBPredicate beFalsyMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beFalsy(void) { + return [NMBMatcher beFalsyMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_beTrue() { - return [NMBPredicate beTrueMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beTrue(void) { + return [NMBMatcher beTrueMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_beFalse() { - return [NMBPredicate beFalseMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beFalse(void) { + return [NMBMatcher beFalseMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_beNil() { - return [NMBPredicate beNilMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beNil(void) { + return [NMBMatcher beNilMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_beEmpty() { - return [NMBPredicate beEmptyMatcher]; +NIMBLE_EXPORT NMBMatcher *NMB_beEmpty(void) { + return [NMBMatcher beEmptyMatcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_containWithNilTermination(id itemOrSubstring, ...) { +NIMBLE_EXPORT NMBMatcher *NMB_containWithNilTermination(id itemOrSubstring, ...) { NSMutableArray *itemOrSubstringArray = [NSMutableArray array]; if (itemOrSubstring) { @@ -107,44 +111,46 @@ NIMBLE_EXPORT void NMB_failWithMessage(NSString *msg, NSString *file, NSUInteger va_end(args); } - return [NMBPredicate containMatcher:itemOrSubstringArray]; + return [NMBMatcher containMatcher:itemOrSubstringArray]; } -NIMBLE_EXPORT NMBPredicate *NMB_containElementSatisfying(BOOL(^predicate)(id)) { - return [NMBPredicate containElementSatisfyingMatcher:predicate]; +NIMBLE_EXPORT NMBMatcher *NMB_containElementSatisfying(BOOL(^matcher)(id)) { + return [NMBMatcher containElementSatisfyingMatcher:matcher]; } -NIMBLE_EXPORT NMBPredicate *NMB_endWith(id itemElementOrSubstring) { - return [NMBPredicate endWithMatcher:itemElementOrSubstring]; +NIMBLE_EXPORT NMBMatcher *NMB_endWith(id itemElementOrSubstring) { + return [NMBMatcher endWithMatcher:itemElementOrSubstring]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_equal(__nullable id expectedValue) { - return [NMBPredicate equalMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_equal(__nullable id expectedValue) { + return [NMBMatcher equalMatcher:expectedValue]; } -NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBPredicate *NMB_haveCount(id expectedValue) { - return [NMBPredicate haveCountMatcher:expectedValue]; +NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBMatcher *NMB_haveCount(id expectedValue) { + return [NMBMatcher haveCountMatcher:expectedValue]; } -NIMBLE_EXPORT NMBPredicate *NMB_match(id expectedValue) { - return [NMBPredicate matchMatcher:expectedValue]; +NIMBLE_EXPORT NMBMatcher *NMB_match(id expectedValue) { + return [NMBMatcher matchMatcher:expectedValue]; } -NIMBLE_EXPORT NMBPredicate *NMB_allPass(id expectedValue) { - return [NMBPredicate allPassMatcher:expectedValue]; +NIMBLE_EXPORT NMBMatcher *NMB_allPass(id expectedValue) { + return [NMBMatcher allPassMatcher:expectedValue]; } -NIMBLE_EXPORT NMBPredicate *NMB_satisfyAnyOfWithMatchers(id matchers) { - return [NMBPredicate satisfyAnyOfMatcher:matchers]; +NIMBLE_EXPORT NMBMatcher *NMB_satisfyAnyOfWithMatchers(id matchers) { + return [NMBMatcher satisfyAnyOfMatcher:matchers]; } -NIMBLE_EXPORT NMBPredicate *NMB_satisfyAllOfWithMatchers(id matchers) { - return [NMBPredicate satisfyAllOfMatcher:matchers]; +NIMBLE_EXPORT NMBMatcher *NMB_satisfyAllOfWithMatchers(id matchers) { + return [NMBMatcher satisfyAllOfMatcher:matchers]; } -NIMBLE_EXPORT NMBObjCRaiseExceptionPredicate *NMB_raiseException() { - return [NMBPredicate raiseExceptionMatcher]; +#if !SWIFT_PACKAGE +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void) { + return [NMBMatcher raiseExceptionMatcher]; } +#endif NIMBLE_EXPORT NMBWaitUntilTimeoutBlock NMB_waitUntilTimeoutBuilder(NSString *file, NSUInteger line) { return ^(NSTimeInterval timeout, void (^ _Nonnull action)(void (^ _Nonnull)(void))) { diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m index 31a80d6..5890e22 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.m @@ -1,10 +1,14 @@ #import "NMBStringify.h" +#if SWIFT_PACKAGE +@import Nimble; +#else #if __has_include("Nimble-Swift.h") #import "Nimble-Swift.h" #else #import #endif +#endif NSString *_Nonnull NMBStringify(id _Nullable anyObject) { return [NMBStringer stringify:anyObject]; diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m b/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m index 3c1110b..4f1ce63 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m +++ b/Pods/Nimble/Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m @@ -1,10 +1,14 @@ #import +#if SWIFT_PACKAGE +@import Nimble; +#else #if __has_include("Nimble-Swift.h") #import "Nimble-Swift.h" #else #import #endif +#endif #pragma mark - Private diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h b/Pods/Nimble/Sources/NimbleObjectiveC/include/DSL.h similarity index 71% rename from Pods/Nimble/Sources/NimbleObjectiveC/DSL.h rename to Pods/Nimble/Sources/NimbleObjectiveC/include/DSL.h index 9ae06a4..5d20fb1 100644 --- a/Pods/Nimble/Sources/NimbleObjectiveC/DSL.h +++ b/Pods/Nimble/Sources/NimbleObjectiveC/include/DSL.h @@ -1,9 +1,9 @@ #import @class NMBExpectation; -@class NMBPredicate; -@class NMBObjCBeCloseToPredicate; -@class NMBObjCRaiseExceptionPredicate; +@class NMBMatcher; +@class NMBObjCBeCloseToMatcher; +@class NMBObjCRaiseExceptionMatcher; NS_ASSUME_NONNULL_BEGIN @@ -66,16 +66,16 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSStrin #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_equal(TYPE expectedValue) { \ + NMBMatcher *NMB_equal(TYPE expectedValue) { \ return NMB_equal((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *equal(TYPE expectedValue), NMB_equal(expectedValue)); + NIMBLE_SHORT_OVERLOADED(NMBMatcher *equal(TYPE expectedValue), NMB_equal(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_equal(__nullable id expectedValue); + NMBMatcher *NMB_equal(__nullable id expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBPredicate *equal(__nullable id expectedValue), + NIMBLE_SHORT_OVERLOADED(NMBMatcher *equal(__nullable id expectedValue), NMB_equal(expectedValue)); // overloaded dispatch for nils - expect(nil) @@ -101,17 +101,17 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSStrin #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_haveCount(TYPE expectedValue) { \ + NMBMatcher *NMB_haveCount(TYPE expectedValue) { \ return NMB_haveCount((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *haveCount(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBMatcher *haveCount(TYPE expectedValue), \ NMB_haveCount(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_haveCount(id expectedValue); + NMBMatcher *NMB_haveCount(id expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBPredicate *haveCount(id expectedValue), + NIMBLE_SHORT_OVERLOADED(NMBMatcher *haveCount(id expectedValue), NMB_haveCount(expectedValue)); DEFINE_OVERLOAD(long, @(expectedValue)) @@ -127,14 +127,14 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSStrin #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBObjCBeCloseToPredicate *NMB_beCloseTo(TYPE expectedValue) { \ + NMBObjCBeCloseToMatcher *NMB_beCloseTo(TYPE expectedValue) { \ return NMB_beCloseTo((NSNumber *)(EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToPredicate *beCloseTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(TYPE expectedValue), \ NMB_beCloseTo(expectedValue)); - NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToPredicate *NMB_beCloseTo(NSNumber *expectedValue); - NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToPredicate *beCloseTo(NSNumber *expectedValue), + NIMBLE_EXPORT NIMBLE_OVERLOADABLE NMBObjCBeCloseToMatcher *NMB_beCloseTo(NSNumber *expectedValue); + NIMBLE_SHORT_OVERLOADED(NMBObjCBeCloseToMatcher *beCloseTo(NSNumber *expectedValue), NMB_beCloseTo(expectedValue)); // it would be better to only overload float & double, but zero becomes ambigious @@ -152,33 +152,33 @@ NIMBLE_EXPORT NMBExpectation *NMB_expectAction(void(^actualBlock)(void), NSStrin #undef DEFINE_OVERLOAD -NIMBLE_EXPORT NMBPredicate *NMB_beAnInstanceOf(Class expectedClass); -NIMBLE_EXPORT_INLINE NMBPredicate *beAnInstanceOf(Class expectedClass) { +NIMBLE_EXPORT NMBMatcher *NMB_beAnInstanceOf(Class expectedClass); +NIMBLE_EXPORT_INLINE NMBMatcher *beAnInstanceOf(Class expectedClass) { return NMB_beAnInstanceOf(expectedClass); } -NIMBLE_EXPORT NMBPredicate *NMB_beAKindOf(Class expectedClass); -NIMBLE_EXPORT_INLINE NMBPredicate *beAKindOf(Class expectedClass) { +NIMBLE_EXPORT NMBMatcher *NMB_beAKindOf(Class expectedClass); +NIMBLE_EXPORT_INLINE NMBMatcher *beAKindOf(Class expectedClass) { return NMB_beAKindOf(expectedClass); } -NIMBLE_EXPORT NMBPredicate *NMB_beginWith(id itemElementOrSubstring); -NIMBLE_EXPORT_INLINE NMBPredicate *beginWith(id itemElementOrSubstring) { +NIMBLE_EXPORT NMBMatcher *NMB_beginWith(id itemElementOrSubstring); +NIMBLE_EXPORT_INLINE NMBMatcher *beginWith(id itemElementOrSubstring) { return NMB_beginWith(itemElementOrSubstring); } #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_beGreaterThan(TYPE expectedValue) { \ + NMBMatcher *NMB_beGreaterThan(TYPE expectedValue) { \ return NMB_beGreaterThan((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); + NIMBLE_SHORT_OVERLOADED(NMBMatcher *beGreaterThan(TYPE expectedValue), NMB_beGreaterThan(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_beGreaterThan(NSNumber *expectedValue); + NMBMatcher *NMB_beGreaterThan(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - NMBPredicate *beGreaterThan(NSNumber *expectedValue) { + NMBMatcher *beGreaterThan(NSNumber *expectedValue) { return NMB_beGreaterThan(expectedValue); } @@ -197,17 +197,17 @@ NIMBLE_EXPORT_INLINE NMBPredicate *beginWith(id itemElementOrSubstring) { #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ + NMBMatcher *NMB_beGreaterThanOrEqualTo(TYPE expectedValue) { \ return NMB_beGreaterThanOrEqualTo((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *beGreaterThanOrEqualTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBMatcher *beGreaterThanOrEqualTo(TYPE expectedValue), \ NMB_beGreaterThanOrEqualTo(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); + NMBMatcher *NMB_beGreaterThanOrEqualTo(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - NMBPredicate *beGreaterThanOrEqualTo(NSNumber *expectedValue) { + NMBMatcher *beGreaterThanOrEqualTo(NSNumber *expectedValue) { return NMB_beGreaterThanOrEqualTo(expectedValue); } @@ -225,28 +225,28 @@ NIMBLE_EXPORT_INLINE NMBPredicate *beginWith(id itemElementOrSubstring) { #undef DEFINE_OVERLOAD -NIMBLE_EXPORT NMBPredicate *NMB_beIdenticalTo(id expectedInstance); -NIMBLE_SHORT(NMBPredicate *beIdenticalTo(id expectedInstance), +NIMBLE_EXPORT NMBMatcher *NMB_beIdenticalTo(id expectedInstance); +NIMBLE_SHORT(NMBMatcher *beIdenticalTo(id expectedInstance), NMB_beIdenticalTo(expectedInstance)); -NIMBLE_EXPORT NMBPredicate *NMB_be(id expectedInstance); -NIMBLE_SHORT(NMBPredicate *be(id expectedInstance), +NIMBLE_EXPORT NMBMatcher *NMB_be(id expectedInstance); +NIMBLE_SHORT(NMBMatcher *be(id expectedInstance), NMB_be(expectedInstance)); #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_beLessThan(TYPE expectedValue) { \ + NMBMatcher *NMB_beLessThan(TYPE expectedValue) { \ return NMB_beLessThan((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *beLessThan(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBMatcher *beLessThan(TYPE expectedValue), \ NMB_beLessThan(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_beLessThan(NSNumber *expectedValue); + NMBMatcher *NMB_beLessThan(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - NMBPredicate *beLessThan(NSNumber *expectedValue) { + NMBMatcher *beLessThan(NSNumber *expectedValue) { return NMB_beLessThan(expectedValue); } @@ -266,18 +266,18 @@ NIMBLE_SHORT(NMBPredicate *be(id expectedInstance), #define DEFINE_OVERLOAD(TYPE, EXPR) \ NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE \ - NMBPredicate *NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ + NMBMatcher *NMB_beLessThanOrEqualTo(TYPE expectedValue) { \ return NMB_beLessThanOrEqualTo((EXPR)); \ } \ - NIMBLE_SHORT_OVERLOADED(NMBPredicate *beLessThanOrEqualTo(TYPE expectedValue), \ + NIMBLE_SHORT_OVERLOADED(NMBMatcher *beLessThanOrEqualTo(TYPE expectedValue), \ NMB_beLessThanOrEqualTo(expectedValue)); NIMBLE_EXPORT NIMBLE_OVERLOADABLE - NMBPredicate *NMB_beLessThanOrEqualTo(NSNumber *expectedValue); + NMBMatcher *NMB_beLessThanOrEqualTo(NSNumber *expectedValue); NIMBLE_EXPORT_INLINE NIMBLE_OVERLOADABLE - NMBPredicate *beLessThanOrEqualTo(NSNumber *expectedValue) { + NMBMatcher *beLessThanOrEqualTo(NSNumber *expectedValue) { return NMB_beLessThanOrEqualTo(expectedValue); } @@ -294,63 +294,63 @@ NIMBLE_SHORT(NMBPredicate *be(id expectedInstance), #undef DEFINE_OVERLOAD -NIMBLE_EXPORT NMBPredicate *NMB_beTruthy(void); -NIMBLE_SHORT(NMBPredicate *beTruthy(void), +NIMBLE_EXPORT NMBMatcher *NMB_beTruthy(void); +NIMBLE_SHORT(NMBMatcher *beTruthy(void), NMB_beTruthy()); -NIMBLE_EXPORT NMBPredicate *NMB_beFalsy(void); -NIMBLE_SHORT(NMBPredicate *beFalsy(void), +NIMBLE_EXPORT NMBMatcher *NMB_beFalsy(void); +NIMBLE_SHORT(NMBMatcher *beFalsy(void), NMB_beFalsy()); -NIMBLE_EXPORT NMBPredicate *NMB_beTrue(void); -NIMBLE_SHORT(NMBPredicate *beTrue(void), +NIMBLE_EXPORT NMBMatcher *NMB_beTrue(void); +NIMBLE_SHORT(NMBMatcher *beTrue(void), NMB_beTrue()); -NIMBLE_EXPORT NMBPredicate *NMB_beFalse(void); -NIMBLE_SHORT(NMBPredicate *beFalse(void), +NIMBLE_EXPORT NMBMatcher *NMB_beFalse(void); +NIMBLE_SHORT(NMBMatcher *beFalse(void), NMB_beFalse()); -NIMBLE_EXPORT NMBPredicate *NMB_beNil(void); -NIMBLE_SHORT(NMBPredicate *beNil(void), +NIMBLE_EXPORT NMBMatcher *NMB_beNil(void); +NIMBLE_SHORT(NMBMatcher *beNil(void), NMB_beNil()); -NIMBLE_EXPORT NMBPredicate *NMB_beEmpty(void); -NIMBLE_SHORT(NMBPredicate *beEmpty(void), +NIMBLE_EXPORT NMBMatcher *NMB_beEmpty(void); +NIMBLE_SHORT(NMBMatcher *beEmpty(void), NMB_beEmpty()); -NIMBLE_EXPORT NMBPredicate *NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; +NIMBLE_EXPORT NMBMatcher *NMB_containWithNilTermination(id itemOrSubstring, ...) NS_REQUIRES_NIL_TERMINATION; #define NMB_contain(...) NMB_containWithNilTermination(__VA_ARGS__, nil) #ifndef NIMBLE_DISABLE_SHORT_SYNTAX #define contain(...) NMB_contain(__VA_ARGS__) #endif -NIMBLE_EXPORT NMBPredicate *NMB_containElementSatisfying(BOOL(^predicate)(id)); -NIMBLE_SHORT(NMBPredicate *containElementSatisfying(BOOL(^predicate)(id)), - NMB_containElementSatisfying(predicate)); +NIMBLE_EXPORT NMBMatcher *NMB_containElementSatisfying(BOOL(^matcher)(id)); +NIMBLE_SHORT(NMBMatcher *containElementSatisfying(BOOL(^matcher)(id)), + NMB_containElementSatisfying(matcher)); -NIMBLE_EXPORT NMBPredicate *NMB_endWith(id itemElementOrSubstring); -NIMBLE_SHORT(NMBPredicate *endWith(id itemElementOrSubstring), +NIMBLE_EXPORT NMBMatcher *NMB_endWith(id itemElementOrSubstring); +NIMBLE_SHORT(NMBMatcher *endWith(id itemElementOrSubstring), NMB_endWith(itemElementOrSubstring)); -NIMBLE_EXPORT NMBObjCRaiseExceptionPredicate *NMB_raiseException(void); -NIMBLE_SHORT(NMBObjCRaiseExceptionPredicate *raiseException(void), +NIMBLE_EXPORT NMBObjCRaiseExceptionMatcher *NMB_raiseException(void); +NIMBLE_SHORT(NMBObjCRaiseExceptionMatcher *raiseException(void), NMB_raiseException()); -NIMBLE_EXPORT NMBPredicate *NMB_match(id expectedValue); -NIMBLE_SHORT(NMBPredicate *match(id expectedValue), +NIMBLE_EXPORT NMBMatcher *NMB_match(id expectedValue); +NIMBLE_SHORT(NMBMatcher *match(id expectedValue), NMB_match(expectedValue)); -NIMBLE_EXPORT NMBPredicate *NMB_allPass(id matcher); -NIMBLE_SHORT(NMBPredicate *allPass(id matcher), +NIMBLE_EXPORT NMBMatcher *NMB_allPass(id matcher); +NIMBLE_SHORT(NMBMatcher *allPass(id matcher), NMB_allPass(matcher)); -NIMBLE_EXPORT NMBPredicate *NMB_satisfyAnyOfWithMatchers(id matchers); +NIMBLE_EXPORT NMBMatcher *NMB_satisfyAnyOfWithMatchers(id matchers); #define NMB_satisfyAnyOf(...) NMB_satisfyAnyOfWithMatchers(@[__VA_ARGS__]) #ifndef NIMBLE_DISABLE_SHORT_SYNTAX #define satisfyAnyOf(...) NMB_satisfyAnyOf(__VA_ARGS__) #endif -NIMBLE_EXPORT NMBPredicate *NMB_satisfyAllOfWithMatchers(id matchers); +NIMBLE_EXPORT NMBMatcher *NMB_satisfyAllOfWithMatchers(id matchers); #define NMB_satisfyAllOf(...) NMB_satisfyAllOfWithMatchers(@[__VA_ARGS__]) #ifndef NIMBLE_DISABLE_SHORT_SYNTAX #define satisfyAllOf(...) NMB_satisfyAllOf(__VA_ARGS__) diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h b/Pods/Nimble/Sources/NimbleObjectiveC/include/NMBExceptionCapture.h similarity index 100% rename from Pods/Nimble/Sources/NimbleObjectiveC/NMBExceptionCapture.h rename to Pods/Nimble/Sources/NimbleObjectiveC/include/NMBExceptionCapture.h diff --git a/Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h b/Pods/Nimble/Sources/NimbleObjectiveC/include/NMBStringify.h similarity index 100% rename from Pods/Nimble/Sources/NimbleObjectiveC/NMBStringify.h rename to Pods/Nimble/Sources/NimbleObjectiveC/include/NMBStringify.h diff --git a/Pods/Nimble/Sources/NimbleSharedTestHelpers/utils.swift b/Pods/Nimble/Sources/NimbleSharedTestHelpers/utils.swift new file mode 100644 index 0000000..ae234c8 --- /dev/null +++ b/Pods/Nimble/Sources/NimbleSharedTestHelpers/utils.swift @@ -0,0 +1,235 @@ +#if !os(WASI) +import Dispatch +#endif +import Foundation +@testable import Nimble +#if SWIFT_PACKAGE && canImport(Darwin) +@testable import NimbleObjectiveC +#endif +import XCTest + +public func failsWithErrorMessage(_ messages: [String], file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () throws -> Void) { + var filePath = file + var lineNumber = line + + let recorder = AssertionRecorder() + withAssertionHandler(recorder, file: file, line: line, closure: closure) + + for msg in messages { + var lastFailure: AssertionRecord? + var foundFailureMessage = false + + for assertion in recorder.assertions where assertion.message.stringValue == msg && !assertion.success { + lastFailure = assertion + foundFailureMessage = true + break + } + + if foundFailureMessage { + continue + } + + if preferOriginalSourceLocation { + if let failure = lastFailure { + filePath = failure.location.file + lineNumber = failure.location.line + } + } + + let message: String + if let lastFailure = lastFailure { + message = "Got failure message: \"\(lastFailure.message.stringValue)\", but expected \"\(msg)\"" + } else { + let knownFailures = recorder.assertions.filter { !$0.success }.map { $0.message.stringValue } + let knownFailuresJoined = knownFailures.joined(separator: ", ") + message = """ + Expected error message (\(msg)), got (\(knownFailuresJoined)) + + Assertions Received: + \(recorder.assertions) + """ + } + NimbleAssertionHandler.assert(false, + message: FailureMessage(stringValue: message), + location: SourceLocation(file: filePath, line: lineNumber)) + } +} + +// Verifies that the error message matches the given regex. +public func failsWithErrorRegex(_ regex: String, file: FileString = #file, line: UInt = #line, closure: () throws -> Void) { + let recorder = AssertionRecorder() + withAssertionHandler(recorder, file: file, line: line, closure: closure) + + for assertion in recorder.assertions where assertion.message.stringValue.range(of: regex, options: .regularExpression) != nil && !assertion.success { + return + } + + let knownFailures = recorder.assertions.filter { !$0.success }.map { $0.message.stringValue } + let knownFailuresJoined = knownFailures.joined(separator: ", ") + let message = """ + Expected error message to match regex (\(regex)), got (\(knownFailuresJoined)) + + Assertions Received: + \(recorder.assertions) + """ + NimbleAssertionHandler.assert(false, + message: FailureMessage(stringValue: message), + location: SourceLocation(file: file, line: line)) +} + +public func failsWithErrorMessage(_ message: String, file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () throws -> Void) { + failsWithErrorMessage( + [message], + file: file, + line: line, + preferOriginalSourceLocation: preferOriginalSourceLocation, + closure: closure + ) +} + +public func failsWithErrorMessageForNil(_ message: String, file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () throws -> Void) { + failsWithErrorMessage( + "\(message) (use beNil() to match nils)", + file: file, + line: line, + preferOriginalSourceLocation: preferOriginalSourceLocation, + closure: closure + ) +} + +public func failsWithErrorMessage(_ messages: [String], file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () async throws -> Void) async { + var filePath = file + var lineNumber = line + + let recorder = AssertionRecorder() + await withAssertionHandler(recorder, file: file, line: line, closure: closure) + + for msg in messages { + var lastFailure: AssertionRecord? + var foundFailureMessage = false + + for assertion in recorder.assertions where assertion.message.stringValue == msg && !assertion.success { + lastFailure = assertion + foundFailureMessage = true + break + } + + if foundFailureMessage { + continue + } + + if preferOriginalSourceLocation { + if let failure = lastFailure { + filePath = failure.location.file + lineNumber = failure.location.line + } + } + + let message: String + if let lastFailure = lastFailure { + message = "Got failure message: \"\(lastFailure.message.stringValue)\", but expected \"\(msg)\"" + } else { + let knownFailures = recorder.assertions.filter { !$0.success }.map { $0.message.stringValue } + let knownFailuresJoined = knownFailures.joined(separator: ", ") + message = """ + Expected error message (\(msg)), got (\(knownFailuresJoined)) + + Assertions Received: + \(recorder.assertions) + """ + } + NimbleAssertionHandler.assert(false, + message: FailureMessage(stringValue: message), + location: SourceLocation(file: filePath, line: lineNumber)) + } +} + +public func failsWithErrorMessage(_ message: String, file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () async throws -> Void) async { + await failsWithErrorMessage( + [message], + file: file, + line: line, + preferOriginalSourceLocation: preferOriginalSourceLocation, + closure: closure + ) +} + +public func failsWithErrorMessageForNil(_ message: String, file: FileString = #file, line: UInt = #line, preferOriginalSourceLocation: Bool = false, closure: () async throws -> Void) async { + await failsWithErrorMessage( + "\(message) (use beNil() to match nils)", + file: file, + line: line, + preferOriginalSourceLocation: preferOriginalSourceLocation, + closure: closure + ) +} + +@discardableResult +public func suppressErrors(closure: () -> T) -> T { + var output: T? + let recorder = AssertionRecorder() + withAssertionHandler(recorder) { + output = closure() + } + return output! +} + +public func producesStatus(_ status: ExpectationStatus, file: FileString = #file, line: UInt = #line, closure: () -> SyncExpectation) { + let expectation = suppressErrors(closure: closure) + + expect(file: file, line: line, expectation.status).to(equal(status)) +} + +public func producesStatus(_ status: ExpectationStatus, file: FileString = #file, line: UInt = #line, closure: () -> AsyncExpectation) { + let expectation = suppressErrors(closure: closure) + + expect(file: file, line: line, expectation.status).to(equal(status)) +} + +#if !os(WASI) +public func deferToMainQueue(action: @escaping () -> Void) { + DispatchQueue.main.async { + Thread.sleep(forTimeInterval: 0.01) + action() + } +} +#endif + +#if canImport(Darwin) +public class NimbleHelper: NSObject { + @objc public class func expectFailureMessage(_ message: NSString, block: () -> Void, file: FileString, line: UInt) { + failsWithErrorMessage(String(describing: message), file: file, line: line, preferOriginalSourceLocation: true, closure: block) + } + + @objc public class func expectFailureMessages(_ messages: [NSString], block: () -> Void, file: FileString, line: UInt) { + failsWithErrorMessage(messages.map({String(describing: $0)}), file: file, line: line, preferOriginalSourceLocation: true, closure: block) + } + + @objc public class func expectFailureMessageForNil(_ message: NSString, block: () -> Void, file: FileString, line: UInt) { + failsWithErrorMessageForNil(String(describing: message), file: file, line: line, preferOriginalSourceLocation: true, closure: block) + } + + @objc public class func expectFailureMessageRegex(_ regex: NSString, block: () -> Void, file: FileString, line: UInt) { + + } +} +#endif + +#if !os(WASI) +extension Date { + public init(dateTimeString: String) { + let dateFormatter = DateFormatter() + dateFormatter.dateFormat = "yyyy-MM-dd HH:mm:ss" + dateFormatter.locale = Locale(identifier: "en_US_POSIX") + let date = dateFormatter.date(from: dateTimeString)! + self.init(timeInterval: 0, since: date) + } +} + +extension NSDate { + public convenience init(dateTimeString: String) { + let date = Date(dateTimeString: dateTimeString) + self.init(timeIntervalSinceReferenceDate: date.timeIntervalSinceReferenceDate) + } +} +#endif diff --git a/Pods/Pods.xcodeproj/project.pbxproj b/Pods/Pods.xcodeproj/project.pbxproj index 857b93b..fbdf431 100644 --- a/Pods/Pods.xcodeproj/project.pbxproj +++ b/Pods/Pods.xcodeproj/project.pbxproj @@ -7,288 +7,487 @@ objects = { /* Begin PBXBuildFile section */ - 01236C984BBB2918575C35713E2E08B4 /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = 586B5A37C0A10198805DA6175B2EB342 /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 057C1964EBAFCBC649F8012723CDADF5 /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 21C0C122235EDD894313B02C03C7C538 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0650AF0DB8DE333CE5D99D704E29AC02 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = A12262F224D0D0A168C398C49F628A15 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 088A5A88342D60B6FCFAEADBF0749220 /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5523F3CB4F893F0BF3631D865BEEC2B4 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 09D4B856CFEA59F4E16AB91D1F06D50C /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = E2FF0C6AC202911FB7A52FE099B9B734 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0BAC760A19A0F7BAD74264AA4DDDD679 /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = F3ED266DDE9C244816DD6A53157F8745 /* World+DSL.swift */; }; + 0197623979A778492C933778D80DD791 /* TestSelectorNameProvider.swift in Sources */ = {isa = PBXBuildFile; fileRef = 427FDF816893162B86CD95A8B6ECA6F3 /* TestSelectorNameProvider.swift */; }; + 02862925CA6AC122C7D7FAFA6EAFE9B4 /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = D5F716D0A883C3817ABCC3DFCD093A12 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 02A19A4480813B8CD5BD418095D21B2B /* CwlPosixPreconditionTesting-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = A06152D2BDE64E2A5494483F26A48791 /* CwlPosixPreconditionTesting-dummy.m */; }; + 05BE0BCB8F600E9095F0949E246AE63F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 072CBEE458E411A7386FEA40EDB74F78 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF020ABF4E2332FCE7BAA228CEA6F5F0 /* ErrorUtility.swift */; }; + 086E1CE4E10D430F1E947C0EB6EE585D /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B1B115D5D9F328D12E904FB04B999415 /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 0A411DB578B132909FECBE652B271BEF /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = FBE175B9962D91CD880D0B7F93C35D89 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 0BED3C790949A2E29BB3C56B0C7D0912 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B188395FBCB9792D62AC9A1BF5BD82A /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 0C0D56E489977C4C3AAC657267CBE490 /* Pods-OSPaymentsLib-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 8FAE50E0E3AD48853025A2E73597E47B /* Pods-OSPaymentsLib-dummy.m */; }; - 0E398EF6297FFF6CC9BC74421BF1712D /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84CC299AC522B25A61A3FAF124FF83FC /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 0F776B26BC641CB895C2E7D961C71152 /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2362FBD489CCE1D540C808716D1EB8C4 /* ExampleHooks.swift */; }; - 154A42D3BBF847E3C2C7A6BB4EFAEE84 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CE338476557D8F2CF2B6E987F5A31CA /* DSL.swift */; }; - 19A8009537BCAD56435B2DDC620B29AA /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = E25EB083AA8985DFFE745FCF5758009A /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1B5648DECACC2C478440DD19516ADCC5 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = E27895722ECA9E17BA1DC28F822F97B9 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1C469C17A0E35E4508F74FEB1EDA586C /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 49D566AD1F3A57C62675DCFF1174ADF8 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 1CBAF686CA3277D9FC264A3B1E692471 /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D3A8BF3C48BD1892DD33A7126753E72F /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m */; }; - 1E5D8B0BD08347A08E3CC4FF6267376F /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B1D21BE1B5A742AA9C8EEE801D57559C /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 207866DD86EDE603026D5AEDAF5ABE44 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = E6BB1E6C30B81EDB33EC7FDB6C205C79 /* QuickConfiguration.m */; }; + 104E39CF62CF4D1A95389513C6732A3F /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7DDD16B3AFA84E81570BD160CB3C2A7E /* QuickSelectedTestSuiteBuilder.swift */; }; + 12D53B67A082D15ED18B4B51CD4C9ABA /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 42C914EA4F30C3E61E293FEFA6D1F328 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1368326833020E1381CC35FE204C0543 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7AFB2D30DA0F7B20CFFC21F790F4203A /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 14FD1319FDF44431950DBE146939F966 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 66F1174270109F74C66D01348D1F514E /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 168E76699C1ADF9D9B8214FD4BB48F44 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 010573E4A5C4F5A5C6D0AFDFB7978306 /* CwlDarwinDefinitions.swift */; }; + 170B8362049B9E7C134C392EF01C1B11 /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 2B0E6009957030250D61B6963C55C947 /* Nimble-dummy.m */; }; + 1876CE44E8440A4737CF40117A68F309 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0021D8C637CD17D0FA0721864E91ADBE /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 19CB73099257045327239879DB6CFCD5 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = CC9F06E5FEEF43271BABE69FE5CD6DA8 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1CC7BC97342645FD4DFCC8C7A445A364 /* QuickConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 305246987AF80E372148798DC39EC054 /* QuickConfiguration.swift */; }; + 1DAF13110AC3B5A462DD10202848DC38 /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = EA7B179133900F7BADE2BF3E46232413 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 210E28965A04075F4DC3960D269F3BFE /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31E775260D1FD8A55FD7DF970BEDF5C /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; 21601609288258F44177C9A71A1A5012 /* Pods-OSPaymentsLib-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 02F5AF25FD35DDCE251A9006737617A5 /* Pods-OSPaymentsLib-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 21F3408E9BD0BE7C7A9FFBF43B4F28A0 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 7C826AD498684E411DD1C792748D889C /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 2223D9864ED3F01713DA2180EF7190B9 /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5273DD569D843C265AF46176F4A534FD /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 233AB756F67ABBD886C54BF9F12403DF /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16F99FA0960BE24312A4603668FD6CFA /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2357EB01C617A8A015615080DBB012D6 /* Equal.swift in Sources */ = {isa = PBXBuildFile; fileRef = 844435B050856A3A90F2F2DC5D10C71E /* Equal.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 289B613DD13E58EA28C0DFAF4358BA68 /* ElementsEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = C851CC15E8E0E35CE23A1222E105A809 /* ElementsEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 28D6E884D7AB6CF2B4BFF328D2537D22 /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = EE08781F30AAAA4776BC4A79E3FA9F40 /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 2C85A44748A3F58CE8C0AE291B9EDDFB /* QCKConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 88CE28DB5FFB584E123C56C4345A73E7 /* QCKConfiguration.swift */; }; - 2D6DB63EBCA201CFABA3012CD1C360BD /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5813F3776773A4275874BC369BB34A01 /* ExampleGroup.swift */; }; - 32995147DC30DF5022DD66C0470BFDE9 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 60403D3F19863854702A6361D7F61850 /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; - 35C095305E5FB8CF40BB6C6A7F02E678 /* ErrorUtility.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD87F111AA17D3829427C832EB042273 /* ErrorUtility.swift */; }; - 389DF9C2C99BD347316A28A8F10387D3 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; - 3ABDA920FDD838A534E55347FF35ACCC /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6C5852911233E16D8DBA632AAF28C4C0 /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 3B59EB43186F324A79D05C3201369283 /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = 0A6115706ED27012A9F43E253D3D3DD7 /* QuickSpecBase.m */; }; - 3B5E796F1BFBB87AAB31305D6FCE160E /* Nimble-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 33FD12F984B4BA8B5D001D0AFD13F708 /* Nimble-dummy.m */; }; - 3CFE6D672FEFBE8A9D10D5723FB88BF2 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6E6AA1575C0AD81F762039746AFAECDC /* Stringers.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 3E1105B44CCBDA9EC8C6C96EACCCC28F /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 45F6B7AC8B7979F25F17036731EE339D /* Behavior.swift */; }; - 3E97A584E7FDD55A6AC072DB23043FCC /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 755D25C0FCCF8F6E3E59CF4F94C8C060 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 3FA8E6AEBD8687BF75B467C33ADF0045 /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B2A30FEA2214E06D065AE8997736B53 /* CwlCatchException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 40D9B846E5A8AF781C0A0C41FED0E0F8 /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = C0DEE4FA5F5FF28F88648CF9EF3B4C39 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 42BC3C3CBE7E5484F09BAD3204DE521D /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = AF3CEFA5153F8ACE3EA7629E00B17B8F /* NSBundle+CurrentTestBundle.swift */; }; - 498D0CEF04FDF36BE2B89A67015FF3A0 /* String+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = B14A4B16D42CCCBE3D21CBDE4FFC9AA4 /* String+C99ExtendedIdentifier.swift */; }; - 4A457767C9968D139BD8AAD877DFC117 /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = D41AA0E2939FB981CED2EFF1B98A57B3 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4DB106EF5D81F121EA58D82401C5DD1C /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BAC25BC63EBD14D35CDE94813660768 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4DFD4AE1B1C12F59014A9C1FE8F7AE47 /* BeResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = BBA4F4C4573FD9589D1CA0CA3DD18A0C /* BeResult.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 4EC19A4F9EE9863B3CF7BDB7607FE96B /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2E9331718C3E375B9305AE6782A65CC4 /* CwlBadInstructionException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 51BAE003E7BD972B4F6EB54CFB7E1BF0 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2FBFBBA48C11C5DAD16F0C15F64297B /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5258586AADBC8482EFAFB4B591A17E03 /* ToSucceed.swift in Sources */ = {isa = PBXBuildFile; fileRef = 51320337A23D4A8E10E00BFD67B8D043 /* ToSucceed.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5448447D317610CE0DF66B87CF6F1094 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1F00FC1EB20AC2CA0B5B083F84159A5 /* Closures.swift */; }; - 58CAB839E63D7D4575D3DEDF8C98EDD9 /* Await.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40955816DD54EA848880AD2815A76921 /* Await.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 5DE534ADC468F5FFC43371CE7138923F /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2AECA1C81ADFA2CA35D84DC7FF1902B2 /* URL+FileName.swift */; }; - 604A73AD1D0E82356F2A073C53BC6517 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; - 60A059AA3734D5D3F2F73D07C427F4C1 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 7A7CD7566A962848ACAFAE01FAC08AA6 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 612581CCD8346C696A80E6BC09D24C1F /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 43D9B7DA298758F3F8912543839CC426 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 61F1ADB6BE662783C1A01C2C1720A9BE /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 67A91DF9E678606788A96C9150D53EA6 /* Expression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 654580360E6694D7F7CE85CE5390DA79 /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2EB0871827E9D45D4B63C66C93F292B /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6A47C53473FBCF2FF5C85069FBD4CA8D /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 32395E85CAF13637932ACEECADC2D96D /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 6C1386A39405BDA544D5BEE2C9155AB1 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 254558E5834898D2301B3E8C4F620311 /* QuickSpec.m */; }; - 6D2F9F1DC6C1DE1C73F4382904B9C97C /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 298044D1245C4BD022B7F13791639E75 /* DSL+Wait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6F4F5989C108EB29AB735E9CAF4B6E0A /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = E937CE363DBBFE4523820E40E9D3F9A0 /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 6F796B7E3AA428C9D8E88F0F2269664F /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = C3D4A2AFFEAE1D8A8E4479F656ADF2D2 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 707245706183C9814604FBE34CD83152 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0F4A8507ACE009C2C0F45E1FDED202C7 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 7190961540266108624E854866842A81 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 369990B25C94966B37B0E376A2FE93C0 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 23CE269175242B42A00AC562C0446EBC /* BeVoid.swift in Sources */ = {isa = PBXBuildFile; fileRef = F14600C0E9673E4CC7E4EA806FF0E5F3 /* BeVoid.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2481095DCDF1162F5FA5AF4E9BDB7463 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = B4BC423F6F6DA19672E4D0DDBFF15B30 /* QCKDSL.m */; }; + 2708C3D34AD6410DB563CBCA5205D89F /* ThrowError.swift in Sources */ = {isa = PBXBuildFile; fileRef = E5EED09E9911F8688FB72A1FD574D617 /* ThrowError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 273C2200A3CCD17914F16621CA8918F1 /* Map.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0D7454A7A71134BA53000CEA4197CF29 /* Map.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 27E52183EDFE2F83356620EC190632CC /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6FE954440EDA2E7E87A363CA332ABB6D /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 28C50DB2279706C3C47A38C9D7DEF9A6 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0B9DC5C7E87A938A767BE98EBCC3AC34 /* AllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2A05C7950CB354EA6FEF8649F3B82067 /* QuickConfiguration.h in Headers */ = {isa = PBXBuildFile; fileRef = 503AB4E90BA02160208142DFCEAD3A05 /* QuickConfiguration.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2C632E96DC0025A2C0036B7CC037A407 /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 3DA9BA00CFF48AA3C0D2FC7CA0EA6011 /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 2CAA65A58918F5EC6815F86DFF0C9145 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 22C8372C0C245DC0B51C4009E88E5C8D /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2D6226020DF075BC08C179CE9D1E57C4 /* QuickSpecBase.h in Headers */ = {isa = PBXBuildFile; fileRef = AD35251EED24E7D573ADCE99E37EBF6D /* QuickSpecBase.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 2DAF34A5F2861544A6F247268044EA97 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7644AFBF58E73F3D0F2AA2474A8268D7 /* SourceLocation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 2F0EA3496EE6BA0E3A41CC09AE663B97 /* StopTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = F9881E951A68EBF0A090E1E78C38E6A7 /* StopTest.swift */; }; + 30AA415F142E3E5F6E15497D254550E4 /* AsyncDSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = FFF3C577D7D9C6CC62FAC9221ACC9BF6 /* AsyncDSL.swift */; }; + 30C5D12AB6B5B930EFCFADA8ABCBF63B /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = D2EBB799FB9B932A1E46754C4F5A0944 /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 386035701616A55133490CC5B7D599A1 /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 34AD4F01F38CB60FFB422A7A72C065FA /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 39FA1995EBCBC081DF2B2353C50ACC4A /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6D3CDF327328618001FE959FDD269008 /* HooksPhase.swift */; }; + 3A8AD07A6240BCF821FF670ED4AEA227 /* Requirement.swift in Sources */ = {isa = PBXBuildFile; fileRef = 060983B9072CE76B5C27D0C6F7A26FCE /* Requirement.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3C0E7EFA4D5514BD647146F181F02F32 /* Behavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 428AA7F17E16C956AA8B0D86D3A6DC25 /* Behavior.swift */; }; + 3CE63C7B763466F2B1E5A50BF4A1C55C /* BeLessThanOrEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = D779B4E1CDC07AF68A9253611560A36D /* BeLessThanOrEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 3E245FE6735FC9C037D4DD30C2EA9C20 /* AsyncExample.swift in Sources */ = {isa = PBXBuildFile; fileRef = A0A97EB9203D4825B685982429EE22D7 /* AsyncExample.swift */; }; + 4235C79508CB73F9F3960AEFBEE95287 /* AsyncAllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 61C7DDA29CAFB3DB6CA497855D433E8B /* AsyncAllPass.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 43C46479311D1489DAE6A0581448BE0C /* DSL+Require.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3ED99CD2818C890CE81D07A9699309F9 /* DSL+Require.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 462F0CA8B3C9AF1257FE0E07BD271087 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = C45D995FC0579F56843554DAED0AB29F /* Quick-dummy.m */; }; + 48F8927D667FF87502CD4DD8C200FECB /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 49471D499F667B43EE5EB46A43D39EB5 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 4C1C46B7FF57E43C3D7037D860510A05 /* URL+FileName.swift in Sources */ = {isa = PBXBuildFile; fileRef = E6ADA6A1E7D8BFBDD30C695EAB397C74 /* URL+FileName.swift */; }; + 4C9212B5D4D4ABC7C9245E1260987D5A /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = D3A8BF3C48BD1892DD33A7126753E72F /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m */; }; + 4FF46429ED8253B45C2DBCCA6E85D146 /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = BC47A61A4228C402DFCE82B29F85BC26 /* mach_excServer.c */; }; + 4FFFE078561455276BD8D7DBBD4B82B7 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 7B2D42ECB3E82916486FEC9384FA249D /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 5031354613E1B45DD616C9428C168A9A /* SatisfyAllOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 11F7DAF34099D8324849BE1BA1898A94 /* SatisfyAllOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5034FA01DC379A5479D202CC1C2FBE4A /* Equal+TupleArray.swift in Sources */ = {isa = PBXBuildFile; fileRef = 837E401928ED3F08917C35F9DE2F1D67 /* Equal+TupleArray.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 5053A17F2081784AB080F30B0F5865F4 /* ElementsEqual.swift in Sources */ = {isa = PBXBuildFile; fileRef = CFA1EFABF9C0EE69A3A3FFCFC97C309A /* ElementsEqual.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 50A1759496E2BFBEBD4E4D947BF3EF49 /* CwlPreconditionTesting-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 64FAD5D5D8489BD37FC62F154800B9F3 /* CwlPreconditionTesting-dummy.m */; }; + 534B183FDA625BCEF7D1D3B3AAD90FB8 /* Polling+Require.swift in Sources */ = {isa = PBXBuildFile; fileRef = B8BA4C9986D8F59C1F8DD66594BA5270 /* Polling+Require.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 53A2DF915F7360AC657F9F7118E2C127 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 49E4331AAF01CB7B1A5791AC2F317893 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 54C73470DE4EFE7038D8BCC96394CB7A /* AsyncTimerSequence.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6650BB42E1D839AEF9C12E5D6D334420 /* AsyncTimerSequence.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 58345F4B6D877E7B7C0F5E62BD617F3B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 58B391FC2D923A51FADDFE09E01D4324 /* CwlBadInstructionException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6EF6C7606EB9BAEACB549B0DC7521A3A /* CwlBadInstructionException.swift */; }; + 5A28B94D6EE4BE9349685EECB112D7A6 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3D2F7CDABDEF157CC25E87A3FF94D228 /* CwlCatchBadInstruction.swift */; }; + 5F4300F4985C00C7E50879D5DA25069D /* AdapterProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 07F6C19E6B79D6A62A98047137C186E4 /* AdapterProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 608FC9113349A392FAF68461DEE56450 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + 61FBDD8958A28F726EE3A66795A628AB /* utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 20C1FD548A2F133D7F0735173B4FEF82 /* utils.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 63640E2BAE8AFCD81A8F952297171486 /* Closures.swift in Sources */ = {isa = PBXBuildFile; fileRef = 906140C81634F7F2BBA3F01EFDE88849 /* Closures.swift */; }; + 64705DF3A1868C524870711259043F58 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = CD7AFBB5B4125D85D39A72E20725E5FA /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 65D65FA4541FC9393C3A50D04583E0B5 /* QuickSpecBase.m in Sources */ = {isa = PBXBuildFile; fileRef = E25520DDA95FBAE29B03465454EADD45 /* QuickSpecBase.m */; }; + 6B5F43788CF310B9DAD46A09B8DCACD2 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 02C9CECA6F1C8F71F9B94D93137EF0EA /* SuiteHooks.swift */; }; + 6C3DB5E93A27526C2717382FFCFEA7C7 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C319EEB2331278DFC6A67C94D00908B /* DSL.swift */; }; + 717F4536032D9AD18B34543BB16B5785 /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 60BA7DA88753D1953169A962D2A1F11A /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 73B0052F6EF7783BA3C1A532D75EB1D8 /* CwlMachBadInstructionHandler-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 22860578BE441530DE0EF805F57485CA /* CwlMachBadInstructionHandler-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 7531CA08B8E24EDD00485B42BB7DA8FD /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4E78EA237A79CA2DE923F31EC39C90FF /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 771F212CFBA566E4C01AF9ACFB254A05 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; 781AF529033437C39A1E1D5CDF9D266D /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; - 79A9ADCAE72B5F30CE882F79CDDDD47F /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; - 7DF5C2582E1C9DE5BC6BF84C0AF1337B /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = F31245591C4C010F1303DAC1BC9804C1 /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 80428B0834B1272AB4E96E00D3FAA081 /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7CDC6B9AB35B53FC579C731AE67FD846 /* Example.swift */; }; - 80DB7C67B0D7A32BF885B5CD17C745A1 /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9215339C71BDBD5B494E9EFD44005158 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 86037D5CAD49EC09A2B944ADBF561059 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 447626370CDD31CDCC3656C6E0B3BA05 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 86F84DE049A0E2CADAC8344E20D070BE /* mach_excServer.c in Sources */ = {isa = PBXBuildFile; fileRef = 8470BE37EE9259F9FDADDFC80764A837 /* mach_excServer.c */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 87535E5C51E9F6B7B1517FEA95033D1C /* QuickConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 204E01215147E1CFDB134360F8F1938E /* QuickConfiguration.swift */; }; - 88380C6AB029E423E69827B204BFF18A /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 97522C7BBA1F97437715C74303E5A686 /* NMBStringify.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8A9FE00A3D26CFEDEF3503C93FEFC954 /* EndWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2C9CC327536739702EE1B8865E38BED6 /* EndWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 8EFA132322053E7D8A1F9F380B5D8935 /* SuiteHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 880EBA466E9150F71DE3C4A76DB140D8 /* SuiteHooks.swift */; }; - 8F5593DFFFCAC3D618365EC2590A3E31 /* AssertionRecorder.swift in Sources */ = {isa = PBXBuildFile; fileRef = 64B896AB55261B6E62E0FC506B92A8EC /* AssertionRecorder.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 92DE6AC67462F0A507D3187892D4FA8A /* Equal+Tuple.swift in Sources */ = {isa = PBXBuildFile; fileRef = 16671DF91816B7CC8BAA2964E1E6414C /* Equal+Tuple.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 981F6B1579CE5D0BDB6E936DFC0B24F1 /* BeAnInstanceOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = B534FC537F198D4CB2269C659A93783F /* BeAnInstanceOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 993ED0D1D74DDFAF99D4108636EFFA64 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = E919903C10E88C8DB75C2CD00A266948 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 994DAB83E925F5BF28B00DFD0F9795CB /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 654A3ADC4BC6E05E9BDC2D8F858A74BA /* CwlCatchException.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9AB3D03BC12D48113C0AFB7E687A274D /* BeginWithPrefix.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7893AC67AE4B488BC3E9604A46413A06 /* BeginWithPrefix.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - 9B4B84C8A58733E87C1F30CDE34F3BEE /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB836F954501FFEA0AA8E87E8856D7A7 /* Filter.swift */; }; - 9B981E6DB0846F597838D6995E3F2EAC /* QuickSelectedTestSuiteBuilder.swift in Sources */ = {isa = PBXBuildFile; fileRef = CDDFBC1CEF007E69BBCFDEFF88615F2C /* QuickSelectedTestSuiteBuilder.swift */; }; - 9C75931ADE8431B4C3C4AE2D59E70977 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = DB88DCC04205DB0A61C17B66FFA0AE97 /* Predicate.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A017E1A4E1C0AA61CDB6F1E8382D3384 /* ExpectationMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3DB3B3904CE5F831A2214803D978A197 /* ExpectationMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A0F1DDBCD61B35967DED6A8F6A69B9A5 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = A1E026C7DAC445C7C813121DE7F03837 /* Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - A327A211C8B71069F32FAE5F5B3807C4 /* HooksPhase.swift in Sources */ = {isa = PBXBuildFile; fileRef = EBC4D3688977E2D961A8F985B1FC0F73 /* HooksPhase.swift */; }; - A357C8E38B58FA37B8E1A6103D4E9A0A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 0BB908657F2C86943C6660C8F0130CEB /* XCTestSuite+QuickTestSuiteBuilder.m */; }; - A487451E3CC40D7F9549FA292435273B /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 81CA9AA102BC399952DACFC1F5740345 /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC0278DBE6921D2AA8CA82CBE8805202 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 090D7BCE58F5A67C1B30F59637E0EE53 /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AC1B0A94D98FF6A485E56165BDAAFB8F /* BeAKindOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B95333BD525E87BFF22C57ED6E20FD5 /* BeAKindOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - ACAA345A1CCAFA1F4EE69B3C25D62558 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4149CC5C4007BD87DFDB7E2114AE830D /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - AD022386EA01CE480072E4C2E261BEC6 /* QuickTestObservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 350B976ED907275DDED563482009AFD2 /* QuickTestObservation.swift */; }; - AFB4F603FD0F5C407CB8920F6A5BA7A1 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85C9317EF9B3052FC9D544E30801F901 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - B93F3526A95D7F43EEBFEE5E453E4795 /* BeLessThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = EF5F8634034723707BA489895B2AC37A /* BeLessThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BD3ABAC28025564DCF2E6C12009435DF /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 1B6A8AE2D5EF989F29A4FFB4EB7D52A8 /* CwlMachBadInstructionHandler.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - BF62525E5628A9F7604BA8479691318C /* BeLogical.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3B4E2AF01C07390467B2A032C1081912 /* BeLogical.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C03116C765F1A8893559730965ECBAD8 /* Nimble-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FC0C54E76B49BF11F64E24F0931846C /* Nimble-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - C20BFECB0A04FE439AE243D89E687B8A /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 289E9ACE73C6629DAAEA21D42495B76E /* QuickTestSuite.swift */; }; - C5DF891232B50DB810099403734CFCEE /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 516931D0E6A9461B9C20990FA366E1F9 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C7DB9FB7C8378ADC0DBC744F9359C0C9 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 115813CA22C723977B41201CF3B4C44A /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - C8539F1BDF052B57BDB129D3D4B07364 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = BF200F89D143FA102042E6D285D5B6B2 /* Callsite.swift */; }; - C85E1092F4DAACDD63FB8E8B0E144095 /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = 50FAC3D0F71CAC2AEF632440A982DF9D /* ExampleMetadata.swift */; }; - C96B370E9B3442878448F8FFFDC98C7A /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = AD1B7F0757B5057BCF6D7D1F6B0B7BD1 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; - CA32F74C00C2448397720AB161360835 /* CwlDarwinDefinitions.swift in Sources */ = {isa = PBXBuildFile; fileRef = C34F47D81171E27AF285CDD1AF9F659C /* CwlDarwinDefinitions.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D6F1A9AFE522D73CB8BDF851FF6F7ACC /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2CF56DC23988E5C892B0834949D740C5 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - D8B8FCEC597824B40986C8F4F7B50899 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = F75E74A600C812323367AD98A7E46500 /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; - DA9B61878019B5428B614BDDB5948F01 /* QCKDSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 230259C7BBC0AB021F9278A064AADAC1 /* QCKDSL.m */; }; - DD130331C3820B0A4A655D6422167410 /* CwlCatchBadInstruction.swift in Sources */ = {isa = PBXBuildFile; fileRef = C4C39466E1E06F0DE2D25E4D0D4E6169 /* CwlCatchBadInstruction.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - E1CD0FEF6BA86FA9C28038C818E2514A /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = E7639378BFCFD4BC8587A03243C01A64 /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E2EE2E7797C383576ACBFE4986179459 /* CwlMachBadInstructionHandler.h in Headers */ = {isa = PBXBuildFile; fileRef = 23E11C41EA8F304D43F144554949AEFF /* CwlMachBadInstructionHandler.h */; settings = {ATTRIBUTES = (Public, ); }; }; - E5ACC239A1C2E515D4939ACECD147445 /* ThrowAssertion.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85254BDDFDC46F27B70DCBF181ADE6FF /* ThrowAssertion.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - EA4EC4B3853541FDC946239C036D12C9 /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = 3EFA1693908150CAAB677FEAB89AEC2D /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; - EB892573E1CA332ED26DCC659406E79B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */; }; - F1D91144B0B756BA7723E0AE68ED6605 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = A16B8BD1EFF8AB8B6940E1EC149FD38A /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F591765960EECDBB53CB4E5329290A4B /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = C53261F42083B42E49E80904A433DE8A /* World.swift */; }; - F8211C89835CD4106BCC584D260CF7C8 /* DispatchTimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = FE268F672F0856752F99A6370C6545F1 /* DispatchTimeInterval.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F94ED0C040D8EFE1B1227A464F81E92E /* BeGreaterThan.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9AA80CEA9B4992D8F9368CEE01A42094 /* BeGreaterThan.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - F9A961CFA0E2BD3C6A94E282069AD80E /* BeWithin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8015D0BB35ED18B858B74C6E8656EB00 /* BeWithin.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; - FC4F734925BC0EDDCD7C10AFBF93C576 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 5C8E70599736912CA1DB7FCDD472F2B2 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - FE67CE5AE4DFFE6B850FA43334EEBDC0 /* QuickObjCRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 622317B228B6CF5C9D75DA1008B0F2B8 /* QuickObjCRuntime.h */; settings = {ATTRIBUTES = (Project, ); }; }; - FEA8C3E9543FB2A316D5A8F89B13D411 /* Quick-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F6D4322ABB010AB0EEC279249B17918 /* Quick-dummy.m */; }; + 7847936EDCDA1B01C677C31B0D3D4E6C /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 05198D9443349CC308FC2B63E492C461 /* Matcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 79DBE9693E2198943A783ABFD29AD8E0 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8B98088616FD55D1953AAC7DD9D0DCE1 /* Errors.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 7AE7F1A36F091AC368D7C86B207FFB0E /* AsyncExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 28881D40AD493F4CB4F35D16F9BC30E7 /* AsyncExampleGroup.swift */; }; + 7D788AE341F323351D1ADEE5E65F68F2 /* CwlCatchBadInstructionPosix.swift in Sources */ = {isa = PBXBuildFile; fileRef = F38617FFBE06F9A4113A1FF4C8F0EB5B /* CwlCatchBadInstructionPosix.swift */; }; + 7DC09E8ED20036275FF7D0A27143F596 /* CwlCatchException.m in Sources */ = {isa = PBXBuildFile; fileRef = 2703D5CC047D4B818556425E18C03970 /* CwlCatchException.m */; }; + 7FD700715732587DA0D9587E45209ECB /* Quick.h in Headers */ = {isa = PBXBuildFile; fileRef = 60D6820E01BCA61C82E683E13A9A5FAB /* Quick.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 8082D3FBF990D28DC8051FD6A2C44650 /* QuickSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 7F3B1C888E10C2600437AB3BEC1FA572 /* QuickSpec.m */; }; + 8153776DC743A3F708498232C91024EB /* TestState.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84952211AB6C6062704AE0C091B569BB /* TestState.swift */; }; + 83464DA07AA59C01E4C5A5D5B736C32E /* Filter.swift in Sources */ = {isa = PBXBuildFile; fileRef = 246CA8E9B8172FE91C2D047224A9E94C /* Filter.swift */; }; + 8370BD520FB666EC353C8F721C3675DB /* CurrentSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3666C5127185639B35619163DE5164E9 /* CurrentSpec.swift */; }; + 84EA7731D14E937368671377E4CAD56F /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = F12ECBFA4CC53AB57E018768F98CD00B /* PostNotification.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 883E3CE7566CDAED097D74819DF969A4 /* Polling+AsyncAwait.swift in Sources */ = {isa = PBXBuildFile; fileRef = C7993940D6DB64D4951F356CEFDC450D /* Polling+AsyncAwait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8982BD9FA66C8988A24C5B03517931A2 /* CwlPosixPreconditionTesting-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 431556E94698D895BBE3D506D2D06048 /* CwlPosixPreconditionTesting-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 89FC9CA354F1BE3BA4947368D6EDA77D /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = CB6F1225A0F71F797015B4DCE1998BE4 /* NMBExpectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8A085B7C40368D8F5DFB06CFE8541809 /* AsyncAwait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 99BC84518076E755101DF735D5CB217F /* AsyncAwait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 8BA9506936BAF58874A11686DE9209FC /* NimbleXCTestHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 981572B1BC0940E3ACB3E4865F13A926 /* NimbleXCTestHandler.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 92D38CFA30428553FA8C7B607F77188B /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0A827F3B8A11664638D6829EE312B7C0 /* MatchError.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 934BAB9A75561F779175AA12A1BEF3E6 /* BeWithin.swift in Sources */ = {isa = PBXBuildFile; fileRef = 33A340E461ABFD5B557BFAEA10B6484A /* BeWithin.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 95E0B03539ADBAFEE8E4F645278FF85A /* QuickObjCRuntime.h in Headers */ = {isa = PBXBuildFile; fileRef = 6BE7250A5BCFFCD70959A4527E1E5525 /* QuickObjCRuntime.h */; settings = {ATTRIBUTES = (Project, ); }; }; + 97A4451BFC7BBB956541232190ED804E /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B58393042028545F4ACE967F4B5A2C /* NMBExceptionCapture.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9842709E4F626F7563E9709D28324787 /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */; }; + 98BF01027C0ED277FA44A5976CCAC48B /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8E0B39232C5995A8C46830D30017957 /* BeGreaterThanOrEqualTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + 9B230DE2E00CC2CA78561DD3DF028339 /* CwlCatchException-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 3BE3413E1EEA3C3E1DE19AE5BE8440E2 /* CwlCatchException-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 9DD804A47165A7BE0A7ABF60B8A198AE /* CwlMachBadInstructionHandler.m in Sources */ = {isa = PBXBuildFile; fileRef = 02BA9A6B3D35D0E8DBCCF45B2AAA2800 /* CwlMachBadInstructionHandler.m */; }; + 9F65F1675C50F3AEA034A1C7AE105438 /* CwlCatchException-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = CE17CB6ADBF606BD40F18E3CFCB080E4 /* CwlCatchException-dummy.m */; }; + 9FEC431B72D606CE1F9A7519ED52F067 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0DC37FD66556F5AFA0F6C8ED8DFEDDC6 /* Expectation.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A00B5714E574282285C79934F3931973 /* Polling.swift in Sources */ = {isa = PBXBuildFile; fileRef = 818508BB86C7028A61F1668B8F393B52 /* Polling.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A06102F3D994B4F3EE5F7EF68FEBBD22 /* QuickTestObservation.swift in Sources */ = {isa = PBXBuildFile; fileRef = F256CD46A9ADC44C9665AED5DCAE51AE /* QuickTestObservation.swift */; }; + A17F986159251EAB78F7A14D9CE751CD /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 3696664980112689674627D9EE8CF099 /* DSL.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + A4A2FACD0FBF3480F60A4F6CD7248C36 /* QCKConfiguration.swift in Sources */ = {isa = PBXBuildFile; fileRef = 84A5E6BAD81672C178803F3279DF3F2A /* QCKConfiguration.swift */; }; + A5C6D97101B799F260827304A7A0FEB1 /* QuickConfiguration.m in Sources */ = {isa = PBXBuildFile; fileRef = 6BA3CB1DF6F496D0D192C2CE67B32E2A /* QuickConfiguration.m */; }; + A8743EE43AD09651A91D1C0535590218 /* AsyncBehavior.swift in Sources */ = {isa = PBXBuildFile; fileRef = 73F2F55231738EB7D67BD0E2FCA99B10 /* AsyncBehavior.swift */; }; + A8E7FA7DB26F2CE5AB231F60C8211956 /* AsyncSpec+testMethodSelectors.m in Sources */ = {isa = PBXBuildFile; fileRef = 0B9A8B11FC7C1531FCA4B6B2BC51630F /* AsyncSpec+testMethodSelectors.m */; }; + AF73B574BAEA6A4890092B7BB4C5E1EF /* BeEmpty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 754297B4F9BC227D7D84B1CB651EF8B4 /* BeEmpty.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + AF8A390A34E0C9260BFC20B123D5330A /* CwlCatchException.h in Headers */ = {isa = PBXBuildFile; fileRef = 81E069ED072343385C014B7B48C416CD /* CwlCatchException.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B0024D71B366915E7FF1A526649F2A4C /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */ = {isa = PBXBuildFile; fileRef = 4D42904EF72A0426F7895677B65F22D5 /* XCTestSuite+QuickTestSuiteBuilder.m */; }; + B01FBBF046DB33409BCAD0CC418B1915 /* Quick-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 8F8AD33D990DFB47A310ABB106FFCC44 /* Quick-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B1F8913FCD67F4863C2F89120395AEFB /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = E66F8D3D05B48F66C8BB0A0161CE6B23 /* NimbleEnvironment.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B299AB0AE55C25E6B62F0E6EADBAC7CF /* mach_excServer.h in Headers */ = {isa = PBXBuildFile; fileRef = E618038AC16CB30F3B5E8F40C9F2749B /* mach_excServer.h */; settings = {ATTRIBUTES = (Public, ); }; }; + B39DA59A1B61AAF40791929F4CCFDC04 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CBDD353F57D9D94EF81C3AD956CF141 /* FailureMessage.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B77FF9D43361BBF2AA444C2635415459 /* NSBundle+CurrentTestBundle.swift in Sources */ = {isa = PBXBuildFile; fileRef = F8C0117628C789996B8C3ADBE64D0F14 /* NSBundle+CurrentTestBundle.swift */; }; + B84C161C8D6F6D45B54F4A0540EC46BA /* BeNil.swift in Sources */ = {isa = PBXBuildFile; fileRef = F4C13876A6C1AC39203D6CB258EB04BA /* BeNil.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + B9DF33D4019BC27D9DFC286EA4889458 /* ContainElementSatisfying.swift in Sources */ = {isa = PBXBuildFile; fileRef = D56E6D71C0EE2A714724EBF17F983257 /* ContainElementSatisfying.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + BAC5FAF0CDF05730BEE178C94C61DF24 /* AsyncSpec.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4479584A655CE3F1DD7D8A74ACFCFD16 /* AsyncSpec.swift */; }; + BE5CB274210C6D83CBF6F2D222FF0C20 /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = A3960D0AAF8FB8850DFA65C1A58F33EB /* AssertionDispatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C152028DCCBF496E39ADA0306CE2102E /* Example.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3A99AE93C9F6B8E96883ABD0C5E6730C /* Example.swift */; }; + C2DB1B3BA2AC1ADA9572527A408E2133 /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4C3FCFB435FCD32941C03A1563D1FA50 /* BeIdenticalTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C2E5477E32519DF248EE41B1E6182E1A /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + C5166B8B226EA61D351F98AFC5EF05B7 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6A6E2F0AEDBA03FE3630124BBE5E4C4A /* DSL.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + C5FC81492CFF91B1BAD3417ADF80FC06 /* AsyncExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = 620C2570C5DD2595C455386F70D838EA /* AsyncExampleHooks.swift */; }; + C70974CDB744D70499372A6AD39711E9 /* World.swift in Sources */ = {isa = PBXBuildFile; fileRef = FC758B9BC4F50D82ED882BB08DC817AC /* World.swift */; }; + C7C0E737E36967917577A44E01367CE1 /* BeginWithPrefix.swift in Sources */ = {isa = PBXBuildFile; fileRef = E46294DD3B28C2E71094B73581F9C462 /* BeginWithPrefix.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + CE845A999012F17514A2F3B857300186 /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = B1D21BE1B5A742AA9C8EEE801D57559C /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + D218D06508938E7E60BA9CA24BCB2D7F /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8186012C6C9DB52500D35A7B89FC6684 /* Match.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D3BD1F7254F7AF70D812D4C965EF54F9 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 4975483BFE3CD106070E2F8DD0286676 /* MatcherProtocols.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D52A6CF8DE6EB018BDC007090B811610 /* HaveCount.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6BB44237D2357864CBA63BAD83C5E21F /* HaveCount.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D6B4AA83CDA43927DB46E614FC3EDF09 /* AsyncExpression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 2B4A6523F00DDE83CE65B121647FD8E2 /* AsyncExpression.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D6DBC83664E74D070050CD81DA0E064C /* BeResult.swift in Sources */ = {isa = PBXBuildFile; fileRef = 83443A3D70BB725B1D7AB14A9C15E021 /* BeResult.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + D8867B60C823F8B93753E9AAB63CEE9C /* CwlCatchException.swift in Sources */ = {isa = PBXBuildFile; fileRef = F81EE8F55A395438492CA563784B65AF /* CwlCatchException.swift */; }; + DD136D9F0BA4405B4AF7E888FBBC03D0 /* AssertionRecorder+Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = EC2C3FDE19B021EB58A60A72DD2ACBFD /* AssertionRecorder+Async.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + DDC7CA0733F6D405C6E0C56785297B2C /* CwlPreconditionTesting-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 7AB13D18C8050C2E09BB64993CFB979A /* CwlPreconditionTesting-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + DEAD70130BED26DFF01DB8335048AE6E /* Equal+Tuple.swift in Sources */ = {isa = PBXBuildFile; fileRef = E1FB77A5A37F5E0F1A113F62AA792B4E /* Equal+Tuple.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E1A63FD6FBFFA3F07C2AED6C1125BC1E /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */; }; + E20BF25CC9FE502D37CED510E7ADFEAC /* PollAwait.swift in Sources */ = {isa = PBXBuildFile; fileRef = E801BCC406D59656CEF188513F018621 /* PollAwait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E3A03088B7A2305F0C89C83ADB7CA2C1 /* String+C99ExtendedIdentifier.swift in Sources */ = {isa = PBXBuildFile; fileRef = 5B228EA0DD8BC8FAFF20CFE730CDC996 /* String+C99ExtendedIdentifier.swift */; }; + E61B94D072E329A90151493C2CBA4FBB /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = E2C37A766EADAD32057A6A484EEADEC6 /* SatisfyAnyOf.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + E7559E209C22EEC9084F6C26CE4B5ED1 /* SubclassDetection.swift in Sources */ = {isa = PBXBuildFile; fileRef = B5E5C2543DA8D4B9393A5FB9ECF49F8D /* SubclassDetection.swift */; }; + EA5E8E6F1D3AA73B3C99473F39C4FF4D /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 3CF100BA1D20D429B60743ABBB177B17 /* RaisesException.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EAE05B70AA9690C0DA3AD1DC0BC975CD /* BeginWith.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1878738073B88CF961FE08390412EABE /* BeginWith.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EB498AC2278DE4F7153349E5EDC46FD7 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = 314A4C0D938EE986C2A37A6D8BAB1152 /* XCTestObservationCenter+Register.m */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EB66279A6CD609B89BEC8BCAE4B304A4 /* QuickTestSuite.swift in Sources */ = {isa = PBXBuildFile; fileRef = 35F24F73875586851CFD5D87FB6A1EBD /* QuickTestSuite.swift */; }; + EC69AC1DF6EA3752AF91F6FE44840D73 /* CwlCatchExceptionSupport-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = ED0CD33F95F0FDEFD02E0DBF797B9204 /* CwlCatchExceptionSupport-dummy.m */; }; + ECAD05FDCA266B54D2890FD130312FFE /* ExampleGroup.swift in Sources */ = {isa = PBXBuildFile; fileRef = 368654B1226C940259AA0FA7B72CEF03 /* ExampleGroup.swift */; }; + ECB25D327813D791F8B04BFDC5C22A56 /* BeCloseTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = FABC44C2BD2F8559216A7708ADA1DBDE /* BeCloseTo.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + ED602BA6C6EE6083E36E982C1C9E8457 /* QCKDSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 86DC8A84C96ED2ABE0EFC4802822CF77 /* QCKDSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + EE219A1D6B7901E2841AF289B9C2D2C4 /* DSL+AsyncAwait.swift in Sources */ = {isa = PBXBuildFile; fileRef = 9BE289D761E2E1918931D1B4E6C6C5D1 /* DSL+AsyncAwait.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EE87C0C5AA90643DAD9359F5B942EFCA /* NimbleTimeInterval.swift in Sources */ = {isa = PBXBuildFile; fileRef = 957DED59E916A59823E7DAAFE69CEC7F /* NimbleTimeInterval.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + EEBE9B46D49C94CC305245EB3B45A237 /* Contain.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0C4DF9A0EBA04AE1D0BAFA86ABD22EFF /* Contain.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F02BFF95B68F481A59DBBA6B85919333 /* AsyncWorld.swift in Sources */ = {isa = PBXBuildFile; fileRef = BFCDFEFC7D9A0BC6495AC66BBFE46BAA /* AsyncWorld.swift */; }; + F14C6A7A9EC794B7F60E244D5227E1DE /* AsyncMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 8D99B7A054EF9EC2955269411275F6E9 /* AsyncMatcher.swift */; settings = {COMPILER_FLAGS = "-DPRODUCT_NAME=Nimble/Nimble"; }; }; + F2C4FCB88A23C8CD9798ABD09DEDBBB7 /* CwlCatchExceptionSupport-umbrella.h in Headers */ = {isa = PBXBuildFile; fileRef = 70C225AA58E38C105D07EA6123151291 /* CwlCatchExceptionSupport-umbrella.h */; settings = {ATTRIBUTES = (Public, ); }; }; + F3177C284538D6D35D50B39CEFEA3C74 /* CwlMachBadInstructionHandler-dummy.m in Sources */ = {isa = PBXBuildFile; fileRef = AF635B7E6F47677E46BD2F572AF69D29 /* CwlMachBadInstructionHandler-dummy.m */; }; + F773D7DF42F0698A40A005C797FAF3FD /* ExampleHooks.swift in Sources */ = {isa = PBXBuildFile; fileRef = A83EEBB4AB25331652969E7E9CB405FC /* ExampleHooks.swift */; }; + F80622B10127233EA9F85B364DAFE74C /* World+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 85BA9500FBD3B1098283277F9F751E2F /* World+DSL.swift */; }; + FA3851317E698A50769EE23A523A4D28 /* Callsite.swift in Sources */ = {isa = PBXBuildFile; fileRef = E446EFCAAE611F817204DFD70B47776A /* Callsite.swift */; }; + FC7DA1DAD8367E9D82A2E8BA7D96BFBD /* ExampleMetadata.swift in Sources */ = {isa = PBXBuildFile; fileRef = E8C6D9912D990689EE4492AC88B09392 /* ExampleMetadata.swift */; }; + FD9D9565069953A0F3298E34848E8730 /* QuickSpec.h in Headers */ = {isa = PBXBuildFile; fileRef = 5BC4FE4A3A2381093059EF05B1395B9A /* QuickSpec.h */; settings = {ATTRIBUTES = (Public, ); }; }; + FF312523DB23087460148A6AEC0E23B9 /* AsyncWorld+DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1CA8E4AA787A7D1C62C1A02CE7815436 /* AsyncWorld+DSL.swift */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ - 4316B6F1CCEA7D68B7D07667F9755024 /* PBXContainerItemProxy */ = { + 680A774DAB6760B2C93AF74888246677 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CA3D99499260B4C146BBB22670C1D8AD; + remoteInfo = CwlCatchExceptionSupport; + }; + 6DF229CD1960DF7A69CE57688797DB9D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = CA3D99499260B4C146BBB22670C1D8AD; + remoteInfo = CwlCatchExceptionSupport; + }; + 98EA497D27303619F8B18ECC1E663EE7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EB8B23AD889CF5BE4A85CD0D8EF2DF99; + remoteInfo = CwlPosixPreconditionTesting; + }; + A2EA725195BF4DEA0BDF10073FB148C7 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 308B5C440C446909122081D367A27A8F; + remoteInfo = CwlCatchException; + }; + B92147CAF60149351DBCDE8A51220C55 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = E4D853F6FBAB5A9BDBE843E4EFB22EB7; + remoteInfo = CwlPreconditionTesting; + }; + BDB1986F32302AFBDB2F58B81F2A213D /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 308B5C440C446909122081D367A27A8F; + remoteInfo = CwlCatchException; + }; + D37643C36FA2B89036A7873AD2BFA57B /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = C82891EAB7293DBEE916B21F57E8474D; remoteInfo = Quick; }; - 4AB6872CAE7EB20877E143891709DAD2 /* PBXContainerItemProxy */ = { + D802A6F826E2597180B239E1AECD0EC0 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3BBD87E27EAD36B90D168213ED6DC32C; + remoteInfo = CwlMachBadInstructionHandler; + }; + DEE7A76326A3AC448377CDEA4CDAAE68 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = E4D853F6FBAB5A9BDBE843E4EFB22EB7; + remoteInfo = CwlPreconditionTesting; + }; + EE2996B22F196FAF55CA8539865BFF97 /* PBXContainerItemProxy */ = { isa = PBXContainerItemProxy; containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; proxyType = 1; remoteGlobalIDString = 6F13695E06195A78EA8A95F8C7ED0D2F; remoteInfo = Nimble; }; + F703D2EE1DF327ED02A370536DED54AB /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = EB8B23AD889CF5BE4A85CD0D8EF2DF99; + remoteInfo = CwlPosixPreconditionTesting; + }; + FE9936BE72A2D9CA0E3D38732DC3AC80 /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = BFDFE7DC352907FC980B868725387E98 /* Project object */; + proxyType = 1; + remoteGlobalIDString = 3BBD87E27EAD36B90D168213ED6DC32C; + remoteInfo = CwlMachBadInstructionHandler; + }; /* End PBXContainerItemProxy section */ /* Begin PBXFileReference section */ + 0021D8C637CD17D0FA0721864E91ADBE /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; + 010573E4A5C4F5A5C6D0AFDFB7978306 /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; + 02BA9A6B3D35D0E8DBCCF45B2AAA2800 /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; + 02C9CECA6F1C8F71F9B94D93137EF0EA /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; 02F5AF25FD35DDCE251A9006737617A5 /* Pods-OSPaymentsLib-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-OSPaymentsLib-umbrella.h"; sourceTree = ""; }; - 090D7BCE58F5A67C1B30F59637E0EE53 /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; - 0A6115706ED27012A9F43E253D3D3DD7 /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickObjCRuntime/QuickSpecBase.m; sourceTree = ""; }; - 0B2A30FEA2214E06D065AE8997736B53 /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; - 0BB908657F2C86943C6660C8F0130CEB /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 05198D9443349CC308FC2B63E492C461 /* Matcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Matcher.swift; path = Sources/Nimble/Matchers/Matcher.swift; sourceTree = ""; }; + 060983B9072CE76B5C27D0C6F7A26FCE /* Requirement.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Requirement.swift; path = Sources/Nimble/Requirement.swift; sourceTree = ""; }; + 07B837DB1F58318777C1630726AEA23A /* CwlCatchExceptionSupport.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlCatchExceptionSupport.release.xcconfig; sourceTree = ""; }; + 07D0FF898AFEF00EF5DD10347811C347 /* CwlCatchException.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlCatchException.release.xcconfig; sourceTree = ""; }; + 07F6C19E6B79D6A62A98047137C186E4 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; + 0A2CA0650F7537ACE178096CD0C6BA4C /* Nimble.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.release.xcconfig; sourceTree = ""; }; + 0A827F3B8A11664638D6829EE312B7C0 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; + 0B9A8B11FC7C1531FCA4B6B2BC51630F /* AsyncSpec+testMethodSelectors.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "AsyncSpec+testMethodSelectors.m"; path = "Sources/QuickObjectiveC/AsyncSpec+testMethodSelectors.m"; sourceTree = ""; }; + 0B9DC5C7E87A938A767BE98EBCC3AC34 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; + 0C319EEB2331278DFC6A67C94D00908B /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; + 0C4DF9A0EBA04AE1D0BAFA86ABD22EFF /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; 0D631E9908483F9525A6B3F36F16CC61 /* Quick */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Quick; path = Quick.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 0D7454A7A71134BA53000CEA4197CF29 /* Map.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Map.swift; path = Sources/Nimble/Matchers/Map.swift; sourceTree = ""; }; 0D904E98038DAE649AA050DAE20B884A /* Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap"; sourceTree = ""; }; - 0F4A8507ACE009C2C0F45E1FDED202C7 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + 0DC37FD66556F5AFA0F6C8ED8DFEDDC6 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; 107B1F29BE07EF1662B3B4BF2A9E0BE9 /* Pods-OSPaymentsLib-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-OSPaymentsLib-acknowledgements.plist"; sourceTree = ""; }; - 115813CA22C723977B41201CF3B4C44A /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; - 16671DF91816B7CC8BAA2964E1E6414C /* Equal+Tuple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Equal+Tuple.swift"; path = "Sources/Nimble/Matchers/Equal+Tuple.swift"; sourceTree = ""; }; - 16F99FA0960BE24312A4603668FD6CFA /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + 11F7DAF34099D8324849BE1BA1898A94 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; + 12E8A18E971F2D6544B8344097DFB058 /* CwlPreconditionTesting.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlPreconditionTesting.debug.xcconfig; sourceTree = ""; }; 183EA06E783DC15564B47398DA299505 /* Pods-OSPaymentsLib-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-OSPaymentsLib-acknowledgements.markdown"; sourceTree = ""; }; - 1B6A8AE2D5EF989F29A4FFB4EB7D52A8 /* CwlMachBadInstructionHandler.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlMachBadInstructionHandler.m; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.m; sourceTree = ""; }; - 1FC0C54E76B49BF11F64E24F0931846C /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; - 204E01215147E1CFDB134360F8F1938E /* QuickConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickConfiguration.swift; path = Sources/Quick/Configuration/QuickConfiguration.swift; sourceTree = ""; }; - 21C0C122235EDD894313B02C03C7C538 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; - 230259C7BBC0AB021F9278A064AADAC1 /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; - 2362FBD489CCE1D540C808716D1EB8C4 /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; - 23E11C41EA8F304D43F144554949AEFF /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; - 254558E5834898D2301B3E8C4F620311 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; - 289E9ACE73C6629DAAEA21D42495B76E /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; - 298044D1245C4BD022B7F13791639E75 /* DSL+Wait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Wait.swift"; path = "Sources/Nimble/DSL+Wait.swift"; sourceTree = ""; }; - 2AECA1C81ADFA2CA35D84DC7FF1902B2 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; - 2C9CC327536739702EE1B8865E38BED6 /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; - 2CF56DC23988E5C892B0834949D740C5 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; - 2E9331718C3E375B9305AE6782A65CC4 /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; - 32395E85CAF13637932ACEECADC2D96D /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; - 33FD12F984B4BA8B5D001D0AFD13F708 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; - 350B976ED907275DDED563482009AFD2 /* QuickTestObservation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestObservation.swift; path = Sources/Quick/QuickTestObservation.swift; sourceTree = ""; }; - 369990B25C94966B37B0E376A2FE93C0 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/NMBStringify.h; sourceTree = ""; }; - 3B4E2AF01C07390467B2A032C1081912 /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; - 3CE338476557D8F2CF2B6E987F5A31CA /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Quick/DSL/DSL.swift; sourceTree = ""; }; - 3DB3B3904CE5F831A2214803D978A197 /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; - 3EFA1693908150CAAB677FEAB89AEC2D /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; - 40955816DD54EA848880AD2815A76921 /* Await.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Await.swift; path = Sources/Nimble/Utils/Await.swift; sourceTree = ""; }; - 4149CC5C4007BD87DFDB7E2114AE830D /* Contain.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Contain.swift; path = Sources/Nimble/Matchers/Contain.swift; sourceTree = ""; }; - 43D9B7DA298758F3F8912543839CC426 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; - 447626370CDD31CDCC3656C6E0B3BA05 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; - 45F6B7AC8B7979F25F17036731EE339D /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; - 49D566AD1F3A57C62675DCFF1174ADF8 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; - 4B5ECB9D7EF3AF7D8F37CE57A988CD83 /* Nimble.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.release.xcconfig; sourceTree = ""; }; + 1878738073B88CF961FE08390412EABE /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; + 1CA8E4AA787A7D1C62C1A02CE7815436 /* AsyncWorld+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AsyncWorld+DSL.swift"; path = "Sources/Quick/DSL/AsyncWorld+DSL.swift"; sourceTree = ""; }; + 1CBDD353F57D9D94EF81C3AD956CF141 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; + 20C1FD548A2F133D7F0735173B4FEF82 /* utils.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = utils.swift; path = Sources/NimbleSharedTestHelpers/utils.swift; sourceTree = ""; }; + 20E1B798DBEB86AC4A92335528B04354 /* CwlCatchExceptionSupport-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlCatchExceptionSupport-prefix.pch"; sourceTree = ""; }; + 220D1365CED5CB83C4C0CE1E3DABD3B0 /* CwlCatchExceptionSupport */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CwlCatchExceptionSupport; path = CwlCatchExceptionSupport.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 22860578BE441530DE0EF805F57485CA /* CwlMachBadInstructionHandler-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlMachBadInstructionHandler-umbrella.h"; sourceTree = ""; }; + 22C8372C0C245DC0B51C4009E88E5C8D /* ExpectationMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExpectationMessage.swift; path = Sources/Nimble/ExpectationMessage.swift; sourceTree = ""; }; + 246CA8E9B8172FE91C2D047224A9E94C /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; + 2703D5CC047D4B818556425E18C03970 /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; + 28881D40AD493F4CB4F35D16F9BC30E7 /* AsyncExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncExampleGroup.swift; path = Sources/Quick/Async/AsyncExampleGroup.swift; sourceTree = ""; }; + 2AF7D9F65D40A8677C2734EE27783405 /* CwlPosixPreconditionTesting-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CwlPosixPreconditionTesting-Info.plist"; sourceTree = ""; }; + 2B0E6009957030250D61B6963C55C947 /* Nimble-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Nimble-dummy.m"; sourceTree = ""; }; + 2B4A6523F00DDE83CE65B121647FD8E2 /* AsyncExpression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncExpression.swift; path = Sources/Nimble/AsyncExpression.swift; sourceTree = ""; }; + 305246987AF80E372148798DC39EC054 /* QuickConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickConfiguration.swift; path = Sources/Quick/Configuration/QuickConfiguration.swift; sourceTree = ""; }; + 314A4C0D938EE986C2A37A6D8BAB1152 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; + 3188B641B9C20E4D45A0883C087E57FF /* CwlMachBadInstructionHandler.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlMachBadInstructionHandler.debug.xcconfig; sourceTree = ""; }; + 33A340E461ABFD5B557BFAEA10B6484A /* BeWithin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeWithin.swift; path = Sources/Nimble/Matchers/BeWithin.swift; sourceTree = ""; }; + 34AD4F01F38CB60FFB422A7A72C065FA /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; + 35F24F73875586851CFD5D87FB6A1EBD /* QuickTestSuite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestSuite.swift; path = Sources/Quick/QuickTestSuite.swift; sourceTree = ""; }; + 3666C5127185639B35619163DE5164E9 /* CurrentSpec.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CurrentSpec.swift; path = Sources/Quick/CurrentSpec.swift; sourceTree = ""; }; + 368654B1226C940259AA0FA7B72CEF03 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; + 3696664980112689674627D9EE8CF099 /* DSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = DSL.m; path = Sources/NimbleObjectiveC/DSL.m; sourceTree = ""; }; + 3A99AE93C9F6B8E96883ABD0C5E6730C /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Examples/Example.swift; sourceTree = ""; }; + 3BE3413E1EEA3C3E1DE19AE5BE8440E2 /* CwlCatchException-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlCatchException-umbrella.h"; sourceTree = ""; }; + 3CF100BA1D20D429B60743ABBB177B17 /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + 3D2F7CDABDEF157CC25E87A3FF94D228 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; + 3DA9BA00CFF48AA3C0D2FC7CA0EA6011 /* CwlMachBadInstructionHandler.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlMachBadInstructionHandler.h; path = Sources/CwlMachBadInstructionHandler/include/CwlMachBadInstructionHandler.h; sourceTree = ""; }; + 3ED99CD2818C890CE81D07A9699309F9 /* DSL+Require.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+Require.swift"; path = "Sources/Nimble/DSL+Require.swift"; sourceTree = ""; }; + 40163553F5FC158BA38AC8108AC7F62B /* CwlMachBadInstructionHandler.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlMachBadInstructionHandler.release.xcconfig; sourceTree = ""; }; + 427FDF816893162B86CD95A8B6ECA6F3 /* TestSelectorNameProvider.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestSelectorNameProvider.swift; path = Sources/Quick/TestSelectorNameProvider.swift; sourceTree = ""; }; + 428AA7F17E16C956AA8B0D86D3A6DC25 /* Behavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Behavior.swift; path = Sources/Quick/Behavior.swift; sourceTree = ""; }; + 42C914EA4F30C3E61E293FEFA6D1F328 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/include/NMBExceptionCapture.h; sourceTree = ""; }; + 431556E94698D895BBE3D506D2D06048 /* CwlPosixPreconditionTesting-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlPosixPreconditionTesting-umbrella.h"; sourceTree = ""; }; + 4479584A655CE3F1DD7D8A74ACFCFD16 /* AsyncSpec.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncSpec.swift; path = Sources/Quick/Async/AsyncSpec.swift; sourceTree = ""; }; + 45F65E1C399788463EB3B81F94BBBD0A /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; + 4975483BFE3CD106070E2F8DD0286676 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; + 49E4331AAF01CB7B1A5791AC2F317893 /* NMBStringify.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBStringify.h; path = Sources/NimbleObjectiveC/include/NMBStringify.h; sourceTree = ""; }; + 4B6E333D4666FC2F1DBFF0A1BC569ECA /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; 4C157CC35B7ABF301C81384661B151DC /* Pods-OSPaymentsLib.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-OSPaymentsLib.debug.xcconfig"; sourceTree = ""; }; - 4C965F64744CB14D8F6E2C2BBB97F4DD /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; - 50FAC3D0F71CAC2AEF632440A982DF9D /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/ExampleMetadata.swift; sourceTree = ""; }; - 51320337A23D4A8E10E00BFD67B8D043 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; - 516931D0E6A9461B9C20990FA366E1F9 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; - 51BA9038051E613E9BCC9972FB613CD3 /* Quick.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.release.xcconfig; sourceTree = ""; }; - 5273DD569D843C265AF46176F4A534FD /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; - 5523F3CB4F893F0BF3631D865BEEC2B4 /* AdapterProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AdapterProtocols.swift; path = Sources/Nimble/Adapters/AdapterProtocols.swift; sourceTree = ""; }; - 5813F3776773A4275874BC369BB34A01 /* ExampleGroup.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleGroup.swift; path = Sources/Quick/ExampleGroup.swift; sourceTree = ""; }; - 586B5A37C0A10198805DA6175B2EB342 /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + 4C3FCFB435FCD32941C03A1563D1FA50 /* BeIdenticalTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeIdenticalTo.swift; path = Sources/Nimble/Matchers/BeIdenticalTo.swift; sourceTree = ""; }; + 4D42904EF72A0426F7895677B65F22D5 /* XCTestSuite+QuickTestSuiteBuilder.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestSuite+QuickTestSuiteBuilder.m"; path = "Sources/QuickObjectiveC/XCTestSuite+QuickTestSuiteBuilder.m"; sourceTree = ""; }; + 4E78EA237A79CA2DE923F31EC39C90FF /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; + 503AB4E90BA02160208142DFCEAD3A05 /* QuickConfiguration.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickConfiguration.h; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.h; sourceTree = ""; }; + 560BCAF8AFBA708862FAB6417AB4175D /* CwlMachBadInstructionHandler-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlMachBadInstructionHandler-prefix.pch"; sourceTree = ""; }; + 56EBDC39EB609F54DFA2CDBCE20B63A7 /* CwlPosixPreconditionTesting.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlPosixPreconditionTesting.release.xcconfig; sourceTree = ""; }; 5AAA74622C8B0B2167156F4EBE359608 /* Pods-OSPaymentsLib.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-OSPaymentsLib.release.xcconfig"; sourceTree = ""; }; - 5B95333BD525E87BFF22C57ED6E20FD5 /* BeAKindOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAKindOf.swift; path = Sources/Nimble/Matchers/BeAKindOf.swift; sourceTree = ""; }; - 5C8E70599736912CA1DB7FCDD472F2B2 /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/DSL.h; sourceTree = ""; }; + 5B228EA0DD8BC8FAFF20CFE730CDC996 /* String+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+C99ExtendedIdentifier.swift"; path = "Sources/Quick/String+C99ExtendedIdentifier.swift"; sourceTree = ""; }; + 5BC4FE4A3A2381093059EF05B1395B9A /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; }; - 60403D3F19863854702A6361D7F61850 /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickObjCRuntime/include/QuickSpecBase.h; sourceTree = ""; }; - 622317B228B6CF5C9D75DA1008B0F2B8 /* QuickObjCRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickObjCRuntime.h; path = Sources/QuickObjCRuntime/include/QuickObjCRuntime.h; sourceTree = ""; }; - 64B896AB55261B6E62E0FC506B92A8EC /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; - 654A3ADC4BC6E05E9BDC2D8F858A74BA /* CwlCatchException.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = CwlCatchException.m; path = Carthage/Checkouts/CwlCatchException/Sources/CwlCatchExceptionSupport/CwlCatchException.m; sourceTree = ""; }; - 67A91DF9E678606788A96C9150D53EA6 /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; - 6BAC25BC63EBD14D35CDE94813660768 /* MatchError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatchError.swift; path = Sources/Nimble/Matchers/MatchError.swift; sourceTree = ""; }; - 6C5852911233E16D8DBA632AAF28C4C0 /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; - 6E6AA1575C0AD81F762039746AFAECDC /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; - 718ABA2E524F929C4106CFE711012B87 /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; + 60BA7DA88753D1953169A962D2A1F11A /* BeLogical.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLogical.swift; path = Sources/Nimble/Matchers/BeLogical.swift; sourceTree = ""; }; + 60D6820E01BCA61C82E683E13A9A5FAB /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + 61C7DDA29CAFB3DB6CA497855D433E8B /* AsyncAllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncAllPass.swift; path = Sources/Nimble/Matchers/AsyncAllPass.swift; sourceTree = ""; }; + 620C2570C5DD2595C455386F70D838EA /* AsyncExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncExampleHooks.swift; path = Sources/Quick/Hooks/AsyncExampleHooks.swift; sourceTree = ""; }; + 64921B170418D2F8EF1C54FBA90FDE02 /* CwlCatchExceptionSupport.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlCatchExceptionSupport.debug.xcconfig; sourceTree = ""; }; + 64FAD5D5D8489BD37FC62F154800B9F3 /* CwlPreconditionTesting-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CwlPreconditionTesting-dummy.m"; sourceTree = ""; }; + 6650BB42E1D839AEF9C12E5D6D334420 /* AsyncTimerSequence.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncTimerSequence.swift; path = Sources/Nimble/Utils/AsyncTimerSequence.swift; sourceTree = ""; }; + 66F1174270109F74C66D01348D1F514E /* Expression.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expression.swift; path = Sources/Nimble/Expression.swift; sourceTree = ""; }; + 6A6E2F0AEDBA03FE3630124BBE5E4C4A /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; + 6BA3CB1DF6F496D0D192C2CE67B32E2A /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + 6BB44237D2357864CBA63BAD83C5E21F /* HaveCount.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HaveCount.swift; path = Sources/Nimble/Matchers/HaveCount.swift; sourceTree = ""; }; + 6BE7250A5BCFFCD70959A4527E1E5525 /* QuickObjCRuntime.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickObjCRuntime.h; path = Sources/QuickObjCRuntime/include/QuickObjCRuntime.h; sourceTree = ""; }; + 6D3CDF327328618001FE959FDD269008 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; + 6EF6C7606EB9BAEACB549B0DC7521A3A /* CwlBadInstructionException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlBadInstructionException.swift; path = Sources/CwlPreconditionTesting/CwlBadInstructionException.swift; sourceTree = ""; }; + 6FE954440EDA2E7E87A363CA332ABB6D /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; + 70C225AA58E38C105D07EA6123151291 /* CwlCatchExceptionSupport-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlCatchExceptionSupport-umbrella.h"; sourceTree = ""; }; 72650BCF9E15BA7772C201F04B20DF8A /* Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist"; sourceTree = ""; }; - 755D25C0FCCF8F6E3E59CF4F94C8C060 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; - 766A5EA3A362FFD45458AAB04D1B9FB4 /* Quick-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-prefix.pch"; sourceTree = ""; }; - 7893AC67AE4B488BC3E9604A46413A06 /* BeginWithPrefix.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWithPrefix.swift; path = Sources/Nimble/Matchers/BeginWithPrefix.swift; sourceTree = ""; }; - 7A7CD7566A962848ACAFAE01FAC08AA6 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = NMBExceptionCapture.h; path = Sources/NimbleObjectiveC/NMBExceptionCapture.h; sourceTree = ""; }; - 7AE197136F8E380A9F1E7D06BD9D0FAF /* Nimble-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-prefix.pch"; sourceTree = ""; }; - 7C826AD498684E411DD1C792748D889C /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; - 7CDC6B9AB35B53FC579C731AE67FD846 /* Example.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Example.swift; path = Sources/Quick/Example.swift; sourceTree = ""; }; - 7F6D4322ABB010AB0EEC279249B17918 /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; - 8015D0BB35ED18B858B74C6E8656EB00 /* BeWithin.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeWithin.swift; path = Sources/Nimble/Matchers/BeWithin.swift; sourceTree = ""; }; - 81CA9AA102BC399952DACFC1F5740345 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; - 8270027ACBF7A64C2B453CCBFE155E90 /* Nimble.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.debug.xcconfig; sourceTree = ""; }; - 844435B050856A3A90F2F2DC5D10C71E /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; - 8470BE37EE9259F9FDADDFC80764A837 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; - 84CC299AC522B25A61A3FAF124FF83FC /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; - 85254BDDFDC46F27B70DCBF181ADE6FF /* ThrowAssertion.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowAssertion.swift; path = Sources/Nimble/Matchers/ThrowAssertion.swift; sourceTree = ""; }; - 85C9317EF9B3052FC9D544E30801F901 /* Expectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Expectation.swift; path = Sources/Nimble/Expectation.swift; sourceTree = ""; }; + 72B58393042028545F4ACE967F4B5A2C /* NMBExceptionCapture.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBExceptionCapture.m; path = Sources/NimbleObjectiveC/NMBExceptionCapture.m; sourceTree = ""; }; + 732C335BAE36E8A4C58FB1DAA85E612E /* Quick.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Quick.modulemap; sourceTree = ""; }; + 73F2F55231738EB7D67BD0E2FCA99B10 /* AsyncBehavior.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncBehavior.swift; path = Sources/Quick/Async/AsyncBehavior.swift; sourceTree = ""; }; + 754297B4F9BC227D7D84B1CB651EF8B4 /* BeEmpty.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeEmpty.swift; path = Sources/Nimble/Matchers/BeEmpty.swift; sourceTree = ""; }; + 7644AFBF58E73F3D0F2AA2474A8268D7 /* SourceLocation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SourceLocation.swift; path = Sources/Nimble/Utils/SourceLocation.swift; sourceTree = ""; }; + 7AB13D18C8050C2E09BB64993CFB979A /* CwlPreconditionTesting-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlPreconditionTesting-umbrella.h"; sourceTree = ""; }; + 7AFB2D30DA0F7B20CFFC21F790F4203A /* Equal.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Equal.swift; path = Sources/Nimble/Matchers/Equal.swift; sourceTree = ""; }; + 7B2D42ECB3E82916486FEC9384FA249D /* DSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = DSL.h; path = Sources/NimbleObjectiveC/include/DSL.h; sourceTree = ""; }; + 7DDD16B3AFA84E81570BD160CB3C2A7E /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; + 7F3B1C888E10C2600437AB3BEC1FA572 /* QuickSpec.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpec.m; path = Sources/QuickObjectiveC/QuickSpec.m; sourceTree = ""; }; + 7FAF6F207E838D5D5C9B10D229774CCD /* CwlCatchException.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlCatchException.debug.xcconfig; sourceTree = ""; }; + 818508BB86C7028A61F1668B8F393B52 /* Polling.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Polling.swift; path = Sources/Nimble/Polling.swift; sourceTree = ""; }; + 8186012C6C9DB52500D35A7B89FC6684 /* Match.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Match.swift; path = Sources/Nimble/Matchers/Match.swift; sourceTree = ""; }; + 81E069ED072343385C014B7B48C416CD /* CwlCatchException.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = CwlCatchException.h; path = Sources/CwlCatchExceptionSupport/include/CwlCatchException.h; sourceTree = ""; }; + 83443A3D70BB725B1D7AB14A9C15E021 /* BeResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeResult.swift; path = Sources/Nimble/Matchers/BeResult.swift; sourceTree = ""; }; + 837E401928ED3F08917C35F9DE2F1D67 /* Equal+TupleArray.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Equal+TupleArray.swift"; path = "Sources/Nimble/Matchers/Equal+TupleArray.swift"; sourceTree = ""; }; + 84952211AB6C6062704AE0C091B569BB /* TestState.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = TestState.swift; path = Sources/Quick/TestState.swift; sourceTree = ""; }; + 84A5E6BAD81672C178803F3279DF3F2A /* QCKConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QCKConfiguration.swift; path = Sources/Quick/Configuration/QCKConfiguration.swift; sourceTree = ""; }; + 85BA9500FBD3B1098283277F9F751E2F /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; 8691A5A49862A69A0E7B43FCF632BD81 /* Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown"; sourceTree = ""; }; - 880EBA466E9150F71DE3C4A76DB140D8 /* SuiteHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SuiteHooks.swift; path = Sources/Quick/Hooks/SuiteHooks.swift; sourceTree = ""; }; - 88CE28DB5FFB584E123C56C4345A73E7 /* QCKConfiguration.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QCKConfiguration.swift; path = Sources/Quick/Configuration/QCKConfiguration.swift; sourceTree = ""; }; + 86DC8A84C96ED2ABE0EFC4802822CF77 /* QCKDSL.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QCKDSL.h; path = Sources/QuickObjectiveC/DSL/QCKDSL.h; sourceTree = ""; }; 898D3821CD6035CCA30F112BAE11DE10 /* Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.script.sh; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh"; sourceTree = ""; }; + 8B188395FBCB9792D62AC9A1BF5BD82A /* Stringers.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Stringers.swift; path = Sources/Nimble/Utils/Stringers.swift; sourceTree = ""; }; + 8B98088616FD55D1953AAC7DD9D0DCE1 /* Errors.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Errors.swift; path = Sources/Nimble/Utils/Errors.swift; sourceTree = ""; }; + 8C06596BBCA5557642E7E09A51858B4B /* CwlPosixPreconditionTesting-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlPosixPreconditionTesting-prefix.pch"; sourceTree = ""; }; + 8D99B7A054EF9EC2955269411275F6E9 /* AsyncMatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncMatcher.swift; path = Sources/Nimble/Matchers/AsyncMatcher.swift; sourceTree = ""; }; + 8F8AD33D990DFB47A310ABB106FFCC44 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; 8FAE50E0E3AD48853025A2E73597E47B /* Pods-OSPaymentsLib-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-OSPaymentsLib-dummy.m"; sourceTree = ""; }; - 9215339C71BDBD5B494E9EFD44005158 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; - 97522C7BBA1F97437715C74303E5A686 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; - 9AA80CEA9B4992D8F9368CEE01A42094 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + 906140C81634F7F2BBA3F01EFDE88849 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; + 922E79F3DE744919AE43C09528485E0E /* Quick.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.debug.xcconfig; sourceTree = ""; }; + 957DED59E916A59823E7DAAFE69CEC7F /* NimbleTimeInterval.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleTimeInterval.swift; path = Sources/Nimble/Utils/NimbleTimeInterval.swift; sourceTree = ""; }; + 9609CBE74715F4BDFAC30EDDF6960A47 /* Nimble.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Nimble.debug.xcconfig; sourceTree = ""; }; + 981572B1BC0940E3ACB3E4865F13A926 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; + 99BC84518076E755101DF735D5CB217F /* AsyncAwait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncAwait.swift; path = Sources/Nimble/Utils/AsyncAwait.swift; sourceTree = ""; }; + 9BE289D761E2E1918931D1B4E6C6C5D1 /* DSL+AsyncAwait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "DSL+AsyncAwait.swift"; path = "Sources/Nimble/DSL+AsyncAwait.swift"; sourceTree = ""; }; 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */ = {isa = PBXFileReference; explicitFileType = text.script.ruby; includeInIndex = 1; indentWidth = 2; lastKnownFileType = text; name = Podfile; path = ../Podfile; sourceTree = SOURCE_ROOT; tabWidth = 2; xcLanguageSpecificationIdentifier = xcode.lang.ruby; }; - A12262F224D0D0A168C398C49F628A15 /* AllPass.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AllPass.swift; path = Sources/Nimble/Matchers/AllPass.swift; sourceTree = ""; }; - A16B8BD1EFF8AB8B6940E1EC149FD38A /* DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DSL.swift; path = Sources/Nimble/DSL.swift; sourceTree = ""; }; - A1E026C7DAC445C7C813121DE7F03837 /* Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Async.swift; path = Sources/Nimble/Matchers/Async.swift; sourceTree = ""; }; - AD1B7F0757B5057BCF6D7D1F6B0B7BD1 /* Quick-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Quick-umbrella.h"; sourceTree = ""; }; - AF3CEFA5153F8ACE3EA7629E00B17B8F /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; - B14A4B16D42CCCBE3D21CBDE4FFC9AA4 /* String+C99ExtendedIdentifier.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "String+C99ExtendedIdentifier.swift"; path = "Sources/Quick/String+C99ExtendedIdentifier.swift"; sourceTree = ""; }; + A06152D2BDE64E2A5494483F26A48791 /* CwlPosixPreconditionTesting-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CwlPosixPreconditionTesting-dummy.m"; sourceTree = ""; }; + A0A97EB9203D4825B685982429EE22D7 /* AsyncExample.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncExample.swift; path = Sources/Quick/Examples/AsyncExample.swift; sourceTree = ""; }; + A1EB030E8B779E04BF98E7491DF8E4CD /* CwlCatchExceptionSupport.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CwlCatchExceptionSupport.modulemap; sourceTree = ""; }; + A20DC11E3C92801B14EFF334B281E8CA /* CwlCatchExceptionSupport-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CwlCatchExceptionSupport-Info.plist"; sourceTree = ""; }; + A3960D0AAF8FB8850DFA65C1A58F33EB /* AssertionDispatcher.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionDispatcher.swift; path = Sources/Nimble/Adapters/AssertionDispatcher.swift; sourceTree = ""; }; + A83EEBB4AB25331652969E7E9CB405FC /* ExampleHooks.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleHooks.swift; path = Sources/Quick/Hooks/ExampleHooks.swift; sourceTree = ""; }; + AA4B854E598EEEDE26BB0916ECBA21B3 /* Quick-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Quick-Info.plist"; sourceTree = ""; }; + AD35251EED24E7D573ADCE99E37EBF6D /* QuickSpecBase.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpecBase.h; path = Sources/QuickObjCRuntime/include/QuickSpecBase.h; sourceTree = ""; }; + AD5DF8CDEC89D9FBE179229C33AA9EC3 /* CwlCatchException-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CwlCatchException-Info.plist"; sourceTree = ""; }; + AF635B7E6F47677E46BD2F572AF69D29 /* CwlMachBadInstructionHandler-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CwlMachBadInstructionHandler-dummy.m"; sourceTree = ""; }; + AFFBFF09BF4043371F58A7807B75F35A /* CwlMachBadInstructionHandler.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CwlMachBadInstructionHandler.modulemap; sourceTree = ""; }; + B1B115D5D9F328D12E904FB04B999415 /* Nimble-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Nimble-umbrella.h"; sourceTree = ""; }; B1D21BE1B5A742AA9C8EEE801D57559C /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h"; sourceTree = ""; }; B22103AE676FAE45408C0FFCD20688FE /* Pods-OSPaymentsLib-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-OSPaymentsLib-Info.plist"; sourceTree = ""; }; - B534FC537F198D4CB2269C659A93783F /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + B4BC423F6F6DA19672E4D0DDBFF15B30 /* QCKDSL.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QCKDSL.m; path = Sources/QuickObjectiveC/DSL/QCKDSL.m; sourceTree = ""; }; + B5E5C2543DA8D4B9393A5FB9ECF49F8D /* SubclassDetection.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SubclassDetection.swift; path = Sources/Quick/SubclassDetection.swift; sourceTree = ""; }; + B69D8666D871F2F21C4849FB9DC16BDE /* Quick.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.release.xcconfig; sourceTree = ""; }; + B8BA4C9986D8F59C1F8DD66594BA5270 /* Polling+Require.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Polling+Require.swift"; path = "Sources/Nimble/Polling+Require.swift"; sourceTree = ""; }; BAE263041362D074978BB3B577DF0A05 /* Nimble */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = Nimble; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - BB5D7CE0E6246798ABFD9DAAE4915E71 /* Nimble-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Nimble-Info.plist"; sourceTree = ""; }; - BBA4F4C4573FD9589D1CA0CA3DD18A0C /* BeResult.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeResult.swift; path = Sources/Nimble/Matchers/BeResult.swift; sourceTree = ""; }; + BC47A61A4228C402DFCE82B29F85BC26 /* mach_excServer.c */ = {isa = PBXFileReference; includeInIndex = 1; name = mach_excServer.c; path = Sources/CwlMachBadInstructionHandler/mach_excServer.c; sourceTree = ""; }; + BDF6CC5EE6ACB29381E0A7B825E936BC /* CwlPreconditionTesting-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CwlPreconditionTesting-Info.plist"; sourceTree = ""; }; BEB97334DF3B76513D34EB7C70369D82 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig"; sourceTree = ""; }; - BF200F89D143FA102042E6D285D5B6B2 /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; - C0DEE4FA5F5FF28F88648CF9EF3B4C39 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; - C34F47D81171E27AF285CDD1AF9F659C /* CwlDarwinDefinitions.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlDarwinDefinitions.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlDarwinDefinitions.swift; sourceTree = ""; }; - C3D4A2AFFEAE1D8A8E4479F656ADF2D2 /* NimbleXCTestHandler.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleXCTestHandler.swift; path = Sources/Nimble/Adapters/NimbleXCTestHandler.swift; sourceTree = ""; }; - C4C39466E1E06F0DE2D25E4D0D4E6169 /* CwlCatchBadInstruction.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstruction.swift; path = Carthage/Checkouts/CwlPreconditionTesting/Sources/CwlPreconditionTesting/CwlCatchBadInstruction.swift; sourceTree = ""; }; - C53261F42083B42E49E80904A433DE8A /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; - C851CC15E8E0E35CE23A1222E105A809 /* ElementsEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementsEqual.swift; path = Sources/Nimble/Matchers/ElementsEqual.swift; sourceTree = ""; }; + BFCDFEFC7D9A0BC6495AC66BBFE46BAA /* AsyncWorld.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncWorld.swift; path = Sources/Quick/Async/AsyncWorld.swift; sourceTree = ""; }; + C132D6453AE83D32563F487897825298 /* CwlCatchException.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CwlCatchException.modulemap; sourceTree = ""; }; + C45D995FC0579F56843554DAED0AB29F /* Quick-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Quick-dummy.m"; sourceTree = ""; }; + C7993940D6DB64D4951F356CEFDC450D /* Polling+AsyncAwait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Polling+AsyncAwait.swift"; path = "Sources/Nimble/Polling+AsyncAwait.swift"; sourceTree = ""; }; C914B482E199C7EDA35291B58CEC2E5E /* Pods-OSPaymentsLib */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-OSPaymentsLib"; path = Pods_OSPaymentsLib.framework; sourceTree = BUILT_PRODUCTS_DIR; }; CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.0.sdk/System/Library/Frameworks/Foundation.framework; sourceTree = DEVELOPER_DIR; }; - CD87F111AA17D3829427C832EB042273 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; - CDDFBC1CEF007E69BBCFDEFF88615F2C /* QuickSelectedTestSuiteBuilder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickSelectedTestSuiteBuilder.swift; path = Sources/Quick/QuickSelectedTestSuiteBuilder.swift; sourceTree = ""; }; - D2FBFBBA48C11C5DAD16F0C15F64297B /* RaisesException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = RaisesException.swift; path = Sources/Nimble/Matchers/RaisesException.swift; sourceTree = ""; }; + CB6F1225A0F71F797015B4DCE1998BE4 /* NMBExpectation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NMBExpectation.swift; path = Sources/Nimble/Adapters/NMBExpectation.swift; sourceTree = ""; }; + CC56497384E780278F916D6C57EA4951 /* CwlPreconditionTesting */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CwlPreconditionTesting; path = CwlPreconditionTesting.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + CC82CA60A225BC73F809E0F8661CC4A0 /* CwlCatchException-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlCatchException-prefix.pch"; sourceTree = ""; }; + CC9F06E5FEEF43271BABE69FE5CD6DA8 /* Nimble.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Nimble.h; path = Sources/Nimble/Nimble.h; sourceTree = ""; }; + CD42A80B2554994C5EAD08D03004B093 /* CwlPosixPreconditionTesting.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CwlPosixPreconditionTesting.modulemap; sourceTree = ""; }; + CD7AFBB5B4125D85D39A72E20725E5FA /* EndWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = EndWith.swift; path = Sources/Nimble/Matchers/EndWith.swift; sourceTree = ""; }; + CE17CB6ADBF606BD40F18E3CFCB080E4 /* CwlCatchException-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CwlCatchException-dummy.m"; sourceTree = ""; }; + CFA1EFABF9C0EE69A3A3FFCFC97C309A /* ElementsEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ElementsEqual.swift; path = Sources/Nimble/Matchers/ElementsEqual.swift; sourceTree = ""; }; + D2AD834000B280096FEB80FBEBD9A414 /* CwlPosixPreconditionTesting */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CwlPosixPreconditionTesting; path = CwlPosixPreconditionTesting.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + D2EBB799FB9B932A1E46754C4F5A0944 /* AssertionRecorder.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AssertionRecorder.swift; path = Sources/Nimble/Adapters/AssertionRecorder.swift; sourceTree = ""; }; D3A8BF3C48BD1892DD33A7126753E72F /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m"; sourceTree = ""; }; - D41AA0E2939FB981CED2EFF1B98A57B3 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; D433C194A6EED6E5DC527AA72FCCF1A4 /* Pods-OSPaymentsLib.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = "Pods-OSPaymentsLib.modulemap"; sourceTree = ""; }; D51FDA1819AB5AE370C57A418BF75B10 /* Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist"; sourceTree = ""; }; - DB836F954501FFEA0AA8E87E8856D7A7 /* Filter.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Filter.swift; path = Sources/Quick/Filter.swift; sourceTree = ""; }; - DB88DCC04205DB0A61C17B66FFA0AE97 /* Predicate.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Predicate.swift; path = Sources/Nimble/Matchers/Predicate.swift; sourceTree = ""; }; - DF776FF666679B4CB34B0A18B1F5B307 /* Quick-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Quick-Info.plist"; sourceTree = ""; }; - E1F00FC1EB20AC2CA0B5B083F84159A5 /* Closures.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Closures.swift; path = Sources/Quick/Hooks/Closures.swift; sourceTree = ""; }; - E25EB083AA8985DFFE745FCF5758009A /* 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 = ""; }; - E27895722ECA9E17BA1DC28F822F97B9 /* MatcherProtocols.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = MatcherProtocols.swift; path = Sources/Nimble/Matchers/MatcherProtocols.swift; sourceTree = ""; }; - E2EB0871827E9D45D4B63C66C93F292B /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; - E2FF0C6AC202911FB7A52FE099B9B734 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = "XCTestObservationCenter+Register.m"; path = "Sources/NimbleObjectiveC/XCTestObservationCenter+Register.m"; sourceTree = ""; }; - E6BB1E6C30B81EDB33EC7FDB6C205C79 /* QuickConfiguration.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickConfiguration.m; path = Sources/QuickObjectiveC/Configuration/QuickConfiguration.m; sourceTree = ""; }; + D56E6D71C0EE2A714724EBF17F983257 /* ContainElementSatisfying.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ContainElementSatisfying.swift; path = Sources/Nimble/Matchers/ContainElementSatisfying.swift; sourceTree = ""; }; + D5F716D0A883C3817ABCC3DFCD093A12 /* BeGreaterThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThan.swift; path = Sources/Nimble/Matchers/BeGreaterThan.swift; sourceTree = ""; }; + D779B4E1CDC07AF68A9253611560A36D /* BeLessThanOrEqual.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThanOrEqual.swift; path = Sources/Nimble/Matchers/BeLessThanOrEqual.swift; sourceTree = ""; }; + D90157D5CDC0BB15EADC2A1E8149F99C /* CwlPreconditionTesting.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = CwlPreconditionTesting.modulemap; sourceTree = ""; }; + DB4B81CB588224154E8C15DA7196F9E8 /* CwlPreconditionTesting.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlPreconditionTesting.release.xcconfig; sourceTree = ""; }; + DB635A9A4445AB464609BF97A3ED19F4 /* CwlMachBadInstructionHandler-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "CwlMachBadInstructionHandler-Info.plist"; sourceTree = ""; }; + DDA26739F6B5A6C3427A79B507B90119 /* CwlPosixPreconditionTesting.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = CwlPosixPreconditionTesting.debug.xcconfig; sourceTree = ""; }; + E0BC8BB0FE4725CF87EB0A9F5D400FD6 /* CwlCatchException */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CwlCatchException; path = CwlCatchException.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E1176A8E7C8F4162FFCA404BE6EEBB1C /* CwlMachBadInstructionHandler */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = CwlMachBadInstructionHandler; path = CwlMachBadInstructionHandler.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + E1FB77A5A37F5E0F1A113F62AA792B4E /* Equal+Tuple.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "Equal+Tuple.swift"; path = "Sources/Nimble/Matchers/Equal+Tuple.swift"; sourceTree = ""; }; + E25520DDA95FBAE29B03465454EADD45 /* QuickSpecBase.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = QuickSpecBase.m; path = Sources/QuickObjCRuntime/QuickSpecBase.m; sourceTree = ""; }; + E2C37A766EADAD32057A6A484EEADEC6 /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAnyOf.swift; path = Sources/Nimble/Matchers/SatisfyAnyOf.swift; sourceTree = ""; }; + E446EFCAAE611F817204DFD70B47776A /* Callsite.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = Callsite.swift; path = Sources/Quick/Callsite.swift; sourceTree = ""; }; + E46294DD3B28C2E71094B73581F9C462 /* BeginWithPrefix.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWithPrefix.swift; path = Sources/Nimble/Matchers/BeginWithPrefix.swift; sourceTree = ""; }; + E4787C67FB5E67AC58DF19C792484EC6 /* CwlPreconditionTesting-prefix.pch */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; path = "CwlPreconditionTesting-prefix.pch"; sourceTree = ""; }; + E519952DFB240624BB93B062F034D560 /* Nimble.modulemap */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.module; path = Nimble.modulemap; sourceTree = ""; }; + E5EED09E9911F8688FB72A1FD574D617 /* ThrowError.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ThrowError.swift; path = Sources/Nimble/Matchers/ThrowError.swift; sourceTree = ""; }; + E618038AC16CB30F3B5E8F40C9F2749B /* mach_excServer.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = mach_excServer.h; path = Sources/CwlMachBadInstructionHandler/mach_excServer.h; sourceTree = ""; }; + E66F8D3D05B48F66C8BB0A0161CE6B23 /* NimbleEnvironment.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = NimbleEnvironment.swift; path = Sources/Nimble/Adapters/NimbleEnvironment.swift; sourceTree = ""; }; + E6ADA6A1E7D8BFBDD30C695EAB397C74 /* URL+FileName.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "URL+FileName.swift"; path = "Sources/Quick/URL+FileName.swift"; sourceTree = ""; }; E6BD0403A56EB6AA58FE2224C68F73C4 /* Pods-OSPaymentsLib-OSPaymentsLibTests */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; name = "Pods-OSPaymentsLib-OSPaymentsLibTests"; path = Pods_OSPaymentsLib_OSPaymentsLibTests.framework; sourceTree = BUILT_PRODUCTS_DIR; }; - E7639378BFCFD4BC8587A03243C01A64 /* Quick.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = Quick.h; path = Sources/QuickObjectiveC/Quick.h; sourceTree = ""; }; + E801BCC406D59656CEF188513F018621 /* PollAwait.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PollAwait.swift; path = Sources/Nimble/Utils/PollAwait.swift; sourceTree = ""; }; + E8C6D9912D990689EE4492AC88B09392 /* ExampleMetadata.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ExampleMetadata.swift; path = Sources/Quick/Examples/ExampleMetadata.swift; sourceTree = ""; }; + E8E0B39232C5995A8C46830D30017957 /* BeGreaterThanOrEqualTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeGreaterThanOrEqualTo.swift; path = Sources/Nimble/Matchers/BeGreaterThanOrEqualTo.swift; sourceTree = ""; }; E8FFA1A64F61EB44FC28A4BF3EF8248A /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = "Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig"; sourceTree = ""; }; - E919903C10E88C8DB75C2CD00A266948 /* FailureMessage.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = FailureMessage.swift; path = Sources/Nimble/FailureMessage.swift; sourceTree = ""; }; - E937CE363DBBFE4523820E40E9D3F9A0 /* BeginWith.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeginWith.swift; path = Sources/Nimble/Matchers/BeginWith.swift; sourceTree = ""; }; - EBC4D3688977E2D961A8F985B1FC0F73 /* HooksPhase.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = HooksPhase.swift; path = Sources/Quick/Hooks/HooksPhase.swift; sourceTree = ""; }; - EE08781F30AAAA4776BC4A79E3FA9F40 /* SatisfyAllOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = SatisfyAllOf.swift; path = Sources/Nimble/Matchers/SatisfyAllOf.swift; sourceTree = ""; }; - EF5F8634034723707BA489895B2AC37A /* BeLessThan.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeLessThan.swift; path = Sources/Nimble/Matchers/BeLessThan.swift; sourceTree = ""; }; - F31245591C4C010F1303DAC1BC9804C1 /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; - F3ED266DDE9C244816DD6A53157F8745 /* World+DSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "World+DSL.swift"; path = "Sources/Quick/DSL/World+DSL.swift"; sourceTree = ""; }; - F75E74A600C812323367AD98A7E46500 /* QuickSpec.h */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.h; name = QuickSpec.h; path = Sources/QuickObjectiveC/QuickSpec.h; sourceTree = ""; }; - FD89D255CE96F4B06B98FE303E825DDF /* Quick.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; path = Quick.debug.xcconfig; sourceTree = ""; }; - FE268F672F0856752F99A6370C6545F1 /* DispatchTimeInterval.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = DispatchTimeInterval.swift; path = Sources/Nimble/Utils/DispatchTimeInterval.swift; sourceTree = ""; }; + EA20092E8E021F163FDFBD934CA74A12 /* Nimble-Info.plist */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.plist.xml; path = "Nimble-Info.plist"; sourceTree = ""; }; + EA7B179133900F7BADE2BF3E46232413 /* ToSucceed.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ToSucceed.swift; path = Sources/Nimble/Matchers/ToSucceed.swift; sourceTree = ""; }; + EC2C3FDE19B021EB58A60A72DD2ACBFD /* AssertionRecorder+Async.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "AssertionRecorder+Async.swift"; path = "Sources/Nimble/Adapters/AssertionRecorder+Async.swift"; sourceTree = ""; }; + ED0CD33F95F0FDEFD02E0DBF797B9204 /* CwlCatchExceptionSupport-dummy.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; path = "CwlCatchExceptionSupport-dummy.m"; sourceTree = ""; }; + EF020ABF4E2332FCE7BAA228CEA6F5F0 /* ErrorUtility.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = ErrorUtility.swift; path = Sources/Quick/ErrorUtility.swift; sourceTree = ""; }; + F12ECBFA4CC53AB57E018768F98CD00B /* PostNotification.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = PostNotification.swift; path = Sources/Nimble/Matchers/PostNotification.swift; sourceTree = ""; }; + F14600C0E9673E4CC7E4EA806FF0E5F3 /* BeVoid.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeVoid.swift; path = Sources/Nimble/Matchers/BeVoid.swift; sourceTree = ""; }; + F256CD46A9ADC44C9665AED5DCAE51AE /* QuickTestObservation.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = QuickTestObservation.swift; path = Sources/Quick/QuickTestObservation.swift; sourceTree = ""; }; + F31E775260D1FD8A55FD7DF970BEDF5C /* BeAnInstanceOf.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeAnInstanceOf.swift; path = Sources/Nimble/Matchers/BeAnInstanceOf.swift; sourceTree = ""; }; + F38617FFBE06F9A4113A1FF4C8F0EB5B /* CwlCatchBadInstructionPosix.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchBadInstructionPosix.swift; path = Sources/CwlPosixPreconditionTesting/CwlCatchBadInstructionPosix.swift; sourceTree = ""; }; + F4C13876A6C1AC39203D6CB258EB04BA /* BeNil.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeNil.swift; path = Sources/Nimble/Matchers/BeNil.swift; sourceTree = ""; }; + F81EE8F55A395438492CA563784B65AF /* CwlCatchException.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = CwlCatchException.swift; path = Sources/CwlCatchException/CwlCatchException.swift; sourceTree = ""; }; + F8C0117628C789996B8C3ADBE64D0F14 /* NSBundle+CurrentTestBundle.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = "NSBundle+CurrentTestBundle.swift"; path = "Sources/Quick/NSBundle+CurrentTestBundle.swift"; sourceTree = ""; }; + F9881E951A68EBF0A090E1E78C38E6A7 /* StopTest.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = StopTest.swift; path = Sources/Quick/StopTest.swift; sourceTree = ""; }; + FABC44C2BD2F8559216A7708ADA1DBDE /* BeCloseTo.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = BeCloseTo.swift; path = Sources/Nimble/Matchers/BeCloseTo.swift; sourceTree = ""; }; + FBE175B9962D91CD880D0B7F93C35D89 /* NMBStringify.m */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.c.objc; name = NMBStringify.m; path = Sources/NimbleObjectiveC/NMBStringify.m; sourceTree = ""; }; + FC758B9BC4F50D82ED882BB08DC817AC /* World.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = World.swift; path = Sources/Quick/World.swift; sourceTree = ""; }; + FFF3C577D7D9C6CC62FAC9221ACC9BF6 /* AsyncDSL.swift */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = sourcecode.swift; name = AsyncDSL.swift; path = Sources/Quick/DSL/AsyncDSL.swift; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ + 00757244B0C2072D3CF379717EAA1D46 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 49471D499F667B43EE5EB46A43D39EB5 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 055F5D9893DB522EDD2C99178F8D3DF7 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + E1A63FD6FBFFA3F07C2AED6C1125BC1E /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; 06AB854D397AC4F5BD7AFCCCEF728C82 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; @@ -297,47 +496,112 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 5BACFA62F624BC18081DF90CFC27D336 /* Frameworks */ = { + 494F3A6D18BE72FCBAE9B38C1D8E0858 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 771F212CFBA566E4C01AF9ACFB254A05 /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 4F45D4EFE46A0C5F60578B86D23B8BFF /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 05BE0BCB8F600E9095F0949E246AE63F /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 596BC85A4D2B3ED26171A14D3169F031 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 389DF9C2C99BD347316A28A8F10387D3 /* Foundation.framework in Frameworks */, + 58345F4B6D877E7B7C0F5E62BD617F3B /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - DA8489B6D5E9C56DC3D6471AE4A67F6D /* Frameworks */ = { + 64E0ACB63EA9EAFDF0043C6358BFA99F /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 604A73AD1D0E82356F2A073C53BC6517 /* Foundation.framework in Frameworks */, - EB892573E1CA332ED26DCC659406E79B /* XCTest.framework in Frameworks */, + 608FC9113349A392FAF68461DEE56450 /* Foundation.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; - DD6C5AE0FCB56EC173421774C5CA73D3 /* Frameworks */ = { + A509C1F85B00AF9A9F66030AC855ABE6 /* Frameworks */ = { isa = PBXFrameworksBuildPhase; buildActionMask = 2147483647; files = ( - 79A9ADCAE72B5F30CE882F79CDDDD47F /* Foundation.framework in Frameworks */, + C2E5477E32519DF248EE41B1E6182E1A /* Foundation.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B16A71154469AD3EB337051952CE0FC6 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 48F8927D667FF87502CD4DD8C200FECB /* Foundation.framework in Frameworks */, + 9842709E4F626F7563E9709D28324787 /* XCTest.framework in Frameworks */, ); runOnlyForDeploymentPostprocessing = 0; }; /* End PBXFrameworksBuildPhase section */ /* Begin PBXGroup section */ - 14663555BFC9D8228B23F8DA0E5EC5BD /* Support Files */ = { + 11F598FBD83EE3D4BBF94518CBC8EBCA /* Quick */ = { isa = PBXGroup; children = ( - 4C965F64744CB14D8F6E2C2BBB97F4DD /* Nimble.modulemap */, - 33FD12F984B4BA8B5D001D0AFD13F708 /* Nimble-dummy.m */, - BB5D7CE0E6246798ABFD9DAAE4915E71 /* Nimble-Info.plist */, - 7AE197136F8E380A9F1E7D06BD9D0FAF /* Nimble-prefix.pch */, - 1FC0C54E76B49BF11F64E24F0931846C /* Nimble-umbrella.h */, - 8270027ACBF7A64C2B453CCBFE155E90 /* Nimble.debug.xcconfig */, - 4B5ECB9D7EF3AF7D8F37CE57A988CD83 /* Nimble.release.xcconfig */, + 73F2F55231738EB7D67BD0E2FCA99B10 /* AsyncBehavior.swift */, + FFF3C577D7D9C6CC62FAC9221ACC9BF6 /* AsyncDSL.swift */, + A0A97EB9203D4825B685982429EE22D7 /* AsyncExample.swift */, + 28881D40AD493F4CB4F35D16F9BC30E7 /* AsyncExampleGroup.swift */, + 620C2570C5DD2595C455386F70D838EA /* AsyncExampleHooks.swift */, + 4479584A655CE3F1DD7D8A74ACFCFD16 /* AsyncSpec.swift */, + 0B9A8B11FC7C1531FCA4B6B2BC51630F /* AsyncSpec+testMethodSelectors.m */, + BFCDFEFC7D9A0BC6495AC66BBFE46BAA /* AsyncWorld.swift */, + 1CA8E4AA787A7D1C62C1A02CE7815436 /* AsyncWorld+DSL.swift */, + 428AA7F17E16C956AA8B0D86D3A6DC25 /* Behavior.swift */, + E446EFCAAE611F817204DFD70B47776A /* Callsite.swift */, + 906140C81634F7F2BBA3F01EFDE88849 /* Closures.swift */, + 3666C5127185639B35619163DE5164E9 /* CurrentSpec.swift */, + 0C319EEB2331278DFC6A67C94D00908B /* DSL.swift */, + EF020ABF4E2332FCE7BAA228CEA6F5F0 /* ErrorUtility.swift */, + 3A99AE93C9F6B8E96883ABD0C5E6730C /* Example.swift */, + 368654B1226C940259AA0FA7B72CEF03 /* ExampleGroup.swift */, + A83EEBB4AB25331652969E7E9CB405FC /* ExampleHooks.swift */, + E8C6D9912D990689EE4492AC88B09392 /* ExampleMetadata.swift */, + 246CA8E9B8172FE91C2D047224A9E94C /* Filter.swift */, + 6D3CDF327328618001FE959FDD269008 /* HooksPhase.swift */, + F8C0117628C789996B8C3ADBE64D0F14 /* NSBundle+CurrentTestBundle.swift */, + 84A5E6BAD81672C178803F3279DF3F2A /* QCKConfiguration.swift */, + 86DC8A84C96ED2ABE0EFC4802822CF77 /* QCKDSL.h */, + B4BC423F6F6DA19672E4D0DDBFF15B30 /* QCKDSL.m */, + 60D6820E01BCA61C82E683E13A9A5FAB /* Quick.h */, + 503AB4E90BA02160208142DFCEAD3A05 /* QuickConfiguration.h */, + 6BA3CB1DF6F496D0D192C2CE67B32E2A /* QuickConfiguration.m */, + 305246987AF80E372148798DC39EC054 /* QuickConfiguration.swift */, + 6BE7250A5BCFFCD70959A4527E1E5525 /* QuickObjCRuntime.h */, + 7DDD16B3AFA84E81570BD160CB3C2A7E /* QuickSelectedTestSuiteBuilder.swift */, + 5BC4FE4A3A2381093059EF05B1395B9A /* QuickSpec.h */, + 7F3B1C888E10C2600437AB3BEC1FA572 /* QuickSpec.m */, + AD35251EED24E7D573ADCE99E37EBF6D /* QuickSpecBase.h */, + E25520DDA95FBAE29B03465454EADD45 /* QuickSpecBase.m */, + F256CD46A9ADC44C9665AED5DCAE51AE /* QuickTestObservation.swift */, + 35F24F73875586851CFD5D87FB6A1EBD /* QuickTestSuite.swift */, + F9881E951A68EBF0A090E1E78C38E6A7 /* StopTest.swift */, + 5B228EA0DD8BC8FAFF20CFE730CDC996 /* String+C99ExtendedIdentifier.swift */, + B5E5C2543DA8D4B9393A5FB9ECF49F8D /* SubclassDetection.swift */, + 02C9CECA6F1C8F71F9B94D93137EF0EA /* SuiteHooks.swift */, + 427FDF816893162B86CD95A8B6ECA6F3 /* TestSelectorNameProvider.swift */, + 84952211AB6C6062704AE0C091B569BB /* TestState.swift */, + E6ADA6A1E7D8BFBDD30C695EAB397C74 /* URL+FileName.swift */, + FC758B9BC4F50D82ED882BB08DC817AC /* World.swift */, + 85BA9500FBD3B1098283277F9F751E2F /* World+DSL.swift */, + 4D42904EF72A0426F7895677B65F22D5 /* XCTestSuite+QuickTestSuiteBuilder.m */, + 76F1A731D21E1E648AE021BFEB46A54C /* Support Files */, ); - name = "Support Files"; - path = "../Target Support Files/Nimble"; + name = Quick; + path = Quick; sourceTree = ""; }; 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */ = { @@ -348,99 +612,33 @@ name = Frameworks; sourceTree = ""; }; - 184D81A390AC32FF38FF3A0047539694 /* Nimble */ = { + 2F82A5CDACBB136FE6BFF76416B7B240 /* Support Files */ = { isa = PBXGroup; children = ( - 5523F3CB4F893F0BF3631D865BEEC2B4 /* AdapterProtocols.swift */, - A12262F224D0D0A168C398C49F628A15 /* AllPass.swift */, - 090D7BCE58F5A67C1B30F59637E0EE53 /* AssertionDispatcher.swift */, - 64B896AB55261B6E62E0FC506B92A8EC /* AssertionRecorder.swift */, - A1E026C7DAC445C7C813121DE7F03837 /* Async.swift */, - 40955816DD54EA848880AD2815A76921 /* Await.swift */, - 5B95333BD525E87BFF22C57ED6E20FD5 /* BeAKindOf.swift */, - B534FC537F198D4CB2269C659A93783F /* BeAnInstanceOf.swift */, - F31245591C4C010F1303DAC1BC9804C1 /* BeCloseTo.swift */, - 2CF56DC23988E5C892B0834949D740C5 /* BeEmpty.swift */, - E937CE363DBBFE4523820E40E9D3F9A0 /* BeginWith.swift */, - 7893AC67AE4B488BC3E9604A46413A06 /* BeginWithPrefix.swift */, - 9AA80CEA9B4992D8F9368CEE01A42094 /* BeGreaterThan.swift */, - C0DEE4FA5F5FF28F88648CF9EF3B4C39 /* BeGreaterThanOrEqualTo.swift */, - 115813CA22C723977B41201CF3B4C44A /* BeIdenticalTo.swift */, - EF5F8634034723707BA489895B2AC37A /* BeLessThan.swift */, - 586B5A37C0A10198805DA6175B2EB342 /* BeLessThanOrEqual.swift */, - 3B4E2AF01C07390467B2A032C1081912 /* BeLogical.swift */, - 6C5852911233E16D8DBA632AAF28C4C0 /* BeNil.swift */, - BBA4F4C4573FD9589D1CA0CA3DD18A0C /* BeResult.swift */, - 5273DD569D843C265AF46176F4A534FD /* BeVoid.swift */, - 8015D0BB35ED18B858B74C6E8656EB00 /* BeWithin.swift */, - 4149CC5C4007BD87DFDB7E2114AE830D /* Contain.swift */, - 84CC299AC522B25A61A3FAF124FF83FC /* ContainElementSatisfying.swift */, - 2E9331718C3E375B9305AE6782A65CC4 /* CwlBadInstructionException.swift */, - C4C39466E1E06F0DE2D25E4D0D4E6169 /* CwlCatchBadInstruction.swift */, - 3EFA1693908150CAAB677FEAB89AEC2D /* CwlCatchException.h */, - 654A3ADC4BC6E05E9BDC2D8F858A74BA /* CwlCatchException.m */, - 0B2A30FEA2214E06D065AE8997736B53 /* CwlCatchException.swift */, - C34F47D81171E27AF285CDD1AF9F659C /* CwlDarwinDefinitions.swift */, - 23E11C41EA8F304D43F144554949AEFF /* CwlMachBadInstructionHandler.h */, - 1B6A8AE2D5EF989F29A4FFB4EB7D52A8 /* CwlMachBadInstructionHandler.m */, - FE268F672F0856752F99A6370C6545F1 /* DispatchTimeInterval.swift */, - 5C8E70599736912CA1DB7FCDD472F2B2 /* DSL.h */, - 49D566AD1F3A57C62675DCFF1174ADF8 /* DSL.m */, - A16B8BD1EFF8AB8B6940E1EC149FD38A /* DSL.swift */, - 298044D1245C4BD022B7F13791639E75 /* DSL+Wait.swift */, - C851CC15E8E0E35CE23A1222E105A809 /* ElementsEqual.swift */, - 2C9CC327536739702EE1B8865E38BED6 /* EndWith.swift */, - 844435B050856A3A90F2F2DC5D10C71E /* Equal.swift */, - 16671DF91816B7CC8BAA2964E1E6414C /* Equal+Tuple.swift */, - 447626370CDD31CDCC3656C6E0B3BA05 /* Errors.swift */, - 85C9317EF9B3052FC9D544E30801F901 /* Expectation.swift */, - 3DB3B3904CE5F831A2214803D978A197 /* ExpectationMessage.swift */, - 67A91DF9E678606788A96C9150D53EA6 /* Expression.swift */, - E919903C10E88C8DB75C2CD00A266948 /* FailureMessage.swift */, - 16F99FA0960BE24312A4603668FD6CFA /* HaveCount.swift */, - 8470BE37EE9259F9FDADDFC80764A837 /* mach_excServer.c */, - E25EB083AA8985DFFE745FCF5758009A /* mach_excServer.h */, - 516931D0E6A9461B9C20990FA366E1F9 /* Match.swift */, - E27895722ECA9E17BA1DC28F822F97B9 /* MatcherProtocols.swift */, - 6BAC25BC63EBD14D35CDE94813660768 /* MatchError.swift */, - 7C826AD498684E411DD1C792748D889C /* Nimble.h */, - 9215339C71BDBD5B494E9EFD44005158 /* NimbleEnvironment.swift */, - C3D4A2AFFEAE1D8A8E4479F656ADF2D2 /* NimbleXCTestHandler.swift */, - 7A7CD7566A962848ACAFAE01FAC08AA6 /* NMBExceptionCapture.h */, - 81CA9AA102BC399952DACFC1F5740345 /* NMBExceptionCapture.m */, - 0F4A8507ACE009C2C0F45E1FDED202C7 /* NMBExpectation.swift */, - 369990B25C94966B37B0E376A2FE93C0 /* NMBStringify.h */, - 97522C7BBA1F97437715C74303E5A686 /* NMBStringify.m */, - E2EB0871827E9D45D4B63C66C93F292B /* PostNotification.swift */, - DB88DCC04205DB0A61C17B66FFA0AE97 /* Predicate.swift */, - D2FBFBBA48C11C5DAD16F0C15F64297B /* RaisesException.swift */, - EE08781F30AAAA4776BC4A79E3FA9F40 /* SatisfyAllOf.swift */, - 21C0C122235EDD894313B02C03C7C538 /* SatisfyAnyOf.swift */, - 755D25C0FCCF8F6E3E59CF4F94C8C060 /* SourceLocation.swift */, - 6E6AA1575C0AD81F762039746AFAECDC /* Stringers.swift */, - 85254BDDFDC46F27B70DCBF181ADE6FF /* ThrowAssertion.swift */, - D41AA0E2939FB981CED2EFF1B98A57B3 /* ThrowError.swift */, - 51320337A23D4A8E10E00BFD67B8D043 /* ToSucceed.swift */, - E2FF0C6AC202911FB7A52FE099B9B734 /* XCTestObservationCenter+Register.m */, - 14663555BFC9D8228B23F8DA0E5EC5BD /* Support Files */, + CD42A80B2554994C5EAD08D03004B093 /* CwlPosixPreconditionTesting.modulemap */, + A06152D2BDE64E2A5494483F26A48791 /* CwlPosixPreconditionTesting-dummy.m */, + 2AF7D9F65D40A8677C2734EE27783405 /* CwlPosixPreconditionTesting-Info.plist */, + 8C06596BBCA5557642E7E09A51858B4B /* CwlPosixPreconditionTesting-prefix.pch */, + 431556E94698D895BBE3D506D2D06048 /* CwlPosixPreconditionTesting-umbrella.h */, + DDA26739F6B5A6C3427A79B507B90119 /* CwlPosixPreconditionTesting.debug.xcconfig */, + 56EBDC39EB609F54DFA2CDBCE20B63A7 /* CwlPosixPreconditionTesting.release.xcconfig */, ); - name = Nimble; - path = Nimble; + name = "Support Files"; + path = "../Target Support Files/CwlPosixPreconditionTesting"; sourceTree = ""; }; - 3FBC8250D8902D858BF14BCFE2C4831B /* Support Files */ = { + 46BB300026DAEDD896A8373BC7650756 /* Pods */ = { isa = PBXGroup; children = ( - 718ABA2E524F929C4106CFE711012B87 /* Quick.modulemap */, - 7F6D4322ABB010AB0EEC279249B17918 /* Quick-dummy.m */, - DF776FF666679B4CB34B0A18B1F5B307 /* Quick-Info.plist */, - 766A5EA3A362FFD45458AAB04D1B9FB4 /* Quick-prefix.pch */, - AD1B7F0757B5057BCF6D7D1F6B0B7BD1 /* Quick-umbrella.h */, - FD89D255CE96F4B06B98FE303E825DDF /* Quick.debug.xcconfig */, - 51BA9038051E613E9BCC9972FB613CD3 /* Quick.release.xcconfig */, + E30B15A48E136E6BA9936A9AAE8CBEC6 /* CwlCatchException */, + 926F3AC5930A50CB14D9C7ACD3083F22 /* CwlCatchExceptionSupport */, + C31B7B756668C971537F77F667AA66A6 /* CwlMachBadInstructionHandler */, + FD6E2C2132E1687F77671AFD0994FB9A /* CwlPosixPreconditionTesting */, + 929486BB9CB62376AA3EBAB0F79C1949 /* CwlPreconditionTesting */, + 8BFDF819C64EE274CBD3DA3757DC9969 /* Nimble */, + 11F598FBD83EE3D4BBF94518CBC8EBCA /* Quick */, ); - name = "Support Files"; - path = "../Target Support Files/Quick"; + name = Pods; sourceTree = ""; }; 46F0087507A0AAD50FB158AA72B6BD9A /* Targets Support Files */ = { @@ -452,66 +650,165 @@ name = "Targets Support Files"; sourceTree = ""; }; - 6ED66B56EF14ED94784F9F705A021130 /* Products */ = { + 4BBD1D1395315A60891479192D08E5F2 /* Support Files */ = { isa = PBXGroup; children = ( - BAE263041362D074978BB3B577DF0A05 /* Nimble */, - C914B482E199C7EDA35291B58CEC2E5E /* Pods-OSPaymentsLib */, - E6BD0403A56EB6AA58FE2224C68F73C4 /* Pods-OSPaymentsLib-OSPaymentsLibTests */, - 0D631E9908483F9525A6B3F36F16CC61 /* Quick */, + E519952DFB240624BB93B062F034D560 /* Nimble.modulemap */, + 2B0E6009957030250D61B6963C55C947 /* Nimble-dummy.m */, + EA20092E8E021F163FDFBD934CA74A12 /* Nimble-Info.plist */, + 4B6E333D4666FC2F1DBFF0A1BC569ECA /* Nimble-prefix.pch */, + B1B115D5D9F328D12E904FB04B999415 /* Nimble-umbrella.h */, + 9609CBE74715F4BDFAC30EDDF6960A47 /* Nimble.debug.xcconfig */, + 0A2CA0650F7537ACE178096CD0C6BA4C /* Nimble.release.xcconfig */, ); - name = Products; + name = "Support Files"; + path = "../Target Support Files/Nimble"; sourceTree = ""; }; - 974814B39C0012DECD183BBB91B32103 /* iOS */ = { + 76F1A731D21E1E648AE021BFEB46A54C /* Support Files */ = { isa = PBXGroup; children = ( - CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */, - 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */, + 732C335BAE36E8A4C58FB1DAA85E612E /* Quick.modulemap */, + C45D995FC0579F56843554DAED0AB29F /* Quick-dummy.m */, + AA4B854E598EEEDE26BB0916ECBA21B3 /* Quick-Info.plist */, + 45F65E1C399788463EB3B81F94BBBD0A /* Quick-prefix.pch */, + 8F8AD33D990DFB47A310ABB106FFCC44 /* Quick-umbrella.h */, + 922E79F3DE744919AE43C09528485E0E /* Quick.debug.xcconfig */, + B69D8666D871F2F21C4849FB9DC16BDE /* Quick.release.xcconfig */, ); - name = iOS; + name = "Support Files"; + path = "../Target Support Files/Quick"; sourceTree = ""; }; - 9CD6E9346741C4B09B5C94340207FFE0 /* Quick */ = { + 8BFDF819C64EE274CBD3DA3757DC9969 /* Nimble */ = { isa = PBXGroup; children = ( - 45F6B7AC8B7979F25F17036731EE339D /* Behavior.swift */, - BF200F89D143FA102042E6D285D5B6B2 /* Callsite.swift */, - E1F00FC1EB20AC2CA0B5B083F84159A5 /* Closures.swift */, - 3CE338476557D8F2CF2B6E987F5A31CA /* DSL.swift */, - CD87F111AA17D3829427C832EB042273 /* ErrorUtility.swift */, - 7CDC6B9AB35B53FC579C731AE67FD846 /* Example.swift */, - 5813F3776773A4275874BC369BB34A01 /* ExampleGroup.swift */, - 2362FBD489CCE1D540C808716D1EB8C4 /* ExampleHooks.swift */, - 50FAC3D0F71CAC2AEF632440A982DF9D /* ExampleMetadata.swift */, - DB836F954501FFEA0AA8E87E8856D7A7 /* Filter.swift */, - EBC4D3688977E2D961A8F985B1FC0F73 /* HooksPhase.swift */, - AF3CEFA5153F8ACE3EA7629E00B17B8F /* NSBundle+CurrentTestBundle.swift */, - 88CE28DB5FFB584E123C56C4345A73E7 /* QCKConfiguration.swift */, - 43D9B7DA298758F3F8912543839CC426 /* QCKDSL.h */, - 230259C7BBC0AB021F9278A064AADAC1 /* QCKDSL.m */, - E7639378BFCFD4BC8587A03243C01A64 /* Quick.h */, - 32395E85CAF13637932ACEECADC2D96D /* QuickConfiguration.h */, - E6BB1E6C30B81EDB33EC7FDB6C205C79 /* QuickConfiguration.m */, - 204E01215147E1CFDB134360F8F1938E /* QuickConfiguration.swift */, - 622317B228B6CF5C9D75DA1008B0F2B8 /* QuickObjCRuntime.h */, - CDDFBC1CEF007E69BBCFDEFF88615F2C /* QuickSelectedTestSuiteBuilder.swift */, - F75E74A600C812323367AD98A7E46500 /* QuickSpec.h */, - 254558E5834898D2301B3E8C4F620311 /* QuickSpec.m */, - 60403D3F19863854702A6361D7F61850 /* QuickSpecBase.h */, - 0A6115706ED27012A9F43E253D3D3DD7 /* QuickSpecBase.m */, - 350B976ED907275DDED563482009AFD2 /* QuickTestObservation.swift */, - 289E9ACE73C6629DAAEA21D42495B76E /* QuickTestSuite.swift */, - B14A4B16D42CCCBE3D21CBDE4FFC9AA4 /* String+C99ExtendedIdentifier.swift */, - 880EBA466E9150F71DE3C4A76DB140D8 /* SuiteHooks.swift */, - 2AECA1C81ADFA2CA35D84DC7FF1902B2 /* URL+FileName.swift */, - C53261F42083B42E49E80904A433DE8A /* World.swift */, - F3ED266DDE9C244816DD6A53157F8745 /* World+DSL.swift */, - 0BB908657F2C86943C6660C8F0130CEB /* XCTestSuite+QuickTestSuiteBuilder.m */, - 3FBC8250D8902D858BF14BCFE2C4831B /* Support Files */, + 07F6C19E6B79D6A62A98047137C186E4 /* AdapterProtocols.swift */, + 0B9DC5C7E87A938A767BE98EBCC3AC34 /* AllPass.swift */, + A3960D0AAF8FB8850DFA65C1A58F33EB /* AssertionDispatcher.swift */, + D2EBB799FB9B932A1E46754C4F5A0944 /* AssertionRecorder.swift */, + EC2C3FDE19B021EB58A60A72DD2ACBFD /* AssertionRecorder+Async.swift */, + 61C7DDA29CAFB3DB6CA497855D433E8B /* AsyncAllPass.swift */, + 99BC84518076E755101DF735D5CB217F /* AsyncAwait.swift */, + 2B4A6523F00DDE83CE65B121647FD8E2 /* AsyncExpression.swift */, + 8D99B7A054EF9EC2955269411275F6E9 /* AsyncMatcher.swift */, + 6650BB42E1D839AEF9C12E5D6D334420 /* AsyncTimerSequence.swift */, + 34AD4F01F38CB60FFB422A7A72C065FA /* BeAKindOf.swift */, + F31E775260D1FD8A55FD7DF970BEDF5C /* BeAnInstanceOf.swift */, + FABC44C2BD2F8559216A7708ADA1DBDE /* BeCloseTo.swift */, + 754297B4F9BC227D7D84B1CB651EF8B4 /* BeEmpty.swift */, + 1878738073B88CF961FE08390412EABE /* BeginWith.swift */, + E46294DD3B28C2E71094B73581F9C462 /* BeginWithPrefix.swift */, + D5F716D0A883C3817ABCC3DFCD093A12 /* BeGreaterThan.swift */, + E8E0B39232C5995A8C46830D30017957 /* BeGreaterThanOrEqualTo.swift */, + 4C3FCFB435FCD32941C03A1563D1FA50 /* BeIdenticalTo.swift */, + 6FE954440EDA2E7E87A363CA332ABB6D /* BeLessThan.swift */, + D779B4E1CDC07AF68A9253611560A36D /* BeLessThanOrEqual.swift */, + 60BA7DA88753D1953169A962D2A1F11A /* BeLogical.swift */, + F4C13876A6C1AC39203D6CB258EB04BA /* BeNil.swift */, + 83443A3D70BB725B1D7AB14A9C15E021 /* BeResult.swift */, + F14600C0E9673E4CC7E4EA806FF0E5F3 /* BeVoid.swift */, + 33A340E461ABFD5B557BFAEA10B6484A /* BeWithin.swift */, + 0C4DF9A0EBA04AE1D0BAFA86ABD22EFF /* Contain.swift */, + D56E6D71C0EE2A714724EBF17F983257 /* ContainElementSatisfying.swift */, + 7B2D42ECB3E82916486FEC9384FA249D /* DSL.h */, + 3696664980112689674627D9EE8CF099 /* DSL.m */, + 6A6E2F0AEDBA03FE3630124BBE5E4C4A /* DSL.swift */, + 9BE289D761E2E1918931D1B4E6C6C5D1 /* DSL+AsyncAwait.swift */, + 3ED99CD2818C890CE81D07A9699309F9 /* DSL+Require.swift */, + 0021D8C637CD17D0FA0721864E91ADBE /* DSL+Wait.swift */, + CFA1EFABF9C0EE69A3A3FFCFC97C309A /* ElementsEqual.swift */, + CD7AFBB5B4125D85D39A72E20725E5FA /* EndWith.swift */, + 7AFB2D30DA0F7B20CFFC21F790F4203A /* Equal.swift */, + E1FB77A5A37F5E0F1A113F62AA792B4E /* Equal+Tuple.swift */, + 837E401928ED3F08917C35F9DE2F1D67 /* Equal+TupleArray.swift */, + 8B98088616FD55D1953AAC7DD9D0DCE1 /* Errors.swift */, + 0DC37FD66556F5AFA0F6C8ED8DFEDDC6 /* Expectation.swift */, + 22C8372C0C245DC0B51C4009E88E5C8D /* ExpectationMessage.swift */, + 66F1174270109F74C66D01348D1F514E /* Expression.swift */, + 1CBDD353F57D9D94EF81C3AD956CF141 /* FailureMessage.swift */, + 6BB44237D2357864CBA63BAD83C5E21F /* HaveCount.swift */, + 0D7454A7A71134BA53000CEA4197CF29 /* Map.swift */, + 8186012C6C9DB52500D35A7B89FC6684 /* Match.swift */, + 05198D9443349CC308FC2B63E492C461 /* Matcher.swift */, + 4975483BFE3CD106070E2F8DD0286676 /* MatcherProtocols.swift */, + 0A827F3B8A11664638D6829EE312B7C0 /* MatchError.swift */, + CC9F06E5FEEF43271BABE69FE5CD6DA8 /* Nimble.h */, + E66F8D3D05B48F66C8BB0A0161CE6B23 /* NimbleEnvironment.swift */, + 957DED59E916A59823E7DAAFE69CEC7F /* NimbleTimeInterval.swift */, + 981572B1BC0940E3ACB3E4865F13A926 /* NimbleXCTestHandler.swift */, + 42C914EA4F30C3E61E293FEFA6D1F328 /* NMBExceptionCapture.h */, + 72B58393042028545F4ACE967F4B5A2C /* NMBExceptionCapture.m */, + CB6F1225A0F71F797015B4DCE1998BE4 /* NMBExpectation.swift */, + 49E4331AAF01CB7B1A5791AC2F317893 /* NMBStringify.h */, + FBE175B9962D91CD880D0B7F93C35D89 /* NMBStringify.m */, + E801BCC406D59656CEF188513F018621 /* PollAwait.swift */, + 818508BB86C7028A61F1668B8F393B52 /* Polling.swift */, + C7993940D6DB64D4951F356CEFDC450D /* Polling+AsyncAwait.swift */, + B8BA4C9986D8F59C1F8DD66594BA5270 /* Polling+Require.swift */, + F12ECBFA4CC53AB57E018768F98CD00B /* PostNotification.swift */, + 3CF100BA1D20D429B60743ABBB177B17 /* RaisesException.swift */, + 060983B9072CE76B5C27D0C6F7A26FCE /* Requirement.swift */, + 11F7DAF34099D8324849BE1BA1898A94 /* SatisfyAllOf.swift */, + E2C37A766EADAD32057A6A484EEADEC6 /* SatisfyAnyOf.swift */, + 7644AFBF58E73F3D0F2AA2474A8268D7 /* SourceLocation.swift */, + 8B188395FBCB9792D62AC9A1BF5BD82A /* Stringers.swift */, + 4E78EA237A79CA2DE923F31EC39C90FF /* ThrowAssertion.swift */, + E5EED09E9911F8688FB72A1FD574D617 /* ThrowError.swift */, + EA7B179133900F7BADE2BF3E46232413 /* ToSucceed.swift */, + 20C1FD548A2F133D7F0735173B4FEF82 /* utils.swift */, + 314A4C0D938EE986C2A37A6D8BAB1152 /* XCTestObservationCenter+Register.m */, + 4BBD1D1395315A60891479192D08E5F2 /* Support Files */, ); - name = Quick; - path = Quick; + name = Nimble; + path = Nimble; + sourceTree = ""; + }; + 8FE4B53D6F758AB3141EBDB226457CAF /* Support Files */ = { + isa = PBXGroup; + children = ( + A1EB030E8B779E04BF98E7491DF8E4CD /* CwlCatchExceptionSupport.modulemap */, + ED0CD33F95F0FDEFD02E0DBF797B9204 /* CwlCatchExceptionSupport-dummy.m */, + A20DC11E3C92801B14EFF334B281E8CA /* CwlCatchExceptionSupport-Info.plist */, + 20E1B798DBEB86AC4A92335528B04354 /* CwlCatchExceptionSupport-prefix.pch */, + 70C225AA58E38C105D07EA6123151291 /* CwlCatchExceptionSupport-umbrella.h */, + 64921B170418D2F8EF1C54FBA90FDE02 /* CwlCatchExceptionSupport.debug.xcconfig */, + 07B837DB1F58318777C1630726AEA23A /* CwlCatchExceptionSupport.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/CwlCatchExceptionSupport"; + sourceTree = ""; + }; + 926F3AC5930A50CB14D9C7ACD3083F22 /* CwlCatchExceptionSupport */ = { + isa = PBXGroup; + children = ( + 81E069ED072343385C014B7B48C416CD /* CwlCatchException.h */, + 2703D5CC047D4B818556425E18C03970 /* CwlCatchException.m */, + 8FE4B53D6F758AB3141EBDB226457CAF /* Support Files */, + ); + name = CwlCatchExceptionSupport; + path = CwlCatchExceptionSupport; + sourceTree = ""; + }; + 929486BB9CB62376AA3EBAB0F79C1949 /* CwlPreconditionTesting */ = { + isa = PBXGroup; + children = ( + 6EF6C7606EB9BAEACB549B0DC7521A3A /* CwlBadInstructionException.swift */, + 3D2F7CDABDEF157CC25E87A3FF94D228 /* CwlCatchBadInstruction.swift */, + 010573E4A5C4F5A5C6D0AFDFB7978306 /* CwlDarwinDefinitions.swift */, + EFB59DDF320C3C29DE2D0C303E7D7CF6 /* Support Files */, + ); + name = CwlPreconditionTesting; + path = CwlPreconditionTesting; + sourceTree = ""; + }; + 974814B39C0012DECD183BBB91B32103 /* iOS */ = { + isa = PBXGroup; + children = ( + CA8B94E9D3B433157168D1EECCEC11CD /* Foundation.framework */, + 5EBC8F300895E39EA0DF6D6B2B5E6BCD /* XCTest.framework */, + ); + name = iOS; sourceTree = ""; }; AAE5607300A4E45071C10DF6B35A33C1 /* Pods-OSPaymentsLib-OSPaymentsLibTests */ = { @@ -531,13 +828,47 @@ path = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests"; sourceTree = ""; }; - B716C811F0F14528B6525E2277EA7060 /* Pods */ = { + BF0AF404D2650AA579B25455EFC11293 /* Support Files */ = { isa = PBXGroup; children = ( - 184D81A390AC32FF38FF3A0047539694 /* Nimble */, - 9CD6E9346741C4B09B5C94340207FFE0 /* Quick */, + C132D6453AE83D32563F487897825298 /* CwlCatchException.modulemap */, + CE17CB6ADBF606BD40F18E3CFCB080E4 /* CwlCatchException-dummy.m */, + AD5DF8CDEC89D9FBE179229C33AA9EC3 /* CwlCatchException-Info.plist */, + CC82CA60A225BC73F809E0F8661CC4A0 /* CwlCatchException-prefix.pch */, + 3BE3413E1EEA3C3E1DE19AE5BE8440E2 /* CwlCatchException-umbrella.h */, + 7FAF6F207E838D5D5C9B10D229774CCD /* CwlCatchException.debug.xcconfig */, + 07D0FF898AFEF00EF5DD10347811C347 /* CwlCatchException.release.xcconfig */, ); - name = Pods; + name = "Support Files"; + path = "../Target Support Files/CwlCatchException"; + sourceTree = ""; + }; + C31B7B756668C971537F77F667AA66A6 /* CwlMachBadInstructionHandler */ = { + isa = PBXGroup; + children = ( + 3DA9BA00CFF48AA3C0D2FC7CA0EA6011 /* CwlMachBadInstructionHandler.h */, + 02BA9A6B3D35D0E8DBCCF45B2AAA2800 /* CwlMachBadInstructionHandler.m */, + BC47A61A4228C402DFCE82B29F85BC26 /* mach_excServer.c */, + E618038AC16CB30F3B5E8F40C9F2749B /* mach_excServer.h */, + C8FFA132FB5C6E413998055C39489863 /* Support Files */, + ); + name = CwlMachBadInstructionHandler; + path = CwlMachBadInstructionHandler; + sourceTree = ""; + }; + C8FFA132FB5C6E413998055C39489863 /* Support Files */ = { + isa = PBXGroup; + children = ( + AFFBFF09BF4043371F58A7807B75F35A /* CwlMachBadInstructionHandler.modulemap */, + AF635B7E6F47677E46BD2F572AF69D29 /* CwlMachBadInstructionHandler-dummy.m */, + DB635A9A4445AB464609BF97A3ED19F4 /* CwlMachBadInstructionHandler-Info.plist */, + 560BCAF8AFBA708862FAB6417AB4175D /* CwlMachBadInstructionHandler-prefix.pch */, + 22860578BE441530DE0EF805F57485CA /* CwlMachBadInstructionHandler-umbrella.h */, + 3188B641B9C20E4D45A0883C087E57FF /* CwlMachBadInstructionHandler.debug.xcconfig */, + 40163553F5FC158BA38AC8108AC7F62B /* CwlMachBadInstructionHandler.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/CwlMachBadInstructionHandler"; sourceTree = ""; }; CF1408CF629C7361332E53B88F7BD30C = { @@ -545,12 +876,28 @@ children = ( 9D940727FF8FB9C785EB98E56350EF41 /* Podfile */, 1628BF05B4CAFDCC3549A101F5A10A17 /* Frameworks */, - B716C811F0F14528B6525E2277EA7060 /* Pods */, - 6ED66B56EF14ED94784F9F705A021130 /* Products */, + 46BB300026DAEDD896A8373BC7650756 /* Pods */, + D36E011A466B185884474A745A7D054F /* Products */, 46F0087507A0AAD50FB158AA72B6BD9A /* Targets Support Files */, ); sourceTree = ""; }; + D36E011A466B185884474A745A7D054F /* Products */ = { + isa = PBXGroup; + children = ( + E0BC8BB0FE4725CF87EB0A9F5D400FD6 /* CwlCatchException */, + 220D1365CED5CB83C4C0CE1E3DABD3B0 /* CwlCatchExceptionSupport */, + E1176A8E7C8F4162FFCA404BE6EEBB1C /* CwlMachBadInstructionHandler */, + D2AD834000B280096FEB80FBEBD9A414 /* CwlPosixPreconditionTesting */, + CC56497384E780278F916D6C57EA4951 /* CwlPreconditionTesting */, + BAE263041362D074978BB3B577DF0A05 /* Nimble */, + C914B482E199C7EDA35291B58CEC2E5E /* Pods-OSPaymentsLib */, + E6BD0403A56EB6AA58FE2224C68F73C4 /* Pods-OSPaymentsLib-OSPaymentsLibTests */, + 0D631E9908483F9525A6B3F36F16CC61 /* Quick */, + ); + name = Products; + sourceTree = ""; + }; E0CF605A153CEE673050F1700727599C /* Pods-OSPaymentsLib */ = { isa = PBXGroup; children = ( @@ -567,29 +914,90 @@ path = "Target Support Files/Pods-OSPaymentsLib"; sourceTree = ""; }; + E30B15A48E136E6BA9936A9AAE8CBEC6 /* CwlCatchException */ = { + isa = PBXGroup; + children = ( + F81EE8F55A395438492CA563784B65AF /* CwlCatchException.swift */, + BF0AF404D2650AA579B25455EFC11293 /* Support Files */, + ); + name = CwlCatchException; + path = CwlCatchException; + sourceTree = ""; + }; + EFB59DDF320C3C29DE2D0C303E7D7CF6 /* Support Files */ = { + isa = PBXGroup; + children = ( + D90157D5CDC0BB15EADC2A1E8149F99C /* CwlPreconditionTesting.modulemap */, + 64FAD5D5D8489BD37FC62F154800B9F3 /* CwlPreconditionTesting-dummy.m */, + BDF6CC5EE6ACB29381E0A7B825E936BC /* CwlPreconditionTesting-Info.plist */, + E4787C67FB5E67AC58DF19C792484EC6 /* CwlPreconditionTesting-prefix.pch */, + 7AB13D18C8050C2E09BB64993CFB979A /* CwlPreconditionTesting-umbrella.h */, + 12E8A18E971F2D6544B8344097DFB058 /* CwlPreconditionTesting.debug.xcconfig */, + DB4B81CB588224154E8C15DA7196F9E8 /* CwlPreconditionTesting.release.xcconfig */, + ); + name = "Support Files"; + path = "../Target Support Files/CwlPreconditionTesting"; + sourceTree = ""; + }; + FD6E2C2132E1687F77671AFD0994FB9A /* CwlPosixPreconditionTesting */ = { + isa = PBXGroup; + children = ( + F38617FFBE06F9A4113A1FF4C8F0EB5B /* CwlCatchBadInstructionPosix.swift */, + 2F82A5CDACBB136FE6BFF76416B7B240 /* Support Files */, + ); + name = CwlPosixPreconditionTesting; + path = CwlPosixPreconditionTesting; + sourceTree = ""; + }; /* End PBXGroup section */ /* Begin PBXHeadersBuildPhase section */ - 1562ED0D7217E6951085B834D8034728 /* Headers */ = { + 53651E4EB3F8CC46B1B0FF04366908FF /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + DDC7CA0733F6D405C6E0C56785297B2C /* CwlPreconditionTesting-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5724ABB843906339B7DA2FCE9B5C692D /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 2C632E96DC0025A2C0036B7CC037A407 /* CwlMachBadInstructionHandler.h in Headers */, + 73B0052F6EF7783BA3C1A532D75EB1D8 /* CwlMachBadInstructionHandler-umbrella.h in Headers */, + B299AB0AE55C25E6B62F0E6EADBAC7CF /* mach_excServer.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 58E1902B7634A3F18A4073C6E5ED2842 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + CE845A999012F17514A2F3B857300186 /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5B8DB64BB9D2A177E8BAAFEE10E3F31C /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 1E5D8B0BD08347A08E3CC4FF6267376F /* Pods-OSPaymentsLib-OSPaymentsLibTests-umbrella.h in Headers */, + ED602BA6C6EE6083E36E982C1C9E8457 /* QCKDSL.h in Headers */, + 7FD700715732587DA0D9587E45209ECB /* Quick.h in Headers */, + B01FBBF046DB33409BCAD0CC418B1915 /* Quick-umbrella.h in Headers */, + 2A05C7950CB354EA6FEF8649F3B82067 /* QuickConfiguration.h in Headers */, + 95E0B03539ADBAFEE8E4F645278FF85A /* QuickObjCRuntime.h in Headers */, + FD9D9565069953A0F3298E34848E8730 /* QuickSpec.h in Headers */, + 2D6226020DF075BC08C179CE9D1E57C4 /* QuickSpecBase.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; - 2ECA8588289B7FD3CD8D5FC71DC87C4E /* Headers */ = { + 7A1CD14BA2C35029E11919CEA0292D2E /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - EA4EC4B3853541FDC946239C036D12C9 /* CwlCatchException.h in Headers */, - E2EE2E7797C383576ACBFE4986179459 /* CwlMachBadInstructionHandler.h in Headers */, - FC4F734925BC0EDDCD7C10AFBF93C576 /* DSL.h in Headers */, - 19A8009537BCAD56435B2DDC620B29AA /* mach_excServer.h in Headers */, - 21F3408E9BD0BE7C7A9FFBF43B4F28A0 /* Nimble.h in Headers */, - C03116C765F1A8893559730965ECBAD8 /* Nimble-umbrella.h in Headers */, - 60A059AA3734D5D3F2F73D07C427F4C1 /* NMBExceptionCapture.h in Headers */, - 7190961540266108624E854866842A81 /* NMBStringify.h in Headers */, + AF8A390A34E0C9260BFC20B123D5330A /* CwlCatchException.h in Headers */, + F2C4FCB88A23C8CD9798ABD09DEDBBB7 /* CwlCatchExceptionSupport-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -601,17 +1009,31 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - EF56162795BEE38037C39740F2E15F4B /* Headers */ = { + A5C71D3D6A9100C45B0F049BDB996C22 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 4FFFE078561455276BD8D7DBBD4B82B7 /* DSL.h in Headers */, + 19CB73099257045327239879DB6CFCD5 /* Nimble.h in Headers */, + 086E1CE4E10D430F1E947C0EB6EE585D /* Nimble-umbrella.h in Headers */, + 12D53B67A082D15ED18B4B51CD4C9ABA /* NMBExceptionCapture.h in Headers */, + 53A2DF915F7360AC657F9F7118E2C127 /* NMBStringify.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + D8E5AA88F860CD2CE849CCBD4875BDC8 /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 9B230DE2E00CC2CA78561DD3DF028339 /* CwlCatchException-umbrella.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + F7ECBCD811330822CF2CF8B3A09C1BCB /* Headers */ = { isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 612581CCD8346C696A80E6BC09D24C1F /* QCKDSL.h in Headers */, - E1CD0FEF6BA86FA9C28038C818E2514A /* Quick.h in Headers */, - C96B370E9B3442878448F8FFFDC98C7A /* Quick-umbrella.h in Headers */, - 6A47C53473FBCF2FF5C85069FBD4CA8D /* QuickConfiguration.h in Headers */, - FE67CE5AE4DFFE6B850FA43334EEBDC0 /* QuickObjCRuntime.h in Headers */, - D8B8FCEC597824B40986C8F4F7B50899 /* QuickSpec.h in Headers */, - 32995147DC30DF5022DD66C0470BFDE9 /* QuickSpecBase.h in Headers */, + 8982BD9FA66C8988A24C5B03517931A2 /* CwlPosixPreconditionTesting-umbrella.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -620,24 +1042,66 @@ /* Begin PBXNativeTarget section */ 04AB15DB33DBB70D7B25012DBAB06F1A /* Pods-OSPaymentsLib-OSPaymentsLibTests */ = { isa = PBXNativeTarget; - buildConfigurationList = 00C17C5870BF07DC0D42D38500DDDB88 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib-OSPaymentsLibTests" */; + buildConfigurationList = 5533DBFB87FB69A0B48E4B16BDF17721 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib-OSPaymentsLibTests" */; buildPhases = ( - 1562ED0D7217E6951085B834D8034728 /* Headers */, - F9CF23A2BE65EAF674EE3CCC010F62ED /* Sources */, - 5BACFA62F624BC18081DF90CFC27D336 /* Frameworks */, - BBBF04B4CD4D1ABF95C3C134D06D84FC /* Resources */, + 58E1902B7634A3F18A4073C6E5ED2842 /* Headers */, + 5E5F58446B6BB384C21151984BD15EAC /* Sources */, + 494F3A6D18BE72FCBAE9B38C1D8E0858 /* Frameworks */, + B84160B808EE297A8F95F357B5E57900 /* Resources */, ); buildRules = ( ); dependencies = ( - C9897A3C5A37DA388024EF1B73474E40 /* PBXTargetDependency */, - EFC11406FB1C0273752AF7AA25C48093 /* PBXTargetDependency */, + 23D91AEC5E843AF93CBC858F071D68E4 /* PBXTargetDependency */, + 175A48428BE8BD12F8C7D872E946E8D9 /* PBXTargetDependency */, + F82C29A500BE75FEB54DFE09EB0A643F /* PBXTargetDependency */, + C39A7CDBC30A8BC906B084B424A3B92B /* PBXTargetDependency */, + 1207A805C1AB998DCB5A86249DD94A29 /* PBXTargetDependency */, + 154D26F063684B9A17EB669FCF288908 /* PBXTargetDependency */, + 3C75D747123C55C1953451CBE31A3853 /* PBXTargetDependency */, ); name = "Pods-OSPaymentsLib-OSPaymentsLibTests"; productName = Pods_OSPaymentsLib_OSPaymentsLibTests; productReference = E6BD0403A56EB6AA58FE2224C68F73C4 /* Pods-OSPaymentsLib-OSPaymentsLibTests */; productType = "com.apple.product-type.framework"; }; + 308B5C440C446909122081D367A27A8F /* CwlCatchException */ = { + isa = PBXNativeTarget; + buildConfigurationList = 0B24FD4C46092DD465F3CEBD6FADA0B5 /* Build configuration list for PBXNativeTarget "CwlCatchException" */; + buildPhases = ( + D8E5AA88F860CD2CE849CCBD4875BDC8 /* Headers */, + 965BE037A59B9DAE341CD3A0A852BD34 /* Sources */, + A509C1F85B00AF9A9F66030AC855ABE6 /* Frameworks */, + F4C0F2A685097AE92FEE3DC9D340656E /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ADDBFB367EB6BAAD288A49AF641A2E43 /* PBXTargetDependency */, + ); + name = CwlCatchException; + productName = CwlCatchException; + productReference = E0BC8BB0FE4725CF87EB0A9F5D400FD6 /* CwlCatchException */; + productType = "com.apple.product-type.framework"; + }; + 3BBD87E27EAD36B90D168213ED6DC32C /* CwlMachBadInstructionHandler */ = { + isa = PBXNativeTarget; + buildConfigurationList = 9F679600745075134FBDCA8EB0FACB15 /* Build configuration list for PBXNativeTarget "CwlMachBadInstructionHandler" */; + buildPhases = ( + 5724ABB843906339B7DA2FCE9B5C692D /* Headers */, + B4881A76BF4D9FDFE30B0F3E471743C2 /* Sources */, + 64E0ACB63EA9EAFDF0043C6358BFA99F /* Frameworks */, + E89B8427F7D5396605DA55D3897F06B4 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CwlMachBadInstructionHandler; + productName = CwlMachBadInstructionHandler; + productReference = E1176A8E7C8F4162FFCA404BE6EEBB1C /* CwlMachBadInstructionHandler */; + productType = "com.apple.product-type.framework"; + }; 4BB08E2983BD09E8DAED9FA5412B115D /* Pods-OSPaymentsLib */ = { isa = PBXNativeTarget; buildConfigurationList = 2EC9DC26A2B2F522D07CE5FE7D1EF6F5 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib" */; @@ -658,16 +1122,17 @@ }; 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */ = { isa = PBXNativeTarget; - buildConfigurationList = 84E3C08133057626870418A290649C7E /* Build configuration list for PBXNativeTarget "Nimble" */; + buildConfigurationList = B8921DB3FB146EFAE5814E112153F87C /* Build configuration list for PBXNativeTarget "Nimble" */; buildPhases = ( - 2ECA8588289B7FD3CD8D5FC71DC87C4E /* Headers */, - 7EB80E67F560CFEE04CAB2D2B4502824 /* Sources */, - DD6C5AE0FCB56EC173421774C5CA73D3 /* Frameworks */, - C8C24821D185E1A194A59A3A3BCB60CA /* Resources */, + A5C71D3D6A9100C45B0F049BDB996C22 /* Headers */, + 10EF102237D379D954F11586E4C26E74 /* Sources */, + 596BC85A4D2B3ED26171A14D3169F031 /* Frameworks */, + A5DC210E99894CE656AA48D340E9D24C /* Resources */, ); buildRules = ( ); dependencies = ( + 53815EC913CDF6F58B52ABF1F13D9522 /* PBXTargetDependency */, ); name = Nimble; productName = Nimble; @@ -676,12 +1141,12 @@ }; C82891EAB7293DBEE916B21F57E8474D /* Quick */ = { isa = PBXNativeTarget; - buildConfigurationList = 1D467AF12BCFD8263C61085D135659C3 /* Build configuration list for PBXNativeTarget "Quick" */; + buildConfigurationList = DAD01693EC221F6D6CD576D139164CDD /* Build configuration list for PBXNativeTarget "Quick" */; buildPhases = ( - EF56162795BEE38037C39740F2E15F4B /* Headers */, - C802F10129A4770EE61F067F767E7A8B /* Sources */, - DA8489B6D5E9C56DC3D6471AE4A67F6D /* Frameworks */, - 78B22DE6F38E020E338DC52F9D195A52 /* Resources */, + 5B8DB64BB9D2A177E8BAAFEE10E3F31C /* Headers */, + C2C85E430F73C50F4C46CFD6C177DC82 /* Sources */, + B16A71154469AD3EB337051952CE0FC6 /* Frameworks */, + 8B55C70BA02D1E1E06FD91A60FA29721 /* Resources */, ); buildRules = ( ); @@ -692,14 +1157,71 @@ productReference = 0D631E9908483F9525A6B3F36F16CC61 /* Quick */; productType = "com.apple.product-type.framework"; }; + CA3D99499260B4C146BBB22670C1D8AD /* CwlCatchExceptionSupport */ = { + isa = PBXNativeTarget; + buildConfigurationList = 626E614C7AB779319725A927E8061F7D /* Build configuration list for PBXNativeTarget "CwlCatchExceptionSupport" */; + buildPhases = ( + 7A1CD14BA2C35029E11919CEA0292D2E /* Headers */, + 80BBB390668C21FFCF14D9C64FB46314 /* Sources */, + 00757244B0C2072D3CF379717EAA1D46 /* Frameworks */, + FC68A227966E5BF56F3DB0118F290689 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CwlCatchExceptionSupport; + productName = CwlCatchExceptionSupport; + productReference = 220D1365CED5CB83C4C0CE1E3DABD3B0 /* CwlCatchExceptionSupport */; + productType = "com.apple.product-type.framework"; + }; + E4D853F6FBAB5A9BDBE843E4EFB22EB7 /* CwlPreconditionTesting */ = { + isa = PBXNativeTarget; + buildConfigurationList = BBA2CF64B702765C105515A5F22180CF /* Build configuration list for PBXNativeTarget "CwlPreconditionTesting" */; + buildPhases = ( + 53651E4EB3F8CC46B1B0FF04366908FF /* Headers */, + 821C75B2AC5F67F724BE057C17A046BB /* Sources */, + 055F5D9893DB522EDD2C99178F8D3DF7 /* Frameworks */, + 8463DDF462CDDCA9A7552517F4F60CB1 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + 623DAEB0CDAA927C50E8EFD26BCFF8C9 /* PBXTargetDependency */, + 5DBD1E8D697CC3AAA19FFCAFDA2F7C5C /* PBXTargetDependency */, + 4F7EC3A2460323E00131B6122BF060F4 /* PBXTargetDependency */, + ); + name = CwlPreconditionTesting; + productName = CwlPreconditionTesting; + productReference = CC56497384E780278F916D6C57EA4951 /* CwlPreconditionTesting */; + productType = "com.apple.product-type.framework"; + }; + EB8B23AD889CF5BE4A85CD0D8EF2DF99 /* CwlPosixPreconditionTesting */ = { + isa = PBXNativeTarget; + buildConfigurationList = 42B2059A767BF03B41073C49BC67735A /* Build configuration list for PBXNativeTarget "CwlPosixPreconditionTesting" */; + buildPhases = ( + F7ECBCD811330822CF2CF8B3A09C1BCB /* Headers */, + 117C3FD66999C297C75A904EC6305A71 /* Sources */, + 4F45D4EFE46A0C5F60578B86D23B8BFF /* Frameworks */, + 96867D34F91470BF3050416C1EB59E76 /* Resources */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = CwlPosixPreconditionTesting; + productName = CwlPosixPreconditionTesting; + productReference = D2AD834000B280096FEB80FBEBD9A414 /* CwlPosixPreconditionTesting */; + productType = "com.apple.product-type.framework"; + }; /* End PBXNativeTarget section */ /* Begin PBXProject section */ BFDFE7DC352907FC980B868725387E98 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 1300; - LastUpgradeCheck = 1300; + LastSwiftUpdateCheck = 1500; + LastUpgradeCheck = 1500; }; buildConfigurationList = 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */; compatibilityVersion = "Xcode 13.0"; @@ -710,10 +1232,15 @@ en, ); mainGroup = CF1408CF629C7361332E53B88F7BD30C; - productRefGroup = 6ED66B56EF14ED94784F9F705A021130 /* Products */; + productRefGroup = D36E011A466B185884474A745A7D054F /* Products */; projectDirPath = ""; projectRoot = ""; targets = ( + 308B5C440C446909122081D367A27A8F /* CwlCatchException */, + CA3D99499260B4C146BBB22670C1D8AD /* CwlCatchExceptionSupport */, + 3BBD87E27EAD36B90D168213ED6DC32C /* CwlMachBadInstructionHandler */, + EB8B23AD889CF5BE4A85CD0D8EF2DF99 /* CwlPosixPreconditionTesting */, + E4D853F6FBAB5A9BDBE843E4EFB22EB7 /* CwlPreconditionTesting */, 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */, 4BB08E2983BD09E8DAED9FA5412B115D /* Pods-OSPaymentsLib */, 04AB15DB33DBB70D7B25012DBAB06F1A /* Pods-OSPaymentsLib-OSPaymentsLibTests */, @@ -730,176 +1257,339 @@ ); runOnlyForDeploymentPostprocessing = 0; }; - 78B22DE6F38E020E338DC52F9D195A52 /* Resources */ = { + 8463DDF462CDDCA9A7552517F4F60CB1 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - BBBF04B4CD4D1ABF95C3C134D06D84FC /* Resources */ = { + 8B55C70BA02D1E1E06FD91A60FA29721 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; - C8C24821D185E1A194A59A3A3BCB60CA /* Resources */ = { + 96867D34F91470BF3050416C1EB59E76 /* Resources */ = { isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 14593B72CC5AB1953F9390743FA4967E /* Sources */ = { - isa = PBXSourcesBuildPhase; + A5DC210E99894CE656AA48D340E9D24C /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 0C0D56E489977C4C3AAC657267CBE490 /* Pods-OSPaymentsLib-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - 7EB80E67F560CFEE04CAB2D2B4502824 /* Sources */ = { - isa = PBXSourcesBuildPhase; + B84160B808EE297A8F95F357B5E57900 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 088A5A88342D60B6FCFAEADBF0749220 /* AdapterProtocols.swift in Sources */, - 0650AF0DB8DE333CE5D99D704E29AC02 /* AllPass.swift in Sources */, - AC0278DBE6921D2AA8CA82CBE8805202 /* AssertionDispatcher.swift in Sources */, - 8F5593DFFFCAC3D618365EC2590A3E31 /* AssertionRecorder.swift in Sources */, - A0F1DDBCD61B35967DED6A8F6A69B9A5 /* Async.swift in Sources */, - 58CAB839E63D7D4575D3DEDF8C98EDD9 /* Await.swift in Sources */, - AC1B0A94D98FF6A485E56165BDAAFB8F /* BeAKindOf.swift in Sources */, - 981F6B1579CE5D0BDB6E936DFC0B24F1 /* BeAnInstanceOf.swift in Sources */, - 7DF5C2582E1C9DE5BC6BF84C0AF1337B /* BeCloseTo.swift in Sources */, - D6F1A9AFE522D73CB8BDF851FF6F7ACC /* BeEmpty.swift in Sources */, - 6F4F5989C108EB29AB735E9CAF4B6E0A /* BeginWith.swift in Sources */, - 9AB3D03BC12D48113C0AFB7E687A274D /* BeginWithPrefix.swift in Sources */, - F94ED0C040D8EFE1B1227A464F81E92E /* BeGreaterThan.swift in Sources */, - 40D9B846E5A8AF781C0A0C41FED0E0F8 /* BeGreaterThanOrEqualTo.swift in Sources */, - C7DB9FB7C8378ADC0DBC744F9359C0C9 /* BeIdenticalTo.swift in Sources */, - B93F3526A95D7F43EEBFEE5E453E4795 /* BeLessThan.swift in Sources */, - 01236C984BBB2918575C35713E2E08B4 /* BeLessThanOrEqual.swift in Sources */, - BF62525E5628A9F7604BA8479691318C /* BeLogical.swift in Sources */, - 3ABDA920FDD838A534E55347FF35ACCC /* BeNil.swift in Sources */, - 4DFD4AE1B1C12F59014A9C1FE8F7AE47 /* BeResult.swift in Sources */, - 2223D9864ED3F01713DA2180EF7190B9 /* BeVoid.swift in Sources */, - F9A961CFA0E2BD3C6A94E282069AD80E /* BeWithin.swift in Sources */, - ACAA345A1CCAFA1F4EE69B3C25D62558 /* Contain.swift in Sources */, - 0E398EF6297FFF6CC9BC74421BF1712D /* ContainElementSatisfying.swift in Sources */, - 4EC19A4F9EE9863B3CF7BDB7607FE96B /* CwlBadInstructionException.swift in Sources */, - DD130331C3820B0A4A655D6422167410 /* CwlCatchBadInstruction.swift in Sources */, - 994DAB83E925F5BF28B00DFD0F9795CB /* CwlCatchException.m in Sources */, - 3FA8E6AEBD8687BF75B467C33ADF0045 /* CwlCatchException.swift in Sources */, - CA32F74C00C2448397720AB161360835 /* CwlDarwinDefinitions.swift in Sources */, - BD3ABAC28025564DCF2E6C12009435DF /* CwlMachBadInstructionHandler.m in Sources */, - F8211C89835CD4106BCC584D260CF7C8 /* DispatchTimeInterval.swift in Sources */, - 1C469C17A0E35E4508F74FEB1EDA586C /* DSL.m in Sources */, - F1D91144B0B756BA7723E0AE68ED6605 /* DSL.swift in Sources */, - 6D2F9F1DC6C1DE1C73F4382904B9C97C /* DSL+Wait.swift in Sources */, - 289B613DD13E58EA28C0DFAF4358BA68 /* ElementsEqual.swift in Sources */, - 8A9FE00A3D26CFEDEF3503C93FEFC954 /* EndWith.swift in Sources */, - 2357EB01C617A8A015615080DBB012D6 /* Equal.swift in Sources */, - 92DE6AC67462F0A507D3187892D4FA8A /* Equal+Tuple.swift in Sources */, - 86037D5CAD49EC09A2B944ADBF561059 /* Errors.swift in Sources */, - AFB4F603FD0F5C407CB8920F6A5BA7A1 /* Expectation.swift in Sources */, - A017E1A4E1C0AA61CDB6F1E8382D3384 /* ExpectationMessage.swift in Sources */, - 61F1ADB6BE662783C1A01C2C1720A9BE /* Expression.swift in Sources */, - 993ED0D1D74DDFAF99D4108636EFFA64 /* FailureMessage.swift in Sources */, - 233AB756F67ABBD886C54BF9F12403DF /* HaveCount.swift in Sources */, - 86F84DE049A0E2CADAC8344E20D070BE /* mach_excServer.c in Sources */, - C5DF891232B50DB810099403734CFCEE /* Match.swift in Sources */, - 1B5648DECACC2C478440DD19516ADCC5 /* MatcherProtocols.swift in Sources */, - 4DB106EF5D81F121EA58D82401C5DD1C /* MatchError.swift in Sources */, - 3B5E796F1BFBB87AAB31305D6FCE160E /* Nimble-dummy.m in Sources */, - 80DB7C67B0D7A32BF885B5CD17C745A1 /* NimbleEnvironment.swift in Sources */, - 6F796B7E3AA428C9D8E88F0F2269664F /* NimbleXCTestHandler.swift in Sources */, - A487451E3CC40D7F9549FA292435273B /* NMBExceptionCapture.m in Sources */, - 707245706183C9814604FBE34CD83152 /* NMBExpectation.swift in Sources */, - 88380C6AB029E423E69827B204BFF18A /* NMBStringify.m in Sources */, - 654580360E6694D7F7CE85CE5390DA79 /* PostNotification.swift in Sources */, - 9C75931ADE8431B4C3C4AE2D59E70977 /* Predicate.swift in Sources */, - 51BAE003E7BD972B4F6EB54CFB7E1BF0 /* RaisesException.swift in Sources */, - 28D6E884D7AB6CF2B4BFF328D2537D22 /* SatisfyAllOf.swift in Sources */, - 057C1964EBAFCBC649F8012723CDADF5 /* SatisfyAnyOf.swift in Sources */, - 3E97A584E7FDD55A6AC072DB23043FCC /* SourceLocation.swift in Sources */, - 3CFE6D672FEFBE8A9D10D5723FB88BF2 /* Stringers.swift in Sources */, - E5ACC239A1C2E515D4939ACECD147445 /* ThrowAssertion.swift in Sources */, - 4A457767C9968D139BD8AAD877DFC117 /* ThrowError.swift in Sources */, - 5258586AADBC8482EFAFB4B591A17E03 /* ToSucceed.swift in Sources */, - 09D4B856CFEA59F4E16AB91D1F06D50C /* XCTestObservationCenter+Register.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - C802F10129A4770EE61F067F767E7A8B /* Sources */ = { - isa = PBXSourcesBuildPhase; + E89B8427F7D5396605DA55D3897F06B4 /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 3E1105B44CCBDA9EC8C6C96EACCCC28F /* Behavior.swift in Sources */, - C8539F1BDF052B57BDB129D3D4B07364 /* Callsite.swift in Sources */, - 5448447D317610CE0DF66B87CF6F1094 /* Closures.swift in Sources */, - 154A42D3BBF847E3C2C7A6BB4EFAEE84 /* DSL.swift in Sources */, - 35C095305E5FB8CF40BB6C6A7F02E678 /* ErrorUtility.swift in Sources */, - 80428B0834B1272AB4E96E00D3FAA081 /* Example.swift in Sources */, - 2D6DB63EBCA201CFABA3012CD1C360BD /* ExampleGroup.swift in Sources */, - 0F776B26BC641CB895C2E7D961C71152 /* ExampleHooks.swift in Sources */, - C85E1092F4DAACDD63FB8E8B0E144095 /* ExampleMetadata.swift in Sources */, - 9B4B84C8A58733E87C1F30CDE34F3BEE /* Filter.swift in Sources */, - A327A211C8B71069F32FAE5F5B3807C4 /* HooksPhase.swift in Sources */, - 42BC3C3CBE7E5484F09BAD3204DE521D /* NSBundle+CurrentTestBundle.swift in Sources */, - 2C85A44748A3F58CE8C0AE291B9EDDFB /* QCKConfiguration.swift in Sources */, - DA9B61878019B5428B614BDDB5948F01 /* QCKDSL.m in Sources */, - FEA8C3E9543FB2A316D5A8F89B13D411 /* Quick-dummy.m in Sources */, - 207866DD86EDE603026D5AEDAF5ABE44 /* QuickConfiguration.m in Sources */, - 87535E5C51E9F6B7B1517FEA95033D1C /* QuickConfiguration.swift in Sources */, - 9B981E6DB0846F597838D6995E3F2EAC /* QuickSelectedTestSuiteBuilder.swift in Sources */, - 6C1386A39405BDA544D5BEE2C9155AB1 /* QuickSpec.m in Sources */, - 3B59EB43186F324A79D05C3201369283 /* QuickSpecBase.m in Sources */, - AD022386EA01CE480072E4C2E261BEC6 /* QuickTestObservation.swift in Sources */, - C20BFECB0A04FE439AE243D89E687B8A /* QuickTestSuite.swift in Sources */, - 498D0CEF04FDF36BE2B89A67015FF3A0 /* String+C99ExtendedIdentifier.swift in Sources */, - 8EFA132322053E7D8A1F9F380B5D8935 /* SuiteHooks.swift in Sources */, - 5DE534ADC468F5FFC43371CE7138923F /* URL+FileName.swift in Sources */, - F591765960EECDBB53CB4E5329290A4B /* World.swift in Sources */, - 0BAC760A19A0F7BAD74264AA4DDDD679 /* World+DSL.swift in Sources */, - A357C8E38B58FA37B8E1A6103D4E9A0A /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; - F9CF23A2BE65EAF674EE3CCC010F62ED /* Sources */ = { - isa = PBXSourcesBuildPhase; + F4C0F2A685097AE92FEE3DC9D340656E /* Resources */ = { + isa = PBXResourcesBuildPhase; buildActionMask = 2147483647; files = ( - 1CBAF686CA3277D9FC264A3B1E692471 /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - C9897A3C5A37DA388024EF1B73474E40 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = Nimble; - target = 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */; - targetProxy = 4AB6872CAE7EB20877E143891709DAD2 /* PBXContainerItemProxy */; - }; - EFC11406FB1C0273752AF7AA25C48093 /* PBXTargetDependency */ = { + FC68A227966E5BF56F3DB0118F290689 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 10EF102237D379D954F11586E4C26E74 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 5F4300F4985C00C7E50879D5DA25069D /* AdapterProtocols.swift in Sources */, + 28C50DB2279706C3C47A38C9D7DEF9A6 /* AllPass.swift in Sources */, + BE5CB274210C6D83CBF6F2D222FF0C20 /* AssertionDispatcher.swift in Sources */, + 30C5D12AB6B5B930EFCFADA8ABCBF63B /* AssertionRecorder.swift in Sources */, + DD136D9F0BA4405B4AF7E888FBBC03D0 /* AssertionRecorder+Async.swift in Sources */, + 4235C79508CB73F9F3960AEFBEE95287 /* AsyncAllPass.swift in Sources */, + 8A085B7C40368D8F5DFB06CFE8541809 /* AsyncAwait.swift in Sources */, + D6B4AA83CDA43927DB46E614FC3EDF09 /* AsyncExpression.swift in Sources */, + F14C6A7A9EC794B7F60E244D5227E1DE /* AsyncMatcher.swift in Sources */, + 54C73470DE4EFE7038D8BCC96394CB7A /* AsyncTimerSequence.swift in Sources */, + 386035701616A55133490CC5B7D599A1 /* BeAKindOf.swift in Sources */, + 210E28965A04075F4DC3960D269F3BFE /* BeAnInstanceOf.swift in Sources */, + ECB25D327813D791F8B04BFDC5C22A56 /* BeCloseTo.swift in Sources */, + AF73B574BAEA6A4890092B7BB4C5E1EF /* BeEmpty.swift in Sources */, + EAE05B70AA9690C0DA3AD1DC0BC975CD /* BeginWith.swift in Sources */, + C7C0E737E36967917577A44E01367CE1 /* BeginWithPrefix.swift in Sources */, + 02862925CA6AC122C7D7FAFA6EAFE9B4 /* BeGreaterThan.swift in Sources */, + 98BF01027C0ED277FA44A5976CCAC48B /* BeGreaterThanOrEqualTo.swift in Sources */, + C2DB1B3BA2AC1ADA9572527A408E2133 /* BeIdenticalTo.swift in Sources */, + 27E52183EDFE2F83356620EC190632CC /* BeLessThan.swift in Sources */, + 3CE63C7B763466F2B1E5A50BF4A1C55C /* BeLessThanOrEqual.swift in Sources */, + 717F4536032D9AD18B34543BB16B5785 /* BeLogical.swift in Sources */, + B84C161C8D6F6D45B54F4A0540EC46BA /* BeNil.swift in Sources */, + D6DBC83664E74D070050CD81DA0E064C /* BeResult.swift in Sources */, + 23CE269175242B42A00AC562C0446EBC /* BeVoid.swift in Sources */, + 934BAB9A75561F779175AA12A1BEF3E6 /* BeWithin.swift in Sources */, + EEBE9B46D49C94CC305245EB3B45A237 /* Contain.swift in Sources */, + B9DF33D4019BC27D9DFC286EA4889458 /* ContainElementSatisfying.swift in Sources */, + A17F986159251EAB78F7A14D9CE751CD /* DSL.m in Sources */, + C5166B8B226EA61D351F98AFC5EF05B7 /* DSL.swift in Sources */, + EE219A1D6B7901E2841AF289B9C2D2C4 /* DSL+AsyncAwait.swift in Sources */, + 43C46479311D1489DAE6A0581448BE0C /* DSL+Require.swift in Sources */, + 1876CE44E8440A4737CF40117A68F309 /* DSL+Wait.swift in Sources */, + 5053A17F2081784AB080F30B0F5865F4 /* ElementsEqual.swift in Sources */, + 64705DF3A1868C524870711259043F58 /* EndWith.swift in Sources */, + 1368326833020E1381CC35FE204C0543 /* Equal.swift in Sources */, + DEAD70130BED26DFF01DB8335048AE6E /* Equal+Tuple.swift in Sources */, + 5034FA01DC379A5479D202CC1C2FBE4A /* Equal+TupleArray.swift in Sources */, + 79DBE9693E2198943A783ABFD29AD8E0 /* Errors.swift in Sources */, + 9FEC431B72D606CE1F9A7519ED52F067 /* Expectation.swift in Sources */, + 2CAA65A58918F5EC6815F86DFF0C9145 /* ExpectationMessage.swift in Sources */, + 14FD1319FDF44431950DBE146939F966 /* Expression.swift in Sources */, + B39DA59A1B61AAF40791929F4CCFDC04 /* FailureMessage.swift in Sources */, + D52A6CF8DE6EB018BDC007090B811610 /* HaveCount.swift in Sources */, + 273C2200A3CCD17914F16621CA8918F1 /* Map.swift in Sources */, + D218D06508938E7E60BA9CA24BCB2D7F /* Match.swift in Sources */, + 7847936EDCDA1B01C677C31B0D3D4E6C /* Matcher.swift in Sources */, + D3BD1F7254F7AF70D812D4C965EF54F9 /* MatcherProtocols.swift in Sources */, + 92D38CFA30428553FA8C7B607F77188B /* MatchError.swift in Sources */, + 170B8362049B9E7C134C392EF01C1B11 /* Nimble-dummy.m in Sources */, + B1F8913FCD67F4863C2F89120395AEFB /* NimbleEnvironment.swift in Sources */, + EE87C0C5AA90643DAD9359F5B942EFCA /* NimbleTimeInterval.swift in Sources */, + 8BA9506936BAF58874A11686DE9209FC /* NimbleXCTestHandler.swift in Sources */, + 97A4451BFC7BBB956541232190ED804E /* NMBExceptionCapture.m in Sources */, + 89FC9CA354F1BE3BA4947368D6EDA77D /* NMBExpectation.swift in Sources */, + 0A411DB578B132909FECBE652B271BEF /* NMBStringify.m in Sources */, + E20BF25CC9FE502D37CED510E7ADFEAC /* PollAwait.swift in Sources */, + A00B5714E574282285C79934F3931973 /* Polling.swift in Sources */, + 883E3CE7566CDAED097D74819DF969A4 /* Polling+AsyncAwait.swift in Sources */, + 534B183FDA625BCEF7D1D3B3AAD90FB8 /* Polling+Require.swift in Sources */, + 84EA7731D14E937368671377E4CAD56F /* PostNotification.swift in Sources */, + EA5E8E6F1D3AA73B3C99473F39C4FF4D /* RaisesException.swift in Sources */, + 3A8AD07A6240BCF821FF670ED4AEA227 /* Requirement.swift in Sources */, + 5031354613E1B45DD616C9428C168A9A /* SatisfyAllOf.swift in Sources */, + E61B94D072E329A90151493C2CBA4FBB /* SatisfyAnyOf.swift in Sources */, + 2DAF34A5F2861544A6F247268044EA97 /* SourceLocation.swift in Sources */, + 0BED3C790949A2E29BB3C56B0C7D0912 /* Stringers.swift in Sources */, + 7531CA08B8E24EDD00485B42BB7DA8FD /* ThrowAssertion.swift in Sources */, + 2708C3D34AD6410DB563CBCA5205D89F /* ThrowError.swift in Sources */, + 1DAF13110AC3B5A462DD10202848DC38 /* ToSucceed.swift in Sources */, + 61FBDD8958A28F726EE3A66795A628AB /* utils.swift in Sources */, + EB498AC2278DE4F7153349E5EDC46FD7 /* XCTestObservationCenter+Register.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 117C3FD66999C297C75A904EC6305A71 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7D788AE341F323351D1ADEE5E65F68F2 /* CwlCatchBadInstructionPosix.swift in Sources */, + 02A19A4480813B8CD5BD418095D21B2B /* CwlPosixPreconditionTesting-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 14593B72CC5AB1953F9390743FA4967E /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 0C0D56E489977C4C3AAC657267CBE490 /* Pods-OSPaymentsLib-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 5E5F58446B6BB384C21151984BD15EAC /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 4C9212B5D4D4ABC7C9245E1260987D5A /* Pods-OSPaymentsLib-OSPaymentsLibTests-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 80BBB390668C21FFCF14D9C64FB46314 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 7DC09E8ED20036275FF7D0A27143F596 /* CwlCatchException.m in Sources */, + EC69AC1DF6EA3752AF91F6FE44840D73 /* CwlCatchExceptionSupport-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 821C75B2AC5F67F724BE057C17A046BB /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 58B391FC2D923A51FADDFE09E01D4324 /* CwlBadInstructionException.swift in Sources */, + 5A28B94D6EE4BE9349685EECB112D7A6 /* CwlCatchBadInstruction.swift in Sources */, + 168E76699C1ADF9D9B8214FD4BB48F44 /* CwlDarwinDefinitions.swift in Sources */, + 50A1759496E2BFBEBD4E4D947BF3EF49 /* CwlPreconditionTesting-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 965BE037A59B9DAE341CD3A0A852BD34 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + D8867B60C823F8B93753E9AAB63CEE9C /* CwlCatchException.swift in Sources */, + 9F65F1675C50F3AEA034A1C7AE105438 /* CwlCatchException-dummy.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + B4881A76BF4D9FDFE30B0F3E471743C2 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 9DD804A47165A7BE0A7ABF60B8A198AE /* CwlMachBadInstructionHandler.m in Sources */, + F3177C284538D6D35D50B39CEFEA3C74 /* CwlMachBadInstructionHandler-dummy.m in Sources */, + 4FF46429ED8253B45C2DBCCA6E85D146 /* mach_excServer.c in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + C2C85E430F73C50F4C46CFD6C177DC82 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + A8743EE43AD09651A91D1C0535590218 /* AsyncBehavior.swift in Sources */, + 30AA415F142E3E5F6E15497D254550E4 /* AsyncDSL.swift in Sources */, + 3E245FE6735FC9C037D4DD30C2EA9C20 /* AsyncExample.swift in Sources */, + 7AE7F1A36F091AC368D7C86B207FFB0E /* AsyncExampleGroup.swift in Sources */, + C5FC81492CFF91B1BAD3417ADF80FC06 /* AsyncExampleHooks.swift in Sources */, + BAC5FAF0CDF05730BEE178C94C61DF24 /* AsyncSpec.swift in Sources */, + A8E7FA7DB26F2CE5AB231F60C8211956 /* AsyncSpec+testMethodSelectors.m in Sources */, + F02BFF95B68F481A59DBBA6B85919333 /* AsyncWorld.swift in Sources */, + FF312523DB23087460148A6AEC0E23B9 /* AsyncWorld+DSL.swift in Sources */, + 3C0E7EFA4D5514BD647146F181F02F32 /* Behavior.swift in Sources */, + FA3851317E698A50769EE23A523A4D28 /* Callsite.swift in Sources */, + 63640E2BAE8AFCD81A8F952297171486 /* Closures.swift in Sources */, + 8370BD520FB666EC353C8F721C3675DB /* CurrentSpec.swift in Sources */, + 6C3DB5E93A27526C2717382FFCFEA7C7 /* DSL.swift in Sources */, + 072CBEE458E411A7386FEA40EDB74F78 /* ErrorUtility.swift in Sources */, + C152028DCCBF496E39ADA0306CE2102E /* Example.swift in Sources */, + ECAD05FDCA266B54D2890FD130312FFE /* ExampleGroup.swift in Sources */, + F773D7DF42F0698A40A005C797FAF3FD /* ExampleHooks.swift in Sources */, + FC7DA1DAD8367E9D82A2E8BA7D96BFBD /* ExampleMetadata.swift in Sources */, + 83464DA07AA59C01E4C5A5D5B736C32E /* Filter.swift in Sources */, + 39FA1995EBCBC081DF2B2353C50ACC4A /* HooksPhase.swift in Sources */, + B77FF9D43361BBF2AA444C2635415459 /* NSBundle+CurrentTestBundle.swift in Sources */, + A4A2FACD0FBF3480F60A4F6CD7248C36 /* QCKConfiguration.swift in Sources */, + 2481095DCDF1162F5FA5AF4E9BDB7463 /* QCKDSL.m in Sources */, + 462F0CA8B3C9AF1257FE0E07BD271087 /* Quick-dummy.m in Sources */, + A5C6D97101B799F260827304A7A0FEB1 /* QuickConfiguration.m in Sources */, + 1CC7BC97342645FD4DFCC8C7A445A364 /* QuickConfiguration.swift in Sources */, + 104E39CF62CF4D1A95389513C6732A3F /* QuickSelectedTestSuiteBuilder.swift in Sources */, + 8082D3FBF990D28DC8051FD6A2C44650 /* QuickSpec.m in Sources */, + 65D65FA4541FC9393C3A50D04583E0B5 /* QuickSpecBase.m in Sources */, + A06102F3D994B4F3EE5F7EF68FEBBD22 /* QuickTestObservation.swift in Sources */, + EB66279A6CD609B89BEC8BCAE4B304A4 /* QuickTestSuite.swift in Sources */, + 2F0EA3496EE6BA0E3A41CC09AE663B97 /* StopTest.swift in Sources */, + E3A03088B7A2305F0C89C83ADB7CA2C1 /* String+C99ExtendedIdentifier.swift in Sources */, + E7559E209C22EEC9084F6C26CE4B5ED1 /* SubclassDetection.swift in Sources */, + 6B5F43788CF310B9DAD46A09B8DCACD2 /* SuiteHooks.swift in Sources */, + 0197623979A778492C933778D80DD791 /* TestSelectorNameProvider.swift in Sources */, + 8153776DC743A3F708498232C91024EB /* TestState.swift in Sources */, + 4C1C46B7FF57E43C3D7037D860510A05 /* URL+FileName.swift in Sources */, + C70974CDB744D70499372A6AD39711E9 /* World.swift in Sources */, + F80622B10127233EA9F85B364DAFE74C /* World+DSL.swift in Sources */, + B0024D71B366915E7FF1A526649F2A4C /* XCTestSuite+QuickTestSuiteBuilder.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXTargetDependency section */ + 1207A805C1AB998DCB5A86249DD94A29 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlPreconditionTesting; + target = E4D853F6FBAB5A9BDBE843E4EFB22EB7 /* CwlPreconditionTesting */; + targetProxy = DEE7A76326A3AC448377CDEA4CDAAE68 /* PBXContainerItemProxy */; + }; + 154D26F063684B9A17EB669FCF288908 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = Nimble; + target = 6F13695E06195A78EA8A95F8C7ED0D2F /* Nimble */; + targetProxy = EE2996B22F196FAF55CA8539865BFF97 /* PBXContainerItemProxy */; + }; + 175A48428BE8BD12F8C7D872E946E8D9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlCatchExceptionSupport; + target = CA3D99499260B4C146BBB22670C1D8AD /* CwlCatchExceptionSupport */; + targetProxy = 680A774DAB6760B2C93AF74888246677 /* PBXContainerItemProxy */; + }; + 23D91AEC5E843AF93CBC858F071D68E4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlCatchException; + target = 308B5C440C446909122081D367A27A8F /* CwlCatchException */; + targetProxy = BDB1986F32302AFBDB2F58B81F2A213D /* PBXContainerItemProxy */; + }; + 3C75D747123C55C1953451CBE31A3853 /* PBXTargetDependency */ = { isa = PBXTargetDependency; name = Quick; target = C82891EAB7293DBEE916B21F57E8474D /* Quick */; - targetProxy = 4316B6F1CCEA7D68B7D07667F9755024 /* PBXContainerItemProxy */; + targetProxy = D37643C36FA2B89036A7873AD2BFA57B /* PBXContainerItemProxy */; + }; + 4F7EC3A2460323E00131B6122BF060F4 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlPosixPreconditionTesting; + target = EB8B23AD889CF5BE4A85CD0D8EF2DF99 /* CwlPosixPreconditionTesting */; + targetProxy = F703D2EE1DF327ED02A370536DED54AB /* PBXContainerItemProxy */; + }; + 53815EC913CDF6F58B52ABF1F13D9522 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlPreconditionTesting; + target = E4D853F6FBAB5A9BDBE843E4EFB22EB7 /* CwlPreconditionTesting */; + targetProxy = B92147CAF60149351DBCDE8A51220C55 /* PBXContainerItemProxy */; + }; + 5DBD1E8D697CC3AAA19FFCAFDA2F7C5C /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlMachBadInstructionHandler; + target = 3BBD87E27EAD36B90D168213ED6DC32C /* CwlMachBadInstructionHandler */; + targetProxy = D802A6F826E2597180B239E1AECD0EC0 /* PBXContainerItemProxy */; + }; + 623DAEB0CDAA927C50E8EFD26BCFF8C9 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlCatchException; + target = 308B5C440C446909122081D367A27A8F /* CwlCatchException */; + targetProxy = A2EA725195BF4DEA0BDF10073FB148C7 /* PBXContainerItemProxy */; + }; + ADDBFB367EB6BAAD288A49AF641A2E43 /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlCatchExceptionSupport; + target = CA3D99499260B4C146BBB22670C1D8AD /* CwlCatchExceptionSupport */; + targetProxy = 6DF229CD1960DF7A69CE57688797DB9D /* PBXContainerItemProxy */; + }; + C39A7CDBC30A8BC906B084B424A3B92B /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlPosixPreconditionTesting; + target = EB8B23AD889CF5BE4A85CD0D8EF2DF99 /* CwlPosixPreconditionTesting */; + targetProxy = 98EA497D27303619F8B18ECC1E663EE7 /* PBXContainerItemProxy */; + }; + F82C29A500BE75FEB54DFE09EB0A643F /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + name = CwlMachBadInstructionHandler; + target = 3BBD87E27EAD36B90D168213ED6DC32C /* CwlMachBadInstructionHandler */; + targetProxy = FE9936BE72A2D9CA0E3D38732DC3AC80 /* PBXContainerItemProxy */; }; /* End PBXTargetDependency section */ /* Begin XCBuildConfiguration section */ - 3B58E15B5CCD60FE4DDAAA765421D182 /* Release */ = { + 0351339B5E77E6CDF4EC7475ED081F94 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = BEB97334DF3B76513D34EB7C70369D82 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */; + baseConfigurationReference = 56EBDC39EB609F54DFA2CDBCE20B63A7 /* CwlPosixPreconditionTesting.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; @@ -909,23 +1599,22 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.modulemap"; + PRODUCT_MODULE_NAME = CwlPosixPreconditionTesting; + PRODUCT_NAME = CwlPosixPreconditionTesting; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -933,33 +1622,70 @@ }; name = Release; }; - 4DA5966C6835A80985E79F8D69CB451A /* Release */ = { + 0691F12D5BEF3F36107FD2A1DFDEDCE8 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 4B5ECB9D7EF3AF7D8F37CE57A988CD83 /* Nimble.release.xcconfig */; + baseConfigurationReference = 64921B170418D2F8EF1C54FBA90FDE02 /* CwlCatchExceptionSupport.debug.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; + MODULEMAP_FILE = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.modulemap"; + PRODUCT_MODULE_NAME = CwlCatchExceptionSupport; + PRODUCT_NAME = CwlCatchExceptionSupport; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 082B7CDF68A00F5C0C3407E83F6F2AB0 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 07B837DB1F58318777C1630726AEA23A /* CwlCatchExceptionSupport.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.modulemap"; + PRODUCT_MODULE_NAME = CwlCatchExceptionSupport; + PRODUCT_NAME = CwlCatchExceptionSupport; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -967,21 +1693,20 @@ }; name = Release; }; - 7B0027D8FD39A07361A916896DFA1F76 /* Debug */ = { + 2058DC873B458090E1A8F1FFAF0E3078 /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = E8FFA1A64F61EB44FC28A4BF3EF8248A /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */; + baseConfigurationReference = B69D8666D871F2F21C4849FB9DC16BDE /* Quick.release.xcconfig */; buildSettings = { - ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; - DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; IPHONEOS_DEPLOYMENT_TARGET = 13.0; LD_RUNPATH_SEARCH_PATHS = ( @@ -989,81 +1714,86 @@ "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap"; - OTHER_LDFLAGS = ""; - OTHER_LIBTOOLFLAGS = ""; - PODS_ROOT = "$(SRCROOT)"; - PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; - PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; SDKROOT = iphoneos; SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; - name = Debug; + name = Release; }; - 7C554CFBE2233E13A020638ABC37ABD7 /* Debug */ = { + 37499306350BFA24B850883D8203694F /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 8270027ACBF7A64C2B453CCBFE155E90 /* Nimble.debug.xcconfig */; + baseConfigurationReference = 3188B641B9C20E4D45A0883C087E57FF /* CwlMachBadInstructionHandler.debug.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; - PRODUCT_MODULE_NAME = Nimble; - PRODUCT_NAME = Nimble; + MODULEMAP_FILE = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.modulemap"; + PRODUCT_MODULE_NAME = CwlMachBadInstructionHandler; + PRODUCT_NAME = CwlMachBadInstructionHandler; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; + SWIFT_VERSION = 5.5; TARGETED_DEVICE_FAMILY = "1,2"; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Debug; }; - 87348FBD840126344754C1FDCFB6020A /* Release */ = { + 37C7B0A916CBAA5FB43BAED43B5B794B /* Release */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 51BA9038051E613E9BCC9972FB613CD3 /* Quick.release.xcconfig */; + baseConfigurationReference = 5AAA74622C8B0B2167156F4EBE359608 /* Pods-OSPaymentsLib.release.xcconfig */; buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; SDKROOT = iphoneos; SKIP_INSTALL = YES; - SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; - SWIFT_VERSION = 5.0; TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; @@ -1071,7 +1801,7 @@ }; name = Release; }; - 8DE5143C03248BB6CD542DE3963D6F3A /* Debug */ = { + 4BC7450F9457737EE3E637BA155B56F7 /* Debug */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -1124,7 +1854,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE; MTL_FAST_MATH = YES; ONLY_ACTIVE_ARCH = YES; @@ -1137,9 +1867,9 @@ }; name = Debug; }; - 902D1415E2FD80576F0BA3C3E6919A89 /* Release */ = { + 4CDD9D0B97E856E52BBAB0E1AE902FA1 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = 5AAA74622C8B0B2167156F4EBE359608 /* Pods-OSPaymentsLib.release.xcconfig */; + baseConfigurationReference = E8FFA1A64F61EB44FC28A4BF3EF8248A /* Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig */; buildSettings = { ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; CLANG_ENABLE_OBJC_WEAK = NO; @@ -1151,16 +1881,16 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist"; + INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); MACH_O_TYPE = staticlib; - MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib.modulemap"; + MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap"; OTHER_LDFLAGS = ""; OTHER_LIBTOOLFLAGS = ""; PODS_ROOT = "$(SRCROOT)"; @@ -1169,13 +1899,226 @@ SDKROOT = iphoneos; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4D776A255D68F25F23C2AE214512D1EF /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DDA26739F6B5A6C3427A79B507B90119 /* CwlPosixPreconditionTesting.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.modulemap"; + PRODUCT_MODULE_NAME = CwlPosixPreconditionTesting; + PRODUCT_NAME = CwlPosixPreconditionTesting; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 4DB56D12BF987A8C42B082B877226600 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = BEB97334DF3B76513D34EB7C70369D82 /* Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig */; + buildSettings = { + ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = NO; + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MACH_O_TYPE = staticlib; + MODULEMAP_FILE = "Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.modulemap"; + OTHER_LDFLAGS = ""; + OTHER_LIBTOOLFLAGS = ""; + PODS_ROOT = "$(SRCROOT)"; + PRODUCT_BUNDLE_IDENTIFIER = "org.cocoapods.${PRODUCT_NAME:rfc1034identifier}"; + PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)"; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 51E603515B3F34E72073BB44FB20A466 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 07D0FF898AFEF00EF5DD10347811C347 /* CwlCatchException.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlCatchException/CwlCatchException-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlCatchException/CwlCatchException-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlCatchException/CwlCatchException.modulemap"; + PRODUCT_MODULE_NAME = CwlCatchException; + PRODUCT_NAME = CwlCatchException; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; VALIDATE_PRODUCT = YES; VERSIONING_SYSTEM = "apple-generic"; VERSION_INFO_PREFIX = ""; }; name = Release; }; - 9E406C6AAF85E580207CD97B0044DEAB /* Release */ = { + 54A311AC1F9C768DFFE69F26F3C49C28 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 0A2CA0650F7537ACE178096CD0C6BA4C /* Nimble.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 747942B5FF697469F064235FBBB1C4BB /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 922E79F3DE744919AE43C09528485E0E /* Quick.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + 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/Quick-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; + PRODUCT_MODULE_NAME = Quick; + PRODUCT_NAME = Quick; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.0; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + 7FC9243B2E60FF32C9FD7791F525D208 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = DB4B81CB588224154E8C15DA7196F9E8 /* CwlPreconditionTesting.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.modulemap"; + PRODUCT_MODULE_NAME = CwlPreconditionTesting; + PRODUCT_NAME = CwlPreconditionTesting; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + 8B5A46FF8D3C1289CDEE3BAFACABCD2A /* Release */ = { isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; @@ -1225,7 +2168,7 @@ GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE; GCC_WARN_UNUSED_FUNCTION = YES; GCC_WARN_UNUSED_VARIABLE = YES; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; MTL_ENABLE_DEBUG_INFO = NO; MTL_FAST_MATH = YES; PRODUCT_NAME = "$(TARGET_NAME)"; @@ -1237,29 +2180,65 @@ }; name = Release; }; - 9FB1D9D883B07F6F30FCD12226177EB3 /* Debug */ = { + 8F99684721AD9684BD82E37C927568E4 /* Debug */ = { isa = XCBuildConfiguration; - baseConfigurationReference = FD89D255CE96F4B06B98FE303E825DDF /* Quick.debug.xcconfig */; + baseConfigurationReference = 12E8A18E971F2D6544B8344097DFB058 /* CwlPreconditionTesting.debug.xcconfig */; buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; - GCC_PREFIX_HEADER = "Target Support Files/Quick/Quick-prefix.pch"; - INFOPLIST_FILE = "Target Support Files/Quick/Quick-Info.plist"; + GCC_PREFIX_HEADER = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 9.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", "@loader_path/Frameworks", ); - MODULEMAP_FILE = "Target Support Files/Quick/Quick.modulemap"; - PRODUCT_MODULE_NAME = Quick; - PRODUCT_NAME = Quick; + MODULEMAP_FILE = "Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.modulemap"; + PRODUCT_MODULE_NAME = CwlPreconditionTesting; + PRODUCT_NAME = CwlPreconditionTesting; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + A5D3D1A457C9E59A085F9F267E2EDCD0 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 9609CBE74715F4BDFAC30EDDF6960A47 /* Nimble.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/Nimble/Nimble-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/Nimble/Nimble-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 13.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/Nimble/Nimble.modulemap"; + PRODUCT_MODULE_NAME = Nimble; + PRODUCT_NAME = Nimble; SDKROOT = iphoneos; SKIP_INSTALL = YES; SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; @@ -1270,7 +2249,78 @@ }; name = Debug; }; - D5A420976E9B94BCDCFB5C49F7536549 /* Debug */ = { + B9FA3C9F2C2EF8117A899F82B7D06E44 /* Debug */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 7FAF6F207E838D5D5C9B10D229774CCD /* CwlCatchException.debug.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlCatchException/CwlCatchException-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlCatchException/CwlCatchException-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlCatchException/CwlCatchException.modulemap"; + PRODUCT_MODULE_NAME = CwlCatchException; + PRODUCT_NAME = CwlCatchException; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Debug; + }; + BF989A342387266177AA99C98AD84D95 /* Release */ = { + isa = XCBuildConfiguration; + baseConfigurationReference = 40163553F5FC158BA38AC8108AC7F62B /* CwlMachBadInstructionHandler.release.xcconfig */; + buildSettings = { + CLANG_ENABLE_OBJC_WEAK = NO; + "CODE_SIGN_IDENTITY[sdk=appletvos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = ""; + "CODE_SIGN_IDENTITY[sdk=watchos*]" = ""; + CURRENT_PROJECT_VERSION = 1; + DEFINES_MODULE = YES; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + DYLIB_INSTALL_NAME_BASE = "@rpath"; + GCC_PREFIX_HEADER = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-prefix.pch"; + INFOPLIST_FILE = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-Info.plist"; + INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + LD_RUNPATH_SEARCH_PATHS = ( + "$(inherited)", + "@executable_path/Frameworks", + "@loader_path/Frameworks", + ); + MODULEMAP_FILE = "Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.modulemap"; + PRODUCT_MODULE_NAME = CwlMachBadInstructionHandler; + PRODUCT_NAME = CwlMachBadInstructionHandler; + SDKROOT = iphoneos; + SKIP_INSTALL = YES; + SWIFT_ACTIVE_COMPILATION_CONDITIONS = "$(inherited) "; + SWIFT_VERSION = 5.5; + TARGETED_DEVICE_FAMILY = "1,2"; + VALIDATE_PRODUCT = YES; + VERSIONING_SYSTEM = "apple-generic"; + VERSION_INFO_PREFIX = ""; + }; + name = Release; + }; + D631A53F962A080D5EBF24F1E29C0DE4 /* Debug */ = { isa = XCBuildConfiguration; baseConfigurationReference = 4C157CC35B7ABF301C81384661B151DC /* Pods-OSPaymentsLib.debug.xcconfig */; buildSettings = { @@ -1286,7 +2336,7 @@ DYLIB_INSTALL_NAME_BASE = "@rpath"; INFOPLIST_FILE = "Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist"; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 13.0; + IPHONEOS_DEPLOYMENT_TARGET = 14.0; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", "@executable_path/Frameworks", @@ -1310,29 +2360,29 @@ /* End XCBuildConfiguration section */ /* Begin XCConfigurationList section */ - 00C17C5870BF07DC0D42D38500DDDB88 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib-OSPaymentsLibTests" */ = { + 0B24FD4C46092DD465F3CEBD6FADA0B5 /* Build configuration list for PBXNativeTarget "CwlCatchException" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7B0027D8FD39A07361A916896DFA1F76 /* Debug */, - 3B58E15B5CCD60FE4DDAAA765421D182 /* Release */, + B9FA3C9F2C2EF8117A899F82B7D06E44 /* Debug */, + 51E603515B3F34E72073BB44FB20A466 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 1D467AF12BCFD8263C61085D135659C3 /* Build configuration list for PBXNativeTarget "Quick" */ = { + 2EC9DC26A2B2F522D07CE5FE7D1EF6F5 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib" */ = { isa = XCConfigurationList; buildConfigurations = ( - 9FB1D9D883B07F6F30FCD12226177EB3 /* Debug */, - 87348FBD840126344754C1FDCFB6020A /* Release */, + D631A53F962A080D5EBF24F1E29C0DE4 /* Debug */, + 37C7B0A916CBAA5FB43BAED43B5B794B /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 2EC9DC26A2B2F522D07CE5FE7D1EF6F5 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib" */ = { + 42B2059A767BF03B41073C49BC67735A /* Build configuration list for PBXNativeTarget "CwlPosixPreconditionTesting" */ = { isa = XCConfigurationList; buildConfigurations = ( - D5A420976E9B94BCDCFB5C49F7536549 /* Debug */, - 902D1415E2FD80576F0BA3C3E6919A89 /* Release */, + 4D776A255D68F25F23C2AE214512D1EF /* Debug */, + 0351339B5E77E6CDF4EC7475ED081F94 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; @@ -1340,17 +2390,62 @@ 4821239608C13582E20E6DA73FD5F1F9 /* Build configuration list for PBXProject "Pods" */ = { isa = XCConfigurationList; buildConfigurations = ( - 8DE5143C03248BB6CD542DE3963D6F3A /* Debug */, - 9E406C6AAF85E580207CD97B0044DEAB /* Release */, + 4BC7450F9457737EE3E637BA155B56F7 /* Debug */, + 8B5A46FF8D3C1289CDEE3BAFACABCD2A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 5533DBFB87FB69A0B48E4B16BDF17721 /* Build configuration list for PBXNativeTarget "Pods-OSPaymentsLib-OSPaymentsLibTests" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 4CDD9D0B97E856E52BBAB0E1AE902FA1 /* Debug */, + 4DB56D12BF987A8C42B082B877226600 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 626E614C7AB779319725A927E8061F7D /* Build configuration list for PBXNativeTarget "CwlCatchExceptionSupport" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 0691F12D5BEF3F36107FD2A1DFDEDCE8 /* Debug */, + 082B7CDF68A00F5C0C3407E83F6F2AB0 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 9F679600745075134FBDCA8EB0FACB15 /* Build configuration list for PBXNativeTarget "CwlMachBadInstructionHandler" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 37499306350BFA24B850883D8203694F /* Debug */, + BF989A342387266177AA99C98AD84D95 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + B8921DB3FB146EFAE5814E112153F87C /* Build configuration list for PBXNativeTarget "Nimble" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + A5D3D1A457C9E59A085F9F267E2EDCD0 /* Debug */, + 54A311AC1F9C768DFFE69F26F3C49C28 /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + BBA2CF64B702765C105515A5F22180CF /* Build configuration list for PBXNativeTarget "CwlPreconditionTesting" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 8F99684721AD9684BD82E37C927568E4 /* Debug */, + 7FC9243B2E60FF32C9FD7791F525D208 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; }; - 84E3C08133057626870418A290649C7E /* Build configuration list for PBXNativeTarget "Nimble" */ = { + DAD01693EC221F6D6CD576D139164CDD /* Build configuration list for PBXNativeTarget "Quick" */ = { isa = XCConfigurationList; buildConfigurations = ( - 7C554CFBE2233E13A020638ABC37ABD7 /* Debug */, - 4DA5966C6835A80985E79F8D69CB451A /* Release */, + 747942B5FF697469F064235FBBB1C4BB /* Debug */, + 2058DC873B458090E1A8F1FFAF0E3078 /* Release */, ); defaultConfigurationIsVisible = 0; defaultConfigurationName = Release; diff --git a/Pods/Quick/README.md b/Pods/Quick/README.md index 98dbdec..af35f20 100644 --- a/Pods/Quick/README.md +++ b/Pods/Quick/README.md @@ -17,7 +17,7 @@ import Quick import Nimble class TableOfContentsSpec: QuickSpec { - override func spec() { + override class func spec() { describe("the 'Documentation' directory") { it("has everything you need to get started") { let sections = Directory("Documentation").sections @@ -51,7 +51,7 @@ Certain versions of Quick and Nimble only support certain versions of Swift. Dep ## 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: +All documentation can be found in the [Documentation folder](./Documentation), including [detailed installation instructions](./Documentation/en-us/InstallingQuick.md) for CocoaPods, Carthage, Git submodules, Swift Package Manager, and more. For example, you can install Quick and [Nimble](https://github.com/Quick/Nimble) using CocoaPods by adding the following to your `Podfile`: ```rb # Podfile @@ -61,10 +61,8 @@ use_frameworks! target "MyApp" do # Normal libraries - abstract_target 'Tests' do + target 'MyApp_Tests' do inherit! :search_paths - target "MyAppTests" - target "MyAppUITests" pod 'Quick' pod 'Nimble' @@ -72,6 +70,15 @@ target "MyApp" do end ``` +You can also install Quick and Nimble using Swift Package Manager by adding the following to the dependencies section your `Package.swift`: + +```swift +dependencies: [ + .package(url: "https://github.com/Quick/Quick.git", from: "7.0.0"), + .package(url: "https://github.com/Quick/Nimble.git", from: "12.0.0"), +], +``` + ## Projects using Quick 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. @@ -84,6 +91,12 @@ Similar to projects using Quick, it would be nice to hear why people use Quick a Have something positive to say about Quick (or Nimble)? If yes, [provide a testimonial here](https://github.com/Quick/Quick/wiki/Who-uses-Quick). +## Privacy Statement + +Quick is a library that is only used for testing and should never be included in the binary submitted to App Store Connect. +Your app will be rejected if you do include Quick in the submitted binary because Quick uses private APIs to better integrate with Xcode. + +Despite not being shipped to Apple, Quick does not and will never collect any kind of analytics or tracking. ## License diff --git a/Pods/Quick/Sources/Quick/Async/AsyncBehavior.swift b/Pods/Quick/Sources/Quick/Async/AsyncBehavior.swift new file mode 100644 index 0000000..6b72945 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Async/AsyncBehavior.swift @@ -0,0 +1,19 @@ +/// A `Behavior` encapsulates a set of examples that can be re-used in several locations using the `itBehavesLike` +/// function with a context instance of the generic type. +open class AsyncBehavior { + + /** + Override this variable if you want to provide custom name for this example group. + */ + open class var name: String { return String(describing: self) } + + /** + Override this method in your behavior to define a set of reusable examples. + + This behaves just like an example group defines using `describe` or `context`--it may contain any number of `beforeEach` + and `afterEach` closures, as well as any number of examples (defined using `it`). + + - parameter aContext: A closure that, when evaluated, returns a `Context` instance that provide the information on the subject. + */ + open class func spec(_ aContext: @escaping () -> Context) {} +} diff --git a/Pods/Quick/Sources/Quick/Async/AsyncExampleGroup.swift b/Pods/Quick/Sources/Quick/Async/AsyncExampleGroup.swift new file mode 100644 index 0000000..122c05b --- /dev/null +++ b/Pods/Quick/Sources/Quick/Async/AsyncExampleGroup.swift @@ -0,0 +1,112 @@ +import Foundation + +private enum ExampleUnit { + case example(AsyncExample) + case group(AsyncExampleGroup) +} + +/** + Example groups are logical groupings of examples, defined with + the `describe` and `context` functions. Example groups can share + setup and teardown code. +*/ +final public class AsyncExampleGroup: CustomStringConvertible { + weak internal var parent: AsyncExampleGroup? + internal let hooks = AsyncExampleHooks() + + internal var phase: HooksPhase = .nothingExecuted + + private let internalDescription: String + private let flags: FilterFlags + private let isInternalRootExampleGroup: Bool + private var childUnits = [ExampleUnit]() + + internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { + self.internalDescription = description + self.flags = flags + self.isInternalRootExampleGroup = isInternalRootExampleGroup + } + + public var description: String { + return internalDescription + } + + /** + Returns a list of examples that belong to this example group, + or to any of its descendant example groups. + */ + public var examples: [AsyncExample] { + childUnits.flatMap { unit in + switch unit { + case .example(let example): + return [example] + case .group(let exampleGroup): + return exampleGroup.examples + } + } + } + + internal var name: String? { + 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 in + for (key, value) in group.flags { + aggregateFlags[key] = value + } + } + return aggregateFlags + } + + internal var justBeforeEachStatements: [AroundExampleWithMetadataAsyncClosure] { + var closures = Array(hooks.justBeforeEachStatements.reversed()) + walkUp { group in + closures.append(contentsOf: group.hooks.justBeforeEachStatements.reversed()) + } + return closures + } + + internal var wrappers: [AroundExampleWithMetadataAsyncClosure] { + var closures = Array(hooks.wrappers.reversed()) + walkUp { group in + closures.append(contentsOf: group.hooks.wrappers.reversed()) + } + return closures + } + + internal func walkDownExamples(_ callback: (_ example: AsyncExample) -> Void) { + for unit in childUnits { + switch unit { + case .example(let example): + callback(example) + case .group(let exampleGroup): + exampleGroup.walkDownExamples(callback) + } + } + } + + internal func appendExampleGroup(_ group: AsyncExampleGroup) { + group.parent = self + childUnits.append(.group(group)) + } + + internal func appendExample(_ example: AsyncExample) { + example.group = self + childUnits.append(.example(example)) + } + + private func walkUp(_ callback: (_ group: AsyncExampleGroup) -> Void) { + var group = self + while let parent = group.parent { + callback(parent) + group = parent + } + } +} diff --git a/Pods/Quick/Sources/Quick/Async/AsyncSpec.swift b/Pods/Quick/Sources/Quick/Async/AsyncSpec.swift new file mode 100644 index 0000000..1f61399 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Async/AsyncSpec.swift @@ -0,0 +1,152 @@ +import XCTest + +#if canImport(QuickObjCRuntime) +import QuickObjCRuntime + +public typealias AsyncSpecBase = _QuickSpecBase +#else +public typealias AsyncSpecBase = XCTestCase +#endif + +open class AsyncSpec: AsyncSpecBase { + /// Returns the currently executing spec. Use in specs that require XCTestCase + /// methods, e.g. expectation(description:). + /// + /// If you're using `beforeSuite`/`afterSuite`, you should consider the ``currentSpec()`` helper. + public private(set) static var current: AsyncSpec! + + private var example: AsyncExample? { + didSet { + AsyncSpec.current = self + } + } + + open class func spec() {} + +#if canImport(Darwin) + /// This method is used as a hook for the following two purposes + /// + /// 1. Performing all configurations + /// 2. Gathering examples for each spec classes + /// + /// On Linux, those are done in `LinuxMain.swift` and `Quick.QCKMain`. But + /// SwiftPM on macOS does not have the mechanism (test cases are automatically + /// discovered powered by Objective-C runtime), so we needed the alternative + /// way. + override open class var defaultTestSuite: XCTestSuite { + QuickConfiguration.configureSubclassesIfNeeded(world: World.sharedWorld) + + // Let's gather examples for each spec classes. This has the same effect + // as listing spec classes in `LinuxMain.swift` on Linux. + gatherExamplesIfNeeded() + + return super.defaultTestSuite + } + + @objc + class func buildExamplesIfNeeded() { + gatherExamplesIfNeeded() + } + + /// This method is used as a hook for injecting test methods into the + /// Objective-C runtime on individual test runs. + /// + /// When `xctest` runs a test on a single method, it does not call + /// `defaultTestSuite` on the test class but rather calls + /// `instancesRespondToSelector:` to build its own suite. + /// + /// In normal conditions, Quick uses the implicit call to `defaultTestSuite` + /// to both generate examples and inject them as methods by way of + /// `testInvocations`. Under single test conditions, there's no implicit + /// call to `defaultTestSuite` so we make it explicitly here. + open override class func instancesRespond(to aSelector: Selector!) -> Bool { + _ = self.defaultTestSuite + return super.instancesRespond(to: aSelector) + } + +#if SWIFT_PACKAGE + open override class func _qck_testMethodSelectors() -> [String]! { + darwinXCTestMethodSelectors() + } +#endif // SWIFT_PACKAGE + + @objc + internal class func darwinXCTestMethodSelectors() -> [String]! { + let examples = AsyncWorld.sharedWorld.examples(forSpecClass: self) + + var selectorNames = Set() + return examples.map { test in + let selector = addInstanceMethod(for: test.example, runFullTest: test.runFullTest, classSelectorNames: &selectorNames) + return NSStringFromSelector(selector) + } + } + + private static func addInstanceMethod(for example: AsyncExample, runFullTest: Bool, classSelectorNames selectorNames: inout Set) -> Selector { + let block: @convention(block) (AsyncSpec, @escaping () -> Void) -> Void = { spec, completionHandler in + Task { + spec.example = example + if runFullTest { + await example.run() + } else { + await example.runSkippedTest() + } + AsyncSpec.current = nil + completionHandler() + } + } + let implementation = imp_implementationWithBlock(block as Any) + + let selectorName = TestSelectorNameProvider.testSelectorName(forAsync: example, classSelectorNames: selectorNames) + + selectorNames.insert(selectorName) + + let selector = NSSelectorFromString(selectorName) + class_addMethod(self, selector, implementation, "v@:@?") + + return selector + } +#endif // canImport(Darwin) + +#if !canImport(Darwin) + public required init() { + super.init(name: "", testClosure: { _ in }) + } + + public required init(name: String, testClosure: @escaping (XCTestCase) throws -> Swift.Void) { + super.init(name: name, testClosure: testClosure) + } + + public class var allTests: [(String, (AsyncSpec) -> () throws -> Void)] { + gatherExamplesIfNeeded() + + let tests = AsyncWorld.sharedWorld.examples(forSpecClass: self) + + let result = tests.map { (example, runFullTest) -> (String, (AsyncSpec) -> () throws -> Void) in + return (example.name, asyncTest { spec in + return { + spec.example = example + if runFullTest { + await example.run() + } else { + await example.runSkippedTest() + } + AsyncSpec.current = nil + } + }) + } + return result + } +#endif // !canImport(Darwin) + + internal static func gatherExamplesIfNeeded() { + let world = AsyncWorld.sharedWorld + let rootExampleGroup = world.rootExampleGroup(forSpecClass: self) + guard rootExampleGroup.examples.isEmpty else { + return + } + + world.performWithCurrentExampleGroup(rootExampleGroup) { + self.spec() + } + } +} diff --git a/Pods/Quick/Sources/Quick/Async/AsyncWorld.swift b/Pods/Quick/Sources/Quick/Async/AsyncWorld.swift new file mode 100644 index 0000000..b3ba644 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Async/AsyncWorld.swift @@ -0,0 +1,233 @@ +import Foundation + +/** + A collection of state Quick builds up in order to work its magic. + + AsyncWorld is primarily responsible for maintaining a mapping of AsyncSpec + classes to root example groups for those classes. + + AsyncWorld is the equivalent of World for AsyncSpec. + + It also maintains a mapping of shared example names to shared + example closures. + + You may configure how Quick behaves by calling the `AsyncWorld.configure(_:)` + method from within an overridden `class QuickConfiguration.configure(_:)` method. +*/ +final internal class AsyncWorld: _WorldBase { + /** + The example group that is currently being run. + The DSL requires that this group is correctly set in order to build a + correct hierarchy of example groups and their examples. + */ + internal var currentExampleGroup: AsyncExampleGroup! + + /** + The example metadata of the test that is currently being run. + This is useful for using the Quick test metadata (like its name) at + runtime. + */ + + internal var currentExampleMetadata: AsyncExampleMetadata? + + internal var numberOfAsyncExamplesRun = 0 + + /** + A flag that indicates whether additional test suites are being run + within this test suite. This is only true within the context of Quick + functional tests. + */ + internal var isRunningAdditionalSuites = false + + private var specs: [String: AsyncExampleGroup] = [:] + private let configuration = QCKConfiguration() + + internal private(set) var isConfigurationFinalized = false + + internal var exampleHooks: AsyncExampleHooks { return World.sharedWorld.asyncExampleHooks } + internal var suiteHooks: SuiteHooks { return World.sharedWorld.suiteHooks } + + // MARK: Singleton Constructor + + private override init() {} + + static private(set) var sharedWorld = AsyncWorld() + + internal static func anotherWorld(block: (AsyncWorld) -> T) -> T { + let previous = sharedWorld + defer { sharedWorld = previous } + return World.anotherWorld { _ in + let newWorld = AsyncWorld() + sharedWorld = newWorld + return block(newWorld) + } + } + + // MARK: Public Interface + + /** + Exposes the World's QCKConfiguration object within the scope of the closure + so that it may be configured. This method must not be called outside of + an overridden `class QuickConfiguration.configure(_:)` method. + + - parameter closure: A closure that takes a Configuration object that can + be mutated to change Quick's behavior. + */ + internal func configure(_ closure: QuickConfigurer) { + assert( + !isConfigurationFinalized, + // swiftlint:disable:next line_length + "Quick cannot be configured outside of a `class QuickConfiguration.configure(_:)` method. You should not call `AsyncWorld.configure(_:)` directly. Instead, subclass QuickConfiguration and override the `class QuickConfiguration.configure(_:)` method." + ) + closure(configuration) + } + + /** + Finalizes the World's configuration. + Any subsequent calls to World.configure() will raise. + */ + internal func finalizeConfiguration() { + isConfigurationFinalized = true + } + + /** + Returns `true` if the root example group for the given spec class has been already initialized. + + - parameter specClass: The QuickSpec class for which is checked for the existing root example group. + - returns: Whether the root example group for the given spec class has been already initialized or not. + */ + internal func isRootExampleGroupInitialized(forSpecClass specClass: AsyncSpec.Type) -> Bool { + let name = String(describing: specClass) + return specs.keys.contains(name) + } + + /** + Returns an internally constructed root example group for the given + AsyncSpec class. + + A root example group with the description "root example group" is lazily + initialized for each AsyncSpec class. This root example group wraps the + top level of a `class AsyncSpec.spec()` method--it's thanks to this group that + users can define beforeEach and it closures at the top level, like so: + + override class func spec() { + // These belong to the root example group + beforeEach {} + it("is at the top level") {} + } + + - parameter specClass: The AsyncSpec class for which to retrieve the root example group. + - returns: The root example group for the class. + */ + internal func rootExampleGroup(forSpecClass specClass: AsyncSpec.Type) -> AsyncExampleGroup { + let name = String(describing: specClass) + + if let group = specs[name] { + return group + } else { + let group = AsyncExampleGroup( + description: "root example group", + flags: [:], + isInternalRootExampleGroup: true + ) + specs[name] = group + return group + } + } + + /** + Returns all examples that should be run for a given spec class. + There are two filtering passes that occur when determining which examples should be run. + That is, these examples are the ones that are included by inclusion filters, and are + not excluded by exclusion filters. + + - parameter specClass: The AsyncSpec subclass for which examples are to be returned. + - returns: A list of examples to be run as test invocations. + */ + internal func examples(forSpecClass specClass: AsyncSpec.Type) -> [(example: AsyncExample, runFullTest: Bool)] { + // 1. Grab all included examples. + let included = includedExamples() + // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. + let spec = rootExampleGroup(forSpecClass: specClass).examples.map { example in + return ( + example: example, + runFullTest: included.first(where: { $0.example == example})?.runFullTest ?? true + ) + } + // 3. Remove all excluded examples. + return spec.map { test in + return ( + test.example, + test.runFullTest && !self.configuration.exclusionFilters.contains { $0(test.example) } + ) + } + } + + // MARK: Internal + + internal var includedExampleCount: Int { + return includedExamples().count + } + + internal lazy var cachedIncludedExampleCount: Int = self.includedExampleCount + + internal var beforesCurrentlyExecuting: Bool { + let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting + let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting + var groupBeforesExecuting = false + if let runningExampleGroup = currentExampleMetadata?.group { + groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting + } + + return suiteBeforesExecuting || exampleBeforesExecuting || groupBeforesExecuting + } + + internal var aftersCurrentlyExecuting: Bool { + let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting + let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting + var groupAftersExecuting = false + if let runningExampleGroup = currentExampleMetadata?.group { + groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting + } + + return suiteAftersExecuting || exampleAftersExecuting || groupAftersExecuting + } + + internal func performWithCurrentExampleGroup(_ group: AsyncExampleGroup, closure: () -> Void) { + let previousExampleGroup = currentExampleGroup + currentExampleGroup = group + + closure() + + currentExampleGroup = previousExampleGroup + } + + private func allExamples() -> [AsyncExample] { + var all: [AsyncExample] = [] + for (_, group) in specs { + group.walkDownExamples { all.append($0) } + } + return all + } + + internal func hasFocusedExamples() -> Bool { + return allExamples().contains { example in + return self.configuration.inclusionFilters.contains { $0(example) } + } + } + + private func includedExamples() -> [(example: AsyncExample, runFullTest: Bool)] { + let all = allExamples() + let hasFocusedExamples = self.hasFocusedExamples() || World.sharedWorld.hasFocusedExamples() + + if !hasFocusedExamples && configuration.runAllWhenEverythingFiltered { + return all.map { example in + return (example, !self.configuration.exclusionFilters.contains { $0(example) }) + } + } else { + return all.map { example in + return (example, self.configuration.inclusionFilters.contains { $0(example) }) + } + } + } +} diff --git a/Pods/Quick/Sources/Quick/Callsite.swift b/Pods/Quick/Sources/Quick/Callsite.swift index 33e732c..502a9d5 100644 --- a/Pods/Quick/Sources/Quick/Callsite.swift +++ b/Pods/Quick/Sources/Quick/Callsite.swift @@ -14,7 +14,7 @@ public class _CallsiteBase: NSObject {} // stdlib, and because recent versions of the XCTest overlay require `StaticString` // when calling `XCTFail`. Under the Objective-C runtime (i.e. building on macOS), we // have to use `String` instead because StaticString can't be generated from Objective-C -#if SWIFT_PACKAGE +#if !canImport(Darwin) public typealias FileString = StaticString #else public typealias FileString = String diff --git a/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift b/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift index 35735a2..01de905 100644 --- a/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift +++ b/Pods/Quick/Sources/Quick/Configuration/QCKConfiguration.swift @@ -10,7 +10,7 @@ public typealias QuickConfigurer = (_ configuration: QCKConfiguration) -> Void A closure that, given metadata about an example, returns a boolean value indicating whether that example should be run. */ -public typealias ExampleFilter = (_ example: Example) -> Bool +public typealias ExampleFilter = (_ example: ExampleBase) -> Bool /** A configuration encapsulates various options you can use @@ -18,6 +18,7 @@ public typealias ExampleFilter = (_ example: Example) -> Bool */ final public class QCKConfiguration: NSObject { internal let exampleHooks = ExampleHooks() + internal let asyncExampleHooks = AsyncExampleHooks() internal let suiteHooks = SuiteHooks() internal var exclusionFilters: [ExampleFilter] = [ { example in // swiftlint:disable:this opening_brace @@ -75,15 +76,37 @@ final public class QCKConfiguration: NSObject { Identical to Quick.QCKConfiguration.beforeEach, except the closure is provided with metadata on the example that the closure is being run prior to. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ #if canImport(Darwin) @objc(beforeEachWithMetadata:) + public func objc_beforeEach(_ closure: @escaping BeforeExampleWithMetadataNonThrowingClosure) { + exampleHooks.appendBefore(closure) + asyncExampleHooks.appendBefore { exampleMetadata in + await MainActor.run { + closure(exampleMetadata) + } + } + } + + @nonobjc public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) + asyncExampleHooks.appendBefore { exampleMetadata in + try await MainActor.run { + try closure(exampleMetadata) + } + } } #else public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { exampleHooks.appendBefore(closure) + asyncExampleHooks.appendBefore { exampleMetadata in + try await MainActor.run { + try closure(exampleMetadata) + } + } } #endif @@ -103,24 +126,51 @@ final public class QCKConfiguration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ public func beforeEach(_ closure: @escaping BeforeExampleClosure) { exampleHooks.appendBefore(closure) + asyncExampleHooks.appendBefore { @MainActor in + try closure() + } } /** Identical to Quick.QCKConfiguration.afterEach, except the closure is provided with metadata on the example that the closure is being run after. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ #if canImport(Darwin) @objc(afterEachWithMetadata:) + public func objc_afterEach(_ closure: @escaping AfterExampleWithMetadataNonThrowingClosure) { + exampleHooks.appendAfter(closure) + asyncExampleHooks.appendAfter { exampleMetadata in + await MainActor.run { + closure(exampleMetadata) + } + } + } + + @nonobjc public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) + asyncExampleHooks.appendAfter { exampleMetadata in + try await MainActor.run { + try closure(exampleMetadata) + } + } } #else public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { exampleHooks.appendAfter(closure) + asyncExampleHooks.appendAfter { exampleMetadata in + try await MainActor.run { + try closure(exampleMetadata) + } + } } #endif @@ -140,9 +190,14 @@ final public class QCKConfiguration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ public func afterEach(_ closure: @escaping AfterExampleClosure) { exampleHooks.appendAfter(closure) + asyncExampleHooks.appendAfter { @MainActor in + try closure() + } } /** @@ -161,23 +216,70 @@ final public class QCKConfiguration: NSObject { - parameter closure: The closure to be executed before each example in the test suite. + + - warning: Unlike ``beforeEach`` and ``afterEach``, aroundEach does not automatically bridge between async and sync expectations. + + - SeeAlso: ``aroundEach(_:)-6ptvt`` for the async version. */ public func aroundEach(_ closure: @escaping AroundExampleClosure) { exampleHooks.appendAround(closure) } /** - Identical to Quick.QCKConfiguration.aroundEach, except the closure receives + Like Quick.DSL.aroundEach, this configures Quick to wrap each example + with the given closure. The closure passed to this method will wrap + all examples globally across the test suite. You may call this method + multiple times across multiple +[QuickConfigure configure:] methods in + order to define several closures to wrap all examples. + + Note that, since Quick makes no guarantee as to the order in which + +[QuickConfiguration configure:] methods are evaluated, there is no + guarantee as to the order in which aroundEach closures are evaluated. + However, aroundEach does always guarantee proper nesting of operations: + cleanup within aroundEach closures will always happen in the reverse order + of setup. + + - parameter closure: The closure to be executed before each example + in the test suite. + + - warning: Unlike ``beforeEach`` and ``afterEach``, aroundEach does not automatically bridge between async and sync expectations. + + - SeeAlso: ``aroundEach(_:)-5z8vj`` for the sync version. + */ + public func aroundEach(_ closure: @escaping AroundExampleAsyncClosure) { + asyncExampleHooks.appendAround(closure) + } + + /** + Identical to ``aroundEach(_:)-5z8vj``, except the closure receives metadata about the example that the closure wraps. + + - warning: Unlike ``beforeEach`` and ``afterEach``, aroundEach does not automatically bridge between async and sync expectations. + + - SeeAlso: ``aroundEach(_:)-2xmgx`` for the async version. */ public func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { exampleHooks.appendAround(closure) } + /** + Identical to ``aroundEach(_:)-6ptvt``, except the closure receives + metadata about the example that the closure wraps. + + - warning: Unlike ``beforeEach`` and ``afterEach``, aroundEach does not automatically bridge between async and sync expectations. + + - SeeAlso: ``aroundEach(_:)-2xmgx`` for the sync version. + */ + public func aroundEach(_ closure: @escaping AroundExampleWithMetadataAsyncClosure) { + asyncExampleHooks.appendAround(closure) + } + /** Like Quick.DSL.beforeSuite, this configures Quick to execute the given closure prior to any and all examples that are run. The two methods are functionally equivalent. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) @@ -187,6 +289,8 @@ final public class QCKConfiguration: NSObject { Like Quick.DSL.afterSuite, this configures Quick to execute the given closure after all examples have been run. The two methods are functionally equivalent. + + - Important: This automatically bridges between async and sync specs. When running on AsyncSpecs, this closure will run on the main actor. */ public func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) diff --git a/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift b/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift index 6cc4481..a1e879e 100644 --- a/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift +++ b/Pods/Quick/Sources/Quick/Configuration/QuickConfiguration.swift @@ -3,51 +3,35 @@ import XCTest #if SWIFT_PACKAGE +/** + Subclass QuickConfiguration and override the `configure(_:)` class + method in order to configure how Quick behaves when running specs, or to define + shared examples that are used across spec files. + */ open class QuickConfiguration: NSObject { + /** + This method is executed on each subclass of this class before Quick runs + any examples. You may override this method on as many subclasses as you like, but + there is no guarantee as to the order in which these methods are executed. + + You can override this method in order to: + + 1. Configure how Quick behaves, by modifying properties on the Configuration object. + Setting the same properties in several methods has undefined behavior. + + 2. Define shared examples using `sharedExamples`. + + - Parameter configuration: A mutable object that is used to configure how Quick behaves on + a framework level. For details on all the options, see the + documentation in QCKConfiguration.swift. + */ open class func configure(_ configuration: QCKConfiguration) {} } #endif extension QuickConfiguration { - #if !canImport(Darwin) private static var configurationSubclasses: [QuickConfiguration.Type] = [] - #endif - - /// Finds all direct subclasses of QuickConfiguration and passes them to the block provided. - /// The classes are iterated over in the order that objc_getClassList returns them. - /// - /// - parameter block: A block that takes a QuickConfiguration.Type. - /// This block will be executed once for each subclass of QuickConfiguration. - private static func enumerateSubclasses(_ block: (QuickConfiguration.Type) -> Void) { - #if canImport(Darwin) - let classesCount = objc_getClassList(nil, 0) - - guard classesCount > 0 else { - return - } - - let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) - defer { free(classes) } - - let autoreleasingClasses = AutoreleasingUnsafeMutablePointer(classes) - objc_getClassList(autoreleasingClasses, classesCount) - - var configurationSubclasses: [QuickConfiguration.Type] = [] - for index in 0.. XCTestCase? { + QuickSpec.current ?? AsyncSpec.current +} diff --git a/Pods/Quick/Sources/Quick/DSL/AsyncDSL.swift b/Pods/Quick/Sources/Quick/DSL/AsyncDSL.swift new file mode 100644 index 0000000..6f18fa5 --- /dev/null +++ b/Pods/Quick/Sources/Quick/DSL/AsyncDSL.swift @@ -0,0 +1,271 @@ +// swiftlint:disable line_length + +/// A protocol for defining the synchronous DSL usable from Quick synchronous specs. +public protocol AsyncDSLUser {} + +extension AsyncSpec: AsyncDSLUser {} +extension AsyncBehavior: AsyncDSLUser {} + +extension AsyncDSLUser { + // MARK: - beforeSuite + /** + Defines a closure to be run prior to any examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before the first example is run, this closure + will not be executed. + + beforeSuite intentionally does not allow async methods to be called. This is to ensure that in a mixed synchronous & asynchronous environment, beforeSuite hooks are truly called before any tests in the the suite run. + + - parameter closure: The closure to be run prior to any examples in the test suite. + */ + public static func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { + World.sharedWorld.beforeSuite(closure) + } + + // MARK: - afterSuite + /** + Defines a closure to be run after all of the examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before all examples are run, this closure + will not be executed. + + afterSuite intentionally does not allow async methods to be called. This is to ensure that in a mixed synchronous & asynchronous environment, beforeSuite hooks are truly called after all tests in the the suite have run. + + - parameter closure: The closure to be run after all of the examples in the test suite. + */ + public static func afterSuite(_ closure: @escaping AfterSuiteClosure) { + World.sharedWorld.afterSuite(closure) + } + + // MARK: - Example groups + /** + Defines an example group. Example groups are logical groupings of examples. + Example groups can share setup and teardown code. + + - parameter description: An arbitrary string describing the example group. + - parameter closure: A closure that can contain other examples. + */ + public static func describe(_ description: String, closure: () -> Void) { + AsyncWorld.sharedWorld.describe(description, closure: closure) + } + + /** + Defines an example group. Equivalent to `describe`. + */ + public static func context(_ description: String, closure: () -> Void) { + AsyncWorld.sharedWorld.context(description, closure: closure) + } + + // MARK: - beforeEach + /** + Defines a closure to be run prior to each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of beforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run prior to each example. + */ + public static func beforeEach(_ closure: @escaping BeforeExampleAsyncClosure) { + AsyncWorld.sharedWorld.beforeEach(closure) + } + + /** + Identical to Quick.DSL.beforeEach, except the closure is provided with + metadata on the example that the closure is being run prior to. + */ + public static func beforeEach(_ closure: @escaping BeforeExampleWithMetadataAsyncClosure) { + AsyncWorld.sharedWorld.beforeEach(closure: closure) + } + + // MARK: - AfterEach + /** + Defines a closure to be run after each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of afterEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run after each example. + */ + public static func afterEach(_ closure: @escaping AfterExampleAsyncClosure) { + AsyncWorld.sharedWorld.afterEach(closure) + } + + /** + Identical to Quick.DSL.afterEach, except the closure is provided with + metadata on the example that the closure is being run after. + */ + public static func afterEach(_ closure: @escaping AfterExampleWithMetadataAsyncClosure) { + AsyncWorld.sharedWorld.afterEach(closure: closure) + } + + // MARK: - aroundEach + /** + Defines a closure to that wraps each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + + The closure you pass to aroundEach receives a callback as its argument, which + it MUST call exactly one for the example to run properly: + + aroundEach { runExample in + doSomeSetup() + runExample() + doSomeCleanup() + } + + This callback is particularly useful for test decartions that can’t split + into a separate beforeEach and afterEach. For example, running each example + in its own autorelease pool (provided by Task) requires aroundEach: + + aroundEach { runExample in + autoreleasepool { + runExample() + } + checkObjectsNoLongerRetained() + } + + You can also use aroundEach to guarantee proper nesting of setup and cleanup + operations in situations where their relative order matters. + + An example group may contain an unlimited number of aroundEach callbacks. + They will nest inside each other, with the first declared in the group + nested at the outermost level. + + - parameter closure: The closure that wraps around each example. + */ + public static func aroundEach(_ closure: @escaping AroundExampleAsyncClosure) { + AsyncWorld.sharedWorld.aroundEach(closure) + } + + /** + Identical to Quick.DSL.aroundEach, except the closure receives metadata + about the example that the closure wraps. + */ + public static func aroundEach(_ closure: @escaping AroundExampleWithMetadataAsyncClosure) { + AsyncWorld.sharedWorld.aroundEach(closure) + } + + // MARK: - Examples + /** + Defines a closure to be run prior to each example but after any beforeEach blocks. + This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of justBeforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run prior to each example and after any beforeEach blocks + */ + + public static func justBeforeEach(_ closure: @escaping BeforeExampleAsyncClosure) { + AsyncWorld.sharedWorld.justBeforeEach(closure) + } + + /** + Defines an example. Examples use assertions to demonstrate how code should + behave. These are like "tests" in XCTest. + + - parameter description: An arbitrary string describing what the example is meant to specify. + - parameter closure: A closure that can contain assertions. + - parameter 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 static func it(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () async throws -> Void) { + AsyncWorld.sharedWorld.it(description, file: file, line: line, closure: closure) + } + + // MARK: - Shared Examples + /** + Inserts the examples defined using a ``AsyncBehavior`` 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 ``AsyncBehavior`` class defining the example group to be executed. + - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. + */ + public static func itBehavesLike(_ behavior: AsyncBehavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + AsyncWorld.sharedWorld.itBehavesLike(behavior, context: context, file: file, line: line) + } + + // MARK: - Pending + /** + 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. + + - parameter description: An arbitrary string describing the example or example group. + - parameter closure: A closure that will not be evaluated. + */ + public static func pending(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () async throws -> Void) { + AsyncWorld.sharedWorld.pending(description, file: file, line: line, closure: closure) + } + + // MARK: - Defocused + /** + Use this to quickly mark a `describe` closure as pending. + This disables all examples within the closure. + */ + public static func xdescribe(_ description: String, closure: () -> Void) { + AsyncWorld.sharedWorld.xdescribe(description, closure: closure) + } + + /** + Use this to quickly mark a `context` closure as pending. + This disables all examples within the closure. + */ + public static func xcontext(_ description: String, closure: () -> Void) { + xdescribe(description, closure: closure) + } + + /** + Use this to quickly mark an `it` closure as pending. + This disables the example and ensures the code within the closure is never run. + */ + public static func xit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () async throws -> Void) { + AsyncWorld.sharedWorld.xit(description, file: file, line: line, closure: closure) + } + + /** + Use this to quickly mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. + */ + public static func xitBehavesLike(_ behavior: AsyncBehavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + AsyncWorld.sharedWorld.xitBehavesLike(behavior, context: context, file: file, line: line) + } + + // MARK: - Focused + /** + 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 static func fdescribe(_ description: String, closure: () -> Void) { + AsyncWorld.sharedWorld.fdescribe(description, closure: closure) + } + + /** + Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. + */ + public static func fcontext(_ description: String, closure: () -> Void) { + fdescribe(description, closure: closure) + } + + /** + Use this to quickly focus an `it` closure, focusing the example. + If any examples in the test suite are focused, only those examples are executed. + */ + public static func fit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () async throws -> Void) { + AsyncWorld.sharedWorld.fit(description, file: file, line: line, closure: closure) + } + + /** + Use this to quickly focus on `itBehavesLike` closure. + */ + public static func fitBehavesLike(_ behavior: AsyncBehavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + AsyncWorld.sharedWorld.fitBehavesLike(behavior, context: context, file: file, line: line) + } +} + +// swiftlint:enable line_length diff --git a/Pods/Quick/Sources/Quick/DSL/AsyncWorld+DSL.swift b/Pods/Quick/Sources/Quick/DSL/AsyncWorld+DSL.swift new file mode 100644 index 0000000..d365eb6 --- /dev/null +++ b/Pods/Quick/Sources/Quick/DSL/AsyncWorld+DSL.swift @@ -0,0 +1,163 @@ +import Foundation + +/** + Adds methods to World to support top-level DSL functions. These functions map directly to the DSL that test + writers use in their specs. +*/ +extension AsyncWorld { + // MARK: - Example groups. + @nonobjc + 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'.") + } + guard currentExampleGroup != nil else { + // swiftlint:disable:next line_length + raiseError("Error: example group was not created by its parent QuickSpec spec. Check that describe() or context() was used in QuickSpec.spec() and not a more general context (i.e. an XCTestCase test)") + } + let group = AsyncExampleGroup(description: description, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group, closure: closure) + } + + @nonobjc + 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) + } + + @nonobjc + internal func fdescribe(_ description: String, closure: () -> Void) { + self.describe(description, flags: [Filter.focused: true], closure: closure) + } + + @nonobjc + internal func xdescribe(_ description: String, closure: () -> Void) { + self.describe(description, flags: [Filter.pending: true], closure: closure) + } + + // MARK: - Just Before Each + internal func justBeforeEach(_ closure: @escaping BeforeExampleAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'justBeforeEach' cannot be used inside '\(currentPhase)', 'justBeforeEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendJustBeforeEach(closure) + } + + // MARK: - Before Each + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendBefore(closure) + } + + internal func beforeEach(_ closure: @escaping BeforeExampleAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendBefore(closure) + } + + // MARK: - After Each + internal func afterEach(closure: @escaping AfterExampleWithMetadataAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendAfter(closure) + } + + internal func afterEach(_ closure: @escaping AfterExampleAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendAfter(closure) + } + + // MARK: - Around Each + internal func aroundEach(_ closure: @escaping AroundExampleAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendAround(closure) + } + + internal func aroundEach(_ closure: @escaping AroundExampleWithMetadataAsyncClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendAround(closure) + } + + // MARK: - Examples (Swift) + @nonobjc + internal func it(_ description: String, flags: FilterFlags = [:], file: FileString, line: UInt, closure: @escaping () async throws -> Void) { + if beforesCurrentlyExecuting { + raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'.") + } + if aftersCurrentlyExecuting { + raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'.") + } + guard currentExampleMetadata == nil else { + raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'.") + } + let callsite = Callsite(file: file, line: line) + let example = AsyncExample(description: description, callsite: callsite, flags: flags, closure: closure) + currentExampleGroup.appendExample(example) + } + + @nonobjc + internal func fit(_ description: String, file: FileString, line: UInt, closure: @escaping () async throws -> Void) { + self.it(description, flags: [Filter.focused: true], file: file, line: line, closure: closure) + } + + @nonobjc + internal func xit(_ description: String, file: FileString, line: UInt, closure: @escaping () async throws -> Void) { + self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) + } + + // MARK: - Shared Behavior + internal func itBehavesLike(_ behavior: AsyncBehavior.Type, context: @escaping () -> C, flags: FilterFlags = [:], file: FileString, line: UInt) { + guard currentExampleMetadata == nil else { + raiseError("'itBehavesLike' cannot be used inside '\(currentPhase)', 'itBehavesLike' may only be used inside 'context' or 'describe'.") + } + let callsite = Callsite(file: file, line: line) + let closure = behavior.spec + let group = AsyncExampleGroup(description: behavior.name, flags: flags) + currentExampleGroup.appendExampleGroup(group) + performWithCurrentExampleGroup(group) { + closure(context) + } + + group.walkDownExamples { (example: AsyncExample) in + example.isSharedExample = true + example.callsite = callsite + } + } + + internal func fitBehavesLike(_ behavior: AsyncBehavior.Type, context: @escaping () -> C, file: FileString, line: UInt) { + self.itBehavesLike(behavior, context: context, flags: [Filter.focused: true], file: file, line: line) + } + + internal func xitBehavesLike(_ behavior: AsyncBehavior.Type, context: @escaping () -> C, file: FileString, line: UInt) { + self.itBehavesLike(behavior, context: context, flags: [Filter.pending: true], file: file, line: line) + } + + // MARK: - Pending + @nonobjc + internal func pending(_ description: String, file: FileString, line: UInt, closure: @escaping () async throws -> Void) { + self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) + } + + private var currentPhase: String { + if beforesCurrentlyExecuting { + return "beforeEach" + } else if aftersCurrentlyExecuting { + return "afterEach" + } + + return "it" + } +} diff --git a/Pods/Quick/Sources/Quick/DSL/DSL.swift b/Pods/Quick/Sources/Quick/DSL/DSL.swift index a881912..d222971 100644 --- a/Pods/Quick/Sources/Quick/DSL/DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/DSL.swift @@ -1,311 +1,363 @@ // swiftlint:disable line_length -/** - Defines a closure to be run prior to any examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before the first example is run, this closure - will not be executed. - - - parameter closure: The closure to be run prior to any examples in the test suite. -*/ -public func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { - World.sharedWorld.beforeSuite(closure) -} - -/** - Defines a closure to be run after all of the examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. - - If the test suite crashes before all examples are run, this closure - will not be executed. - - - parameter closure: The closure to be run after all of the examples in the test suite. -*/ -public func afterSuite(_ closure: @escaping AfterSuiteClosure) { - World.sharedWorld.afterSuite(closure) -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - - parameter name: The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - - parameter closure: A closure containing the examples. This behaves just like an example group defined - 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 () -> Void) { - World.sharedWorld.sharedExamples(name) { _ in closure() } -} - -/** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - - parameter name: The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - - parameter closure: A closure containing the examples. This behaves just like an example group defined - 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`). - - The closure takes a SharedExampleContext as an argument. This context is a function - that can be executed to retrieve parameters passed in via an `itBehavesLike` function. -*/ -public func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { - World.sharedWorld.sharedExamples(name, closure: closure) -} - -/** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. - - - parameter description: An arbitrary string describing the example group. - - parameter closure: A closure that can contain other examples. -*/ -public func describe(_ description: String, closure: () -> Void) { - World.sharedWorld.describe(description, closure: closure) -} - -/** - Defines an example group. Equivalent to `describe`. -*/ -public func context(_ description: String, closure: () -> Void) { - World.sharedWorld.context(description, closure: closure) -} - -/** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run prior to each example. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleClosure) { - World.sharedWorld.beforeEach(closure) -} - -/** - Identical to Quick.DSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. -*/ -public func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { - World.sharedWorld.beforeEach(closure: closure) -} - -/** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - - parameter closure: The closure to be run after each example. -*/ -public func afterEach(_ closure: @escaping AfterExampleClosure) { - World.sharedWorld.afterEach(closure) -} - -/** - Identical to Quick.DSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. -*/ -public func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { - World.sharedWorld.afterEach(closure: closure) -} - -/** - Defines a closure to that wraps each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - - The closure you pass to aroundEach receives a callback as its argument, which - it MUST call exactly one for the example to run properly: - - aroundEach { runExample in - doSomeSetup() - runExample() - doSomeCleanup() - } - - This callback is particularly useful for test decartions that can’t split - into a separate beforeEach and afterEach. For example, running each example - in its own autorelease pool requires aroundEach: - - aroundEach { runExample in - autoreleasepool { - runExample() - } - checkObjectsNoLongerRetained() - } - - You can also use aroundEach to guarantee proper nesting of setup and cleanup - operations in situations where their relative order matters. - - An example group may contain an unlimited number of aroundEach callbacks. - They will nest inside each other, with the first declared in the group - nested at the outermost level. - - - parameter closure: The closure that wraps around each example. -*/ -public func aroundEach(_ closure: @escaping AroundExampleClosure) { - World.sharedWorld.aroundEach(closure) -} - -/** - Identical to Quick.DSL.aroundEach, except the closure receives metadata - about the example that the closure wraps. -*/ -public func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { - World.sharedWorld.aroundEach(closure) -} - -/** - Defines an example. Examples use assertions to demonstrate how code should - behave. These are like "tests" in XCTest. - - - parameter description: An arbitrary string describing what the example is meant to specify. - - parameter closure: A closure that can contain assertions. - - parameter 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, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { - World.sharedWorld.it(description, file: file, line: line, closure: closure) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { - itBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Inserts the examples defined using a `sharedExamples` function into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes those shared examples a context that can be evaluated to give the shared - examples extra information on the subject of the example. - - - parameter name: The name of the shared examples group to be executed. This must be identical to the - name of a shared examples group defined using `sharedExamples`. If there are no shared - examples that match the name given, an exception is thrown and the test suite will crash. - - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the - shared examples with extra information on the subject of the example. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. -*/ -public func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) -} - -/** - Inserts the examples defined using a `Behavior` into the current example group. - The shared examples are executed at this location, as if they were written out manually. - This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. - - - parameter behavior: The type of `Behavior` class defining the example group to be executed. - - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. - - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. - - parameter line: The line containing the current example group. A sensible default is provided. - */ -public func itBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.itBehavesLike(behavior, context: context, file: file, line: line) -} - -/** - 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. - - - 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: () -> Void) { - World.sharedWorld.pending(description, closure: closure) -} - -/** - Use this to quickly mark a `describe` closure as pending. - This disables all examples within the closure. -*/ -public func xdescribe(_ description: String, closure: () -> Void) { - World.sharedWorld.xdescribe(description, closure: closure) -} - -/** - Use this to quickly mark a `context` closure as pending. - This disables all examples within the closure. -*/ -public func xcontext(_ description: String, closure: () -> Void) { - xdescribe(description, closure: closure) -} - -/** - Use this to quickly mark an `it` closure as pending. - This disables the example and ensures the code within the closure is never run. -*/ -public func xit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { - World.sharedWorld.xit(description, file: file, line: line, closure: closure) -} - -/** - Use this to quickly mark an `itBehavesLike` closure as pending. - This disables the example group defined by this behavior and ensures the code within is never run. -*/ -public func xitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.xitBehavesLike(behavior, context: context, file: file, line: line) -} -/** - Use this to quickly focus a `describe` closure, focusing the examples in the closure. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the closure--they are all treated as focused. -*/ -public func fdescribe(_ description: String, closure: () -> Void) { - World.sharedWorld.fdescribe(description, closure: closure) -} - -/** - Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. -*/ -public func fcontext(_ description: String, closure: () -> Void) { - fdescribe(description, closure: closure) -} - -/** - Use this to quickly focus an `it` closure, focusing the example. - If any examples in the test suite are focused, only those examples are executed. -*/ -public func fit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { - World.sharedWorld.fit(description, file: file, line: line, closure: closure) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { - fitBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) -} - -/** - Use this to quickly focus an `itBehavesLike` closure. -*/ -public func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { - World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) -} - -/** - Use this to quickly focus on `itBehavesLike` closure. - */ -public func fitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { - World.sharedWorld.fitBehavesLike(behavior, context: context, file: file, line: line) +/// A protocol for defining the synchronous DSL usable from Quick synchronous specs. +public protocol SyncDSLUser {} + +extension QuickSpec: SyncDSLUser {} +extension Behavior: SyncDSLUser {} +extension QuickConfiguration: SyncDSLUser {} + +extension SyncDSLUser { + + // MARK: - beforeSuite + /** + Defines a closure to be run prior to any examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before the first example is run, this closure + will not be executed. + + - parameter closure: The closure to be run prior to any examples in the test suite. + */ + public static func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { + World.sharedWorld.beforeSuite(closure) + } + + // MARK: - afterSuite + /** + Defines a closure to be run after all of the examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. + + If the test suite crashes before all examples are run, this closure + will not be executed. + + - parameter closure: The closure to be run after all of the examples in the test suite. + */ + public static func afterSuite(_ closure: @escaping AfterSuiteClosure) { + World.sharedWorld.afterSuite(closure) + } + + // MARK: - sharedExamples + /** + Defines a group of shared examples. These examples can be re-used in several locations + by using the `itBehavesLike` function. + + - parameter name: The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + - parameter closure: A closure containing the examples. This behaves just like an example group defined + 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 static func sharedExamples(_ name: String, closure: @escaping () -> Void) { + World.sharedWorld.sharedExamples(name) { _ in closure() } + } + + /** + Defines a group of shared examples. These examples can be re-used in several locations + by using the `itBehavesLike` function. + + - parameter name: The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + - parameter closure: A closure containing the examples. This behaves just like an example group defined + 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`). + + The closure takes a SharedExampleContext as an argument. This context is a function + that can be executed to retrieve parameters passed in via an `itBehavesLike` function. + */ + public static func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { + World.sharedWorld.sharedExamples(name, closure: closure) + } + + // MARK: - Example groups + /** + Defines an example group. Example groups are logical groupings of examples. + Example groups can share setup and teardown code. + + - parameter description: An arbitrary string describing the example group. + - parameter closure: A closure that can contain other examples. + */ + public static func describe(_ description: String, closure: () -> Void) { + World.sharedWorld.describe(description, closure: closure) + } + + /** + Defines an example group. Equivalent to `describe`. + */ + public static func context(_ description: String, closure: () -> Void) { + World.sharedWorld.context(description, closure: closure) + } + + // MARK: - beforeEach + /** + Defines a closure to be run prior to each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of beforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run prior to each example. + */ + public static func beforeEach(_ closure: @escaping BeforeExampleClosure) { + World.sharedWorld.beforeEach(closure) + } + + /** + Identical to Quick.DSL.beforeEach, except the closure is provided with + metadata on the example that the closure is being run prior to. + */ + public static func beforeEach(_ closure: @escaping BeforeExampleWithMetadataClosure) { + World.sharedWorld.beforeEach(closure: closure) + } + + // MARK: - AfterEach + /** + Defines a closure to be run after each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of afterEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run after each example. + */ + public static func afterEach(_ closure: @escaping AfterExampleClosure) { + World.sharedWorld.afterEach(closure) + } + + /** + Identical to Quick.DSL.afterEach, except the closure is provided with + metadata on the example that the closure is being run after. + */ + public static func afterEach(_ closure: @escaping AfterExampleWithMetadataClosure) { + World.sharedWorld.afterEach(closure: closure) + } + + // MARK: - aroundEach + /** + Defines a closure to that wraps each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + + The closure you pass to aroundEach receives a callback as its argument, which + it MUST call exactly one for the example to run properly: + + aroundEach { runExample in + doSomeSetup() + runExample() + doSomeCleanup() + } + + This callback is particularly useful for test decartions that can’t split + into a separate beforeEach and afterEach. For example, running each example + in its own autorelease pool (provided by Task) requires aroundEach: + + aroundEach { runExample in + autoreleasepool { + runExample() + } + checkObjectsNoLongerRetained() + } + + You can also use aroundEach to guarantee proper nesting of setup and cleanup + operations in situations where their relative order matters. + + An example group may contain an unlimited number of aroundEach callbacks. + They will nest inside each other, with the first declared in the group + nested at the outermost level. + + - parameter closure: The closure that wraps around each example. + */ + public static func aroundEach(_ closure: @escaping AroundExampleClosure) { + World.sharedWorld.aroundEach(closure) + } + + /** + Identical to Quick.DSL.aroundEach, except the closure receives metadata + about the example that the closure wraps. + */ + public static func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + World.sharedWorld.aroundEach(closure) + } + + // MARK: - Examples + /** + Defines a closure to be run prior to each example but after any beforeEach blocks. + This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of justBeforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + - parameter closure: The closure to be run prior to each example and after any beforeEach blocks + */ + + public static func justBeforeEach(_ closure: @escaping BeforeExampleClosure) { + World.sharedWorld.justBeforeEach(closure) + } + + /** + Defines an example. Examples use assertions to demonstrate how code should + behave. These are like "tests" in XCTest. + + - parameter description: An arbitrary string describing what the example is meant to specify. + - parameter closure: A closure that can contain assertions. + - parameter 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 static func it(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.it(description, file: file, line: line, closure: closure) + } + + // MARK: - Shared Examples + /** + Inserts the examples defined using a `sharedExamples` function into the current example group. + The shared examples are executed at this location, as if they were written out manually. + + - parameter name: The name of the shared examples group to be executed. This must be identical to the + name of a shared examples group defined using `sharedExamples`. If there are no shared + examples that match the name given, an exception is thrown and the test suite will crash. + - parameter 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 static func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { + itBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) + } + + /** + Inserts the examples defined using a `sharedExamples` function into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes those shared examples a context that can be evaluated to give the shared + examples extra information on the subject of the example. + + - parameter name: The name of the shared examples group to be executed. This must be identical to the + name of a shared examples group defined using `sharedExamples`. If there are no shared + examples that match the name given, an exception is thrown and the test suite will crash. + - parameter sharedExampleContext: A closure that, when evaluated, returns key-value pairs that provide the + shared examples with extra information on the subject of the example. + - parameter 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 static func itBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.itBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) + } + + /** + Inserts the examples defined using a `Behavior` into the current example group. + The shared examples are executed at this location, as if they were written out manually. + This function also passes a strongly-typed context that can be evaluated to give the shared examples extra information on the subject of the example. + + - parameter behavior: The type of `Behavior` class defining the example group to be executed. + - parameter context: A closure that, when evaluated, returns an instance of `Behavior`'s context type to provide its example group with extra information on the subject of the example. + - parameter file: The absolute path to the file containing the current example group. A sensible default is provided. + - parameter line: The line containing the current example group. A sensible default is provided. + */ + public static func itBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.itBehavesLike(behavior, context: context, file: file, line: line) + } + + // MARK: - Pending + /** + 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. + + - parameter description: An arbitrary string describing the example or example group. + - parameter closure: A closure that will not be evaluated. + */ + public static func pending(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.pending(description, file: file, line: line, closure: closure) + } + + // MARK: - Defocused + /** + Use this to quickly mark a `describe` closure as pending. + This disables all examples within the closure. + */ + public static func xdescribe(_ description: String, closure: () -> Void) { + World.sharedWorld.xdescribe(description, closure: closure) + } + + /** + Use this to quickly mark a `context` closure as pending. + This disables all examples within the closure. + */ + public static func xcontext(_ description: String, closure: () -> Void) { + xdescribe(description, closure: closure) + } + + /** + Use this to quickly mark an `it` closure as pending. + This disables the example and ensures the code within the closure is never run. + */ + public static func xit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.xit(description, file: file, line: line, closure: closure) + } + + /** + Use this to quickly mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. + */ + public static func xitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.xitBehavesLike(behavior, context: context, file: file, line: line) + } + + /** + Use this to quickly mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. + */ + public static func xitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { + xitBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) + } + + /** + Use this to quickly mark an `itBehavesLike` closure as pending. + This disables the example group defined by this behavior and ensures the code within is never run. + */ + public static func xitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.xitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) + } + + // MARK: - Focused + /** + 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 static func fdescribe(_ description: String, closure: () -> Void) { + World.sharedWorld.fdescribe(description, closure: closure) + } + + /** + Use this to quickly focus a `context` closure. Equivalent to `fdescribe`. + */ + public static func fcontext(_ description: String, closure: () -> Void) { + fdescribe(description, closure: closure) + } + + /** + Use this to quickly focus an `it` closure, focusing the example. + If any examples in the test suite are focused, only those examples are executed. + */ + public static func fit(_ description: String, file: FileString = #file, line: UInt = #line, closure: @escaping () throws -> Void) { + World.sharedWorld.fit(description, file: file, line: line, closure: closure) + } + + /** + Use this to quickly focus an `itBehavesLike` closure. + */ + public static func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line) { + fitBehavesLike(name, file: file, line: line, sharedExampleContext: { return [:] }) + } + + /** + Use this to quickly focus an `itBehavesLike` closure. + */ + public static func fitBehavesLike(_ name: String, file: FileString = #file, line: UInt = #line, sharedExampleContext: @escaping SharedExampleContext) { + World.sharedWorld.fitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) + } + + /** + Use this to quickly focus on `itBehavesLike` closure. + */ + public static func fitBehavesLike(_ behavior: Behavior.Type, file: FileString = #file, line: UInt = #line, context: @escaping () -> C) { + World.sharedWorld.fitBehavesLike(behavior, context: context, file: file, line: line) + } } // swiftlint:enable line_length diff --git a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift index be7e684..d6eb719 100644 --- a/Pods/Quick/Sources/Quick/DSL/World+DSL.swift +++ b/Pods/Quick/Sources/Quick/DSL/World+DSL.swift @@ -6,18 +6,38 @@ import Foundation writers use in their specs. */ extension World { + // MARK: - Before Suite +#if canImport(Darwin) + @objc(beforeSuite:) + internal func objc_beforeSuite(_ closure: @escaping BeforeSuiteNonThrowingClosure) { + suiteHooks.appendBefore(closure) + } +#endif + + @nonobjc internal func beforeSuite(_ closure: @escaping BeforeSuiteClosure) { suiteHooks.appendBefore(closure) } + // MARK: - After Suite +#if canImport(Darwin) + @objc(afterSuite:) + internal func objc_afterSuite(_ closure: @escaping AfterSuiteNonThrowingClosure) { + suiteHooks.appendAfter(closure) + } +#endif + + @nonobjc internal func afterSuite(_ closure: @escaping AfterSuiteClosure) { suiteHooks.appendAfter(closure) } + // MARK: - Specifying shared examples internal func sharedExamples(_ name: String, closure: @escaping SharedExampleClosure) { registerSharedExample(name, closure: closure) } + // MARK: - Example groups. 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'.") @@ -46,60 +66,131 @@ extension World { self.describe(description, flags: [Filter.pending: true], closure: closure) } - internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { + // MARK: - Just Before Each +#if canImport(Darwin) + @objc(justBeforeEach:) + internal func objc_justBeforeEach(_ closure: @escaping BeforeExampleNonThrowingClosure) { guard currentExampleMetadata == nil else { - raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + raiseError("'justBeforeEach' cannot be used inside '\(currentPhase)', 'justBeforeEach' may only be used inside 'context' or 'describe'.") } - currentExampleGroup.hooks.appendBefore(closure) + currentExampleGroup.hooks.appendJustBeforeEach(closure) + } +#endif + + @nonobjc + internal func justBeforeEach(_ closure: @escaping BeforeExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'justBeforeEach' cannot be used inside '\(currentPhase)', 'justBeforeEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendJustBeforeEach(closure) } + // MARK: - Before Each #if canImport(Darwin) @objc(beforeEachWithMetadata:) - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { + internal func objc_beforeEach(closure: @escaping BeforeExampleWithMetadataNonThrowingClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + } currentExampleGroup.hooks.appendBefore(closure) } -#else - internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { + + @objc(beforeEach:) + internal func objc_beforeEach(closure: @escaping BeforeExampleNonThrowingClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + } currentExampleGroup.hooks.appendBefore(closure) } #endif - internal func afterEach(_ closure: @escaping AfterExampleClosure) { + @nonobjc + internal func beforeEach(closure: @escaping BeforeExampleWithMetadataClosure) { guard currentExampleMetadata == nil else { - raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") } - currentExampleGroup.hooks.appendAfter(closure) + currentExampleGroup.hooks.appendBefore(closure) + } + + @nonobjc + internal func beforeEach(_ closure: @escaping BeforeExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'beforeEach' cannot be used inside '\(currentPhase)', 'beforeEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendBefore(closure) } + // MARK: - After Each #if canImport(Darwin) @objc(afterEachWithMetadata:) - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { + internal func objc_afterEach(closure: @escaping AfterExampleWithMetadataNonThrowingClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } currentExampleGroup.hooks.appendAfter(closure) } -#else - internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { + + @objc(afterEach:) + internal func objc_afterEach(_ closure: @escaping AfterExampleNonThrowingClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } currentExampleGroup.hooks.appendAfter(closure) } #endif - internal func aroundEach(_ closure: @escaping AroundExampleClosure) { + @nonobjc + internal func afterEach(closure: @escaping AfterExampleWithMetadataClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendAfter(closure) + } + + @nonobjc + internal func afterEach(_ closure: @escaping AfterExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'afterEach' cannot be used inside '\(currentPhase)', 'afterEach' may only be used inside 'context' or 'describe'.") + } + currentExampleGroup.hooks.appendAfter(closure) + } + + // MARK: - Around Each + #if canImport(Darwin) + @objc(aroundEach:) + internal func objc_aroundEach(_ closure: @escaping AroundExampleNonThrowingClosure) { guard currentExampleMetadata == nil else { raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") } currentExampleGroup.hooks.appendAround(closure) } -#if canImport(Darwin) @objc(aroundEachWithMetadata:) - internal func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + internal func objc_aroundEach(_ closure: @escaping AroundExampleWithMetadataNonThrowingClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } currentExampleGroup.hooks.appendAround(closure) } -#else + #endif + + @nonobjc + internal func aroundEach(_ closure: @escaping AroundExampleClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } + currentExampleGroup.hooks.appendAround(closure) + } + + @nonobjc internal func aroundEach(_ closure: @escaping AroundExampleWithMetadataClosure) { + guard currentExampleMetadata == nil else { + raiseError("'aroundEach' cannot be used inside '\(currentPhase)', 'aroundEach' may only be used inside 'context' or 'describe'. ") + } currentExampleGroup.hooks.appendAround(closure) } -#endif + // MARK: - Examples (Swift) @nonobjc internal func it(_ description: String, flags: FilterFlags = [:], file: FileString, line: UInt, closure: @escaping () throws -> Void) { if beforesCurrentlyExecuting { @@ -126,6 +217,7 @@ extension World { self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) } + // MARK: - Shared Behavior @nonobjc internal func itBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, flags: FilterFlags = [:], file: FileString, line: UInt) { guard currentExampleMetadata == nil else { @@ -182,20 +274,37 @@ extension World { self.itBehavesLike(behavior, context: context, flags: [Filter.pending: true], file: file, line: line) } + // MARK: Examples & Shared behavior (objc) #if canImport(Darwin) && !SWIFT_PACKAGE + @nonobjc + internal func syncIt(_ description: String, flags: FilterFlags = [:], file: FileString, line: UInt, closure: @escaping () throws -> Void) { + if beforesCurrentlyExecuting { + raiseError("'it' cannot be used inside 'beforeEach', 'it' may only be used inside 'context' or 'describe'.") + } + if aftersCurrentlyExecuting { + raiseError("'it' cannot be used inside 'afterEach', 'it' may only be used inside 'context' or 'describe'.") + } + guard currentExampleMetadata == nil else { + raiseError("'it' cannot be used inside 'it', 'it' may only be used inside 'context' or 'describe'.") + } + let callsite = Callsite(file: file, line: line) + let example = Example(description: description, callsite: callsite, flags: flags, closure: closure) + currentExampleGroup.appendExample(example) + } + @objc(itWithDescription:file:line:closure:) internal func objc_it(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { - it(description, file: file, line: line, closure: closure) + syncIt(description, file: file, line: line, closure: closure) } @objc(fitWithDescription:file:line:closure:) internal func objc_fit(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { - fit(description, file: file, line: line, closure: closure) + syncIt(description, flags: [Filter.focused: true], file: file, line: line, closure: closure) } @objc(xitWithDescription:file:line:closure:) internal func objc_xit(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { - xit(description, file: file, line: line, closure: closure) + syncIt(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) } @objc(itBehavesLikeSharedExampleNamed:sharedExampleContext:file:line:) @@ -212,10 +321,17 @@ extension World { internal func objc_xitBehavesLike(_ name: String, sharedExampleContext: @escaping SharedExampleContext, file: FileString, line: UInt) { xitBehavesLike(name, sharedExampleContext: sharedExampleContext, file: file, line: line) } + + @objc(pendingWithDescription:file:line:closure:) + internal func objc_pending(_ description: String, file: FileString, line: UInt, closure: @escaping () -> Void) { + self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) + } #endif - internal func pending(_ description: String, closure: () -> Void) { - print("Pending: \(description)") + // MARK: - Pending + @nonobjc + internal func pending(_ description: String, file: FileString, line: UInt, closure: @escaping () throws -> Void) { + self.it(description, flags: [Filter.pending: true], file: file, line: line, closure: closure) } private var currentPhase: String { diff --git a/Pods/Quick/Sources/Quick/Example.swift b/Pods/Quick/Sources/Quick/Example.swift deleted file mode 100644 index 42160b1..0000000 --- a/Pods/Quick/Sources/Quick/Example.swift +++ /dev/null @@ -1,154 +0,0 @@ -import Foundation -import XCTest - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _ExampleBase: NSObject {} -#else -public class _ExampleBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - Examples, defined with the `it` function, use assertions to - demonstrate how code should behave. These are like "tests" in XCTest. -*/ -final public class Example: _ExampleBase { - /** - A boolean indicating whether the example is a shared example; - i.e.: whether it is an example defined with `itBehavesLike`. - */ - public var isSharedExample = false - - /** - The site at which the example is defined. - This must be set correctly in order for Xcode to highlight - the correct line in red when reporting a failure. - */ - public var callsite: Callsite - - weak internal var group: ExampleGroup? - - private let internalDescription: String - private let closure: () throws -> Void - private let flags: FilterFlags - - internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () throws -> Void) { - self.internalDescription = description - self.closure = closure - self.callsite = callsite - self.flags = flags - } - - public override var description: String { - return internalDescription - } - - /** - The example name. A name is a concatenation of the name of - the example group the example belongs to, followed by the - description of the example itself. - - The example name is used to generate a test method selector - to be displayed in Xcode's test navigator. - */ - public var name: String { - guard let groupName = group?.name else { return description } - return "\(groupName), \(description)" - } - - /** - Executes the example closure, as well as all before and after - closures defined in the its surrounding example groups. - */ - public func run() { // swiftlint:disable:this function_body_length - let world = World.sharedWorld - - if world.numberOfExamplesRun == 0 { - world.suiteHooks.executeBefores() - } - - let exampleMetadata = ExampleMetadata(example: self, exampleIndex: world.numberOfExamplesRun) - world.currentExampleMetadata = exampleMetadata - defer { - world.currentExampleMetadata = nil - } - - group!.phase = .beforesExecuting - - let runExample = { [closure, name, callsite] in - self.group!.phase = .beforesFinished - - do { - try closure() - } catch { - let description = "Test \(name) threw unexpected error: \(error.localizedDescription)" - #if SWIFT_PACKAGE - let file = callsite.file.description - #else - let file = callsite.file - #endif - - // XCTIssue is unavailable (not implemented yet) on swift-corelibs-xctest (for non-Apple platforms) - #if canImport(Darwin) - let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) - let sourceCodeContext = XCTSourceCodeContext(location: location) - let issue = XCTIssue( - type: .thrownError, - compactDescription: description, - sourceCodeContext: sourceCodeContext - ) - QuickSpec.current.record(issue) - #else - QuickSpec.current.recordFailure( - withDescription: description, - inFile: file, - atLine: Int(callsite.line), - expected: false - ) - #endif - } - - self.group!.phase = .aftersExecuting - } - - let allWrappers = group!.wrappers + world.exampleHooks.wrappers - let wrappedExample = allWrappers.reduce(runExample) { closure, wrapper in - return { wrapper(exampleMetadata, closure) } - } - wrappedExample() - - group!.phase = .aftersFinished - - world.numberOfExamplesRun += 1 - - if !world.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { - world.suiteHooks.executeAfters() - } - } - - /** - Evaluates the filter flags set on this example and on the example groups - this example belongs to. Flags set on the example are trumped by flags on - the example group it belongs to. Flags on inner example groups are trumped - by flags on outer example groups. - */ - internal var filterFlags: FilterFlags { - var aggregateFlags = flags - for (key, value) in group!.filterFlags { - aggregateFlags[key] = value - } - return aggregateFlags - } -} - -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 d18bcf7..bb6f867 100644 --- a/Pods/Quick/Sources/Quick/ExampleGroup.swift +++ b/Pods/Quick/Sources/Quick/ExampleGroup.swift @@ -1,11 +1,20 @@ import Foundation +internal protocol Filterable { + var filterFlags: FilterFlags { get } +} + +private enum ExampleUnit { + case example(Example) + case group(ExampleGroup) +} + /** Example groups are logical groupings of examples, defined with the `describe` and `context` functions. Example groups can share setup and teardown code. */ -final public class ExampleGroup: NSObject { +final public class ExampleGroup: NSObject, Filterable { weak internal var parent: ExampleGroup? internal let hooks = ExampleHooks() @@ -14,8 +23,7 @@ final public class ExampleGroup: NSObject { private let internalDescription: String private let flags: FilterFlags private let isInternalRootExampleGroup: Bool - private var childGroups = [ExampleGroup]() - private var childExamples = [Example]() + private var childUnits = [ExampleUnit]() internal init(description: String, flags: FilterFlags, isInternalRootExampleGroup: Bool = false) { self.internalDescription = description @@ -34,14 +42,25 @@ final public class ExampleGroup: NSObject { #if canImport(Darwin) @objc public var examples: [Example] { - return childExamples + childGroups.flatMap { $0.examples } + _examples } #else public var examples: [Example] { - return childExamples + childGroups.flatMap { $0.examples } + _examples } #endif + private var _examples: [Example] { + childUnits.flatMap { unit in + switch unit { + case .example(let example): + return [example] + case .group(let exampleGroup): + return exampleGroup.examples + } + } + } + internal var name: String? { guard let parent = parent else { return isInternalRootExampleGroup ? nil : description @@ -61,6 +80,14 @@ final public class ExampleGroup: NSObject { return aggregateFlags } + internal var justBeforeEachStatements: [AroundExampleWithMetadataClosure] { + var closures = Array(hooks.justBeforeEachStatements.reversed()) + walkUp { group in + closures.append(contentsOf: group.hooks.justBeforeEachStatements.reversed()) + } + return closures + } + internal var wrappers: [AroundExampleWithMetadataClosure] { var closures = Array(hooks.wrappers.reversed()) walkUp { group in @@ -70,22 +97,24 @@ final public class ExampleGroup: NSObject { } internal func walkDownExamples(_ callback: (_ example: Example) -> Void) { - for example in childExamples { - callback(example) - } - for group in childGroups { - group.walkDownExamples(callback) + for unit in childUnits { + switch unit { + case .example(let example): + callback(example) + case .group(let exampleGroup): + exampleGroup.walkDownExamples(callback) + } } } internal func appendExampleGroup(_ group: ExampleGroup) { group.parent = self - childGroups.append(group) + childUnits.append(.group(group)) } internal func appendExample(_ example: Example) { example.group = self - childExamples.append(example) + childUnits.append(.example(example)) } private func walkUp(_ callback: (_ group: ExampleGroup) -> Void) { diff --git a/Pods/Quick/Sources/Quick/ExampleMetadata.swift b/Pods/Quick/Sources/Quick/ExampleMetadata.swift deleted file mode 100644 index a8f0d77..0000000 --- a/Pods/Quick/Sources/Quick/ExampleMetadata.swift +++ /dev/null @@ -1,33 +0,0 @@ -import Foundation - -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -public class _ExampleMetadataBase: NSObject {} -#else -public class _ExampleMetadataBase: NSObject {} -// swiftlint:enable type_name -#endif - -/** - A class that encapsulates information about an example, - including the index at which the example was executed, as - well as the example itself. -*/ -final public class ExampleMetadata: _ExampleMetadataBase { - /** - The example for which this metadata was collected. - */ - public let example: Example - - /** - The index at which this example was executed in the - test suite. - */ - public let exampleIndex: Int - - internal init(example: Example, exampleIndex: Int) { - self.example = example - self.exampleIndex = exampleIndex - } -} diff --git a/Pods/Quick/Sources/Quick/Examples/AsyncExample.swift b/Pods/Quick/Sources/Quick/Examples/AsyncExample.swift new file mode 100644 index 0000000..5da96ac --- /dev/null +++ b/Pods/Quick/Sources/Quick/Examples/AsyncExample.swift @@ -0,0 +1,279 @@ +import Foundation +import XCTest + +public class AsyncExample: ExampleBase { + weak internal var group: AsyncExampleGroup? + + private let internalDescription: String + private let closure: () async throws -> Void + + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () async throws -> Void) { + self.internalDescription = description + self.closure = closure + super.init(callsite: callsite, flags: flags) + } + + public override var description: String { + return internalDescription + } + + /** + The example name. A name is a concatenation of the name of + the example group the example belongs to, followed by the + description of the example itself. + + The example name is used to generate a test method selector + to be displayed in Xcode's test navigator. + */ + public override var name: String { + guard let groupName = group?.name else { return description } + return "\(groupName), \(description)" + } + + public func run() async { + let asyncWorld = AsyncWorld.sharedWorld + let world = World.sharedWorld + + if world.numberOfExamplesRun == 0 { + await MainActor.run { + world.suiteHooks.executeBefores() + } + } + + let exampleMetadata = AsyncExampleMetadata(group: group!, example: self, exampleIndex: asyncWorld.numberOfAsyncExamplesRun) + asyncWorld.currentExampleMetadata = exampleMetadata + defer { + asyncWorld.currentExampleMetadata = nil + } + + group!.phase = .beforesExecuting + + let runExample: () async -> Void = { [closure, name, callsite] in + self.group!.phase = .beforesFinished + + do { + try await closure() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + } + + self.group!.phase = .aftersExecuting + } + + var cancelTests = false + + let handleThrowingClosure: (@escaping () async throws -> Void) -> () async -> Void = { [name, callsite] (closure: @escaping () async throws -> Void) in + { + if cancelTests { return } + do { + try await closure() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + cancelTests = true + } + } + } + + let allJustBeforeEachStatements = group!.justBeforeEachStatements + asyncWorld.exampleHooks.justBeforeEachStatements + let justBeforeEachExample = allJustBeforeEachStatements.reduce(runExample as () async throws -> Void) { closure, wrapper in + return { try await wrapper(exampleMetadata, handleThrowingClosure(closure)) } + } + + let allWrappers = group!.wrappers + asyncWorld.exampleHooks.wrappers + let wrappedExample = allWrappers.reduce(justBeforeEachExample) { closure, wrapper in + return { try await wrapper(exampleMetadata, handleThrowingClosure(closure)) } + } + do { + try await wrappedExample() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + } + + + group!.phase = .aftersFinished + + asyncWorld.numberOfAsyncExamplesRun += 1 + + if !asyncWorld.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { + await MainActor.run { + world.suiteHooks.executeAfters() + } + } + } + + public func runSkippedTest() async { + let asyncWorld = AsyncWorld.sharedWorld + let world = World.sharedWorld + + if world.numberOfExamplesRun == 0 { + await MainActor.run { + world.suiteHooks.executeBefores() + } + } + + reportSkippedTest(XCTSkip("Test was filtered out."), name: name, callsite: callsite) + + asyncWorld.numberOfAsyncExamplesRun += 1 + + if !asyncWorld.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { + await MainActor.run { + world.suiteHooks.executeAfters() + } + } + } + + /** + Evaluates the filter flags set on this example and on the example groups + this example belongs to. Flags set on the example are trumped by flags on + the example group it belongs to. Flags on inner example groups are trumped + by flags on outer example groups. + */ + internal override var filterFlags: FilterFlags { + var aggregateFlags = flags + for (key, value) in group!.filterFlags { + aggregateFlags[key] = value + } + return aggregateFlags + } + + #if canImport(Darwin) + static internal let recordSkipSelector = NSSelectorFromString("recordSkipWithDescription:sourceCodeContext:") + #endif + + internal func handleErrorInTest(_ error: Error, name: String, callsite: Callsite) { + if let stopTestError = error as? StopTest { + self.reportStoppedTest(stopTestError) + } else if let testSkippedError = error as? XCTSkip { + self.reportSkippedTest(testSkippedError, name: name, callsite: callsite) + } else { + self.reportFailedTest(error, name: name, callsite: callsite) + } + } + + internal func reportSkippedTest(_ testSkippedError: XCTSkip, name: String, callsite: Callsite) { + #if !canImport(Darwin) + return // This functionality is only supported by Apple's proprietary XCTest, not by swift-corelibs-xctest + #else // `NSSelectorFromString` requires the Objective-C runtime, which is not available on Linux. + + let messageSuffix = """ + \n + If nobody else has done so yet, please submit an issue to https://github.com/Quick/Quick/issues + + For now, we'll just benignly ignore skipped tests. + """ + + guard let testRun = AsyncSpec.current?.testRun else { + print(""" + [Quick Warning]: `AsyncSpec.current?.testRun` was unexpectededly `nil`. + """ + messageSuffix) + return + } + + guard let skippedTestContextAny = testSkippedError.errorUserInfo["XCTestErrorUserInfoKeySkippedTestContext"] else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected the `errorUserInfo` dictionary of the XCTSKip error to contain a value for the key + "XCTestErrorUserInfoKeySkippedTestContext", but it didn't. + """ + messageSuffix) + return + } + + // Uses an internal type "XCTSkippedTestContext", but "NSObject" will be sufficient for `perform(_:with:_with:)`. + guard let skippedTestContext = skippedTestContextAny as? NSObject else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `skippedTestContextAny` to have type `NSObject`, + but we got an object of type \(type(of: skippedTestContextAny)) + """ + messageSuffix) + return + } + + guard let sourceCodeContextAny = skippedTestContext.value(forKey: "sourceCodeContext") else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `XCTSkippedTestContext` to have a `sourceCodeContext` property, but it did not. + """ + messageSuffix) + return + } + + guard let sourceCodeContext = sourceCodeContextAny as? XCTSourceCodeContext else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `XCTSkippedTestContext.sourceCodeContext` to have type `XCTSourceCodeContext`, + but we got an object of type \(type(of: sourceCodeContextAny)). + """ + messageSuffix) + return + } + + guard testRun.responds(to: Self.recordSkipSelector) else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed, as it no longer responds to + the -[XCTSkip \(NSStringFromSelector(Self.recordSkipSelector))] message necessary to report skipped tests to Xcode. + """ + messageSuffix) + return + } + + testRun.perform(Self.recordSkipSelector, with: testSkippedError.message, with: sourceCodeContext) + #endif + } + + internal func reportFailedTest(_ error: Error, name: String, callsite: Callsite) { + let description = "Test \(name) threw unexpected error: \(error.localizedDescription)" + + #if canImport(Darwin) + let file = callsite.file + let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue( + type: .thrownError, + compactDescription: description, + sourceCodeContext: sourceCodeContext + ) + AsyncSpec.current?.record(issue) + #else + let file = callsite.file.description + AsyncSpec.current?.recordFailure( + withDescription: description, + inFile: file, + atLine: Int(callsite.line), + expected: false + ) + #endif + } + + internal func reportStoppedTest(_ stopTestError: StopTest) { + guard stopTestError.reportError else { return } + + let callsite = stopTestError.callsite + + #if canImport(Darwin) + let file = callsite.file + let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue( + type: .assertionFailure, + compactDescription: stopTestError.failureDescription, + sourceCodeContext: sourceCodeContext + ) + AsyncSpec.current?.record(issue) + #else + let file = callsite.file.description + AsyncSpec.current?.recordFailure( + withDescription: stopTestError.failureDescription, + inFile: file, + atLine: Int(callsite.line), + expected: true + ) + #endif + } +} + +extension AsyncExample { + /** + 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: AsyncExample, rhs: AsyncExample) -> Bool { + return lhs.callsite == rhs.callsite + } +} diff --git a/Pods/Quick/Sources/Quick/Examples/Example.swift b/Pods/Quick/Sources/Quick/Examples/Example.swift new file mode 100644 index 0000000..e89fef4 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Examples/Example.swift @@ -0,0 +1,324 @@ +import Foundation +import XCTest + +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +public class _ExampleBase: NSObject {} +#else +public class _ExampleBase: NSObject {} +// swiftlint:enable type_name +#endif + +/** + The common superclass of both Example and AsyncExample. This is mostly used for + determining filtering (focusing or pending) and other cases where we want to apply + something to any kind of example. + */ +public class ExampleBase: _ExampleBase { + /** + A boolean indicating whether the example is a shared example; + i.e.: whether it is an example defined with `itBehavesLike`. + */ + public var isSharedExample = false + + /** + The site at which the example is defined. + This must be set correctly in order for Xcode to highlight + the correct line in red when reporting a failure. + */ + public var callsite: Callsite + + internal let flags: FilterFlags + + init(callsite: Callsite, flags: FilterFlags) { + self.callsite = callsite + self.flags = flags + } + + /** + Evaluates the filter flags set on this example and on the example groups + this example belongs to. Flags set on the example are trumped by flags on + the example group it belongs to. Flags on inner example groups are trumped + by flags on outer example groups. + */ + internal var filterFlags: FilterFlags { + [:] + } + + /** + The example name. A name is a concatenation of the name of + the example group the example belongs to, followed by the + description of the example itself. + + The example name is used to generate a test method selector + to be displayed in Xcode's test navigator. + */ + public var name: String { "" } +} + +public class Example: ExampleBase { + weak internal var group: ExampleGroup? + + private let internalDescription: String + private let closure: () throws -> Void + + internal init(description: String, callsite: Callsite, flags: FilterFlags, closure: @escaping () throws -> Void) { + self.internalDescription = description + self.closure = closure + super.init(callsite: callsite, flags: flags) + } + + public override var description: String { + return internalDescription + } + + /** + The example name. A name is a concatenation of the name of + the example group the example belongs to, followed by the + description of the example itself. + + The example name is used to generate a test method selector + to be displayed in Xcode's test navigator. + */ + public override var name: String { + guard let groupName = group?.name else { return description } + return "\(groupName), \(description)" + } + + public func run() { + let world = World.sharedWorld + + if world.numberOfExamplesRun == 0 { + world.suiteHooks.executeBefores() + } + + let exampleMetadata = SyncExampleMetadata(group: group!, example: self, exampleIndex: world.numberOfExamplesRun) + world.currentExampleMetadata = exampleMetadata + defer { + world.currentExampleMetadata = nil + } + + group!.phase = .beforesExecuting + + let runExample: () -> Void = { [closure, name, callsite] in + self.group!.phase = .beforesFinished + + do { + try closure() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + } + + self.group!.phase = .aftersExecuting + } + + var cancelTests = false + + let handleThrowingClosure: (@escaping () throws -> Void) -> () -> Void = { [name, callsite] (closure: @escaping () throws -> Void) in + { + if cancelTests { return } + do { + try closure() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + cancelTests = true + } + } + } + + let allJustBeforeEachStatements = group!.justBeforeEachStatements + world.exampleHooks.justBeforeEachStatements + let justBeforeEachExample = allJustBeforeEachStatements.reduce(runExample as () throws -> Void) { closure, wrapper in + return { try wrapper(exampleMetadata, handleThrowingClosure(closure)) } + } + + let allWrappers = group!.wrappers + world.exampleHooks.wrappers + let wrappedExample = allWrappers.reduce(justBeforeEachExample) { closure, wrapper in + return { try wrapper(exampleMetadata, handleThrowingClosure(closure)) } + } + do { + try wrappedExample() + } catch { + self.handleErrorInTest(error, name: name, callsite: callsite) + } + + group!.phase = .aftersFinished + + world.numberOfSyncExamplesRun += 1 + + if !world.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { + world.suiteHooks.executeAfters() + } + } + + public func runSkippedTest() { + let world = World.sharedWorld + + if world.numberOfExamplesRun == 0 { + world.suiteHooks.executeBefores() + } + + reportSkippedTest(XCTSkip("Test was filtered out."), name: name, callsite: callsite) + + world.numberOfSyncExamplesRun += 1 + + if !world.isRunningAdditionalSuites && world.numberOfExamplesRun >= world.cachedIncludedExampleCount { + world.suiteHooks.executeAfters() + } + } + + /** + Evaluates the filter flags set on this example and on the example groups + this example belongs to. Flags set on the example are trumped by flags on + the example group it belongs to. Flags on inner example groups are trumped + by flags on outer example groups. + */ + internal override var filterFlags: FilterFlags { + var aggregateFlags = flags + for (key, value) in group!.filterFlags { + aggregateFlags[key] = value + } + return aggregateFlags + } + + #if canImport(Darwin) + static internal let recordSkipSelector = NSSelectorFromString("recordSkipWithDescription:sourceCodeContext:") + #endif + + internal func handleErrorInTest(_ error: Error, name: String, callsite: Callsite) { + if let stopTestError = error as? StopTest { + self.reportStoppedTest(stopTestError) + } else if let testSkippedError = error as? XCTSkip { + self.reportSkippedTest(testSkippedError, name: name, callsite: callsite) + } else { + self.reportFailedTest(error, name: name, callsite: callsite) + } + } + + internal func reportSkippedTest(_ testSkippedError: XCTSkip, name: String, callsite: Callsite) { + #if !canImport(Darwin) + return // This functionality is only supported by Apple's proprietary XCTest, not by swift-corelibs-xctest + #else // `NSSelectorFromString` requires the Objective-C runtime, which is not available on Linux. + + let messageSuffix = """ + \n + If nobody else has done so yet, please submit an issue to https://github.com/Quick/Quick/issues + + For now, we'll just benignly ignore skipped tests. + """ + + guard let testRun = QuickSpec.current.testRun else { + print(""" + [Quick Warning]: `QuickSpec.current.testRun` was unexpectededly `nil`. + """ + messageSuffix) + return + } + + guard let skippedTestContextAny = testSkippedError.errorUserInfo["XCTestErrorUserInfoKeySkippedTestContext"] else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected the `errorUserInfo` dictionary of the XCTSKip error to contain a value for the key + "XCTestErrorUserInfoKeySkippedTestContext", but it didn't. + """ + messageSuffix) + return + } + + // Uses an internal type "XCTSkippedTestContext", but "NSObject" will be sufficient for `perform(_:with:_with:)`. + guard let skippedTestContext = skippedTestContextAny as? NSObject else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `skippedTestContextAny` to have type `NSObject`, + but we got an object of type \(type(of: skippedTestContextAny)) + """ + messageSuffix) + return + } + + guard let sourceCodeContextAny = skippedTestContext.value(forKey: "sourceCodeContext") else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `XCTSkippedTestContext` to have a `sourceCodeContext` property, but it did not. + """ + messageSuffix) + return + } + + guard let sourceCodeContext = sourceCodeContextAny as? XCTSourceCodeContext else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed. + We expected `XCTSkippedTestContext.sourceCodeContext` to have type `XCTSourceCodeContext`, + but we got an object of type \(type(of: sourceCodeContextAny)). + """ + messageSuffix) + return + } + + guard testRun.responds(to: Self.recordSkipSelector) else { + print(""" + [Quick Warning]: The internals of Apple's XCTestCaseRun have changed, as it no longer responds to + the -[XCTSkip \(NSStringFromSelector(Self.recordSkipSelector))] message necessary to report skipped tests to Xcode. + """ + messageSuffix) + return + } + + testRun.perform(Self.recordSkipSelector, with: testSkippedError.message, with: sourceCodeContext) + #endif + } + + internal func reportFailedTest(_ error: Error, name: String, callsite: Callsite) { + let description = "Test \(name) threw unexpected error: \(error.localizedDescription)" + + #if canImport(Darwin) + let file = callsite.file + let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue( + type: .thrownError, + compactDescription: description, + sourceCodeContext: sourceCodeContext + ) + QuickSpec.current.record(issue) + #else + let file = callsite.file.description + QuickSpec.current.recordFailure( + withDescription: description, + inFile: file, + atLine: Int(callsite.line), + expected: false + ) + #endif + } + + internal func reportStoppedTest(_ stopTestError: StopTest) { + guard stopTestError.reportError else { return } + + let callsite = stopTestError.callsite + + #if canImport(Darwin) + let file = callsite.file + let location = XCTSourceCodeLocation(filePath: file, lineNumber: Int(callsite.line)) + let sourceCodeContext = XCTSourceCodeContext(location: location) + let issue = XCTIssue( + type: .assertionFailure, + compactDescription: stopTestError.failureDescription, + sourceCodeContext: sourceCodeContext + ) + QuickSpec.current.record(issue) + #else + let file = callsite.file.description + QuickSpec.current.recordFailure( + withDescription: stopTestError.failureDescription, + inFile: file, + atLine: Int(callsite.line), + expected: true + ) + #endif + } +} + +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/Examples/ExampleMetadata.swift b/Pods/Quick/Sources/Quick/Examples/ExampleMetadata.swift new file mode 100644 index 0000000..484ccf1 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Examples/ExampleMetadata.swift @@ -0,0 +1,51 @@ +import Foundation + +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +public class _ExampleMetadataBase: NSObject {} +#else +public class _ExampleMetadataBase: NSObject {} +// swiftlint:enable type_name +#endif + +/** + A class that encapsulates information about an example, + including the index at which the example was executed, as + well as the example itself. +*/ +public class ExampleMetadata: _ExampleMetadataBase { + /** + The example for which this metadata was collected. + */ + public let example: ExampleBase + + /** + The index at which this example was executed in the + test suite. + */ + public let exampleIndex: Int + + fileprivate init(example: ExampleBase, exampleIndex: Int) { + self.example = example + self.exampleIndex = exampleIndex + } +} + +final class SyncExampleMetadata: ExampleMetadata { + let group: ExampleGroup + + init(group: ExampleGroup, example: ExampleBase, exampleIndex: Int) { + self.group = group + super.init(example: example, exampleIndex: exampleIndex) + } +} + +final class AsyncExampleMetadata: ExampleMetadata { + let group: AsyncExampleGroup + + init(group: AsyncExampleGroup, example: ExampleBase, exampleIndex: Int) { + self.group = group + super.init(example: example, exampleIndex: exampleIndex) + } +} diff --git a/Pods/Quick/Sources/Quick/Filter.swift b/Pods/Quick/Sources/Quick/Filter.swift index a250631..1a14f74 100644 --- a/Pods/Quick/Sources/Quick/Filter.swift +++ b/Pods/Quick/Sources/Quick/Filter.swift @@ -1,14 +1,5 @@ import Foundation -#if canImport(Darwin) -// swiftlint:disable type_name -@objcMembers -internal class _FilterBase: NSObject {} -#else -internal class _FilterBase: NSObject {} -// swiftlint:enable type_name -#endif - /** A mapping of string keys to booleans that can be used to filter examples or example groups. For example, a "focused" @@ -20,12 +11,13 @@ internal typealias FilterFlags = [String: Bool] A namespace for filter flag keys, defined primarily to make the keys available in Objective-C. */ -final internal class Filter: _FilterBase { +final internal class Filter: NSObject { /** Example and example groups with [Focused: true] are included in test runs, excluding all other examples without this flag. Use this to only run one or two tests that you're currently focusing on. */ + @nonobjc internal class var focused: String { return "focused" } @@ -34,6 +26,7 @@ final internal class Filter: _FilterBase { Example and example groups with [Pending: true] are excluded from test runs. Use this to temporarily suspend examples that you know do not pass yet. */ + @nonobjc internal class var pending: String { return "pending" } diff --git a/Pods/Quick/Sources/Quick/Hooks/AsyncExampleHooks.swift b/Pods/Quick/Sources/Quick/Hooks/AsyncExampleHooks.swift new file mode 100644 index 0000000..055d270 --- /dev/null +++ b/Pods/Quick/Sources/Quick/Hooks/AsyncExampleHooks.swift @@ -0,0 +1,53 @@ +import Foundation + +/** + A container for closures to be executed before and after each example. +*/ +final internal class AsyncExampleHooks { + internal var justBeforeEachStatements: [AroundExampleWithMetadataAsyncClosure] = [] + internal var wrappers: [AroundExampleWithMetadataAsyncClosure] = [] + internal var phase: HooksPhase = .nothingExecuted + + internal func appendJustBeforeEach(_ closure: @escaping BeforeExampleAsyncClosure) { + justBeforeEachStatements.append { _, runExample in + try await closure() + await runExample() + } + } + + internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataAsyncClosure) { + wrappers.append { exampleMetadata, runExample in + try await closure(exampleMetadata) + await runExample() + } + } + + internal func appendBefore(_ closure: @escaping BeforeExampleAsyncClosure) { + wrappers.append { _, runExample in + try await closure() + await runExample() + } + } + + internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataAsyncClosure) { + wrappers.prepend { exampleMetadata, runExample in + await runExample() + try await closure(exampleMetadata) + } + } + + internal func appendAfter(_ closure: @escaping AfterExampleAsyncClosure) { + wrappers.prepend { _, runExample in + await runExample() + try await closure() + } + } + + internal func appendAround(_ closure: @escaping AroundExampleWithMetadataAsyncClosure) { + wrappers.append(closure) + } + + internal func appendAround(_ closure: @escaping AroundExampleAsyncClosure) { + wrappers.append { _, runExample in try await closure(runExample) } + } +} diff --git a/Pods/Quick/Sources/Quick/Hooks/Closures.swift b/Pods/Quick/Sources/Quick/Hooks/Closures.swift index e70194d..3f79a35 100644 --- a/Pods/Quick/Sources/Quick/Hooks/Closures.swift +++ b/Pods/Quick/Sources/Quick/Hooks/Closures.swift @@ -1,48 +1,141 @@ // MARK: Example Hooks +/** + An async throwing closure executed before an example is run. +*/ +public typealias BeforeExampleAsyncClosure = () async throws -> Void + +/** + A throwing closure executed before an example is run. + */ +public typealias BeforeExampleClosure = () throws -> Void + /** A closure executed before an example is run. + This is only used by ObjC. + */ +public typealias BeforeExampleNonThrowingClosure = () -> Void + +/** + An async throwing 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 BeforeExampleClosure = () -> Void +public typealias BeforeExampleWithMetadataAsyncClosure = (_ exampleMetadata: ExampleMetadata) async throws -> Void + +/** + A throwing 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) throws -> 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. + This is only used by ObjC + */ +public typealias BeforeExampleWithMetadataNonThrowingClosure = (_ exampleMetadata: ExampleMetadata) -> Void + +/** + An async throwing closure executed after an example is run. */ -public typealias BeforeExampleWithMetadataClosure = (_ exampleMetadata: ExampleMetadata) -> Void +public typealias AfterExampleAsyncClosure = BeforeExampleAsyncClosure /** - A closure executed after an example is run. + A throwing closure executed after an example is run. */ public typealias AfterExampleClosure = BeforeExampleClosure /** - A closure executed after an example is run. The closure is given example metadata, + A closure executed after an example is run. + This is only used by ObjC +*/ +public typealias AfterExampleNonThrowingClosure = BeforeExampleNonThrowingClosure + +/** + An async throwing closure executed after an example is run. The closure is given example metadata, + which contains information about the example that has just finished running. +*/ +public typealias AfterExampleWithMetadataAsyncClosure = BeforeExampleWithMetadataAsyncClosure + +/** + A throwing closure executed after an example is run. The closure is given example metadata, which contains information about the example that has just finished running. */ public typealias AfterExampleWithMetadataClosure = BeforeExampleWithMetadataClosure +/** + A closure executed after an example is run. The closure is given example metadata, + which contains information about the example that has just finished running. +*/ +public typealias AfterExampleWithMetadataNonThrowingClosure = BeforeExampleWithMetadataNonThrowingClosure + +/** + A throwing closure which wraps an example. The closure must call runExample() exactly once. +*/ +public typealias AroundExampleClosure = (_ runExample: @escaping () -> Void) throws -> Void + /** A closure which wraps an example. The closure must call runExample() exactly once. */ -public typealias AroundExampleClosure = (_ runExample: @escaping () -> Void) -> Void +public typealias AroundExampleNonThrowingClosure = (_ runExample: @escaping () -> Void) -> Void /** - A closure which wraps an example. The closure is given example metadata, + A throwing closure which wraps an example. The closure is given example metadata, which contains information about the example that the wrapper will run. The closure must call runExample() exactly once. */ public typealias AroundExampleWithMetadataClosure = + (_ exampleMetadata: ExampleMetadata, _ runExample: @escaping () -> Void) throws -> Void + +/** + A throwing closure which wraps an example. The closure is given example metadata, + which contains information about the example that the wrapper will run. + The closure must call runExample() exactly once. +*/ +public typealias AroundExampleWithMetadataNonThrowingClosure = (_ exampleMetadata: ExampleMetadata, _ runExample: @escaping () -> Void) -> Void +/** + An async throwing closure which wraps an example. The closure must call runExample() exactly once. +*/ +public typealias AroundExampleAsyncClosure = (_ runExample: @escaping () async -> Void) async throws -> Void + +/** + An async throwing closure which wraps an example. The closure is given example metadata, + which contains information about the example that the wrapper will run. + The closure must call runExample() exactly once. +*/ +public typealias AroundExampleWithMetadataAsyncClosure = + (_ exampleMetadata: ExampleMetadata, _ runExample: @escaping () async -> Void) async throws -> Void + // MARK: Suite Hooks +/** + An async throwing closure executed before any examples are run. +*/ +public typealias BeforeSuiteAsyncClosure = () async throws -> Void + +/** + A throwing closure executed before any examples are run. +*/ +public typealias BeforeSuiteClosure = () throws -> Void + /** A closure executed before any examples are run. */ -public typealias BeforeSuiteClosure = () -> Void +public typealias BeforeSuiteNonThrowingClosure = () -> Void /** - A closure executed after all examples have finished running. + An async throwing closure executed after all examples have finished running. +*/ +public typealias AfterSuiteAsyncClosure = BeforeSuiteAsyncClosure + +/** + A throwing closure executed after all examples have finished running. */ public typealias AfterSuiteClosure = BeforeSuiteClosure + +/** + A closure executed after all examples have finished running. +*/ +public typealias AfterSuiteNonThrowingClosure = BeforeSuiteNonThrowingClosure diff --git a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift index 51f004b..0fc0384 100644 --- a/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift +++ b/Pods/Quick/Sources/Quick/Hooks/ExampleHooks.swift @@ -1,20 +1,30 @@ +import Foundation + /** A container for closures to be executed before and after each example. */ final internal class ExampleHooks { + internal var justBeforeEachStatements: [AroundExampleWithMetadataClosure] = [] internal var wrappers: [AroundExampleWithMetadataClosure] = [] internal var phase: HooksPhase = .nothingExecuted + internal func appendJustBeforeEach(_ closure: @escaping BeforeExampleClosure) { + justBeforeEachStatements.append { _, runExample in + try closure() + runExample() + } + } + internal func appendBefore(_ closure: @escaping BeforeExampleWithMetadataClosure) { wrappers.append { exampleMetadata, runExample in - closure(exampleMetadata) + try closure(exampleMetadata) runExample() } } internal func appendBefore(_ closure: @escaping BeforeExampleClosure) { wrappers.append { _, runExample in - closure() + try closure() runExample() } } @@ -22,14 +32,14 @@ final internal class ExampleHooks { internal func appendAfter(_ closure: @escaping AfterExampleWithMetadataClosure) { wrappers.prepend { exampleMetadata, runExample in runExample() - closure(exampleMetadata) + try closure(exampleMetadata) } } internal func appendAfter(_ closure: @escaping AfterExampleClosure) { wrappers.prepend { _, runExample in runExample() - closure() + try closure() } } @@ -38,7 +48,7 @@ final internal class ExampleHooks { } internal func appendAround(_ closure: @escaping AroundExampleClosure) { - wrappers.append { _, runExample in closure(runExample) } + wrappers.append { _, runExample in try closure(runExample) } } } diff --git a/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift b/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift index b39292b..337ff1f 100644 --- a/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift +++ b/Pods/Quick/Sources/Quick/Hooks/SuiteHooks.swift @@ -17,7 +17,11 @@ final internal class SuiteHooks { internal func executeBefores() { phase = .beforesExecuting for before in befores { - before() + do { + try before() + } catch { + break + } } phase = .beforesFinished } @@ -25,7 +29,11 @@ final internal class SuiteHooks { internal func executeAfters() { phase = .aftersExecuting for after in afters { - after() + do { + try after() + } catch { + break + } } phase = .aftersFinished } diff --git a/Pods/Quick/Sources/Quick/QuickTestObservation.swift b/Pods/Quick/Sources/Quick/QuickTestObservation.swift index 8bfc95b..1c2c033 100644 --- a/Pods/Quick/Sources/Quick/QuickTestObservation.swift +++ b/Pods/Quick/Sources/Quick/QuickTestObservation.swift @@ -5,7 +5,7 @@ import XCTest /// A dummy protocol for calling the internal `+[QuickSpec buildExamplesIfNeeded]` method /// which is defined in Objective-C from Swift. -@objc internal protocol _QuickSpecInternal { +@objc internal protocol _QuickSpecInternal { // swiftlint:disable:this type_name static func buildExamplesIfNeeded() } @@ -27,52 +27,11 @@ import XCTest guard !didBuildAllExamples else { return } didBuildAllExamples = true - QuickSpec.enumerateSubclasses { specClass in - // This relies on `_QuickSpecInternal`. - (specClass as AnyClass).buildExamplesIfNeeded() - } - } -} - -// swiftlint:disable:next todo -// TODO: Unify this with QuickConfiguration's equivalent -extension QuickSpec { - internal static func enumerateSubclasses( - subclasses: [QuickSpec.Type]? = nil, - _ block: (QuickSpec.Type) -> Void - ) { - let subjects: [QuickSpec.Type] - if let subclasses = subclasses { - subjects = subclasses - } else { - let classesCount = objc_getClassList(nil, 0) - - guard classesCount > 0 else { - return + allSubclasses(ofType: QuickSpec.self) + .forEach { (specClass: QuickSpec.Type) in + // This relies on `_QuickSpecInternal`. + (specClass as AnyClass).buildExamplesIfNeeded() } - - let classes = UnsafeMutablePointer.allocate(capacity: Int(classesCount)) - defer { free(classes) } - - let autoreleasingClasses = AutoreleasingUnsafeMutablePointer(classes) - objc_getClassList(autoreleasingClasses, classesCount) - - var specSubclasses: [QuickSpec.Type] = [] - for index in 0.. Bool { + /// if property.isValid { + /// return true + /// } else { + /// XCTFail("\(property) is not valid") + /// return false + /// } + /// } + /// + /// guard checkProperty() else { + /// throw StopTest.error + /// } + /// ``` + public static let silently: StopTest = .init("", reportError: false, file: #file, line: #line) +} diff --git a/Pods/Quick/Sources/Quick/SubclassDetection.swift b/Pods/Quick/Sources/Quick/SubclassDetection.swift new file mode 100644 index 0000000..ad93036 --- /dev/null +++ b/Pods/Quick/Sources/Quick/SubclassDetection.swift @@ -0,0 +1,41 @@ +#if canImport(Darwin) + +import Foundation + +/// Determines if a class is a subclass of another by looping over the superclasses of the given class. +/// Apparently, `isSubclass(of:)` uses a different method to check this, which can cause exceptions to +/// be raised under certain circumstances when used in conjuction with `objc_getClassList`. +/// See https://github.com/Quick/Quick/issues/1155, and https://openradar.appspot.com/FB9854851. +func isClass(_ klass: AnyClass, aSubclassOf targetClass: AnyClass) -> Bool { + var superclass: AnyClass? = klass + while superclass != nil { + superclass = class_getSuperclass(superclass) + if superclass == targetClass { return true } + } + return false +} +#endif + +/// Retrieves the current list of all known classes that are a subtype of the desired type. +/// This uses `objc_copyClassList` instead of `objc_getClassList` because the get function +/// is subject to race conditions and buffer overflow issues. The copy function handles all of that for us. +/// Note: On non-Apple platforms, this will return an empty array. +func allSubclasses(ofType targetType: T.Type) -> [T.Type] { + #if canImport(Darwin) + // See https://developer.apple.com/forums/thread/700770. + var classesCount: UInt32 = 0 + guard let classList = objc_copyClassList(&classesCount) else { return [] } + defer { free(UnsafeMutableRawPointer(classList)) } + let classes = UnsafeBufferPointer(start: classList, count: Int(classesCount)) + + guard classesCount > 0 else { + return [] + } + + return classes.filter { isClass($0, aSubclassOf: targetType) } + // swiftlint:disable:next force_cast + .map { $0 as! T.Type } + #else + return [] + #endif +} diff --git a/Pods/Quick/Sources/Quick/TestSelectorNameProvider.swift b/Pods/Quick/Sources/Quick/TestSelectorNameProvider.swift new file mode 100644 index 0000000..4fad845 --- /dev/null +++ b/Pods/Quick/Sources/Quick/TestSelectorNameProvider.swift @@ -0,0 +1,52 @@ +#if canImport(Darwin) +import Foundation + +@objc internal final class TestSelectorNameProvider: NSObject { + @objc static func testSelectorName(for example: Example, classSelectorNames selectorNames: Set) -> String { + if useLegacyStyleTestSelectorNames { + return legacyStyleTestSelectorName(exampleName: example.name, classSelectorNames: selectorNames, isAsync: false) + } else { + return humanReadableTestSelectorName(exampleName: example.name, classSelectorNames: selectorNames) + } + } + + static func testSelectorName(forAsync example: AsyncExample, classSelectorNames selectorNames: Set) -> String { + if useLegacyStyleTestSelectorNames { + return legacyStyleTestSelectorName(exampleName: example.name, classSelectorNames: selectorNames, isAsync: true) + } else { + return humanReadableTestSelectorName(exampleName: example.name, classSelectorNames: selectorNames) + } + } + + internal static var useLegacyStyleTestSelectorNames: Bool = { + ProcessInfo.processInfo.environment["QUICK_USE_ENCODED_TEST_SELECTOR_NAMES"] != nil + }() + + private static func legacyStyleTestSelectorName(exampleName: String, classSelectorNames selectorNames: Set, isAsync: Bool) -> String { + let originalName = exampleName.c99ExtendedIdentifier + var selectorName = originalName + var index: UInt = 2 + + var proposedName = isAsync ? selectorName.appending(":") : selectorName + + while selectorNames.contains(proposedName) { + selectorName = String(format: "%@_%tu", originalName, index) + proposedName = isAsync ? selectorName.appending(":") : selectorName + index += 1 + } + + return proposedName + } + + private static func humanReadableTestSelectorName(exampleName: String, classSelectorNames selectorNames: Set) -> String { + var selectorName = exampleName + var index: UInt = 2 + + while selectorNames.contains(selectorName) { + selectorName = String(format: "%@ (%tu)", exampleName, index) + index += 1 + } + return selectorName + } +} +#endif diff --git a/Pods/Quick/Sources/Quick/TestState.swift b/Pods/Quick/Sources/Quick/TestState.swift new file mode 100644 index 0000000..c66cd38 --- /dev/null +++ b/Pods/Quick/Sources/Quick/TestState.swift @@ -0,0 +1,59 @@ +/// A property wrapper that will automatically reset the contained value after each test. +@propertyWrapper +public struct TestState { + private class Container { + var value: T? + } + + private let container = Container() + + public var wrappedValue: T! { + get { container.value } + set { container.value = newValue } + } + + /// Resets the property to nil after each test. + public init() { + if AsyncWorld.sharedWorld.currentExampleGroup != nil { + AsyncWorld.sharedWorld.beforeEach { [container] in + AsyncSpec.current.addTeardownBlock { + container.value = nil + } + } + } + + if World.sharedWorld.currentExampleGroup != nil { + World.sharedWorld.beforeEach { [container] in + QuickSpec.current.addTeardownBlock { + container.value = nil + } + } + } + } + + public init(wrappedValue: @escaping @autoclosure () -> T?) { + if AsyncWorld.sharedWorld.currentExampleGroup != nil { + AsyncWorld.sharedWorld.beforeEach { [container] in + container.value = wrappedValue() + AsyncSpec.current.addTeardownBlock { + container.value = nil + } + } + } + + if World.sharedWorld.currentExampleGroup != nil { + World.sharedWorld.beforeEach { [container] in + container.value = wrappedValue() + QuickSpec.current.addTeardownBlock { + container.value = nil + } + } + } + } + + /// Sets the property to an initial value before each test and resets it to nil after each test. + /// - Parameter initialValue: An autoclosure to return the initial value to use before the test. + public init(_ initialValue: @escaping @autoclosure () -> T) { + self.init(wrappedValue: initialValue()) + } +} diff --git a/Pods/Quick/Sources/Quick/World.swift b/Pods/Quick/Sources/Quick/World.swift index c14e871..3a51132 100644 --- a/Pods/Quick/Sources/Quick/World.swift +++ b/Pods/Quick/Sources/Quick/World.swift @@ -45,10 +45,12 @@ final internal class World: _WorldBase { This is useful for using the Quick test metadata (like its name) at runtime. */ + internal var currentExampleMetadata: SyncExampleMetadata? - internal var currentExampleMetadata: ExampleMetadata? - - internal var numberOfExamplesRun = 0 + internal var numberOfSyncExamplesRun = 0 + internal var numberOfExamplesRun: Int { + numberOfSyncExamplesRun + AsyncWorld.sharedWorld.numberOfAsyncExamplesRun + } /** A flag that indicates whether additional test suites are being run @@ -69,7 +71,8 @@ final internal class World: _WorldBase { internal private(set) var isConfigurationFinalized = false - internal var exampleHooks: ExampleHooks {return configuration.exampleHooks } + internal var exampleHooks: ExampleHooks { return configuration.exampleHooks } + internal var asyncExampleHooks: AsyncExampleHooks { return configuration.asyncExampleHooks } internal var suiteHooks: SuiteHooks { return configuration.suiteHooks } // MARK: Singleton Constructor @@ -134,7 +137,7 @@ final internal class World: _WorldBase { top level of a -[QuickSpec spec] method--it's thanks to this group that users can define beforeEach and it closures at the top level, like so: - override func spec() { + override class func spec() { // These belong to the root example group beforeEach {} it("is at the top level") {} @@ -166,16 +169,21 @@ final internal class World: _WorldBase { not excluded by exclusion filters. - parameter specClass: The QuickSpec subclass for which examples are to be returned. - - returns: A list of examples to be run as test invocations. + - returns: A list of examples to be run as test invocations, along with whether to run the full test, or just mark it as skipped. */ - internal func examples(forSpecClass specClass: QuickSpec.Type) -> [Example] { + internal func examples(forSpecClass specClass: QuickSpec.Type) -> [ExampleWrapper] { // 1. Grab all included examples. - let included = includedExamples + let included = includedExamples() // 2. Grab the intersection of (a) examples for this spec, and (b) included examples. - let spec = rootExampleGroup(forSpecClass: specClass).examples.filter { included.contains($0) } + let spec = rootExampleGroup(forSpecClass: specClass).examples.map { example in + return ExampleWrapper( + example: example, + runFullTest: included.first(where: { $0.example == example})?.runFullTest ?? false + ) + } // 3. Remove all excluded examples. - return spec.filter { example in - !self.configuration.exclusionFilters.contains { $0(example) } + return spec.map { test -> ExampleWrapper in + ExampleWrapper(example: test.example, runFullTest: test.runFullTest && !self.configuration.exclusionFilters.contains { $0(test.example) }) } } @@ -192,7 +200,7 @@ final internal class World: _WorldBase { } internal var includedExampleCount: Int { - return includedExamples.count + return includedExamples().count } internal lazy var cachedIncludedExampleCount: Int = self.includedExampleCount @@ -201,7 +209,7 @@ final internal class World: _WorldBase { let suiteBeforesExecuting = suiteHooks.phase == .beforesExecuting let exampleBeforesExecuting = exampleHooks.phase == .beforesExecuting var groupBeforesExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { + if let runningExampleGroup = currentExampleMetadata?.group { groupBeforesExecuting = runningExampleGroup.phase == .beforesExecuting } @@ -212,7 +220,7 @@ final internal class World: _WorldBase { let suiteAftersExecuting = suiteHooks.phase == .aftersExecuting let exampleAftersExecuting = exampleHooks.phase == .aftersExecuting var groupAftersExecuting = false - if let runningExampleGroup = currentExampleMetadata?.example.group { + if let runningExampleGroup = currentExampleMetadata?.group { groupAftersExecuting = runningExampleGroup.phase == .aftersExecuting } @@ -228,7 +236,7 @@ final internal class World: _WorldBase { currentExampleGroup = previousExampleGroup } - private var allExamples: [Example] { + private func allExamples() -> [Example] { var all: [Example] = [] for (_, group) in specs { group.walkDownExamples { all.append($0) } @@ -236,20 +244,32 @@ final internal class World: _WorldBase { return all } - private var includedExamples: [Example] { - let all = allExamples - let included = all.filter { example in + internal func hasFocusedExamples() -> Bool { + return allExamples().contains { example in return self.configuration.inclusionFilters.contains { $0(example) } } + } - if included.isEmpty && configuration.runAllWhenEverythingFiltered { - let exceptExcluded = all.filter { example in - return !self.configuration.exclusionFilters.contains { $0(example) } - } + private func includedExamples() -> [ExampleWrapper] { + let all = allExamples() + let hasFocusedExamples = self.hasFocusedExamples() || AsyncWorld.sharedWorld.hasFocusedExamples() - return exceptExcluded + if !hasFocusedExamples && configuration.runAllWhenEverythingFiltered { + return all.map { example in + return ExampleWrapper( + example: example, + runFullTest: !self.configuration.exclusionFilters.contains { $0(example) } + ) + } } else { - return included + return all.map { example in + return ExampleWrapper( + example: example, + runFullTest: self.configuration.inclusionFilters.contains { + $0(example) + } + ) + } } } @@ -265,3 +285,23 @@ final internal class World: _WorldBase { } } } + +#if canImport(Darwin) +// swiftlint:disable type_name +@objcMembers +internal class _ExampleWrapperBase: NSObject {} +#else +internal class _ExampleWrapperBase: NSObject {} +// swiftlint:enable type_name +#endif + +final internal class ExampleWrapper: _ExampleWrapperBase { + private(set) var example: Example + private(set) var runFullTest: Bool + + init(example: Example, runFullTest: Bool) { + self.example = example + self.runFullTest = runFullTest + super.init() + } +} diff --git a/Pods/Quick/Sources/QuickObjectiveC/AsyncSpec+testMethodSelectors.m b/Pods/Quick/Sources/QuickObjectiveC/AsyncSpec+testMethodSelectors.m new file mode 100644 index 0000000..26ef3b1 --- /dev/null +++ b/Pods/Quick/Sources/QuickObjectiveC/AsyncSpec+testMethodSelectors.m @@ -0,0 +1,28 @@ +#if __has_include("Quick-Swift.h") +#import "Quick-Swift.h" +#else +#import +#endif + +@interface AsyncSpec (testMethodSelectors) +@end + +@implementation AsyncSpec (testMethodSelectors) + ++ (NSArray *)testInvocations { + NSArray *selectors = [self darwinXCTestMethodSelectors]; + NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:selectors.count]; + + for (NSString *selectorString in selectors) { + SEL selector = NSSelectorFromString(selectorString); + NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; + NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; + invocation.selector = selector; + + [invocations addObject:invocation]; + } + + return invocations; +} + +@end diff --git a/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h index d3e3f64..f2d52e7 100644 --- a/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h +++ b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.h @@ -35,7 +35,7 @@ #define QuickSpecBegin(name) \ @interface name : QuickSpec; @end \ @implementation name \ - - (void)spec { \ + + (void)spec { \ /** @@ -65,6 +65,7 @@ QUICK_EXPORT void qck_afterEach(QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure); QUICK_EXPORT void qck_aroundEach(QCKDSLAroundExampleBlock closure); QUICK_EXPORT void qck_aroundEachWithMetadata(QCKDSLAroundExampleMetadataBlock closure); +QUICK_EXPORT void qck_justBeforeEach(QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_pending(NSString *description, QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure); QUICK_EXPORT void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure); @@ -73,193 +74,178 @@ QUICK_EXPORT void qck_fcontext(NSString *description, QCKDSLEmptyBlock closure); #ifndef QUICK_DISABLE_SHORT_SYNTAX /** - Defines a closure to be run prior to any examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. + Defines a closure to be run prior to any examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. - If the test suite crashes before the first example is run, this closure - will not be executed. + If the test suite crashes before the first example is run, this closure + will not be executed. - @param closure The closure to be run prior to any examples in the test suite. + @param closure The closure to be run prior to any examples in the test suite. */ static inline void beforeSuite(QCKDSLEmptyBlock closure) { qck_beforeSuite(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines a closure to be run after all of the examples in the test suite. - You may define an unlimited number of these closures, but there is no - guarantee as to the order in which they're run. + Defines a closure to be run after all of the examples in the test suite. + You may define an unlimited number of these closures, but there is no + guarantee as to the order in which they're run. - If the test suite crashes before all examples are run, this closure - will not be executed. + If the test suite crashes before all examples are run, this closure + will not be executed. - @param closure The closure to be run after all of the examples in the test suite. + @param closure The closure to be run after all of the examples in the test suite. */ static inline void afterSuite(QCKDSLEmptyBlock closure) { qck_afterSuite(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines a group of shared examples. These examples can be re-used in several locations - by using the `itBehavesLike` function. - - @param name The name of the shared example group. This must be unique across all shared example - groups defined in a test suite. - @param closure A closure containing the examples. This behaves just like an example group defined - 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`). + Defines a group of shared examples. These examples can be re-used in several locations + by using the ``itBehavesLike`` function. + + @param name The name of the shared example group. This must be unique across all shared example + groups defined in a test suite. + @param closure A closure containing the examples. This behaves just like an example group defined + 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`). */ static inline void sharedExamples(NSString *name, QCKDSLSharedExampleBlock closure) { qck_sharedExamples(name, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines an example group. Example groups are logical groupings of examples. - Example groups can share setup and teardown code. + Defines an example group. Example groups are logical groupings of examples. + Example groups can share setup and teardown code. - @param description An arbitrary string describing the example group. - @param closure A closure that can contain other examples. + @param description An arbitrary string describing the example group. + @param closure A closure that can contain other examples. */ static inline void describe(NSString *description, QCKDSLEmptyBlock closure) { qck_describe(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines an example group. Equivalent to `describe`. + Defines an example group. Equivalent to ``describe(description, closure)``. */ static inline void context(NSString *description, QCKDSLEmptyBlock closure) { qck_context(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines a closure to be run prior to each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of beforeEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. + Defines a closure to be run prior to each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of beforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. - @param closure The closure to be run prior to each example. + @param closure The closure to be run prior to each example. */ static inline void beforeEach(QCKDSLEmptyBlock closure) { qck_beforeEach(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Identical to QCKDSL.beforeEach, except the closure is provided with - metadata on the example that the closure is being run prior to. + Identical to ``beforeEach(closure)``, except the closure is provided with + metadata on the example that the closure is being run prior to. */ static inline void beforeEachWithMetadata(QCKDSLExampleMetadataBlock closure) { qck_beforeEachWithMetadata(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines a closure to be run after each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - An example group may contain an unlimited number of afterEach. They'll be - run in the order they're defined, but you shouldn't rely on that behavior. - - @param closure The closure to be run after each example. + Defines a closure to be run after each example in the current example + group. This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of afterEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + @param closure The closure to be run after each example. */ static inline void afterEach(QCKDSLEmptyBlock closure) { qck_afterEach(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Identical to QCKDSL.afterEach, except the closure is provided with - metadata on the example that the closure is being run after. + Identical to ``afterEach(closure)``, except the closure is provided with + metadata on the example that the closure is being run after. */ static inline void afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { qck_afterEachWithMetadata(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Defines a closure to that wraps each example in the current example - group. This closure is not run for pending or otherwise disabled examples. - - The closure you pass to aroundEach receives a callback as its argument, which - it MUST call exactly one for the example to run properly: - - aroundEach(^(QCKDSLEmptyBlock runExample) { - [self doSomeSetup]; - runExample(); - [self doSomeCleanup]; - }); - - This callback is particularly useful for test decartions that can’t split - into a separate beforeEach and afterEach. For example, running each example - in its own autorelease pool requires aroundEach: - - aroundEach(^(QCKDSLEmptyBlock runExample) { - @autoreleasepool { - runExample(); - } - [self checkObjectsNoLongerRetained]; - }); - - You can also use aroundEach to guarantee proper nesting of setup and cleanup - operations in situations where their relative order matters. - - An example group may contain an unlimited number of aroundEach callbacks. - They will nest inside each other, with the first declared in the group - nested at the outermost level. - - - parameter closure: The closure that wraps around each example. -*/ + Defines a closure to be run around each example in the currente example group. + You must call the passed-in `runClosure` argument at least once in order to + run the example. This closure is not run for pending or otherwise disabled example. + An example group may contain an unlimited number of `aroundEach`. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + @param closure The closure to run around each example. This closure itself takes + in a closure: the before-mentioned `runClosure` argument. The `runClosure` argument + must be called at once and only once. + */ static inline void aroundEach(QCKDSLAroundExampleBlock closure) { qck_aroundEach(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Identical to Quick.DSL.aroundEach, except the closure receives metadata - about the example that the closure wraps. + Identical to ``aroundEach(closure)``, except the closure is provided with + metadata on the example that the closure is being run around. + + @param closure The closure to run around each example. This closure itself takes + in an ``ExampleMetadata-swift.class`` object and a closure. + The ``ExampleMetadata-swift.class`` provides information about the example being run around. + The closure is the example to run, and must be called at once and only once. */ static inline void aroundEachWithMetadata(QCKDSLAroundExampleMetadataBlock closure) { qck_aroundEachWithMetadata(closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - 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. - - @param description An arbitrary string describing the example or example group. - @param closure A closure that will not be evaluated. + Defines a closure to be run prior to each example but after any beforeEach blocks. + This closure is not run for pending or otherwise disabled examples. + An example group may contain an unlimited number of justBeforeEach. They'll be + run in the order they're defined, but you shouldn't rely on that behavior. + + @param closure The closure to be run prior to each example but before any beforeEach blocks in the test suite. */ -static inline void pending(NSString *description, QCKDSLEmptyBlock closure) { - qck_pending(description, closure); -} +static inline void justBeforeEach(QCKDSLEmptyBlock closure) { + qck_justBeforeEach(closure); +} NS_SWIFT_UNAVAILABLE("") /** - Use this to quickly mark a `describe` block as pending. - This disables all examples within the block. + Use this to quickly mark a ``describe(description, closure)`` block as pending. + This disables all examples within the block. */ static inline void xdescribe(NSString *description, QCKDSLEmptyBlock closure) { qck_xdescribe(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Use this to quickly mark a `context` block as pending. - This disables all examples within the block. + Use this to quickly mark a ``context(description, closure)`` block as pending. + This disables all examples within the block. */ static inline void xcontext(NSString *description, QCKDSLEmptyBlock closure) { qck_xcontext(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Use this to quickly focus a `describe` block, focusing the examples in the block. - If any examples in the test suite are focused, only those examples are executed. - This trumps any explicitly focused or unfocused examples within the block--they are all treated as focused. + Use this to quickly focus a ``describe(description, closure)`` block, focusing the examples in the block. + If any examples in the test suite are focused, only those examples are executed. + This trumps any explicitly focused or unfocused examples within the block--they are all treated as focused. */ static inline void fdescribe(NSString *description, QCKDSLEmptyBlock closure) { qck_fdescribe(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") /** - Use this to quickly focus a `context` block. Equivalent to `fdescribe`. + Use this to quickly focus a ``context(description, closure)`` block. + Equivalent to ``fdescribe(description, closure)``. */ static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { qck_fcontext(description, closure); -} +} NS_SWIFT_UNAVAILABLE("") #define it qck_it #define xit qck_xit @@ -267,6 +253,7 @@ static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { #define itBehavesLike qck_itBehavesLike #define xitBehavesLike qck_xitBehavesLike #define fitBehavesLike qck_fitBehavesLike +#define pending qck_pending #endif #define qck_it qck_it_builder(@(__FILE__), __LINE__) @@ -275,13 +262,15 @@ static inline void fcontext(NSString *description, QCKDSLEmptyBlock closure) { #define qck_itBehavesLike qck_itBehavesLike_builder(@(__FILE__), __LINE__) #define qck_xitBehavesLike qck_xitBehavesLike_builder(@(__FILE__), __LINE__) #define qck_fitBehavesLike qck_fitBehavesLike_builder(@(__FILE__), __LINE__) +#define qck_pending qck_pending_builder(@(__FILE__), __LINE__) typedef void (^QCKItBlock)(NSString *description, QCKDSLEmptyBlock closure); typedef void (^QCKItBehavesLikeBlock)(NSString *description, QCKDSLSharedExampleContext context); -QUICK_EXPORT QCKItBlock qck_it_builder(NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBlock qck_xit_builder(NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBlock qck_fit_builder(NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_xitBehavesLike_builder(NSString *file, NSUInteger line); -QUICK_EXPORT QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line); +QUICK_EXPORT QCKItBlock qck_it_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBlock qck_xit_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBlock qck_fit_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBehavesLikeBlock qck_itBehavesLike_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBehavesLikeBlock qck_xitBehavesLike_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); +QUICK_EXPORT QCKItBlock qck_pending_builder(NSString *file, NSUInteger line) NS_SWIFT_UNAVAILABLE(""); diff --git a/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m index 9285265..ba30410 100644 --- a/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m +++ b/Pods/Quick/Sources/QuickObjectiveC/DSL/QCKDSL.m @@ -42,6 +42,10 @@ void qck_afterEachWithMetadata(QCKDSLExampleMetadataBlock closure) { [[World sharedWorld] afterEachWithMetadata:closure]; } +void qck_justBeforeEach(QCKDSLEmptyBlock closure) { + [[World sharedWorld] justBeforeEach:closure]; +} + void qck_aroundEach(QCKDSLAroundExampleBlock closure) { [[World sharedWorld] aroundEach:closure]; } @@ -104,16 +108,10 @@ QCKItBehavesLikeBlock qck_fitBehavesLike_builder(NSString *file, NSUInteger line }; } -void qck_pending(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] pending:description closure:closure]; -} - -void qck_xdescribe(NSString *description, QCKDSLEmptyBlock closure) { - [[World sharedWorld] xdescribe:description closure:closure]; -} - -void qck_xcontext(NSString *description, QCKDSLEmptyBlock closure) { - qck_xdescribe(description, closure); +QCKItBlock qck_pending_builder(NSString *file, NSUInteger line) { + return ^(NSString *description, QCKDSLEmptyBlock closure) { + [[World sharedWorld] pendingWithDescription:description file:file line:line closure:closure]; + }; } void qck_fdescribe(NSString *description, QCKDSLEmptyBlock closure) { diff --git a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h index ccf006e..e4d3e5e 100644 --- a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h +++ b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.h @@ -34,7 +34,7 @@ and examples. @code - override func spec() { + override class func spec() { describe("winter") { it("is coming") { // ... @@ -45,11 +45,13 @@ See DSL.swift for more information on what syntax is available. */ -- (void)spec; ++ (void)spec; /** Returns the currently executing spec. Use in specs that require XCTestCase methods, e.g. expectationWithDescription. + + If you're using `beforeSuite`/`afterSuite`, you should consider the ``currentSpec()`` helper. */ @property (class, nonatomic, readonly) QuickSpec *current; diff --git a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m index 2d6b1fc..a7d83a1 100644 --- a/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m +++ b/Pods/Quick/Sources/QuickObjectiveC/QuickSpec.m @@ -28,13 +28,13 @@ + (NSArray *)testInvocations { // In case of fix in later versions next line can be removed [[QuickTestObservation sharedInstance] buildAllExamplesIfNeeded]; - NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; + NSArray *examples = [[World sharedWorld] examplesForSpecClass:[self class]]; NSMutableArray *invocations = [NSMutableArray arrayWithCapacity:[examples count]]; NSMutableSet *selectorNames = [NSMutableSet set]; - for (Example *example in examples) { - SEL selector = [self addInstanceMethodForExample:example classSelectorNames:selectorNames]; + for (ExampleWrapper *exampleWrapper in examples) { + SEL selector = [self addInstanceMethodForExample:exampleWrapper.example runFullTest:exampleWrapper.runFullTest classSelectorNames:selectorNames]; NSMethodSignature *signature = [self instanceMethodSignatureForSelector:selector]; NSInvocation *invocation = [NSInvocation invocationWithMethodSignature:signature]; @@ -46,9 +46,27 @@ + (NSArray *)testInvocations { return invocations; } +/** + This method is used as a hook for injecting test methods into the + Objective-C runtime on individual test runs. + + When `xctest` runs a test on a single method, it does not call + `defaultTestSuite` on the test class but rather calls + `instancesRespondToSelector:` to build its own suite. + + In normal conditions, Quick uses the implicit call to `defaultTestSuite` + to both generate examples and inject them as methods by way of + `testInvocations`. Under single test conditions, there's no implicit + call to `defaultTestSuite` so we make it explicitly here. + */ ++ (BOOL)instancesRespondToSelector:(SEL)aSelector { + [self defaultTestSuite]; + return [super instancesRespondToSelector:aSelector]; +} + #pragma mark - Public Interface -- (void)spec { } ++ (void)spec { } + (QuickSpec*) current { return currentSpec; @@ -73,10 +91,8 @@ + (void)buildExamplesIfNeeded { ExampleGroup *rootExampleGroup = [world rootExampleGroupForSpecClass:[self class]]; [world performWithCurrentExampleGroup:rootExampleGroup closure:^{ - QuickSpec *spec = [self new]; - @try { - [spec spec]; + [self spec]; } @catch (NSException *exception) { [NSException raise:NSInternalInconsistencyException @@ -108,25 +124,24 @@ + (void)buildExamplesIfNeeded { @return The selector of the newly defined instance method. */ -+ (SEL)addInstanceMethodForExample:(Example *)example classSelectorNames:(NSMutableSet *)selectorNames { ++ (SEL)addInstanceMethodForExample:(Example *)example runFullTest:(BOOL)runFullTest classSelectorNames:(NSMutableSet *)selectorNames { IMP implementation = imp_implementationWithBlock(^(QuickSpec *self){ self.example = example; currentSpec = self; - [example run]; + if (runFullTest) { + [example run]; + } else { + [example runSkippedTest]; + } + currentSpec = nil; }); const char *types = [[NSString stringWithFormat:@"%s%s%s", @encode(void), @encode(id), @encode(SEL)] UTF8String]; - NSString *originalName = [QCKObjCStringUtils c99ExtendedIdentifierFrom:example.name]; - NSString *selectorName = originalName; - NSUInteger i = 2; - - while ([selectorNames containsObject:selectorName]) { - selectorName = [NSString stringWithFormat:@"%@_%tu", originalName, i++]; - } - + NSString *selectorName = [TestSelectorNameProvider testSelectorNameFor:example classSelectorNames:selectorNames]; + [selectorNames addObject:selectorName]; - + SEL selector = NSSelectorFromString(selectorName); class_addMethod(self, selector, implementation, types); diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException-Info.plist b/Pods/Target Support Files/CwlCatchException/CwlCatchException-Info.plist new file mode 100644 index 0000000..3e91b61 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException-dummy.m b/Pods/Target Support Files/CwlCatchException/CwlCatchException-dummy.m new file mode 100644 index 0000000..3efcf02 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CwlCatchException : NSObject +@end +@implementation PodsDummy_CwlCatchException +@end diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException-prefix.pch b/Pods/Target Support Files/CwlCatchException/CwlCatchException-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException-prefix.pch @@ -0,0 +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/CwlCatchException/CwlCatchException-umbrella.h b/Pods/Target Support Files/CwlCatchException/CwlCatchException-umbrella.h new file mode 100644 index 0000000..7acce82 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double CwlCatchExceptionVersionNumber; +FOUNDATION_EXPORT const unsigned char CwlCatchExceptionVersionString[]; + diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException.debug.xcconfig b/Pods/Target Support Files/CwlCatchException/CwlCatchException.debug.xcconfig new file mode 100644 index 0000000..faee21f --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException.debug.xcconfig @@ -0,0 +1,16 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchExceptionSupport" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlCatchException +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException.modulemap b/Pods/Target Support Files/CwlCatchException/CwlCatchException.modulemap new file mode 100644 index 0000000..6ec3281 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException.modulemap @@ -0,0 +1,6 @@ +framework module CwlCatchException { + umbrella header "CwlCatchException-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/CwlCatchException/CwlCatchException.release.xcconfig b/Pods/Target Support Files/CwlCatchException/CwlCatchException.release.xcconfig new file mode 100644 index 0000000..faee21f --- /dev/null +++ b/Pods/Target Support Files/CwlCatchException/CwlCatchException.release.xcconfig @@ -0,0 +1,16 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchExceptionSupport" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlCatchException +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-Info.plist b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-Info.plist new file mode 100644 index 0000000..3e91b61 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-dummy.m b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-dummy.m new file mode 100644 index 0000000..c9327de --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CwlCatchExceptionSupport : NSObject +@end +@implementation PodsDummy_CwlCatchExceptionSupport +@end diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-prefix.pch b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-prefix.pch @@ -0,0 +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/CwlCatchExceptionSupport/CwlCatchExceptionSupport-umbrella.h b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-umbrella.h new file mode 100644 index 0000000..4b76b2b --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport-umbrella.h @@ -0,0 +1,17 @@ +#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" + +FOUNDATION_EXPORT double CwlCatchExceptionSupportVersionNumber; +FOUNDATION_EXPORT const unsigned char CwlCatchExceptionSupportVersionString[]; + diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.debug.xcconfig b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.debug.xcconfig new file mode 100644 index 0000000..3f9a387 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.debug.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlCatchExceptionSupport +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.modulemap b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.modulemap new file mode 100644 index 0000000..670403d --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.modulemap @@ -0,0 +1,6 @@ +framework module CwlCatchExceptionSupport { + umbrella header "CwlCatchExceptionSupport-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.release.xcconfig b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.release.xcconfig new file mode 100644 index 0000000..3f9a387 --- /dev/null +++ b/Pods/Target Support Files/CwlCatchExceptionSupport/CwlCatchExceptionSupport.release.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlCatchExceptionSupport +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-Info.plist b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-Info.plist new file mode 100644 index 0000000..3e91b61 --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-dummy.m b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-dummy.m new file mode 100644 index 0000000..d9fac03 --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CwlMachBadInstructionHandler : NSObject +@end +@implementation PodsDummy_CwlMachBadInstructionHandler +@end diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-prefix.pch b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-prefix.pch @@ -0,0 +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/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-umbrella.h b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-umbrella.h new file mode 100644 index 0000000..8f87427 --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler-umbrella.h @@ -0,0 +1,18 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + +#import "CwlMachBadInstructionHandler.h" +#import "mach_excServer.h" + +FOUNDATION_EXPORT double CwlMachBadInstructionHandlerVersionNumber; +FOUNDATION_EXPORT const unsigned char CwlMachBadInstructionHandlerVersionString[]; + diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.debug.xcconfig b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.debug.xcconfig new file mode 100644 index 0000000..8b0579b --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.debug.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlMachBadInstructionHandler +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.modulemap b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.modulemap new file mode 100644 index 0000000..bdb3056 --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.modulemap @@ -0,0 +1,6 @@ +framework module CwlMachBadInstructionHandler { + umbrella header "CwlMachBadInstructionHandler-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.release.xcconfig b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.release.xcconfig new file mode 100644 index 0000000..8b0579b --- /dev/null +++ b/Pods/Target Support Files/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.release.xcconfig @@ -0,0 +1,12 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlMachBadInstructionHandler +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-Info.plist b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-Info.plist new file mode 100644 index 0000000..3e91b61 --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.0 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-dummy.m b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-dummy.m new file mode 100644 index 0000000..9df5b30 --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CwlPosixPreconditionTesting : NSObject +@end +@implementation PodsDummy_CwlPosixPreconditionTesting +@end diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-prefix.pch b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-prefix.pch @@ -0,0 +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/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-umbrella.h b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-umbrella.h new file mode 100644 index 0000000..6d066cd --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double CwlPosixPreconditionTestingVersionNumber; +FOUNDATION_EXPORT const unsigned char CwlPosixPreconditionTestingVersionString[]; + diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.debug.xcconfig b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.debug.xcconfig new file mode 100644 index 0000000..e72066d --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.debug.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlPosixPreconditionTesting +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.modulemap b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.modulemap new file mode 100644 index 0000000..b388a47 --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.modulemap @@ -0,0 +1,6 @@ +framework module CwlPosixPreconditionTesting { + umbrella header "CwlPosixPreconditionTesting-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.release.xcconfig b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.release.xcconfig new file mode 100644 index 0000000..e72066d --- /dev/null +++ b/Pods/Target Support Files/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.release.xcconfig @@ -0,0 +1,14 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlPosixPreconditionTesting +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-Info.plist b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-Info.plist new file mode 100644 index 0000000..38610d2 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-Info.plist @@ -0,0 +1,26 @@ + + + + + CFBundleDevelopmentRegion + ${PODS_DEVELOPMENT_LANGUAGE} + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIdentifier + ${PRODUCT_BUNDLE_IDENTIFIER} + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + FMWK + CFBundleShortVersionString + 2.2.1 + CFBundleSignature + ???? + CFBundleVersion + ${CURRENT_PROJECT_VERSION} + NSPrincipalClass + + + diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-dummy.m b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-dummy.m new file mode 100644 index 0000000..b33eab5 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-dummy.m @@ -0,0 +1,5 @@ +#import +@interface PodsDummy_CwlPreconditionTesting : NSObject +@end +@implementation PodsDummy_CwlPreconditionTesting +@end diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-prefix.pch b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-prefix.pch new file mode 100644 index 0000000..beb2a24 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-prefix.pch @@ -0,0 +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/CwlPreconditionTesting/CwlPreconditionTesting-umbrella.h b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-umbrella.h new file mode 100644 index 0000000..e6319a2 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting-umbrella.h @@ -0,0 +1,16 @@ +#ifdef __OBJC__ +#import +#else +#ifndef FOUNDATION_EXPORT +#if defined(__cplusplus) +#define FOUNDATION_EXPORT extern "C" +#else +#define FOUNDATION_EXPORT extern +#endif +#endif +#endif + + +FOUNDATION_EXPORT double CwlPreconditionTestingVersionNumber; +FOUNDATION_EXPORT const unsigned char CwlPreconditionTestingVersionString[]; + diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.debug.xcconfig b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.debug.xcconfig new file mode 100644 index 0000000..9294c61 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.debug.xcconfig @@ -0,0 +1,16 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchException" -framework "CwlMachBadInstructionHandler" -framework "CwlPosixPreconditionTesting" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlPreconditionTesting +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.modulemap b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.modulemap new file mode 100644 index 0000000..b0cb51e --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.modulemap @@ -0,0 +1,6 @@ +framework module CwlPreconditionTesting { + umbrella header "CwlPreconditionTesting-umbrella.h" + + export * + module * { export * } +} diff --git a/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.release.xcconfig b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.release.xcconfig new file mode 100644 index 0000000..9294c61 --- /dev/null +++ b/Pods/Target Support Files/CwlPreconditionTesting/CwlPreconditionTesting.release.xcconfig @@ -0,0 +1,16 @@ +CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO +CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting +FRAMEWORK_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" +GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchException" -framework "CwlMachBadInstructionHandler" -framework "CwlPosixPreconditionTesting" +OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS +PODS_BUILD_DIR = ${BUILD_DIR} +PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} +PODS_ROOT = ${SRCROOT} +PODS_TARGET_SRCROOT = ${PODS_ROOT}/CwlPreconditionTesting +PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates +PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} +SKIP_INSTALL = YES +USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Nimble/Nimble-Info.plist b/Pods/Target Support Files/Nimble/Nimble-Info.plist index a451985..dced619 100644 --- a/Pods/Target Support Files/Nimble/Nimble-Info.plist +++ b/Pods/Target Support Files/Nimble/Nimble-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 10.0.0 + 13.2.1 CFBundleSignature ???? CFBundleVersion diff --git a/Pods/Target Support Files/Nimble/Nimble-umbrella.h b/Pods/Target Support Files/Nimble/Nimble-umbrella.h index 15ed932..35609a7 100644 --- a/Pods/Target Support Files/Nimble/Nimble-umbrella.h +++ b/Pods/Target Support Files/Nimble/Nimble-umbrella.h @@ -14,9 +14,6 @@ #import "DSL.h" #import "NMBExceptionCapture.h" #import "NMBStringify.h" -#import "CwlCatchException.h" -#import "CwlMachBadInstructionHandler.h" -#import "mach_excServer.h" FOUNDATION_EXPORT double NimbleVersionNumber; FOUNDATION_EXPORT const unsigned char NimbleVersionString[]; diff --git a/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig b/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig index 32f7768..c3b0599 100644 --- a/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig +++ b/Pods/Target Support Files/Nimble/Nimble.debug.xcconfig @@ -4,18 +4,17 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble DEFINES_MODULE = YES ENABLE_BITCODE = NO ENABLE_TESTING_SEARCH_PATHS = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -weak_framework "XCTest" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -framework "CwlPreconditionTesting" -weak_framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Nimble/Nimble.release.xcconfig b/Pods/Target Support Files/Nimble/Nimble.release.xcconfig index 32f7768..c3b0599 100644 --- a/Pods/Target Support Files/Nimble/Nimble.release.xcconfig +++ b/Pods/Target Support Files/Nimble/Nimble.release.xcconfig @@ -4,18 +4,17 @@ CONFIGURATION_BUILD_DIR = ${PODS_CONFIGURATION_BUILD_DIR}/Nimble DEFINES_MODULE = YES ENABLE_BITCODE = NO ENABLE_TESTING_SEARCH_PATHS = YES -FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" +FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -weak_framework "XCTest" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -weak-lXCTestSwiftSupport -framework "CwlPreconditionTesting" -weak_framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS $(inherited) -suppress-warnings PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Nimble PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist index 2243fe6..19cf209 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown index c2cb63e..1a386c1 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.markdown @@ -1,6 +1,101 @@ # Acknowledgements This application makes use of the following third party libraries: +## CwlCatchException + +ISC License + +Copyright © 2017 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. + + +## CwlCatchExceptionSupport + +ISC License + +Copyright © 2017 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. + + +## CwlMachBadInstructionHandler + +ISC License + +Copyright © 2017 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. + + +## CwlPosixPreconditionTesting + +ISC License + +Copyright © 2017 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. + + +## CwlPreconditionTesting + +ISC License + +Copyright © 2017 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. + + ## Nimble Apache License diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist index 252bf55..1807af9 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-acknowledgements.plist @@ -12,6 +12,131 @@ Type PSGroupSpecifier + + FooterText + ISC License + +Copyright © 2017 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. + + License + ISC + Title + CwlCatchException + Type + PSGroupSpecifier + + + FooterText + ISC License + +Copyright © 2017 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. + + License + ISC + Title + CwlCatchExceptionSupport + Type + PSGroupSpecifier + + + FooterText + ISC License + +Copyright © 2017 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. + + License + ISC + Title + CwlMachBadInstructionHandler + Type + PSGroupSpecifier + + + FooterText + ISC License + +Copyright © 2017 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. + + License + ISC + Title + CwlPosixPreconditionTesting + Type + PSGroupSpecifier + + + FooterText + ISC License + +Copyright © 2017 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. + + License + ISC + Title + CwlPreconditionTesting + Type + PSGroupSpecifier + FooterText Apache License diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-input-files.xcfilelist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-input-files.xcfilelist index 6323d70..5d60bf6 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-input-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-input-files.xcfilelist @@ -1,3 +1,8 @@ ${PODS_ROOT}/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh +${BUILT_PRODUCTS_DIR}/CwlCatchException/CwlCatchException.framework +${BUILT_PRODUCTS_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework +${BUILT_PRODUCTS_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework +${BUILT_PRODUCTS_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework +${BUILT_PRODUCTS_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.framework ${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework ${BUILT_PRODUCTS_DIR}/Quick/Quick.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-output-files.xcfilelist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-output-files.xcfilelist index 26331d0..66dffc3 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-output-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Debug-output-files.xcfilelist @@ -1,2 +1,7 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlCatchException.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlCatchExceptionSupport.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlMachBadInstructionHandler.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlPosixPreconditionTesting.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlPreconditionTesting.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-input-files.xcfilelist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-input-files.xcfilelist index 6323d70..5d60bf6 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-input-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-input-files.xcfilelist @@ -1,3 +1,8 @@ ${PODS_ROOT}/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh +${BUILT_PRODUCTS_DIR}/CwlCatchException/CwlCatchException.framework +${BUILT_PRODUCTS_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework +${BUILT_PRODUCTS_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework +${BUILT_PRODUCTS_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework +${BUILT_PRODUCTS_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.framework ${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework ${BUILT_PRODUCTS_DIR}/Quick/Quick.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-output-files.xcfilelist b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-output-files.xcfilelist index 26331d0..66dffc3 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-output-files.xcfilelist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks-Release-output-files.xcfilelist @@ -1,2 +1,7 @@ +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlCatchException.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlCatchExceptionSupport.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlMachBadInstructionHandler.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlPosixPreconditionTesting.framework +${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/CwlPreconditionTesting.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Nimble.framework ${TARGET_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}/Quick.framework \ No newline at end of file diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh index 0420a86..4233ffc 100755 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests-frameworks.sh @@ -18,7 +18,7 @@ echo "mkdir -p ${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" mkdir -p "${CONFIGURATION_BUILD_DIR}/${FRAMEWORKS_FOLDER_PATH}" COCOAPODS_PARALLEL_CODE_SIGN="${COCOAPODS_PARALLEL_CODE_SIGN:-false}" -SWIFT_STDLIB_PATH="${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" +SWIFT_STDLIB_PATH="${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" BCSYMBOLMAP_DIR="BCSymbolMaps" @@ -41,7 +41,7 @@ install_framework() if [ -L "${source}" ]; then echo "Symlinked..." - source="$(readlink "${source}")" + source="$(readlink -f "${source}")" fi if [ -d "${source}/${BCSYMBOLMAP_DIR}" ]; then @@ -176,10 +176,20 @@ code_sign_if_enabled() { } if [[ "$CONFIGURATION" == "Debug" ]]; then + install_framework "${BUILT_PRODUCTS_DIR}/CwlCatchException/CwlCatchException.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.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}/CwlCatchException/CwlCatchException.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework" + install_framework "${BUILT_PRODUCTS_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.framework" install_framework "${BUILT_PRODUCTS_DIR}/Nimble/Nimble.framework" install_framework "${BUILT_PRODUCTS_DIR}/Quick/Quick.framework" fi diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig index ad26395..972ed33 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.debug.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -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}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException/CwlCatchException.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchException" -framework "CwlCatchExceptionSupport" -framework "CwlMachBadInstructionHandler" -framework "CwlPosixPreconditionTesting" -framework "CwlPreconditionTesting" -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig index ad26395..972ed33 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig +++ b/Pods/Target Support Files/Pods-OSPaymentsLib-OSPaymentsLibTests/Pods-OSPaymentsLib-OSPaymentsLibTests.release.xcconfig @@ -1,11 +1,11 @@ ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES = YES CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO -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}/CwlCatchException" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble" "${PODS_CONFIGURATION_BUILD_DIR}/Quick" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" +HEADER_SEARCH_PATHS = $(inherited) "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchException/CwlCatchException.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlCatchExceptionSupport/CwlCatchExceptionSupport.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlMachBadInstructionHandler/CwlMachBadInstructionHandler.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPosixPreconditionTesting/CwlPosixPreconditionTesting.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/CwlPreconditionTesting/CwlPreconditionTesting.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Nimble/Nimble.framework/Headers" "${PODS_CONFIGURATION_BUILD_DIR}/Quick/Quick.framework/Headers" LD_RUNPATH_SEARCH_PATHS = $(inherited) /usr/lib/swift "$(PLATFORM_DIR)/Developer/Library/Frameworks" '@executable_path/Frameworks' '@loader_path/Frameworks' -LIBRARY_SEARCH_PATHS = $(inherited) "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift -OTHER_LDFLAGS = $(inherited) -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +OTHER_LDFLAGS = $(inherited) -framework "CwlCatchException" -framework "CwlCatchExceptionSupport" -framework "CwlMachBadInstructionHandler" -framework "CwlPosixPreconditionTesting" -framework "CwlPreconditionTesting" -framework "Nimble" -framework "Quick" -framework "XCTest" -weak_framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) diff --git a/Pods/Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist b/Pods/Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist index 2243fe6..19cf209 100644 --- a/Pods/Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist +++ b/Pods/Target Support Files/Pods-OSPaymentsLib/Pods-OSPaymentsLib-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier diff --git a/Pods/Target Support Files/Quick/Quick-Info.plist b/Pods/Target Support Files/Quick/Quick-Info.plist index 8d87a1a..8cc444f 100644 --- a/Pods/Target Support Files/Quick/Quick-Info.plist +++ b/Pods/Target Support Files/Quick/Quick-Info.plist @@ -3,7 +3,7 @@ CFBundleDevelopmentRegion - en + ${PODS_DEVELOPMENT_LANGUAGE} CFBundleExecutable ${EXECUTABLE_NAME} CFBundleIdentifier @@ -15,7 +15,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 5.0.1 + 7.5.0 CFBundleSignature ???? CFBundleVersion diff --git a/Pods/Target Support Files/Quick/Quick.debug.xcconfig b/Pods/Target Support Files/Quick/Quick.debug.xcconfig index ddea45d..d949e13 100644 --- a/Pods/Target Support Files/Quick/Quick.debug.xcconfig +++ b/Pods/Target Support Files/Quick/Quick.debug.xcconfig @@ -6,16 +6,15 @@ ENABLE_BITCODE = NO ENABLE_TESTING_SEARCH_PATHS = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/Pods/Target Support Files/Quick/Quick.release.xcconfig b/Pods/Target Support Files/Quick/Quick.release.xcconfig index ddea45d..d949e13 100644 --- a/Pods/Target Support Files/Quick/Quick.release.xcconfig +++ b/Pods/Target Support Files/Quick/Quick.release.xcconfig @@ -6,16 +6,15 @@ ENABLE_BITCODE = NO ENABLE_TESTING_SEARCH_PATHS = YES FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" GCC_PREPROCESSOR_DEFINITIONS = $(inherited) COCOAPODS=1 -LIBRARY_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" "${DT_TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift +LIBRARY_SEARCH_PATHS = $(inherited) "${TOOLCHAIN_DIR}/usr/lib/swift/${PLATFORM_NAME}" /usr/lib/swift OTHER_LDFLAGS = $(inherited) -Xlinker -no_application_extension -framework "XCTest" OTHER_SWIFT_FLAGS = $(inherited) -D COCOAPODS PODS_BUILD_DIR = ${BUILD_DIR} PODS_CONFIGURATION_BUILD_DIR = ${PODS_BUILD_DIR}/$(CONFIGURATION)$(EFFECTIVE_PLATFORM_NAME) +PODS_DEVELOPMENT_LANGUAGE = ${DEVELOPMENT_LANGUAGE} PODS_ROOT = ${SRCROOT} PODS_TARGET_SRCROOT = ${PODS_ROOT}/Quick PODS_XCFRAMEWORKS_BUILD_DIR = $(PODS_CONFIGURATION_BUILD_DIR)/XCFrameworkIntermediates PRODUCT_BUNDLE_IDENTIFIER = org.cocoapods.${PRODUCT_NAME:rfc1034identifier} SKIP_INSTALL = YES -SWIFT_INCLUDE_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/usr/lib" -SYSTEM_FRAMEWORK_SEARCH_PATHS = $(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks" USE_RECURSIVE_SCRIPT_INPUTS_IN_SCRIPT_PHASES = YES diff --git a/build.sh b/build.sh index 9f5d5ca..065a2af 100644 --- a/build.sh +++ b/build.sh @@ -1,9 +1,12 @@ rm -rf build +sudo xcode-select --switch /Applications/Xcode_15.1.app + xcodebuild archive \ -workspace OSPaymentsLib.xcworkspace \ -scheme OSPaymentsLib \ -configuration Release \ +-sdk iphonesimulator \ -destination 'generic/platform=iOS Simulator' \ -archivePath './build/OSPaymentsLib.framework-iphonesimulator.xcarchive' \ SKIP_INSTALL=NO \ @@ -13,6 +16,7 @@ xcodebuild archive \ -workspace OSPaymentsLib.xcworkspace \ -scheme OSPaymentsLib \ -configuration Release \ +-sdk iphoneos \ -destination 'generic/platform=iOS' \ -archivePath './build/OSPaymentsLib.framework-iphoneos.xcarchive' \ SKIP_INSTALL=NO \ @@ -21,4 +25,6 @@ BUILD_LIBRARIES_FOR_DISTRIBUTION=YES xcodebuild -create-xcframework \ -framework './build/OSPaymentsLib.framework-iphonesimulator.xcarchive/Products/Library/Frameworks/OSPaymentsLib.framework' \ -framework './build/OSPaymentsLib.framework-iphoneos.xcarchive/Products/Library/Frameworks/OSPaymentsLib.framework' \ --output './build/OSPaymentsLib.xcframework' \ No newline at end of file +-output './build/OSPaymentsLib.xcframework' + +codesign --timestamp -v --sign 'OutSystems Inc. (S25XN959HW)' './build/OSPaymentsLib.xcframework' \ No newline at end of file diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 382f551..74190ed 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [1.2.0] + +### Features +- Add Privacy Manifest file (https://outsystemsrd.atlassian.net/browse/RMET-3283). + +### Fixes +- Update `github_actions.yml` file steps versions (https://outsystemsrd.atlassian.net/browse/RMET-2568). + ## 1.1.1 ### 2023-02-08