Skip to content

Commit

Permalink
Rename Predicate to Matcher (#1090)
Browse files Browse the repository at this point in the history
* Rename Predicate to Matcher

Because I couldn't think of a better name, This re-uses the name of the old
Matcher API (removed since Nimble 10.0).

This change is due to the 2023 Apple Platforms release renaming NSPredicate
to Predicate, which causes friction for developers creating custom matchers.

* Add typealias AsyncPredicate = AsyncMatcher
  • Loading branch information
younata authored Oct 2, 2023
1 parent 67aca90 commit f9b339e
Show file tree
Hide file tree
Showing 62 changed files with 1,417 additions and 1,381 deletions.
40 changes: 20 additions & 20 deletions Nimble.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -204,9 +204,9 @@
1F925F12195C190B00ED456B /* BeGreaterThanOrEqualToTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1F925F10195C190B00ED456B /* BeGreaterThanOrEqualToTest.swift */; };
1F9DB8FB1A74E793002E96AD /* ObjCBeEmptyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F9DB8FA1A74E793002E96AD /* ObjCBeEmptyTest.m */; };
1F9DB8FC1A74E793002E96AD /* ObjCBeEmptyTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F9DB8FA1A74E793002E96AD /* ObjCBeEmptyTest.m */; };
1FA0C3FF1E30B14500623165 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Predicate.swift */; };
1FA0C4001E30B14500623165 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Predicate.swift */; };
1FA0C4011E30B14500623165 /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Predicate.swift */; };
1FA0C3FF1E30B14500623165 /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Matcher.swift */; };
1FA0C4001E30B14500623165 /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Matcher.swift */; };
1FA0C4011E30B14500623165 /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Matcher.swift */; };
1FB90098195EC4B8001D7FAE /* BeIdenticalToTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB90097195EC4B8001D7FAE /* BeIdenticalToTest.swift */; };
1FB90099195EC4B8001D7FAE /* BeIdenticalToTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FB90097195EC4B8001D7FAE /* BeIdenticalToTest.swift */; };
1FC494AA1C29CBA40010975C /* NimbleEnvironment.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FC494A91C29CBA40010975C /* NimbleEnvironment.swift */; };
Expand Down Expand Up @@ -389,10 +389,10 @@
89C297D32A92E814002A143F /* AsyncPromiseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C297CD2A92AB34002A143F /* AsyncPromiseTest.swift */; };
89C297D42A92E815002A143F /* AsyncPromiseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C297CD2A92AB34002A143F /* AsyncPromiseTest.swift */; };
89C297D52A92E816002A143F /* AsyncPromiseTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89C297CD2A92AB34002A143F /* AsyncPromiseTest.swift */; };
89EEF5A52A03293100988224 /* AsyncPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncPredicate.swift */; };
89EEF5A62A03293100988224 /* AsyncPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncPredicate.swift */; };
89EEF5A72A03293100988224 /* AsyncPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncPredicate.swift */; };
89EEF5A82A03293100988224 /* AsyncPredicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncPredicate.swift */; };
89EEF5A52A03293100988224 /* AsyncMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncMatcher.swift */; };
89EEF5A62A03293100988224 /* AsyncMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncMatcher.swift */; };
89EEF5A72A03293100988224 /* AsyncMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncMatcher.swift */; };
89EEF5A82A03293100988224 /* AsyncMatcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5A42A03293100988224 /* AsyncMatcher.swift */; };
89EEF5B72A032C3200988224 /* AsyncPredicateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5B22A032C2500988224 /* AsyncPredicateTest.swift */; };
89EEF5B82A032C3300988224 /* AsyncPredicateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5B22A032C2500988224 /* AsyncPredicateTest.swift */; };
89EEF5B92A032C3300988224 /* AsyncPredicateTest.swift in Sources */ = {isa = PBXBuildFile; fileRef = 89EEF5B22A032C2500988224 /* AsyncPredicateTest.swift */; };
Expand Down Expand Up @@ -605,7 +605,7 @@
D95F8970267EA20A004B1B4D /* MatcherProtocols.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */; };
D95F8971267EA20A004B1B4D /* PostNotification.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FCF91521C61C8A400B15DCB /* PostNotification.swift */; };
D95F8972267EA20A004B1B4D /* Match.swift in Sources */ = {isa = PBXBuildFile; fileRef = DDB4D5EC19FE43C200E9D9FE /* Match.swift */; };
D95F8973267EA20A004B1B4D /* Predicate.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Predicate.swift */; };
D95F8973267EA20A004B1B4D /* Matcher.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FA0C3FE1E30B14500623165 /* Matcher.swift */; };
D95F8974267EA20A004B1B4D /* RaisesException.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD1E1968AB07008ED995 /* RaisesException.swift */; };
D95F8975267EA20A004B1B4D /* BeIdenticalTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD141968AB07008ED995 /* BeIdenticalTo.swift */; };
D95F8976267EA20A004B1B4D /* BeGreaterThanOrEqualTo.swift in Sources */ = {isa = PBXBuildFile; fileRef = 1FD8CD131968AB07008ED995 /* BeGreaterThanOrEqualTo.swift */; };
Expand Down Expand Up @@ -747,7 +747,7 @@
1F925F0D195C18F500ED456B /* BeLessThanOrEqualToTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeLessThanOrEqualToTest.swift; sourceTree = "<group>"; };
1F925F10195C190B00ED456B /* BeGreaterThanOrEqualToTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeGreaterThanOrEqualToTest.swift; sourceTree = "<group>"; };
1F9DB8FA1A74E793002E96AD /* ObjCBeEmptyTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ObjCBeEmptyTest.m; sourceTree = "<group>"; };
1FA0C3FE1E30B14500623165 /* Predicate.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Predicate.swift; sourceTree = "<group>"; };
1FA0C3FE1E30B14500623165 /* Matcher.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = Matcher.swift; sourceTree = "<group>"; };
1FB90097195EC4B8001D7FAE /* BeIdenticalToTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = BeIdenticalToTest.swift; sourceTree = "<group>"; };
1FC494A91C29CBA40010975C /* NimbleEnvironment.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = NimbleEnvironment.swift; sourceTree = "<group>"; };
1FCF914E1C61C85A00B15DCB /* PostNotificationTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PostNotificationTest.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -809,7 +809,7 @@
899441F32902EF0900C1FAF9 /* DSL+AsyncAwait.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "DSL+AsyncAwait.swift"; sourceTree = "<group>"; };
89C297CB2A911CDA002A143F /* AsyncTimerSequenceTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncTimerSequenceTest.swift; sourceTree = "<group>"; };
89C297CD2A92AB34002A143F /* AsyncPromiseTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncPromiseTest.swift; sourceTree = "<group>"; };
89EEF5A42A03293100988224 /* AsyncPredicate.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncPredicate.swift; sourceTree = "<group>"; };
89EEF5A42A03293100988224 /* AsyncMatcher.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncMatcher.swift; sourceTree = "<group>"; };
89EEF5B22A032C2500988224 /* AsyncPredicateTest.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncPredicateTest.swift; sourceTree = "<group>"; };
89EEF5BB2A06210D00988224 /* AsyncHelpers.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AsyncHelpers.swift; sourceTree = "<group>"; };
89F5E06C290765BB001F9377 /* PollingTest.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = PollingTest.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1100,7 +1100,7 @@
children = (
DDB1BC781A92235600F743C3 /* AllPass.swift */,
896962402A5FABD000A7929D /* AsyncAllPass.swift */,
89EEF5A42A03293100988224 /* AsyncPredicate.swift */,
89EEF5A42A03293100988224 /* AsyncMatcher.swift */,
1FD8CD0E1968AB07008ED995 /* BeAKindOf.swift */,
1FD8CD0D1968AB07008ED995 /* BeAnInstanceOf.swift */,
1FD8CD0F1968AB07008ED995 /* BeCloseTo.swift */,
Expand Down Expand Up @@ -1129,7 +1129,7 @@
1FD8CD1D1968AB07008ED995 /* MatcherProtocols.swift */,
AE7ADE441C80BF8000B94CD3 /* MatchError.swift */,
1FCF91521C61C8A400B15DCB /* PostNotification.swift */,
1FA0C3FE1E30B14500623165 /* Predicate.swift */,
1FA0C3FE1E30B14500623165 /* Matcher.swift */,
1FD8CD1E1968AB07008ED995 /* RaisesException.swift */,
A8F6B5BC2070186D00FCB5ED /* SatisfyAllOf.swift */,
7B5358BD1C38479700A23FAA /* SatisfyAnyOf.swift */,
Expand Down Expand Up @@ -1726,9 +1726,9 @@
1FD8CD3A1968AB07008ED995 /* FailureMessage.swift in Sources */,
891A04722AB0164500B46613 /* AsyncTimerSequence.swift in Sources */,
CDFB6A4C1F7E082500AD8CC7 /* mach_excServer.c in Sources */,
89EEF5A62A03293100988224 /* AsyncPredicate.swift in Sources */,
89EEF5A62A03293100988224 /* AsyncMatcher.swift in Sources */,
472FD1351B9E085700C7B8DA /* HaveCount.swift in Sources */,
1FA0C4001E30B14500623165 /* Predicate.swift in Sources */,
1FA0C4001E30B14500623165 /* Matcher.swift in Sources */,
964CFEFD1C4FF48900513336 /* ThrowAssertion.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -1861,7 +1861,7 @@
1F5DF1851BDCA0F500C3A531 /* Equal.swift in Sources */,
F8A1BE311CB3710900031679 /* XCTestObservationCenter+Register.m in Sources */,
1FE661591E6574E30035F243 /* ExpectationMessage.swift in Sources */,
1FA0C4011E30B14500623165 /* Predicate.swift in Sources */,
1FA0C4011E30B14500623165 /* Matcher.swift in Sources */,
1F5DF1711BDCA0F500C3A531 /* DSL+Wait.swift in Sources */,
1F1871D61CA89EEF00A34BF2 /* DSL.m in Sources */,
1F5DF17D1BDCA0F500C3A531 /* BeGreaterThanOrEqualTo.swift in Sources */,
Expand All @@ -1888,7 +1888,7 @@
CDD80B851F20307B0002CD65 /* MatcherProtocols.swift in Sources */,
1F5DF1721BDCA0F500C3A531 /* Expectation.swift in Sources */,
7B5358C01C38479700A23FAA /* SatisfyAnyOf.swift in Sources */,
89EEF5A72A03293100988224 /* AsyncPredicate.swift in Sources */,
89EEF5A72A03293100988224 /* AsyncMatcher.swift in Sources */,
0477153723B740B800402D4E /* NimbleTimeInterval.swift in Sources */,
7B13BA0C1DD361D300C9098C /* ContainElementSatisfying.swift in Sources */,
1F5DF1871BDCA0F500C3A531 /* Match.swift in Sources */,
Expand Down Expand Up @@ -2055,9 +2055,9 @@
1FD8CD391968AB07008ED995 /* Expression.swift in Sources */,
891A04712AB0164500B46613 /* AsyncTimerSequence.swift in Sources */,
CDFB6A4B1F7E082500AD8CC7 /* mach_excServer.c in Sources */,
89EEF5A52A03293100988224 /* AsyncPredicate.swift in Sources */,
89EEF5A52A03293100988224 /* AsyncMatcher.swift in Sources */,
1FD8CD3B1968AB07008ED995 /* FailureMessage.swift in Sources */,
1FA0C3FF1E30B14500623165 /* Predicate.swift in Sources */,
1FA0C3FF1E30B14500623165 /* Matcher.swift in Sources */,
472FD1391B9E0A9700C7B8DA /* HaveCount.swift in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
Expand Down Expand Up @@ -2164,7 +2164,7 @@
D95F8988267EA20E004B1B4D /* Errors.swift in Sources */,
D95F8926267EA1CA004B1B4D /* XCTestObservationCenter+Register.m in Sources */,
D95F8967267EA20A004B1B4D /* SatisfyAnyOf.swift in Sources */,
D95F8973267EA20A004B1B4D /* Predicate.swift in Sources */,
D95F8973267EA20A004B1B4D /* Matcher.swift in Sources */,
D95F8976267EA20A004B1B4D /* BeGreaterThanOrEqualTo.swift in Sources */,
89F5E08F290B8D22001F9377 /* AsyncAwait.swift in Sources */,
D95F8958267EA1F7004B1B4D /* AssertionRecorder.swift in Sources */,
Expand Down Expand Up @@ -2217,7 +2217,7 @@
D95F8975267EA20A004B1B4D /* BeIdenticalTo.swift in Sources */,
D95F8984267EA20E004B1B4D /* SourceLocation.swift in Sources */,
D95F8929267EA1CA004B1B4D /* DSL.m in Sources */,
89EEF5A82A03293100988224 /* AsyncPredicate.swift in Sources */,
89EEF5A82A03293100988224 /* AsyncMatcher.swift in Sources */,
D95F896B267EA20A004B1B4D /* BeEmpty.swift in Sources */,
D95F896E267EA20A004B1B4D /* BeVoid.swift in Sources */,
D95F8957267EA1F7004B1B4D /* AdapterProtocols.swift in Sources */,
Expand Down
Loading

0 comments on commit f9b339e

Please sign in to comment.