diff options
| author | Phil Nash | 2017-08-09 00:44:30 +0100 |
|---|---|---|
| committer | Phil Nash | 2017-08-09 00:44:30 +0100 |
| commit | 27fd8f80bd883df36c243bc355429977fd665c50 (patch) | |
| tree | 4f3cb43a3f40c0c6837a77985fb1508e141db67a /projects | |
| parent | ef4fa56b71e7013fe39609abfb25819b618c1177 (diff) | |
| download | catch3-27fd8f80bd883df36c243bc355429977fd665c50.tar.gz | |
Integrated INTERNAL_CATCH_THROWS_STR_MATCHES with new AssertionHandler
Diffstat (limited to 'projects')
4 files changed, 25 insertions, 11 deletions
diff --git a/projects/SelfTest/Baselines/console.std.approved.txt b/projects/SelfTest/Baselines/console.std.approved.txt index 9e41f7f5..cd406b0c 100644 --- a/projects/SelfTest/Baselines/console.std.approved.txt +++ b/projects/SelfTest/Baselines/console.std.approved.txt @@ -485,7 +485,7 @@ ExceptionTests.cpp:<line number> ExceptionTests.cpp:<line number>: FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: - expected exception + "expected exception" equals: "should fail" ------------------------------------------------------------------------------- Nice descriptive name diff --git a/projects/SelfTest/Baselines/console.sw.approved.txt b/projects/SelfTest/Baselines/console.sw.approved.txt index 971c0e32..80fd38c9 100644 --- a/projects/SelfTest/Baselines/console.sw.approved.txt +++ b/projects/SelfTest/Baselines/console.sw.approved.txt @@ -1428,6 +1428,8 @@ ExceptionTests.cpp:<line number> ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" ------------------------------------------------------------------------------- Exception messages can be tested for @@ -1439,6 +1441,8 @@ ExceptionTests.cpp:<line number> ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" equals: "expected exception" (case insensitive) ------------------------------------------------------------------------------- Exception messages can be tested for @@ -1450,18 +1454,26 @@ ExceptionTests.cpp:<line number> ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), StartsWith( "expected" ) ) +with expansion: + "expected exception" starts with: "expected" ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), EndsWith( "exception" ) ) +with expansion: + "expected exception" ends with: "exception" ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), Contains( "except" ) ) +with expansion: + "expected exception" contains: "except" ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) ) +with expansion: + "expected exception" contains: "except" (case insensitive) ------------------------------------------------------------------------------- Expected exceptions that don't throw or unexpected exceptions fail the test @@ -1882,11 +1894,13 @@ ExceptionTests.cpp:<line number> ExceptionTests.cpp:<line number>: PASSED: REQUIRE_THROWS_WITH( thisThrows(), "expected exception" ) +with expansion: + "expected exception" equals: "expected exception" ExceptionTests.cpp:<line number>: FAILED: REQUIRE_THROWS_WITH( thisThrows(), "should fail" ) with expansion: - expected exception + "expected exception" equals: "should fail" ------------------------------------------------------------------------------- Nice descriptive name diff --git a/projects/SelfTest/Baselines/junit.sw.approved.txt b/projects/SelfTest/Baselines/junit.sw.approved.txt index 58807c18..3a1ebdab 100644 --- a/projects/SelfTest/Baselines/junit.sw.approved.txt +++ b/projects/SelfTest/Baselines/junit.sw.approved.txt @@ -311,7 +311,7 @@ MatchersTests.cpp:<line number> </failure> </testcase> <testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}"> - <failure message="expected exception" type="REQUIRE_THROWS_WITH"> + <failure message=""expected exception" equals: "should fail"" type="REQUIRE_THROWS_WITH"> ExceptionTests.cpp:<line number> </failure> </testcase> diff --git a/projects/SelfTest/Baselines/xml.sw.approved.txt b/projects/SelfTest/Baselines/xml.sw.approved.txt index e70ad12e..9cec8235 100644 --- a/projects/SelfTest/Baselines/xml.sw.approved.txt +++ b/projects/SelfTest/Baselines/xml.sw.approved.txt @@ -1646,7 +1646,7 @@ thisThrows(), "expected exception" </Original> <Expanded> - thisThrows(), "expected exception" + "expected exception" equals: "expected exception" </Expanded> </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> @@ -1657,7 +1657,7 @@ thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) </Original> <Expanded> - thisThrows(), Equals( "expecteD Exception", Catch::CaseSensitive::No ) + "expected exception" equals: "expected exception" (case insensitive) </Expanded> </Expression> <OverallResults successes="1" failures="0" expectedFailures="0"/> @@ -1668,7 +1668,7 @@ thisThrows(), StartsWith( "expected" ) </Original> <Expanded> - thisThrows(), StartsWith( "expected" ) + "expected exception" starts with: "expected" </Expanded> </Expression> <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > @@ -1676,7 +1676,7 @@ thisThrows(), EndsWith( "exception" ) </Original> <Expanded> - thisThrows(), EndsWith( "exception" ) + "expected exception" ends with: "exception" </Expanded> </Expression> <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > @@ -1684,7 +1684,7 @@ thisThrows(), Contains( "except" ) </Original> <Expanded> - thisThrows(), Contains( "except" ) + "expected exception" contains: "except" </Expanded> </Expression> <Expression success="true" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > @@ -1692,7 +1692,7 @@ thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) </Original> <Expanded> - thisThrows(), Contains( "exCept", Catch::CaseSensitive::No ) + "expected exception" contains: "except" (case insensitive) </Expanded> </Expression> <OverallResults successes="4" failures="0" expectedFailures="0"/> @@ -2172,7 +2172,7 @@ thisThrows(), "expected exception" </Original> <Expanded> - thisThrows(), "expected exception" + "expected exception" equals: "expected exception" </Expanded> </Expression> <Expression success="false" type="REQUIRE_THROWS_WITH" filename="projects/<exe-name>/ExceptionTests.cpp" > @@ -2180,7 +2180,7 @@ thisThrows(), "should fail" </Original> <Expanded> - expected exception + "expected exception" equals: "should fail" </Expanded> </Expression> <OverallResult success="false"/> |