Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/projects/SelfTest/ExceptionTests.cpp
diff options
context:
space:
mode:
authorPhil Nash2014-04-12 19:07:24 +0100
committerPhil Nash2014-04-12 19:07:24 +0100
commita176b9373813b4763a7815791097e45f6aa623c8 (patch)
tree07d7a2bbe8267e1c9e7499edfeff368135a0cd60 /projects/SelfTest/ExceptionTests.cpp
parente9d35377fa4f66f3c3ec1e66601292b471acda51 (diff)
downloadcatch3-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.cpp6
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