diff options
| author | Phil Nash | 2014-04-12 19:07:24 +0100 |
|---|---|---|
| committer | Phil Nash | 2014-04-12 19:07:24 +0100 |
| commit | a176b9373813b4763a7815791097e45f6aa623c8 (patch) | |
| tree | 07d7a2bbe8267e1c9e7499edfeff368135a0cd60 /projects/SelfTest/ExceptionTests.cpp | |
| parent | e9d35377fa4f66f3c3ec1e66601292b471acda51 (diff) | |
| download | catch3-a176b9373813b4763a7815791097e45f6aa623c8.tar.gz | |
Fix for #270 (REQUIRE continues if test throws an exception).
Added test case that reproduced the bug then applied the fix.
Diffstat (limited to 'projects/SelfTest/ExceptionTests.cpp')
| -rw-r--r-- | projects/SelfTest/ExceptionTests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/projects/SelfTest/ExceptionTests.cpp b/projects/SelfTest/ExceptionTests.cpp index 2dac0c15..a193b226 100644 --- a/projects/SelfTest/ExceptionTests.cpp +++ b/projects/SelfTest/ExceptionTests.cpp @@ -66,6 +66,12 @@ TEST_CASE( "When unchecked exceptions are thrown from functions they are always CHECK( thisThrows() == 0 ); } +TEST_CASE( "When unchecked exceptions are thrown during a require the test should fail", "[.][failing]" ) +{ + REQUIRE( thisThrows() == 0 ); + FAIL( "This should never happen" ); +} + TEST_CASE( "When unchecked exceptions are thrown, but caught, they do not affect the test", "" ) { try |