Fix for #270 (REQUIRE continues if test throws an exception).

Added test case that reproduced the bug then applied the fix.
This commit is contained in:
Phil Nash
2014-04-12 19:07:24 +01:00
parent e9d35377fa
commit a176b93738
9 changed files with 60 additions and 12 deletions

View File

@@ -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