@@ -16,6 +16,7 @@ final class SynchronousTest: XCTestCase, XCTestCaseProvider {
16
16
( " testToNotProvidesActualValueExpression " , testToNotProvidesActualValueExpression) ,
17
17
( " testToNotProvidesAMemoizedActualValueExpression " , testToNotProvidesAMemoizedActualValueExpression) ,
18
18
( " testToNotProvidesAMemoizedActualValueExpressionIsEvaluatedAtMatcherControl " , testToNotProvidesAMemoizedActualValueExpressionIsEvaluatedAtMatcherControl) ,
19
+ ( " testToNegativeMatches " , testToNegativeMatches) ,
19
20
( " testToNotNegativeMatches " , testToNotNegativeMatches) ,
20
21
( " testNotToMatchesLikeToNot " , testNotToMatchesLikeToNot) ,
21
22
]
@@ -116,10 +117,22 @@ final class SynchronousTest: XCTestCase, XCTestCaseProvider {
116
117
expect ( callCount) . to ( equal ( 1 ) )
117
118
}
118
119
120
+ func testToNegativeMatches( ) {
121
+ failsWithErrorMessage ( " expected to match, got <1> " ) {
122
+ expect ( 1 ) . to ( MatcherFunc { _, _ in false } )
123
+ }
124
+ failsWithErrorMessage ( " expected to match, got <1> " ) {
125
+ expect ( 1 ) . to ( MatcherFunc { _, _ in false } . predicate)
126
+ }
127
+ }
128
+
119
129
func testToNotNegativeMatches( ) {
120
130
failsWithErrorMessage ( " expected to not match, got <1> " ) {
121
131
expect ( 1 ) . toNot ( MatcherFunc { _, _ in true } )
122
132
}
133
+ failsWithErrorMessage ( " expected to not match, got <1> " ) {
134
+ expect ( 1 ) . toNot ( MatcherFunc { _, _ in true } . predicate)
135
+ }
123
136
}
124
137
125
138
func testNotToMatchesLikeToNot( ) {
0 commit comments