diff options
| author | Phil Nash | 2012-10-12 07:58:17 +0100 |
|---|---|---|
| committer | Phil Nash | 2012-10-12 07:58:17 +0100 |
| commit | 9444bbcb7bd0ba2eee6717903490ef7b8bc783a0 (patch) | |
| tree | 584edcb96fb6fce3a7ae6def705d47fdbdfec9ce /projects | |
| parent | 9902ac9f1afc86d83bc5107259494d7c4631adfd (diff) | |
| download | catch3-9444bbcb7bd0ba2eee6717903490ef7b8bc783a0.tar.gz | |
Added AllOf and AnyOf matchers
Diffstat (limited to 'projects')
| -rw-r--r-- | projects/SelfTest/MiscTests.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/projects/SelfTest/MiscTests.cpp b/projects/SelfTest/MiscTests.cpp index d7596586..34915069 100644 --- a/projects/SelfTest/MiscTests.cpp +++ b/projects/SelfTest/MiscTests.cpp @@ -270,6 +270,16 @@ TEST_CASE("./failing/matchers/Equals", "") CHECK_THAT( testStringForMatching(), Equals( "something else" ) ); } +TEST_CASE("/succeeding/matchers/AllOf", "") +{ + CHECK_THAT( testStringForMatching(), AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ); +} +TEST_CASE("/succeeding/matchers/AnyOf", "") +{ + CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) ); + CHECK_THAT( testStringForMatching(), AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) ); +} + TEST_CASE("./succeeding/matchers/Equals", "") { CHECK_THAT( testStringForMatching(), Equals( "this string contains 'abc' as a substring" ) ); |