mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 19:25:38 +02:00
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:
@@ -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
|
||||
|
Reference in New Issue
Block a user