diff --git a/.ruby-version b/.ruby-version new file mode 100644 index 000000000..bec3a35ee --- /dev/null +++ b/.ruby-version @@ -0,0 +1 @@ +system diff --git a/.travis.yml b/.travis.yml index 783fd78b0..09771cf78 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,6 +2,9 @@ osx_image: xcode7.3 language: generic matrix: include: + - os: osx + sudo: required + env: TYPE=podspec - os: osx env: NIMBLE_RUNTIME_IOS_SDK_VERSION=9.0 TYPE=ios - os: osx @@ -14,5 +17,6 @@ matrix: env: TYPE=swiftpm install: - if [[ "$TYPE" == "swiftpm" ]]; then eval "$(curl -sL https://gist.githubusercontent.com/kylef/5c0475ff02b7c7671d2a/raw/02090c7ede5a637b76e6df1710e83cd0bbe7dcdf/swiftenv-install.sh)"; fi + - if [[ "$TYPE" == "podspec" ]]; then sudo gem install bundler; bundle install; fi script: - ./test $TYPE diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 216aaa381..d9c4ba633 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -112,9 +112,8 @@ The process is relatively straight forward, but here's is a useful checklist for - Look at changes from the previously tagged release and write release notes: `git log v0.4.0...HEAD` - Run the release script: `./script/release A.B.C release-notes-file` -- Go to [github releases](https://github.com/Quick/Nimble/releases) and mark the tagged commit as a release. - - Use the same release notes you created for the tag, but tweak up formatting for github. - - Attach the carthage release `Nimble.framework.zip` to the release. +- The script will prompt you to create a new [GitHub release](https://github.com/Quick/Nimble/releases). + - Use the same release notes you created for the tag, but tweak up formatting for GitHub. - Update [Quick](https://github.com/Quick/Quick) - Update Quick's submodule reference to the newly released Nimble version - Update Nimble version in `README.md` and Documentation in [Quick](https://github.com/Quick/Quick) if it's not a patch version update. diff --git a/Gemfile b/Gemfile new file mode 100644 index 000000000..66d7efff3 --- /dev/null +++ b/Gemfile @@ -0,0 +1,4 @@ +# A sample Gemfile +source "https://rubygems.org" + +gem 'cocoapods' diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 000000000..f5b24cff6 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,63 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (4.2.6) + i18n (~> 0.7) + json (~> 1.7, >= 1.7.7) + minitest (~> 5.1) + thread_safe (~> 0.3, >= 0.3.4) + tzinfo (~> 1.1) + claide (0.9.1) + cocoapods (0.39.0) + activesupport (>= 4.0.2) + claide (~> 0.9.1) + cocoapods-core (= 0.39.0) + cocoapods-downloader (~> 0.9.3) + cocoapods-plugins (~> 0.4.2) + cocoapods-search (~> 0.1.0) + cocoapods-stats (~> 0.6.2) + cocoapods-trunk (~> 0.6.4) + cocoapods-try (~> 0.5.1) + colored (~> 1.2) + escape (~> 0.0.4) + molinillo (~> 0.4.0) + nap (~> 1.0) + xcodeproj (~> 0.28.2) + cocoapods-core (0.39.0) + activesupport (>= 4.0.2) + fuzzy_match (~> 2.0.4) + nap (~> 1.0) + cocoapods-downloader (0.9.3) + cocoapods-plugins (0.4.2) + nap + cocoapods-search (0.1.0) + cocoapods-stats (0.6.2) + cocoapods-trunk (0.6.4) + nap (>= 0.8, < 2.0) + netrc (= 0.7.8) + cocoapods-try (0.5.1) + colored (1.2) + escape (0.0.4) + fuzzy_match (2.0.4) + i18n (0.7.0) + json (1.8.3) + minitest (5.8.4) + molinillo (0.4.4) + nap (1.1.0) + netrc (0.7.8) + thread_safe (0.3.5) + tzinfo (1.2.2) + thread_safe (~> 0.1) + xcodeproj (0.28.2) + activesupport (>= 3) + claide (~> 0.9.1) + colored (~> 1.2) + +PLATFORMS + ruby + +DEPENDENCIES + cocoapods + +BUNDLED WITH + 1.11.2 diff --git a/Nimble.podspec b/Nimble.podspec index 550ca9a55..bf45a5eac 100644 --- a/Nimble.podspec +++ b/Nimble.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = "Nimble" - s.version = "3.2.0" + s.version = "4.0.1" s.summary = "A Matcher Framework for Swift and Objective-C" s.description = <<-DESC Use Nimble to express the expected outcomes of Swift or Objective-C expressions. Inspired by Cedar. @@ -14,6 +14,8 @@ Pod::Spec.new do |s| s.source = { :git => "https://github.com/Quick/Nimble.git", :tag => "v#{s.version}" } s.source_files = "Sources/Nimble/**/*.{swift,h,m}" + s.private_header_files = "Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h" + s.exclude_files = "Sources/Nimble/Adapters/NonObjectiveC/*.swift" s.weak_framework = "XCTest" s.requires_arc = true s.pod_target_xcconfig = { 'ENABLE_BITCODE' => 'NO', 'OTHER_LDFLAGS' => '-weak-lswiftXCTest', 'FRAMEWORK_SEARCH_PATHS' => '$(inherited) "$(PLATFORM_DIR)/Developer/Library/Frameworks"' } diff --git a/Nimble.xcodeproj/project.pbxproj b/Nimble.xcodeproj/project.pbxproj index 70efa2b41..7b979dc3f 100644 --- a/Nimble.xcodeproj/project.pbxproj +++ b/Nimble.xcodeproj/project.pbxproj @@ -11,9 +11,37 @@ 1F0648CD19639F5A001F9C46 /* ObjectWithLazyProperty.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0648CB19639F5A001F9C46 /* ObjectWithLazyProperty.swift */; }; 1F0648D41963AAB2001F9C46 /* SynchronousTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0648D31963AAB2001F9C46 /* SynchronousTests.swift */; }; 1F0648D51963AAB2001F9C46 /* SynchronousTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0648D31963AAB2001F9C46 /* SynchronousTests.swift */; }; - 1F0FEA9A1AF32DA4001E554E /* ObjCExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0FEA991AF32DA4001E554E /* ObjCExpectation.swift */; }; - 1F0FEA9B1AF32DA4001E554E /* ObjCExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0FEA991AF32DA4001E554E /* ObjCExpectation.swift */; }; 1F14FB64194180C5009F2A08 /* utils.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F14FB63194180C5009F2A08 /* utils.swift */; }; + 1F1871C51CA89EDB00A34BF2 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BC1CA89EDB00A34BF2 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871C61CA89EDB00A34BF2 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BD1CA89EDB00A34BF2 /* DSL.m */; }; + 1F1871C71CA89EDB00A34BF2 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BE1CA89EDB00A34BF2 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871C81CA89EDB00A34BF2 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BF1CA89EDB00A34BF2 /* NMBExceptionCapture.m */; }; + 1F1871C91CA89EDB00A34BF2 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871C01CA89EDB00A34BF2 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871CA1CA89EDB00A34BF2 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C11CA89EDB00A34BF2 /* NMBStringify.m */; }; + 1F1871CB1CA89EDB00A34BF2 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C21CA89EDB00A34BF2 /* NMBExpectation.swift */; }; + 1F1871CC1CA89EDB00A34BF2 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C31CA89EDB00A34BF2 /* NMBObjCMatcher.swift */; }; + 1F1871D21CA89EEE00A34BF2 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BD1CA89EDB00A34BF2 /* DSL.m */; }; + 1F1871D31CA89EEE00A34BF2 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BF1CA89EDB00A34BF2 /* NMBExceptionCapture.m */; }; + 1F1871D41CA89EEE00A34BF2 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C11CA89EDB00A34BF2 /* NMBStringify.m */; }; + 1F1871D61CA89EEF00A34BF2 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BD1CA89EDB00A34BF2 /* DSL.m */; }; + 1F1871D71CA89EEF00A34BF2 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871BF1CA89EDB00A34BF2 /* NMBExceptionCapture.m */; }; + 1F1871D81CA89EEF00A34BF2 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C11CA89EDB00A34BF2 /* NMBStringify.m */; }; + 1F1871D91CA89EF100A34BF2 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C21CA89EDB00A34BF2 /* NMBExpectation.swift */; }; + 1F1871DA1CA89EF100A34BF2 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C31CA89EDB00A34BF2 /* NMBObjCMatcher.swift */; }; + 1F1871DB1CA89EF100A34BF2 /* NMBExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C21CA89EDB00A34BF2 /* NMBExpectation.swift */; }; + 1F1871DC1CA89EF100A34BF2 /* NMBObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871C31CA89EDB00A34BF2 /* NMBObjCMatcher.swift */; }; + 1F1871DD1CA89EF500A34BF2 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BC1CA89EDB00A34BF2 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871DE1CA89EF500A34BF2 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BE1CA89EDB00A34BF2 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871DF1CA89EF500A34BF2 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871C01CA89EDB00A34BF2 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871E01CA89EF600A34BF2 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BC1CA89EDB00A34BF2 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871E11CA89EF600A34BF2 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871BE1CA89EDB00A34BF2 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871E21CA89EF600A34BF2 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1871C01CA89EDB00A34BF2 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; + 1F1871E41CA89FB600A34BF2 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E31CA89FB600A34BF2 /* AsyncMatcherWrapper.swift */; }; + 1F1871E61CA89FCD00A34BF2 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E51CA89FCD00A34BF2 /* MatcherFunc.swift */; }; + 1F1871E71CA8A18400A34BF2 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E31CA89FB600A34BF2 /* AsyncMatcherWrapper.swift */; }; + 1F1871E81CA8A18400A34BF2 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E31CA89FB600A34BF2 /* AsyncMatcherWrapper.swift */; }; + 1F1871E91CA8A18700A34BF2 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E51CA89FCD00A34BF2 /* MatcherFunc.swift */; }; + 1F1871EB1CA8A18800A34BF2 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1871E51CA89FCD00A34BF2 /* MatcherFunc.swift */; }; 1F1A742F1940169200FFFC47 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1A742E1940169200FFFC47 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1F1A74351940169200FFFC47 /* Nimble.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F1A74291940169200FFFC47 /* Nimble.framework */; }; 1F1B5AD41963E13900CA8BF9 /* BeAKindOfTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F1B5AD31963E13900CA8BF9 /* BeAKindOfTest.swift */; }; @@ -74,7 +102,6 @@ 1F5DF1701BDCA0F500C3A531 /* DSL.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD081968AB07008ED995 /* DSL.swift */; }; 1F5DF1711BDCA0F500C3A531 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */; }; 1F5DF1721BDCA0F500C3A531 /* Expectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD091968AB07008ED995 /* Expectation.swift */; }; - 1F5DF1731BDCA0F500C3A531 /* ObjCExpectation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0FEA991AF32DA4001E554E /* ObjCExpectation.swift */; }; 1F5DF1741BDCA0F500C3A531 /* Expression.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD0A1968AB07008ED995 /* Expression.swift */; }; 1F5DF1751BDCA0F500C3A531 /* FailureMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD0B1968AB07008ED995 /* FailureMessage.swift */; }; 1F5DF1761BDCA0F500C3A531 /* AllPass.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB1BC781A92235600F743C3 /* AllPass.swift */; }; @@ -102,9 +129,6 @@ 1F5DF18C1BDCA0F500C3A531 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Async.swift */; }; 1F5DF18D1BDCA0F500C3A531 /* SourceLocation.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD271968AB07008ED995 /* SourceLocation.swift */; }; 1F5DF18E1BDCA0F500C3A531 /* Stringers.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD281968AB07008ED995 /* Stringers.swift */; }; - 1F5DF18F1BDCA0F500C3A531 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2A1968AB07008ED995 /* AsyncMatcherWrapper.swift */; }; - 1F5DF1901BDCA0F500C3A531 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2C1968AB07008ED995 /* MatcherFunc.swift */; }; - 1F5DF1911BDCA0F500C3A531 /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2D1968AB07008ED995 /* ObjCMatcher.swift */; }; 1F5DF1921BDCA10200C3A531 /* AsynchronousTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F925EE5195C121200ED456B /* AsynchronousTest.swift */; }; 1F5DF1931BDCA10200C3A531 /* SynchronousTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F0648D31963AAB2001F9C46 /* SynchronousTests.swift */; }; 1F5DF1941BDCA10200C3A531 /* UserDescriptionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965B0D0B1B62C06D0005AE66 /* UserDescriptionTest.swift */; }; @@ -131,11 +155,7 @@ 1F5DF1A91BDCA10200C3A531 /* MatchTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EF19FE442800E9D9FE /* MatchTest.swift */; }; 1F5DF1AA1BDCA10200C3A531 /* RaisesExceptionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F925EEB195C12C800ED456B /* RaisesExceptionTest.swift */; }; 1F5DF1AB1BDCA10200C3A531 /* ThrowErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */; }; - 1F5DF1AC1BDCA16E00C3A531 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD211968AB07008ED995 /* DSL.m */; }; - 1F5DF1AD1BDCA16E00C3A531 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD231968AB07008ED995 /* NMBExceptionCapture.m */; }; 1F5DF1AE1BDCA17600C3A531 /* Nimble.h in Headers */ = {isa = PBXBuildFile; fileRef = 1F1A742E1940169200FFFC47 /* Nimble.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1F5DF1AF1BDCA17600C3A531 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD201968AB07008ED995 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1F5DF1B01BDCA17600C3A531 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD221968AB07008ED995 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; 1F8A37B01B7C5042001C8357 /* ObjCSyncTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8A37AF1B7C5042001C8357 /* ObjCSyncTest.m */; }; 1F8A37B11B7C5042001C8357 /* ObjCSyncTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F8A37AF1B7C5042001C8357 /* ObjCSyncTest.m */; }; 1F91DD2D1C74BF36002C309F /* BeVoidTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F91DD2C1C74BF36002C309F /* BeVoidTest.swift */; }; @@ -236,22 +256,8 @@ 1FD8CD5D1968AB07008ED995 /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; }; 1FD8CD5E1968AB07008ED995 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; }; 1FD8CD5F1968AB07008ED995 /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; }; - 1FD8CD601968AB07008ED995 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD201968AB07008ED995 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1FD8CD611968AB07008ED995 /* DSL.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD201968AB07008ED995 /* DSL.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1FD8CD621968AB07008ED995 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD211968AB07008ED995 /* DSL.m */; }; - 1FD8CD631968AB07008ED995 /* DSL.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD211968AB07008ED995 /* DSL.m */; }; - 1FD8CD641968AB07008ED995 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD221968AB07008ED995 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1FD8CD651968AB07008ED995 /* NMBExceptionCapture.h in Headers */ = {isa = PBXBuildFile; fileRef = 1FD8CD221968AB07008ED995 /* NMBExceptionCapture.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 1FD8CD661968AB07008ED995 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD231968AB07008ED995 /* NMBExceptionCapture.m */; }; - 1FD8CD671968AB07008ED995 /* NMBExceptionCapture.m in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD231968AB07008ED995 /* NMBExceptionCapture.m */; }; 1FD8CD6A1968AB07008ED995 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Async.swift */; }; 1FD8CD6B1968AB07008ED995 /* Async.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD261968AB07008ED995 /* Async.swift */; }; - 1FD8CD701968AB07008ED995 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2A1968AB07008ED995 /* AsyncMatcherWrapper.swift */; }; - 1FD8CD711968AB07008ED995 /* AsyncMatcherWrapper.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2A1968AB07008ED995 /* AsyncMatcherWrapper.swift */; }; - 1FD8CD741968AB07008ED995 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2C1968AB07008ED995 /* MatcherFunc.swift */; }; - 1FD8CD751968AB07008ED995 /* MatcherFunc.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2C1968AB07008ED995 /* MatcherFunc.swift */; }; - 1FD8CD761968AB07008ED995 /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2D1968AB07008ED995 /* ObjCMatcher.swift */; }; - 1FD8CD771968AB07008ED995 /* ObjCMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD2D1968AB07008ED995 /* ObjCMatcher.swift */; }; 1FDBD8671AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDBD8661AF8A4FF0089F27B /* AssertionDispatcher.swift */; }; 1FDBD8681AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FDBD8661AF8A4FF0089F27B /* AssertionDispatcher.swift */; }; 29EA59631B551ED2002D767E /* ThrowErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */; }; @@ -275,12 +281,6 @@ 7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */ = {isa = PBXBuildFile; fileRef = 7B5358BD1C38479700A23FAA /* SatisfyAnyOf.swift */; }; 7B5358C51C39184200A23FAA /* ObjCSatisfyAnyOfTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B5358C11C39155600A23FAA /* ObjCSatisfyAnyOfTest.m */; }; 7B5358C61C39184200A23FAA /* ObjCSatisfyAnyOfTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B5358C11C39155600A23FAA /* ObjCSatisfyAnyOfTest.m */; }; - 8DF1C3F01C94F7D4004B2D36 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DF1C3EE1C94F7D4004B2D36 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8DF1C3F11C94F7D4004B2D36 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DF1C3EE1C94F7D4004B2D36 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8DF1C3F21C94F7D4004B2D36 /* NMBStringify.h in Headers */ = {isa = PBXBuildFile; fileRef = 8DF1C3EE1C94F7D4004B2D36 /* NMBStringify.h */; settings = {ATTRIBUTES = (Public, ); }; }; - 8DF1C3F31C94F7D4004B2D36 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3EF1C94F7D4004B2D36 /* NMBStringify.m */; }; - 8DF1C3F41C94F7D4004B2D36 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3EF1C94F7D4004B2D36 /* NMBStringify.m */; }; - 8DF1C3F51C94F7D4004B2D36 /* NMBStringify.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3EF1C94F7D4004B2D36 /* NMBStringify.m */; }; 8DF1C3F71C94FC75004B2D36 /* ObjcStringersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3F61C94FC75004B2D36 /* ObjcStringersTest.m */; }; 8DF1C3F81C94FC75004B2D36 /* ObjcStringersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3F61C94FC75004B2D36 /* ObjcStringersTest.m */; }; 8DF1C3F91C94FD0C004B2D36 /* ObjcStringersTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 8DF1C3F61C94FC75004B2D36 /* ObjcStringersTest.m */; }; @@ -312,9 +312,15 @@ 965B0D0A1B62B8ED0005AE66 /* ObjCUserDescriptionTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 965B0D081B62B8ED0005AE66 /* ObjCUserDescriptionTest.m */; }; 965B0D0C1B62C06D0005AE66 /* UserDescriptionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965B0D0B1B62C06D0005AE66 /* UserDescriptionTest.swift */; }; 965B0D0D1B62C06D0005AE66 /* UserDescriptionTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 965B0D0B1B62C06D0005AE66 /* UserDescriptionTest.swift */; }; - AEBA64701C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = AEBA646F1C5C5FD10060A057 /* CurrentTestCaseTracker.m */; }; - AEBA64711C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = AEBA646F1C5C5FD10060A057 /* CurrentTestCaseTracker.m */; }; - AEBA64721C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */ = {isa = PBXBuildFile; fileRef = AEBA646F1C5C5FD10060A057 /* CurrentTestCaseTracker.m */; }; + AE4BA9AD1C88DDB500B73906 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4BA9AC1C88DDB500B73906 /* Errors.swift */; }; + AE4BA9AE1C88DDB500B73906 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4BA9AC1C88DDB500B73906 /* Errors.swift */; }; + AE4BA9AF1C88DDB500B73906 /* Errors.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE4BA9AC1C88DDB500B73906 /* Errors.swift */; }; + AE7ADE451C80BF8000B94CD3 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE441C80BF8000B94CD3 /* MatchError.swift */; }; + AE7ADE461C80BF8000B94CD3 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE441C80BF8000B94CD3 /* MatchError.swift */; }; + AE7ADE471C80BF8000B94CD3 /* MatchError.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE441C80BF8000B94CD3 /* MatchError.swift */; }; + AE7ADE491C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */; }; + AE7ADE4A1C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */; }; + AE7ADE4B1C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */; }; DA9E8C821A414BB9002633C2 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */; }; DA9E8C831A414BB9002633C2 /* DSL+Wait.swift in Sources */ = {isa = PBXBuildFile; fileRef = DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */; }; DD72EC641A93874A002F7651 /* AllPassTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DD72EC631A93874A002F7651 /* AllPassTest.swift */; }; @@ -329,6 +335,9 @@ DDB4D5F119FE442800E9D9FE /* MatchTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EF19FE442800E9D9FE /* MatchTest.swift */; }; DDEFAEB41A93CBE6005CA37A /* ObjCAllPassTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DDEFAEB31A93CBE6005CA37A /* ObjCAllPassTest.m */; }; DDEFAEB51A93CBE6005CA37A /* ObjCAllPassTest.m in Sources */ = {isa = PBXBuildFile; fileRef = DDEFAEB31A93CBE6005CA37A /* ObjCAllPassTest.m */; }; + F8A1BE2F1CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = F8A1BE2B1CB3710900031679 /* XCTestObservationCenter+Register.m */; }; + F8A1BE301CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = F8A1BE2B1CB3710900031679 /* XCTestObservationCenter+Register.m */; }; + F8A1BE311CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */ = {isa = PBXBuildFile; fileRef = F8A1BE2B1CB3710900031679 /* XCTestObservationCenter+Register.m */; }; /* End PBXBuildFile section */ /* Begin PBXContainerItemProxy section */ @@ -400,8 +409,18 @@ /* Begin PBXFileReference section */ 1F0648CB19639F5A001F9C46 /* ObjectWithLazyProperty.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjectWithLazyProperty.swift; sourceTree = ""; }; 1F0648D31963AAB2001F9C46 /* SynchronousTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SynchronousTests.swift; sourceTree = ""; }; - 1F0FEA991AF32DA4001E554E /* ObjCExpectation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjCExpectation.swift; sourceTree = ""; }; 1F14FB63194180C5009F2A08 /* utils.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = utils.swift; sourceTree = ""; }; + 1F1871BC1CA89EDB00A34BF2 /* DSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSL.h; sourceTree = ""; }; + 1F1871BD1CA89EDB00A34BF2 /* DSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSL.m; sourceTree = ""; }; + 1F1871BE1CA89EDB00A34BF2 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NMBExceptionCapture.h; sourceTree = ""; }; + 1F1871BF1CA89EDB00A34BF2 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NMBExceptionCapture.m; sourceTree = ""; }; + 1F1871C01CA89EDB00A34BF2 /* NMBStringify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NMBStringify.h; sourceTree = ""; }; + 1F1871C11CA89EDB00A34BF2 /* NMBStringify.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NMBStringify.m; sourceTree = ""; }; + 1F1871C21CA89EDB00A34BF2 /* NMBExpectation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NMBExpectation.swift; sourceTree = ""; }; + 1F1871C31CA89EDB00A34BF2 /* NMBObjCMatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NMBObjCMatcher.swift; sourceTree = ""; }; + 1F1871CD1CA89EE000A34BF2 /* ExceptionCapture.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ExceptionCapture.swift; sourceTree = ""; }; + 1F1871E31CA89FB600A34BF2 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncMatcherWrapper.swift; sourceTree = ""; }; + 1F1871E51CA89FCD00A34BF2 /* MatcherFunc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatcherFunc.swift; sourceTree = ""; }; 1F1A74291940169200FFFC47 /* Nimble.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Nimble.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 1F1A742D1940169200FFFC47 /* Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; 1F1A742E1940169200FFFC47 /* Nimble.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = Nimble.h; sourceTree = ""; }; @@ -481,17 +500,10 @@ 1FD8CD1C1968AB07008ED995 /* Equal.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Equal.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatcherProtocols.swift; sourceTree = ""; }; 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = RaisesException.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; - 1FD8CD201968AB07008ED995 /* DSL.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DSL.h; sourceTree = ""; }; - 1FD8CD211968AB07008ED995 /* DSL.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DSL.m; sourceTree = ""; }; - 1FD8CD221968AB07008ED995 /* NMBExceptionCapture.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NMBExceptionCapture.h; sourceTree = ""; }; - 1FD8CD231968AB07008ED995 /* NMBExceptionCapture.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NMBExceptionCapture.m; sourceTree = ""; }; 1FD8CD251968AB07008ED995 /* Functional.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Functional.swift; sourceTree = ""; }; 1FD8CD261968AB07008ED995 /* Async.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Async.swift; sourceTree = ""; }; 1FD8CD271968AB07008ED995 /* SourceLocation.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SourceLocation.swift; sourceTree = ""; }; 1FD8CD281968AB07008ED995 /* Stringers.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Stringers.swift; sourceTree = ""; }; - 1FD8CD2A1968AB07008ED995 /* AsyncMatcherWrapper.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AsyncMatcherWrapper.swift; sourceTree = ""; }; - 1FD8CD2C1968AB07008ED995 /* MatcherFunc.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatcherFunc.swift; sourceTree = ""; }; - 1FD8CD2D1968AB07008ED995 /* ObjCMatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ObjCMatcher.swift; sourceTree = ""; }; 1FDBD8661AF8A4FF0089F27B /* AssertionDispatcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AssertionDispatcher.swift; sourceTree = ""; }; 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowErrorTest.swift; sourceTree = ""; }; 29EA59651B551EE6002D767E /* ThrowError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowError.swift; sourceTree = ""; }; @@ -502,8 +514,6 @@ 7B5358B91C3846C900A23FAA /* SatisfyAnyOfTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SatisfyAnyOfTest.swift; sourceTree = ""; }; 7B5358BD1C38479700A23FAA /* SatisfyAnyOf.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = SatisfyAnyOf.swift; sourceTree = ""; }; 7B5358C11C39155600A23FAA /* ObjCSatisfyAnyOfTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCSatisfyAnyOfTest.m; sourceTree = ""; }; - 8DF1C3EE1C94F7D4004B2D36 /* NMBStringify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NMBStringify.h; sourceTree = ""; }; - 8DF1C3EF1C94F7D4004B2D36 /* NMBStringify.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NMBStringify.m; sourceTree = ""; }; 8DF1C3F61C94FC75004B2D36 /* ObjcStringersTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjcStringersTest.m; sourceTree = ""; }; 9630C00A1C6D0B18000693EE /* CwlCatchBadInstruction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CwlCatchBadInstruction.h; path = CwlPreconditionTesting/CwlCatchBadInstruction.h; sourceTree = ""; }; 9630C00B1C6D0B18000693EE /* CwlCatchBadInstruction.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = CwlCatchBadInstruction.m; path = CwlPreconditionTesting/CwlCatchBadInstruction.m; sourceTree = ""; }; @@ -520,7 +530,9 @@ 964CFF001C5019AD00513336 /* ThrowAssertionTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ThrowAssertionTest.swift; sourceTree = ""; }; 965B0D081B62B8ED0005AE66 /* ObjCUserDescriptionTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCUserDescriptionTest.m; sourceTree = ""; }; 965B0D0B1B62C06D0005AE66 /* UserDescriptionTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserDescriptionTest.swift; sourceTree = ""; }; - AEBA646F1C5C5FD10060A057 /* CurrentTestCaseTracker.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurrentTestCaseTracker.m; sourceTree = ""; }; + AE4BA9AC1C88DDB500B73906 /* Errors.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Errors.swift; sourceTree = ""; }; + AE7ADE441C80BF8000B94CD3 /* MatchError.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchError.swift; sourceTree = ""; }; + AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchErrorTest.swift; sourceTree = ""; }; DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = "DSL+Wait.swift"; sourceTree = ""; }; DD72EC631A93874A002F7651 /* AllPassTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = AllPassTest.swift; sourceTree = ""; }; DD9A9A8D19CF413800706F49 /* BeIdenticalToObjectTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeIdenticalToObjectTest.swift; sourceTree = ""; }; @@ -528,6 +540,8 @@ DDB4D5EC19FE43C200E9D9FE /* Match.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; lineEnding = 0; path = Match.swift; sourceTree = ""; xcLanguageSpecificationIdentifier = xcode.lang.swift; }; DDB4D5EF19FE442800E9D9FE /* MatchTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = MatchTest.swift; sourceTree = ""; }; DDEFAEB31A93CBE6005CA37A /* ObjCAllPassTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCAllPassTest.m; sourceTree = ""; }; + F8A1BE2B1CB3710900031679 /* XCTestObservationCenter+Register.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = "XCTestObservationCenter+Register.m"; sourceTree = ""; }; + F8A1BE321CB3777F00031679 /* CurrentTestCaseTracker.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = CurrentTestCaseTracker.h; sourceTree = ""; }; /* End PBXFileReference section */ /* Begin PBXFrameworksBuildPhase section */ @@ -589,6 +603,31 @@ path = Helpers; sourceTree = ""; }; + 1F1871B91CA89E1B00A34BF2 /* ObjectiveC */ = { + isa = PBXGroup; + children = ( + F8A1BE321CB3777F00031679 /* CurrentTestCaseTracker.h */, + 1F1871BC1CA89EDB00A34BF2 /* DSL.h */, + 1F1871BD1CA89EDB00A34BF2 /* DSL.m */, + 1F1871BE1CA89EDB00A34BF2 /* NMBExceptionCapture.h */, + 1F1871BF1CA89EDB00A34BF2 /* NMBExceptionCapture.m */, + 1F1871C21CA89EDB00A34BF2 /* NMBExpectation.swift */, + 1F1871C31CA89EDB00A34BF2 /* NMBObjCMatcher.swift */, + 1F1871C01CA89EDB00A34BF2 /* NMBStringify.h */, + 1F1871C11CA89EDB00A34BF2 /* NMBStringify.m */, + F8A1BE2B1CB3710900031679 /* XCTestObservationCenter+Register.m */, + ); + path = ObjectiveC; + sourceTree = ""; + }; + 1F1871BA1CA89E2500A34BF2 /* NonObjectiveC */ = { + isa = PBXGroup; + children = ( + 1F1871CD1CA89EE000A34BF2 /* ExceptionCapture.swift */, + ); + path = NonObjectiveC; + sourceTree = ""; + }; 1F1A741F1940169200FFFC47 = { isa = PBXGroup; children = ( @@ -620,28 +659,17 @@ 1FD8CD081968AB07008ED995 /* DSL.swift */, DA9E8C811A414BB9002633C2 /* DSL+Wait.swift */, 1FD8CD091968AB07008ED995 /* Expectation.swift */, - 1F0FEA991AF32DA4001E554E /* ObjCExpectation.swift */, 1FD8CD0A1968AB07008ED995 /* Expression.swift */, 1FD8CD0B1968AB07008ED995 /* FailureMessage.swift */, + 1F1A742D1940169200FFFC47 /* Info.plist */, 1FD8CD0C1968AB07008ED995 /* Matchers */, 1F1A742E1940169200FFFC47 /* Nimble.h */, - 1FD8CD1F1968AB07008ED995 /* objc */, - 1F1A742C1940169200FFFC47 /* Supporting Files */, 1FD8CD241968AB07008ED995 /* Utils */, - 1FD8CD291968AB07008ED995 /* Wrappers */, ); name = Nimble; path = Sources/Nimble; sourceTree = ""; }; - 1F1A742C1940169200FFFC47 /* Supporting Files */ = { - isa = PBXGroup; - children = ( - 1F1A742D1940169200FFFC47 /* Info.plist */, - ); - name = "Supporting Files"; - sourceTree = ""; - }; 1F1A74381940169200FFFC47 /* NimbleTests */ = { isa = PBXGroup; children = ( @@ -693,6 +721,7 @@ 29EA59621B551ED2002D767E /* ThrowErrorTest.swift */, 7B5358B91C3846C900A23FAA /* SatisfyAnyOfTest.swift */, 1FCF914E1C61C85A00B15DCB /* PostNotificationTest.swift */, + AE7ADE481C80C00D00B94CD3 /* MatchErrorTest.swift */, ); path = Matchers; sourceTree = ""; @@ -700,11 +729,13 @@ 1FD8CD041968AB07008ED995 /* Adapters */ = { isa = PBXGroup; children = ( - 1FD8CD051968AB07008ED995 /* AssertionRecorder.swift */, 1FD8CD061968AB07008ED995 /* AdapterProtocols.swift */, - 1FD8CD071968AB07008ED995 /* NimbleXCTestHandler.swift */, 1FDBD8661AF8A4FF0089F27B /* AssertionDispatcher.swift */, + 1FD8CD051968AB07008ED995 /* AssertionRecorder.swift */, 1FC494A91C29CBA40010975C /* NimbleEnvironment.swift */, + 1FD8CD071968AB07008ED995 /* NimbleXCTestHandler.swift */, + 1F1871BA1CA89E2500A34BF2 /* NonObjectiveC */, + 1F1871B91CA89E1B00A34BF2 /* ObjectiveC */, ); path = Adapters; sourceTree = ""; @@ -713,6 +744,7 @@ isa = PBXGroup; children = ( DDB1BC781A92235600F743C3 /* AllPass.swift */, + 1F1871E31CA89FB600A34BF2 /* AsyncMatcherWrapper.swift */, 1FD8CD0E1968AB07008ED995 /* BeAKindOf.swift */, 1FD8CD0D1968AB07008ED995 /* BeAnInstanceOf.swift */, 1FD8CD0F1968AB07008ED995 /* BeCloseTo.swift */, @@ -731,30 +763,18 @@ 1FD8CD1C1968AB07008ED995 /* Equal.swift */, 472FD1341B9E085700C7B8DA /* HaveCount.swift */, DDB4D5EC19FE43C200E9D9FE /* Match.swift */, + 1F1871E51CA89FCD00A34BF2 /* MatcherFunc.swift */, 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */, + AE7ADE441C80BF8000B94CD3 /* MatchError.swift */, + 1FCF91521C61C8A400B15DCB /* PostNotification.swift */, 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */, 964CFEFC1C4FF48900513336 /* ThrowAssertion.swift */, - 29EA59651B551EE6002D767E /* ThrowError.swift */, 7B5358BD1C38479700A23FAA /* SatisfyAnyOf.swift */, - 1FCF91521C61C8A400B15DCB /* PostNotification.swift */, + 29EA59651B551EE6002D767E /* ThrowError.swift */, ); path = Matchers; sourceTree = ""; }; - 1FD8CD1F1968AB07008ED995 /* objc */ = { - isa = PBXGroup; - children = ( - 1FD8CD201968AB07008ED995 /* DSL.h */, - 1FD8CD211968AB07008ED995 /* DSL.m */, - 1FD8CD221968AB07008ED995 /* NMBExceptionCapture.h */, - 1FD8CD231968AB07008ED995 /* NMBExceptionCapture.m */, - 8DF1C3EE1C94F7D4004B2D36 /* NMBStringify.h */, - 8DF1C3EF1C94F7D4004B2D36 /* NMBStringify.m */, - AEBA646F1C5C5FD10060A057 /* CurrentTestCaseTracker.m */, - ); - path = objc; - sourceTree = ""; - }; 1FD8CD241968AB07008ED995 /* Utils */ = { isa = PBXGroup; children = ( @@ -762,20 +782,11 @@ 1FD8CD261968AB07008ED995 /* Async.swift */, 1FD8CD271968AB07008ED995 /* SourceLocation.swift */, 1FD8CD281968AB07008ED995 /* Stringers.swift */, + AE4BA9AC1C88DDB500B73906 /* Errors.swift */, ); path = Utils; sourceTree = ""; }; - 1FD8CD291968AB07008ED995 /* Wrappers */ = { - isa = PBXGroup; - children = ( - 1FD8CD2A1968AB07008ED995 /* AsyncMatcherWrapper.swift */, - 1FD8CD2C1968AB07008ED995 /* MatcherFunc.swift */, - 1FD8CD2D1968AB07008ED995 /* ObjCMatcher.swift */, - ); - path = Wrappers; - sourceTree = ""; - }; 1FFD729A1963FC8200CD29A2 /* objc */ = { isa = PBXGroup; children = ( @@ -847,9 +858,9 @@ files = ( 9630C00D1C6D0B18000693EE /* CwlCatchBadInstruction.h in Headers */, 9630C0191C6D0B2F000693EE /* CwlCatchException.h in Headers */, - 8DF1C3F01C94F7D4004B2D36 /* NMBStringify.h in Headers */, - 1FD8CD601968AB07008ED995 /* DSL.h in Headers */, - 1FD8CD641968AB07008ED995 /* NMBExceptionCapture.h in Headers */, + 1F1871C91CA89EDB00A34BF2 /* NMBStringify.h in Headers */, + 1F1871C51CA89EDB00A34BF2 /* DSL.h in Headers */, + 1F1871C71CA89EDB00A34BF2 /* NMBExceptionCapture.h in Headers */, 1F1A742F1940169200FFFC47 /* Nimble.h in Headers */, 9630C0271C6D0BB0000693EE /* mach_excServer.h in Headers */, ); @@ -859,9 +870,9 @@ isa = PBXHeadersBuildPhase; buildActionMask = 2147483647; files = ( - 8DF1C3F21C94F7D4004B2D36 /* NMBStringify.h in Headers */, - 1F5DF1AF1BDCA17600C3A531 /* DSL.h in Headers */, - 1F5DF1B01BDCA17600C3A531 /* NMBExceptionCapture.h in Headers */, + 1F1871E21CA89EF600A34BF2 /* NMBStringify.h in Headers */, + 1F1871E01CA89EF600A34BF2 /* DSL.h in Headers */, + 1F1871E11CA89EF600A34BF2 /* NMBExceptionCapture.h in Headers */, 1F5DF1AE1BDCA17600C3A531 /* Nimble.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -872,9 +883,9 @@ files = ( 9630C00E1C6D0B18000693EE /* CwlCatchBadInstruction.h in Headers */, 9630C01A1C6D0B2F000693EE /* CwlCatchException.h in Headers */, - 8DF1C3F11C94F7D4004B2D36 /* NMBStringify.h in Headers */, - 1FD8CD611968AB07008ED995 /* DSL.h in Headers */, - 1FD8CD651968AB07008ED995 /* NMBExceptionCapture.h in Headers */, + 1F1871DF1CA89EF500A34BF2 /* NMBStringify.h in Headers */, + 1F1871DD1CA89EF500A34BF2 /* DSL.h in Headers */, + 1F1871DE1CA89EF500A34BF2 /* NMBExceptionCapture.h in Headers */, 1F925EC7195C0DD100ED456B /* Nimble.h in Headers */, ); runOnlyForDeploymentPostprocessing = 0; @@ -1002,7 +1013,7 @@ 1F1A74201940169200FFFC47 /* Project object */ = { isa = PBXProject; attributes = { - LastSwiftUpdateCheck = 0710; + LastSwiftUpdateCheck = 0730; LastUpgradeCheck = 0710; ORGANIZATIONNAME = "Jeff Hui"; TargetAttributes = { @@ -1101,7 +1112,7 @@ buildActionMask = 2147483647; files = ( 1FD8CD401968AB07008ED995 /* BeCloseTo.swift in Sources */, - 1FD8CD741968AB07008ED995 /* MatcherFunc.swift in Sources */, + 1F1871C81CA89EDB00A34BF2 /* NMBExceptionCapture.m in Sources */, 1FD8CD361968AB07008ED995 /* Expectation.swift in Sources */, 1FD8CD321968AB07008ED995 /* NimbleXCTestHandler.swift in Sources */, 1F43728F1A1B344000EB80F8 /* Stringers.swift in Sources */, @@ -1109,12 +1120,10 @@ 1FD8CD4E1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */, 1FDBD8671AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */, 1F43728A1A1B343800EB80F8 /* Functional.swift in Sources */, - 8DF1C3F31C94F7D4004B2D36 /* NMBStringify.m in Sources */, - AEBA64701C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */, + AE4BA9AD1C88DDB500B73906 /* Errors.swift in Sources */, 1FD8CD3C1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */, 1FD8CD501968AB07008ED995 /* BeLogical.swift in Sources */, - 1F0FEA9A1AF32DA4001E554E /* ObjCExpectation.swift in Sources */, - 1FD8CD661968AB07008ED995 /* NMBExceptionCapture.m in Sources */, + 1F1871CB1CA89EDB00A34BF2 /* NMBExpectation.swift in Sources */, DA9E8C821A414BB9002633C2 /* DSL+Wait.swift in Sources */, DDB1BC791A92235600F743C3 /* AllPass.swift in Sources */, 1FD8CD3E1968AB07008ED995 /* BeAKindOf.swift in Sources */, @@ -1125,22 +1134,26 @@ 29EA59661B551EE6002D767E /* ThrowError.swift in Sources */, 1FD8CD5A1968AB07008ED995 /* Equal.swift in Sources */, 1FD8CD4C1968AB07008ED995 /* BeLessThan.swift in Sources */, + 1F1871CC1CA89EDB00A34BF2 /* NMBObjCMatcher.swift in Sources */, 1FD8CD461968AB07008ED995 /* BeGreaterThan.swift in Sources */, + F8A1BE2F1CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */, + 1F1871C61CA89EDB00A34BF2 /* DSL.m in Sources */, 1FD8CD301968AB07008ED995 /* AdapterProtocols.swift in Sources */, + AE7ADE451C80BF8000B94CD3 /* MatchError.swift in Sources */, 1FC494AA1C29CBA40010975C /* NimbleEnvironment.swift in Sources */, 1FD8CD5E1968AB07008ED995 /* RaisesException.swift in Sources */, 1FD8CD561968AB07008ED995 /* Contain.swift in Sources */, 1FD8CD481968AB07008ED995 /* BeGreaterThanOrEqualTo.swift in Sources */, - 1FD8CD701968AB07008ED995 /* AsyncMatcherWrapper.swift in Sources */, 1FD8CD441968AB07008ED995 /* BeginWith.swift in Sources */, 1FD8CD4A1968AB07008ED995 /* BeIdenticalTo.swift in Sources */, - 1FD8CD621968AB07008ED995 /* DSL.m in Sources */, + 1F1871E61CA89FCD00A34BF2 /* MatcherFunc.swift in Sources */, 1FD8CD421968AB07008ED995 /* BeEmpty.swift in Sources */, + 1F1871E41CA89FB600A34BF2 /* AsyncMatcherWrapper.swift in Sources */, + 1F1871CA1CA89EDB00A34BF2 /* NMBStringify.m in Sources */, 1FD8CD521968AB07008ED995 /* BeNil.swift in Sources */, 1FD8CD6A1968AB07008ED995 /* Async.swift in Sources */, 1FD8CD581968AB07008ED995 /* EndWith.swift in Sources */, 1FD8CD5C1968AB07008ED995 /* MatcherProtocols.swift in Sources */, - 1FD8CD761968AB07008ED995 /* ObjCMatcher.swift in Sources */, 1FD8CD341968AB07008ED995 /* DSL.swift in Sources */, 7B5358BE1C38479700A23FAA /* SatisfyAnyOf.swift in Sources */, 1FD8CD381968AB07008ED995 /* Expression.swift in Sources */, @@ -1198,6 +1211,7 @@ 1F299EAB19627B2D002641AF /* BeEmptyTest.swift in Sources */, 1F925EF6195C147800ED456B /* BeCloseToTest.swift in Sources */, 1F4A56791A3B32E3009E1637 /* ObjCBeGreaterThanOrEqualToTest.m in Sources */, + AE7ADE491C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */, 1F4A568B1A3B3407009E1637 /* ObjCBeTrueTest.m in Sources */, DDEFAEB41A93CBE6005CA37A /* ObjCAllPassTest.m in Sources */, 1F4A567F1A3B333F009E1637 /* ObjCBeLessThanTest.m in Sources */, @@ -1228,19 +1242,20 @@ files = ( 1F5DF1791BDCA0F500C3A531 /* BeCloseTo.swift in Sources */, 1F5DF16C1BDCA0F500C3A531 /* AssertionRecorder.swift in Sources */, + 1F1871D71CA89EEF00A34BF2 /* NMBExceptionCapture.m in Sources */, 1F5DF1881BDCA0F500C3A531 /* MatcherProtocols.swift in Sources */, 1F5DF16E1BDCA0F500C3A531 /* NimbleXCTestHandler.swift in Sources */, 1F5DF1751BDCA0F500C3A531 /* FailureMessage.swift in Sources */, 1F5DF1801BDCA0F500C3A531 /* BeLessThanOrEqual.swift in Sources */, + 1F1871E81CA8A18400A34BF2 /* AsyncMatcherWrapper.swift in Sources */, 1F5DF18A1BDCA0F500C3A531 /* ThrowError.swift in Sources */, 1F5DF1891BDCA0F500C3A531 /* RaisesException.swift in Sources */, 1F5DF1761BDCA0F500C3A531 /* AllPass.swift in Sources */, - 8DF1C3F51C94F7D4004B2D36 /* NMBStringify.m in Sources */, - AEBA64721C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */, + AE4BA9AF1C88DDB500B73906 /* Errors.swift in Sources */, 1F5DF1861BDCA0F500C3A531 /* HaveCount.swift in Sources */, 1F5DF1811BDCA0F500C3A531 /* BeLogical.swift in Sources */, + 1F1871DB1CA89EF100A34BF2 /* NMBExpectation.swift in Sources */, 1F5DF1741BDCA0F500C3A531 /* Expression.swift in Sources */, - 1F5DF1911BDCA0F500C3A531 /* ObjCMatcher.swift in Sources */, 1F5DF1781BDCA0F500C3A531 /* BeAnInstanceOf.swift in Sources */, 1F5DF1771BDCA0F500C3A531 /* BeAKindOf.swift in Sources */, 1F5DF17F1BDCA0F500C3A531 /* BeLessThan.swift in Sources */, @@ -1248,21 +1263,23 @@ 1F91DD331C74BF61002C309F /* BeVoid.swift in Sources */, 1FCF91551C61C8A400B15DCB /* PostNotification.swift in Sources */, 1F5DF1831BDCA0F500C3A531 /* Contain.swift in Sources */, - 1F5DF1731BDCA0F500C3A531 /* ObjCExpectation.swift in Sources */, 1F5DF1851BDCA0F500C3A531 /* Equal.swift in Sources */, - 1F5DF18F1BDCA0F500C3A531 /* AsyncMatcherWrapper.swift in Sources */, + 1F1871DC1CA89EF100A34BF2 /* NMBObjCMatcher.swift in Sources */, + F8A1BE311CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */, 1F5DF1711BDCA0F500C3A531 /* DSL+Wait.swift in Sources */, + 1F1871D61CA89EEF00A34BF2 /* DSL.m in Sources */, 1F5DF17D1BDCA0F500C3A531 /* BeGreaterThanOrEqualTo.swift in Sources */, + AE7ADE471C80BF8000B94CD3 /* MatchError.swift in Sources */, 1FC494AC1C29CBA40010975C /* NimbleEnvironment.swift in Sources */, 1F5DF18E1BDCA0F500C3A531 /* Stringers.swift in Sources */, - 1F5DF1AD1BDCA16E00C3A531 /* NMBExceptionCapture.m in Sources */, 1F5DF16D1BDCA0F500C3A531 /* AdapterProtocols.swift in Sources */, 1F5DF17B1BDCA0F500C3A531 /* BeginWith.swift in Sources */, 1F5DF17E1BDCA0F500C3A531 /* BeIdenticalTo.swift in Sources */, + 1F1871E91CA8A18700A34BF2 /* MatcherFunc.swift in Sources */, 1F5DF17A1BDCA0F500C3A531 /* BeEmpty.swift in Sources */, 1F5DF18C1BDCA0F500C3A531 /* Async.swift in Sources */, + 1F1871D81CA89EEF00A34BF2 /* NMBStringify.m in Sources */, 1F5DF1821BDCA0F500C3A531 /* BeNil.swift in Sources */, - 1F5DF1AC1BDCA16E00C3A531 /* DSL.m in Sources */, 1F5DF16F1BDCA0F500C3A531 /* AssertionDispatcher.swift in Sources */, 964CFEFF1C4FF48900513336 /* ThrowAssertion.swift in Sources */, 1F5DF1841BDCA0F500C3A531 /* EndWith.swift in Sources */, @@ -1272,7 +1289,6 @@ 7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */, 1F5DF18B1BDCA0F500C3A531 /* Functional.swift in Sources */, 1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */, - 1F5DF1901BDCA0F500C3A531 /* MatcherFunc.swift in Sources */, ); runOnlyForDeploymentPostprocessing = 0; }; @@ -1289,6 +1305,7 @@ 1F5DF1961BDCA10200C3A531 /* ObjectWithLazyProperty.swift in Sources */, 1F5DF1AB1BDCA10200C3A531 /* ThrowErrorTest.swift in Sources */, 1F5DF1A51BDCA10200C3A531 /* ContainTest.swift in Sources */, + AE7ADE4B1C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */, 1F5DF19E1BDCA10200C3A531 /* BeGreaterThanTest.swift in Sources */, 1F5DF1A21BDCA10200C3A531 /* BeLessThanTest.swift in Sources */, 1F5DF1921BDCA10200C3A531 /* AsynchronousTest.swift in Sources */, @@ -1319,20 +1336,19 @@ buildActionMask = 2147483647; files = ( 1FD8CD411968AB07008ED995 /* BeCloseTo.swift in Sources */, - 1FD8CD751968AB07008ED995 /* MatcherFunc.swift in Sources */, + 1F1871D31CA89EEE00A34BF2 /* NMBExceptionCapture.m in Sources */, 1FD8CD371968AB07008ED995 /* Expectation.swift in Sources */, 1FD8CD331968AB07008ED995 /* NimbleXCTestHandler.swift in Sources */, 1F43728E1A1B343F00EB80F8 /* Stringers.swift in Sources */, 1F43728C1A1B343C00EB80F8 /* SourceLocation.swift in Sources */, 1FD8CD4F1968AB07008ED995 /* BeLessThanOrEqual.swift in Sources */, + 1F1871E71CA8A18400A34BF2 /* AsyncMatcherWrapper.swift in Sources */, 1FDBD8681AF8A4FF0089F27B /* AssertionDispatcher.swift in Sources */, 1F43728B1A1B343900EB80F8 /* Functional.swift in Sources */, - 8DF1C3F41C94F7D4004B2D36 /* NMBStringify.m in Sources */, - AEBA64711C5C5FD10060A057 /* CurrentTestCaseTracker.m in Sources */, + AE4BA9AE1C88DDB500B73906 /* Errors.swift in Sources */, 1FD8CD3D1968AB07008ED995 /* BeAnInstanceOf.swift in Sources */, 1FD8CD511968AB07008ED995 /* BeLogical.swift in Sources */, - 1F0FEA9B1AF32DA4001E554E /* ObjCExpectation.swift in Sources */, - 1FD8CD671968AB07008ED995 /* NMBExceptionCapture.m in Sources */, + 1F1871D91CA89EF100A34BF2 /* NMBExpectation.swift in Sources */, DA9E8C831A414BB9002633C2 /* DSL+Wait.swift in Sources */, DDB1BC7A1A92235600F743C3 /* AllPass.swift in Sources */, 1FD8CD3F1968AB07008ED995 /* BeAKindOf.swift in Sources */, @@ -1344,22 +1360,25 @@ 1FD8CD5B1968AB07008ED995 /* Equal.swift in Sources */, 1FD8CD4D1968AB07008ED995 /* BeLessThan.swift in Sources */, 1FD8CD471968AB07008ED995 /* BeGreaterThan.swift in Sources */, + F8A1BE301CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */, + 1F1871DA1CA89EF100A34BF2 /* NMBObjCMatcher.swift in Sources */, 1FD8CD311968AB07008ED995 /* AdapterProtocols.swift in Sources */, + 1F1871D21CA89EEE00A34BF2 /* DSL.m in Sources */, + AE7ADE461C80BF8000B94CD3 /* MatchError.swift in Sources */, 1FC494AB1C29CBA40010975C /* NimbleEnvironment.swift in Sources */, 1FD8CD5F1968AB07008ED995 /* RaisesException.swift in Sources */, 1FD8CD571968AB07008ED995 /* Contain.swift in Sources */, 1FD8CD491968AB07008ED995 /* BeGreaterThanOrEqualTo.swift in Sources */, - 1FD8CD711968AB07008ED995 /* AsyncMatcherWrapper.swift in Sources */, 1FD8CD451968AB07008ED995 /* BeginWith.swift in Sources */, + 1F1871EB1CA8A18800A34BF2 /* MatcherFunc.swift in Sources */, 1FD8CD4B1968AB07008ED995 /* BeIdenticalTo.swift in Sources */, - 1FD8CD631968AB07008ED995 /* DSL.m in Sources */, 1FD8CD431968AB07008ED995 /* BeEmpty.swift in Sources */, + 1F1871D41CA89EEE00A34BF2 /* NMBStringify.m in Sources */, 1FD8CD531968AB07008ED995 /* BeNil.swift in Sources */, 1FD8CD6B1968AB07008ED995 /* Async.swift in Sources */, 964CFEFE1C4FF48900513336 /* ThrowAssertion.swift in Sources */, 1FD8CD591968AB07008ED995 /* EndWith.swift in Sources */, 1FD8CD5D1968AB07008ED995 /* MatcherProtocols.swift in Sources */, - 1FD8CD771968AB07008ED995 /* ObjCMatcher.swift in Sources */, 1FD8CD351968AB07008ED995 /* DSL.swift in Sources */, 7B5358BF1C38479700A23FAA /* SatisfyAnyOf.swift in Sources */, 1FD8CD391968AB07008ED995 /* Expression.swift in Sources */, @@ -1416,6 +1435,7 @@ 1F299EAC19627B2D002641AF /* BeEmptyTest.swift in Sources */, 1F925EF7195C147800ED456B /* BeCloseToTest.swift in Sources */, 1F4A567A1A3B32E3009E1637 /* ObjCBeGreaterThanOrEqualToTest.m in Sources */, + AE7ADE4A1C80C00D00B94CD3 /* MatchErrorTest.swift in Sources */, 1F4A568C1A3B3407009E1637 /* ObjCBeTrueTest.m in Sources */, DDEFAEB51A93CBE6005CA37A /* ObjCAllPassTest.m in Sources */, 1F4A56801A3B333F009E1637 /* ObjCBeLessThanTest.m in Sources */, @@ -1699,6 +1719,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks", "$(DEVELOPER_FRAMEWORKS_DIR)", @@ -1721,7 +1742,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_MODULE_NAME = Nimble; PRODUCT_NAME = Nimble; - SDKROOT = appletvos; + SDKROOT = appletvsimulator; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; @@ -1737,6 +1758,7 @@ DYLIB_COMPATIBILITY_VERSION = 1; DYLIB_CURRENT_VERSION = 1; DYLIB_INSTALL_NAME_BASE = "@rpath"; + ENABLE_BITCODE = NO; FRAMEWORK_SEARCH_PATHS = ( "$(PLATFORM_DIR)/Developer/Library/Frameworks", "$(DEVELOPER_FRAMEWORKS_DIR)", @@ -1758,7 +1780,7 @@ PRODUCT_BUNDLE_IDENTIFIER = "net.jeffhui.${PRODUCT_NAME:rfc1034identifier}"; PRODUCT_MODULE_NAME = Nimble; PRODUCT_NAME = Nimble; - SDKROOT = appletvos; + SDKROOT = appletvsimulator; SKIP_INSTALL = YES; TARGETED_DEVICE_FAMILY = 3; TVOS_DEPLOYMENT_TARGET = 9.0; diff --git a/README.md b/README.md index 69755f0e7..27a60b8dd 100644 --- a/README.md +++ b/README.md @@ -394,10 +394,10 @@ the default timeout and poll interval values. This can be done as follows: // Swift // Increase the global timeout to 5 seconds: -Nimble.Defaults.AsyncTimeout = 5 +Nimble.AsyncDefaults.Timeout = 5 // Slow the polling interval to 0.1 seconds: -Nimble.Defaults.AsyncPollInterval = 0.1 +Nimble.AsyncDefaults.PollInterval = 0.1 ``` ## Objective-C Support @@ -717,6 +717,23 @@ expect{ try somethingThatThrows() }.to(throwError(NSCocoaError.PropertyListReadC expect{ try somethingThatThrows() }.to(throwError(errorType: MyError.self)) ``` +If you are working directly with `ErrorType` values, as is sometimes the case when using `Result` or `Promise` types, you can use the `matchError` matcher to check if the error is the same error is is supposed to be, without requiring explicit casting. + +```swift +// Swift + +let actual: ErrorType = … + +// Passes if actual contains any error value from the MyErrorEnum type: +expect(actual).to(matchError(MyErrorEnum)) + +// Passes if actual contains the Timeout value from the MyErrorEnum type: +expect(actual).to(matchError(MyErrorEnum.Timeout)) + +// Passes if actual contains an NSError equal to the given one: +expect(actual).to(matchError(NSError(domain: "err", code: 123, userInfo: nil))) +``` + Note: This feature is only available in Swift. ## Exceptions @@ -983,7 +1000,7 @@ in an Xcode project you distribute to others. distribute it yourself via GitHub. For examples of how to write your own matchers, just check out the -[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Nimble/Matchers) +[`Matchers` directory](https://github.com/Quick/Nimble/tree/master/Sources/Nimble/Matchers) to see how Nimble's built-in set of matchers are implemented. You can also check out the tips below. @@ -1190,7 +1207,7 @@ source 'https://github.com/CocoaPods/Specs.git' target 'YOUR_APP_NAME_HERE_Tests', :exclusive => true do use_frameworks! - pod 'Nimble', '~> 3.1.0' + pod 'Nimble', '~> 4.0.0' end ``` diff --git a/Sources/Nimble/Utils/ExceptionCapture.swift b/Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift similarity index 100% rename from Sources/Nimble/Utils/ExceptionCapture.swift rename to Sources/Nimble/Adapters/NonObjectiveC/ExceptionCapture.swift diff --git a/Sources/Nimble/objc/CurrentTestCaseTracker.m b/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h similarity index 53% rename from Sources/Nimble/objc/CurrentTestCaseTracker.m rename to Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h index 0d3b4dbbe..5d416e475 100644 --- a/Sources/Nimble/objc/CurrentTestCaseTracker.m +++ b/Sources/Nimble/Adapters/ObjectiveC/CurrentTestCaseTracker.h @@ -7,12 +7,3 @@ + (CurrentTestCaseTracker *)sharedInstance; @end @interface CurrentTestCaseTracker (Register) @end - -@implementation CurrentTestCaseTracker (Register) - -+ (void)load { - CurrentTestCaseTracker *tracker = [CurrentTestCaseTracker sharedInstance]; - [[XCTestObservationCenter sharedTestObservationCenter] addTestObserver:tracker]; -} - -@end diff --git a/Sources/Nimble/objc/DSL.h b/Sources/Nimble/Adapters/ObjectiveC/DSL.h similarity index 100% rename from Sources/Nimble/objc/DSL.h rename to Sources/Nimble/Adapters/ObjectiveC/DSL.h diff --git a/Sources/Nimble/objc/DSL.m b/Sources/Nimble/Adapters/ObjectiveC/DSL.m similarity index 100% rename from Sources/Nimble/objc/DSL.m rename to Sources/Nimble/Adapters/ObjectiveC/DSL.m diff --git a/Sources/Nimble/objc/NMBExceptionCapture.h b/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h similarity index 100% rename from Sources/Nimble/objc/NMBExceptionCapture.h rename to Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.h diff --git a/Sources/Nimble/objc/NMBExceptionCapture.m b/Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m similarity index 100% rename from Sources/Nimble/objc/NMBExceptionCapture.m rename to Sources/Nimble/Adapters/ObjectiveC/NMBExceptionCapture.m diff --git a/Sources/Nimble/ObjCExpectation.swift b/Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift similarity index 100% rename from Sources/Nimble/ObjCExpectation.swift rename to Sources/Nimble/Adapters/ObjectiveC/NMBExpectation.swift diff --git a/Sources/Nimble/Wrappers/ObjCMatcher.swift b/Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift similarity index 100% rename from Sources/Nimble/Wrappers/ObjCMatcher.swift rename to Sources/Nimble/Adapters/ObjectiveC/NMBObjCMatcher.swift diff --git a/Sources/Nimble/objc/NMBStringify.h b/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h similarity index 100% rename from Sources/Nimble/objc/NMBStringify.h rename to Sources/Nimble/Adapters/ObjectiveC/NMBStringify.h diff --git a/Sources/Nimble/objc/NMBStringify.m b/Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m similarity index 100% rename from Sources/Nimble/objc/NMBStringify.m rename to Sources/Nimble/Adapters/ObjectiveC/NMBStringify.m diff --git a/Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m b/Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m new file mode 100644 index 000000000..35f26fd00 --- /dev/null +++ b/Sources/Nimble/Adapters/ObjectiveC/XCTestObservationCenter+Register.m @@ -0,0 +1,78 @@ +#import "CurrentTestCaseTracker.h" +#import +#import + +#pragma mark - Method Swizzling + +/// Swaps the implementations between two instance methods. +/// +/// @param class The class containing `originalSelector`. +/// @param originalSelector Original method to replace. +/// @param replacementSelector Replacement method. +void swizzleSelectors(Class class, SEL originalSelector, SEL replacementSelector) { + Method originalMethod = class_getInstanceMethod(class, originalSelector); + Method replacementMethod = class_getInstanceMethod(class, replacementSelector); + + BOOL didAddMethod = + class_addMethod(class, + originalSelector, + method_getImplementation(replacementMethod), + method_getTypeEncoding(replacementMethod)); + + if (didAddMethod) { + class_replaceMethod(class, + replacementSelector, + method_getImplementation(originalMethod), + method_getTypeEncoding(originalMethod)); + } else { + method_exchangeImplementations(originalMethod, replacementMethod); + } +} + +#pragma mark - Private + +@interface XCTestObservationCenter (Private) +- (void)_addLegacyTestObserver:(id)observer; +@end + +@implementation XCTestObservationCenter (Register) + +/// Uses objc method swizzling to register `CurrentTestCaseTracker` as a test observer. This is necessary +/// because Xcode 7.3 introduced timing issues where if a custom `XCTestObservation` is registered too early +/// it suppresses all console output (generated by `XCTestLog`), breaking any tools that depend on this output. +/// This approach waits to register our custom test observer until XCTest adds its first "legacy" observer, +/// falling back to registering after the first normal observer if this private method ever changes. ++ (void)load { + if (class_getInstanceMethod([self class], @selector(_addLegacyTestObserver:))) { + // Swizzle -_addLegacyTestObserver: + swizzleSelectors([self class], @selector(_addLegacyTestObserver:), @selector(NMB_original__addLegacyTestObserver:)); + } else { + // Swizzle -addTestObserver:, only if -_addLegacyTestObserver: is not implemented + swizzleSelectors([self class], @selector(addTestObserver:), @selector(NMB_original_addTestObserver:)); + } +} + +#pragma mark - Replacement Methods + +/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. +- (void)NMB_original__addLegacyTestObserver:(id)observer { + [self NMB_original__addLegacyTestObserver:observer]; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self addTestObserver:[CurrentTestCaseTracker sharedInstance]]; + }); +} + +/// Registers `CurrentTestCaseTracker` as a test observer after `XCTestLog` has been added. +/// This method is only used if `-_addLegacyTestObserver:` is not impelemented. (added in Xcode 7.3) +- (void)NMB_original_addTestObserver:(id)observer { + [self NMB_original_addTestObserver:observer]; + + static dispatch_once_t onceToken; + dispatch_once(&onceToken, ^{ + [self NMB_original_addTestObserver:[CurrentTestCaseTracker sharedInstance]]; + }); +} + +@end diff --git a/Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift b/Sources/Nimble/Matchers/AsyncMatcherWrapper.swift similarity index 100% rename from Sources/Nimble/Wrappers/AsyncMatcherWrapper.swift rename to Sources/Nimble/Matchers/AsyncMatcherWrapper.swift diff --git a/Sources/Nimble/Matchers/BeEmpty.swift b/Sources/Nimble/Matchers/BeEmpty.swift index bc1bb9f42..cebd82df7 100644 --- a/Sources/Nimble/Matchers/BeEmpty.swift +++ b/Sources/Nimble/Matchers/BeEmpty.swift @@ -82,7 +82,7 @@ extension NMBObjCMatcher { let expr = Expression(expression: ({ value as String }), location: location) return try! beEmpty().matches(expr, failureMessage: failureMessage) } else if let actualValue = actualValue { - failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSDictionaries, NSHashTables, and NSStrings)" + failureMessage.postfixMessage = "be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings)" failureMessage.actualValue = "\(classAsString(actualValue.dynamicType)) type" } return false diff --git a/Sources/Nimble/Matchers/HaveCount.swift b/Sources/Nimble/Matchers/HaveCount.swift index 7a66d2ac7..a17cca2d2 100644 --- a/Sources/Nimble/Matchers/HaveCount.swift +++ b/Sources/Nimble/Matchers/HaveCount.swift @@ -5,7 +5,7 @@ import Foundation public func haveCount(expectedValue: T.Index.Distance) -> NonNilMatcherFunc { return NonNilMatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" + failureMessage.postfixMessage = "have \(stringify(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" return result @@ -20,7 +20,7 @@ public func haveCount(expectedValue: T.Index.Distance) -> Non public func haveCount(expectedValue: Int) -> MatcherFunc { return MatcherFunc { actualExpression, failureMessage in if let actualValue = try actualExpression.evaluate() { - failureMessage.postfixMessage = "have \(actualValue) with count \(expectedValue)" + failureMessage.postfixMessage = "have \(stringify(actualValue)) with count \(stringify(expectedValue))" let result = expectedValue == actualValue.count failureMessage.actualValue = "\(actualValue.count)" return result diff --git a/Sources/Nimble/Matchers/MatchError.swift b/Sources/Nimble/Matchers/MatchError.swift new file mode 100644 index 000000000..cba70c2a5 --- /dev/null +++ b/Sources/Nimble/Matchers/MatchError.swift @@ -0,0 +1,26 @@ +import Foundation + +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error from the specified case. +/// +/// Errors are tried to be compared by their implementation of Equatable, +/// otherwise they fallback to comparision by _domain and _code. +public func matchError(error: T) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + let actualError: ErrorType? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, error: error) + return errorMatchesNonNilFieldsOrClosure(actualError, error: error) + } +} + +/// A Nimble matcher that succeeds when the actual expression evaluates to an +/// error of the specified type +public func matchError(errorType: T.Type) -> NonNilMatcherFunc { + return NonNilMatcherFunc { actualExpression, failureMessage in + let actualError: ErrorType? = try actualExpression.evaluate() + + setFailureMessageForError(failureMessage, postfixMessageVerb: "match", actualError: actualError, errorType: errorType) + return errorMatchesNonNilFieldsOrClosure(actualError, errorType: errorType) + } +} diff --git a/Sources/Nimble/Wrappers/MatcherFunc.swift b/Sources/Nimble/Matchers/MatcherFunc.swift similarity index 100% rename from Sources/Nimble/Wrappers/MatcherFunc.swift rename to Sources/Nimble/Matchers/MatcherFunc.swift diff --git a/Sources/Nimble/Matchers/MatcherProtocols.swift b/Sources/Nimble/Matchers/MatcherProtocols.swift index f70a4dbdd..978d54c90 100644 --- a/Sources/Nimble/Matchers/MatcherProtocols.swift +++ b/Sources/Nimble/Matchers/MatcherProtocols.swift @@ -46,6 +46,7 @@ public protocol NMBCollection { #endif extension NSSet : NMBCollection {} +extension NSIndexSet : NMBCollection {} extension NSDictionary : NMBCollection {} #if _runtime(_ObjC) diff --git a/Sources/Nimble/Matchers/ThrowError.swift b/Sources/Nimble/Matchers/ThrowError.swift index c12e31cc0..9563565a4 100644 --- a/Sources/Nimble/Matchers/ThrowError.swift +++ b/Sources/Nimble/Matchers/ThrowError.swift @@ -29,93 +29,6 @@ public func throwError( } } -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - error: T?, - errorType: T.Type? = nil, - closure: ((T) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let error = error { - if let error = error as? CustomDebugStringConvertible { - failureMessage.postfixMessage += " <\(error.debugDescription)>" - } else { - failureMessage.postfixMessage += " <\(error)>" - } - } else if errorType != nil || closure != nil { - failureMessage.postfixMessage += " from type <\(T.self)>" - } - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } - if error == nil && errorType == nil && closure == nil { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - return actualError._domain == expectedError._domain - && actualError._code == expectedError._code -} - -internal func errorMatchesExpectedError( - actualError: ErrorType, - expectedError: T) -> Bool { - if let actualError = actualError as? T { - return actualError == expectedError - } - return false -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - error: T?, - errorType: T.Type?, - closure: ((T) -> Void)?) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let error = error { - if !errorMatchesExpectedError(actualError, expectedError: error) { - matches = false - } - } - if let actualError = actualError as? T { - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError as T) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } else if errorType != nil && closure != nil { - // The closure expects another ErrorType as argument, so this - // is _supposed_ to fail, so that it becomes more obvious. - let assertions = gatherExpectations { - expect(actualError is T).to(equal(true)) - } - precondition(assertions.map { $0.message }.count > 0) - matches = false - } - } - - return matches -} - - /// A Nimble matcher that succeeds when the actual expression throws any /// error or when the passed closures' arbitrary custom matching succeeds. /// @@ -138,44 +51,3 @@ public func throwError( return errorMatchesNonNilFieldsOrClosure(actualError, closure: closure) } } - -internal func setFailureMessageForError( - failureMessage: FailureMessage, - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) { - failureMessage.postfixMessage = "throw error" - - if let _ = closure { - failureMessage.postfixMessage += " that satisfies block" - } else { - failureMessage.postfixMessage = "throw any error" - } - - if let actualError = actualError { - failureMessage.actualValue = "<\(actualError)>" - } else { - failureMessage.actualValue = "no error" - } -} - -internal func errorMatchesNonNilFieldsOrClosure( - actualError: ErrorType?, - closure: ((ErrorType) -> Void)?) -> Bool { - var matches = false - - if let actualError = actualError { - matches = true - - if let closure = closure { - let assertions = gatherFailingExpectations { - closure(actualError) - } - let messages = assertions.map { $0.message } - if messages.count > 0 { - matches = false - } - } - } - - return matches -} diff --git a/Sources/Nimble/Utils/Errors.swift b/Sources/Nimble/Utils/Errors.swift new file mode 100644 index 000000000..29c47234c --- /dev/null +++ b/Sources/Nimble/Utils/Errors.swift @@ -0,0 +1,133 @@ +import Foundation + +// Generic + +internal func setFailureMessageForError( + failureMessage: FailureMessage, + postfixMessageVerb: String = "throw", + actualError: ErrorType?, + error: T? = nil, + errorType: T.Type? = nil, + closure: ((T) -> Void)? = nil) { + failureMessage.postfixMessage = "\(postfixMessageVerb) error" + + if let error = error { + if let error = error as? CustomDebugStringConvertible { + failureMessage.postfixMessage += " <\(error.debugDescription)>" + } else { + failureMessage.postfixMessage += " <\(error)>" + } + } else if errorType != nil || closure != nil { + failureMessage.postfixMessage += " from type <\(T.self)>" + } + if let _ = closure { + failureMessage.postfixMessage += " that satisfies block" + } + if error == nil && errorType == nil && closure == nil { + failureMessage.postfixMessage = "\(postfixMessageVerb) any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } +} + +internal func errorMatchesExpectedError( + actualError: ErrorType, + expectedError: T) -> Bool { + return actualError._domain == expectedError._domain + && actualError._code == expectedError._code +} + +internal func errorMatchesExpectedError( + actualError: ErrorType, + expectedError: T) -> Bool { + if let actualError = actualError as? T { + return actualError == expectedError + } + return false +} + +internal func errorMatchesNonNilFieldsOrClosure( + actualError: ErrorType?, + error: T? = nil, + errorType: T.Type? = nil, + closure: ((T) -> Void)? = nil) -> Bool { + var matches = false + + if let actualError = actualError { + matches = true + + if let error = error { + if !errorMatchesExpectedError(actualError, expectedError: error) { + matches = false + } + } + if let actualError = actualError as? T { + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError as T) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } else if errorType != nil && closure != nil { + // The closure expects another ErrorType as argument, so this + // is _supposed_ to fail, so that it becomes more obvious. + let assertions = gatherExpectations { + expect(actualError is T).to(equal(true)) + } + precondition(assertions.map { $0.message }.count > 0) + matches = false + } + } + + return matches +} + +// Non-generic + +internal func setFailureMessageForError( + failureMessage: FailureMessage, + actualError: ErrorType?, + closure: ((ErrorType) -> Void)?) { + failureMessage.postfixMessage = "throw error" + + if let _ = closure { + failureMessage.postfixMessage += " that satisfies block" + } else { + failureMessage.postfixMessage = "throw any error" + } + + if let actualError = actualError { + failureMessage.actualValue = "<\(actualError)>" + } else { + failureMessage.actualValue = "no error" + } +} + +internal func errorMatchesNonNilFieldsOrClosure( + actualError: ErrorType?, + closure: ((ErrorType) -> Void)?) -> Bool { + var matches = false + + if let actualError = actualError { + matches = true + + if let closure = closure { + let assertions = gatherFailingExpectations { + closure(actualError) + } + let messages = assertions.map { $0.message } + if messages.count > 0 { + matches = false + } + } + } + + return matches +} diff --git a/Sources/Nimble/Utils/Stringers.swift b/Sources/Nimble/Utils/Stringers.swift index 5f1da28cf..4edead3f4 100644 --- a/Sources/Nimble/Utils/Stringers.swift +++ b/Sources/Nimble/Utils/Stringers.swift @@ -101,6 +101,13 @@ extension NSArray: TestOutputStringConvertible { } } +extension NSIndexSet: TestOutputStringConvertible { + public var testDescription: String { + let list = Array(self).map(Nimble.stringify).joinWithSeparator(", ") + return "(\(list))" + } +} + extension String: TestOutputStringConvertible { public var testDescription: String { return self diff --git a/Tests/Nimble/Matchers/BeEmptyTest.swift b/Tests/Nimble/Matchers/BeEmptyTest.swift index 829615499..541327fbb 100644 --- a/Tests/Nimble/Matchers/BeEmptyTest.swift +++ b/Tests/Nimble/Matchers/BeEmptyTest.swift @@ -33,6 +33,9 @@ class BeEmptyTest: XCTestCase, XCTestCaseProvider { expect(NSSet()).to(beEmpty()) expect(NSSet(array: [NSNumber(integer: 1)])).toNot(beEmpty()) + expect(NSIndexSet()).to(beEmpty()) + expect(NSIndexSet(index: 1)).toNot(beEmpty()) + expect(NSString()).to(beEmpty()) expect(NSString(string: "hello")).toNot(beEmpty()) @@ -55,6 +58,20 @@ class BeEmptyTest: XCTestCase, XCTestCaseProvider { expect([1]).to(beEmpty()) } + failsWithErrorMessage("expected to not be empty, got <{()}>") { + expect(NSSet()).toNot(beEmpty()); + } + failsWithErrorMessage("expected to be empty, got <{(1)}>") { + expect(NSSet(object: NSNumber(int: 1))).to(beEmpty()); + } + + failsWithErrorMessage("expected to not be empty, got <()>") { + expect(NSIndexSet()).toNot(beEmpty()); + } + failsWithErrorMessage("expected to be empty, got <(1)>") { + expect(NSIndexSet(index: 1)).to(beEmpty()); + } + failsWithErrorMessage("expected to not be empty, got <>") { expect("").toNot(beEmpty()) } diff --git a/Tests/Nimble/Matchers/HaveCountTest.swift b/Tests/Nimble/Matchers/HaveCountTest.swift index 9a0193b2f..9dd79d69b 100644 --- a/Tests/Nimble/Matchers/HaveCountTest.swift +++ b/Tests/Nimble/Matchers/HaveCountTest.swift @@ -28,11 +28,11 @@ class HaveCountTest: XCTestCase, XCTestCaseProvider { expect(dictionary).to(haveCount(3)) expect(dictionary).notTo(haveCount(1)) - failsWithErrorMessage("expected to have \(dictionary) with count 1, got 3") { + failsWithErrorMessage("expected to have \(stringify(dictionary)) with count 1, got 3") { expect(dictionary).to(haveCount(1)) } - failsWithErrorMessage("expected to not have \(dictionary) with count 3, got 3") { + failsWithErrorMessage("expected to not have \(stringify(dictionary)) with count 3, got 3") { expect(dictionary).notTo(haveCount(3)) } } @@ -42,11 +42,11 @@ class HaveCountTest: XCTestCase, XCTestCaseProvider { expect(set).to(haveCount(3)) expect(set).notTo(haveCount(1)) - failsWithErrorMessage("expected to have \(set) with count 1, got 3") { + failsWithErrorMessage("expected to have \(stringify(set)) with count 1, got 3") { expect(set).to(haveCount(1)) } - failsWithErrorMessage("expected to not have \(set) with count 3, got 3") { + failsWithErrorMessage("expected to not have \(stringify(set)) with count 3, got 3") { expect(set).notTo(haveCount(3)) } } diff --git a/Tests/Nimble/Matchers/MatchErrorTest.swift b/Tests/Nimble/Matchers/MatchErrorTest.swift new file mode 100644 index 000000000..c20369e72 --- /dev/null +++ b/Tests/Nimble/Matchers/MatchErrorTest.swift @@ -0,0 +1,78 @@ +import Foundation +import XCTest +import Nimble + +class MatchErrorTest: XCTestCase, XCTestCaseProvider { + var allTests: [(String, () throws -> Void)] { + return [ + ("testMatchErrorPositive", testMatchErrorPositive), + ("testMatchErrorNegative", testMatchErrorNegative), + ("testMatchNSErrorPositive", testMatchNSErrorPositive), + ("testMatchNSErrorNegative", testMatchNSErrorNegative), + ("testMatchPositiveMessage", testMatchPositiveMessage), + ("testMatchNegativeMessage", testMatchNegativeMessage), + ("testDoesNotMatchNils", testDoesNotMatchNils), + ] + } + + func testMatchErrorPositive() { + expect(Error.Laugh).to(matchError(Error.Laugh)) + expect(Error.Laugh).to(matchError(Error.self)) + expect(EquatableError.Parameterized(x: 1)).to(matchError(EquatableError.Parameterized(x: 1))) + + expect(Error.Laugh as ErrorType).to(matchError(Error.Laugh)) + } + + func testMatchErrorNegative() { + expect(Error.Laugh).toNot(matchError(Error.Cry)) + expect(Error.Laugh as ErrorType).toNot(matchError(Error.Cry)) + } + + func testMatchNSErrorPositive() { + let error1 = NSError(domain: "err", code: 0, userInfo: nil) + let error2 = NSError(domain: "err", code: 0, userInfo: nil) + + expect(error1).to(matchError(error2)) + } + + func testMatchNSErrorNegative() { + let error1 = NSError(domain: "err", code: 0, userInfo: nil) + let error2 = NSError(domain: "err", code: 1, userInfo: nil) + + expect(error1).toNot(matchError(error2)) + } + + func testMatchPositiveMessage() { + failsWithErrorMessage("expected to match error , got ") { + expect(EquatableError.Parameterized(x: 1)).to(matchError(EquatableError.Parameterized(x: 2))) + } + failsWithErrorMessage("expected to match error , got ") { + expect(Error.Laugh).to(matchError(Error.Cry)) + } + failsWithErrorMessage("expected to match error , got ") { + expect(CustomDebugStringConvertibleError.A).to(matchError(CustomDebugStringConvertibleError.B)) + } + + failsWithErrorMessage("expected to match error , got ") { + let error1 = NSError(domain: "err", code: 0, userInfo: nil) + let error2 = NSError(domain: "err", code: 1, userInfo: nil) + expect(error1).to(matchError(error2)) + } + } + + func testMatchNegativeMessage() { + failsWithErrorMessage("expected to not match error , got ") { + expect(Error.Laugh).toNot(matchError(Error.Laugh)) + } + } + + func testDoesNotMatchNils() { + failsWithErrorMessageForNil("expected to match error , got no error") { + expect(nil as ErrorType?).to(matchError(Error.Laugh)) + } + + failsWithErrorMessageForNil("expected to not match error , got no error") { + expect(nil as ErrorType?).toNot(matchError(Error.Laugh)) + } + } +} diff --git a/Tests/Nimble/objc/ObjCBeEmptyTest.m b/Tests/Nimble/objc/ObjCBeEmptyTest.m index 856eb60c0..723d64286 100644 --- a/Tests/Nimble/objc/ObjCBeEmptyTest.m +++ b/Tests/Nimble/objc/ObjCBeEmptyTest.m @@ -11,12 +11,14 @@ - (void)testPositiveMatches { expect(@"").to(beEmpty()); expect(@{}).to(beEmpty()); expect([NSSet set]).to(beEmpty()); + expect([NSIndexSet indexSet]).to(beEmpty()); expect([NSHashTable hashTableWithOptions:NSPointerFunctionsWeakMemory]).to(beEmpty()); expect(@[@1, @2]).toNot(beEmpty()); expect(@"a").toNot(beEmpty()); expect(@{@"key": @"value"}).toNot(beEmpty()); expect([NSSet setWithObject:@1]).toNot(beEmpty()); + expect([NSIndexSet indexSetWithIndex:1]).toNot(beEmpty()); NSHashTable *table = [NSHashTable hashTableWithOptions:NSPointerFunctionsStrongMemory]; [table addObject:@1]; @@ -36,6 +38,9 @@ - (void)testNegativeMatches { expectFailureMessage(@"expected to be empty, got <{(1)}>", ^{ expect([NSSet setWithObject:@1]).to(beEmpty()); }); + expectFailureMessage(@"expected to be empty, got <(1)>", ^{ + expect([NSIndexSet indexSetWithIndex:1]).to(beEmpty()); + }); NSHashTable *table = [NSHashTable hashTableWithOptions:NSPointerFunctionsStrongMemory]; [table addObject:@1]; NSString *tableString = [[table description] stringByReplacingOccurrencesOfString:@"\n" withString:@""]; @@ -55,6 +60,9 @@ - (void)testNegativeMatches { expectFailureMessage(@"expected to not be empty, got <{(1)}>", ^{ expect([NSSet setWithObject:@1]).toNot(beEmpty()); }); + expectFailureMessage(@"expected to not be empty, got <(1)>", ^{ + expect([NSIndexSet indexSetWithIndex:1]).toNot(beEmpty()); + }); expectFailureMessage(@"expected to not be empty, got ", ^{ expect([NSHashTable hashTableWithOptions:NSPointerFunctionsStrongMemory]).toNot(beEmpty()); }); @@ -70,10 +78,10 @@ - (void)testItDoesNotMatchNil { } - (void)testItReportsTypesItMatchesAgainst { - expectFailureMessage(@"expected to be empty (only works for NSArrays, NSSets, NSDictionaries, NSHashTables, and NSStrings), got __NSCFNumber type", ^{ + expectFailureMessage(@"expected to be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings), got __NSCFNumber type", ^{ expect(@1).to(beEmpty()); }); - expectFailureMessage(@"expected to not be empty (only works for NSArrays, NSSets, NSDictionaries, NSHashTables, and NSStrings), got __NSCFNumber type", ^{ + expectFailureMessage(@"expected to not be empty (only works for NSArrays, NSSets, NSIndexSets, NSDictionaries, NSHashTables, and NSStrings), got __NSCFNumber type", ^{ expect(@1).toNot(beEmpty()); }); } diff --git a/Tests/Nimble/objc/ObjCHaveCount.m b/Tests/Nimble/objc/ObjCHaveCount.m index 924d36a59..b057fc031 100644 --- a/Tests/Nimble/objc/ObjCHaveCount.m +++ b/Tests/Nimble/objc/ObjCHaveCount.m @@ -14,11 +14,11 @@ - (void)testHaveCountForNSArray { expect(@[]).to(haveCount(@0)); expect(@[@1]).notTo(haveCount(@0)); - expectFailureMessage(@"expected to have (1,2,3) with count 1, got 3", ^{ + expectFailureMessage(@"expected to have (1, 2, 3) with count 1, got 3", ^{ expect(@[@1, @2, @3]).to(haveCount(@1)); }); - expectFailureMessage(@"expected to not have (1,2,3) with count 3, got 3", ^{ + expectFailureMessage(@"expected to not have (1, 2, 3) with count 3, got 3", ^{ expect(@[@1, @2, @3]).notTo(haveCount(@3)); }); @@ -77,6 +77,21 @@ - (void)testHaveCountForNSSet { }); } +- (void)testHaveCountForNSIndexSet { + NSIndexSet *const set = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(1, 3)]; + + expect(set).to(haveCount(@3)); + expect(set).notTo(haveCount(@1)); + + expectFailureMessage(@"expected to have (1, 2, 3) with count 1, got 3", ^{ + expect(set).to(haveCount(@1)); + }); + + expectFailureMessage(@"expected to not have (1, 2, 3) with count 3, got 3", ^{ + expect(set).notTo(haveCount(@3)); + }); +} + - (void)testHaveCountForUnsupportedTypes { expectFailureMessage(@"expected to get type of NSArray, NSSet, NSDictionary, or NSHashTable, got __NSCFConstantString", ^{ expect(@"string").to(haveCount(@6)); diff --git a/Tests/Nimble/objc/ObjcStringersTest.m b/Tests/Nimble/objc/ObjcStringersTest.m index d87117fc1..4ba2eaeb9 100644 --- a/Tests/Nimble/objc/ObjcStringersTest.m +++ b/Tests/Nimble/objc/ObjcStringersTest.m @@ -14,6 +14,13 @@ - (void)testItCanStringifyArrays { expect(result).to(equal(@"(1, 2, 3)")); } +- (void)testItCanStringifyIndexSets { + NSIndexSet *indexSet = [NSIndexSet indexSetWithIndexesInRange:NSMakeRange(1, 3)]; + NSString *result = NMBStringify(indexSet); + + expect(result).to(equal(@"(1, 2, 3)")); +} + - (void)testItRoundsLongDecimals { NSNumber *num = @291.123782163; NSString *result = NMBStringify(num); diff --git a/script/release b/script/release index 5cb9754f8..62840f691 100755 --- a/script/release +++ b/script/release @@ -2,10 +2,7 @@ REMOTE_BRANCH=master POD_NAME=Nimble PODSPEC=Nimble.podspec -GITHUB_TAGS_URL=https://github.com/Quick/Nimble/tags -CARTHAGE_FRAMEWORK_NAME=Nimble -CARTHAGE=${CARTHAGE:-carthage} POD=${COCOAPODS:-pod} function help { @@ -43,11 +40,6 @@ VERSION_TAG="v$VERSION" echo "-> Verifying Local Directory for Release" -if [ -z "`which $CARTHAGE`" ]; then - die "Carthage is required to produce a release. Aborting." -fi -echo " > Carthage is installed" - if [ -z "`which $POD`" ]; then die "Cocoapods is required to produce a release. Aborting." fi @@ -140,9 +132,6 @@ echo "-> Ensuring no differences to origin/$REMOTE_BRANCH" git fetch origin || die "Failed to fetch origin" git diff --quiet HEAD "origin/$REMOTE_BRANCH" || die "HEAD is not aligned to origin/$REMOTE_BRANCH. Cannot update version safely" -# Don't build binaries: see https://github.com/Carthage/Carthage/issues/924 -# echo "-> Building Carthage release" -# $CARTHAGE build --no-skip-current || die "Failed to build framework for carthage" echo "-> Setting podspec version" cat "$PODSPEC" | grep 's.version' | grep -q "\"$VERSION\"" @@ -172,7 +161,6 @@ else fi if [ $SET_PODSPEC_VERSION -ne 0 ]; then - rm $RELEASE_NOTES git push origin "$REMOTE_BRANCH" || die "Failed to push to origin" echo " > Pushed version to origin" fi @@ -180,9 +168,6 @@ fi echo echo "---------------- Released as $VERSION_TAG ----------------" echo -# Don't build binaries: see https://github.com/Carthage/Carthage/issues/924 -# echo "Archiving carthage release..." -# $CARTHAGE archive "$CARTHAGE_FRAMEWORK_NAME" || die "Failed to archive framework for carthage" echo echo "Pushing to pod trunk..." @@ -192,9 +177,10 @@ $POD trunk push "$PODSPEC" echo echo "================ Finalizing the Release ================" echo -echo " - Go to $GITHUB_TAGS_URL and mark this as a release." -echo " - Paste the contents of $RELEASE_NOTES into the release notes. Tweak for Github styling." -# echo " - Attach ${CARTHAGE_FRAMEWORK_NAME}.framework.zip to it." +echo " - Opening GitHub to mark this as a release..." +echo " - Paste the contents of $RELEASE_NOTES into the release notes. Tweak for GitHub styling." echo " - Announce!" +open "https://github.com/Quick/Nimble/releases/new?tag=$VERSION_TAG" + rm ${PODSPEC}.backup diff --git a/test b/test index 333c5d385..4fbdf1a3d 100755 --- a/test +++ b/test @@ -57,6 +57,13 @@ function test_osx { run xcodebuild -project Nimble.xcodeproj -scheme "Nimble-OSX" -configuration "Debug" -sdk "macosx$BUILD_OSX_SDK_VERSION" build test } +function test_podspec { + echo "Gathering CocoaPods installation information..." + run bundle exec pod --version + echo "Linting podspec..." + run bundle exec pod lib lint Nimble.podspec +} + function test_swiftpm { run swift build --clean && swift build && swift test } @@ -83,6 +90,7 @@ function help { echo " clean - Cleans the derived data directory of Xcode. Assumes default location" echo " ios - Runs the tests as an iOS device" echo " osx - Runs the tests on Mac OS X 10.10 (Yosemite and newer only)" + echo " podspec - Runs pod lib lint against the podspec to detect breaking changes" echo " all - Runs both ios and osx tests" echo " swiftpm - Runs the tests built by the Swift Package Manager" echo " help - Displays this help" @@ -98,6 +106,7 @@ function main { clean) clean ;; ios) test_ios ;; osx) test_osx ;; + podspec) test_podspec ;; test) test ;; all) test ;; swiftpm) test_swiftpm ;;