@@ -16,6 +16,7 @@ final class SynchronousTest: XCTestCase, XCTestCaseProvider {
1616 ( " testToNotProvidesActualValueExpression " , testToNotProvidesActualValueExpression) ,
1717 ( " testToNotProvidesAMemoizedActualValueExpression " , testToNotProvidesAMemoizedActualValueExpression) ,
1818 ( " testToNotProvidesAMemoizedActualValueExpressionIsEvaluatedAtMatcherControl " , testToNotProvidesAMemoizedActualValueExpressionIsEvaluatedAtMatcherControl) ,
19+ ( " testToNegativeMatches " , testToNegativeMatches) ,
1920 ( " testToNotNegativeMatches " , testToNotNegativeMatches) ,
2021 ( " testNotToMatchesLikeToNot " , testNotToMatchesLikeToNot) ,
2122 ]
@@ -116,10 +117,22 @@ final class SynchronousTest: XCTestCase, XCTestCaseProvider {
116117 expect ( callCount) . to ( equal ( 1 ) )
117118 }
118119
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+
119129 func testToNotNegativeMatches( ) {
120130 failsWithErrorMessage ( " expected to not match, got <1> " ) {
121131 expect ( 1 ) . toNot ( MatcherFunc { _, _ in true } )
122132 }
133+ failsWithErrorMessage ( " expected to not match, got <1> " ) {
134+ expect ( 1 ) . toNot ( MatcherFunc { _, _ in true } . predicate)
135+ }
123136 }
124137
125138 func testNotToMatchesLikeToNot( ) {
0 commit comments