mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-14 09:25:40 +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:
@@ -1110,6 +1110,17 @@ ExceptionTests.cpp:<line number>: FAILED:
|
||||
due to unexpected exception with message:
|
||||
expected exception
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
When unchecked exceptions are thrown during a require the test should fail
|
||||
-------------------------------------------------------------------------------
|
||||
ExceptionTests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
ExceptionTests.cpp:<line number>: FAILED:
|
||||
REQUIRE( thisThrows() == 0 )
|
||||
due to unexpected exception with message:
|
||||
expected exception
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
When unchecked exceptions are thrown, but caught, they do not affect the test
|
||||
-------------------------------------------------------------------------------
|
||||
@@ -6958,5 +6969,5 @@ with expansion:
|
||||
true
|
||||
|
||||
===============================================================================
|
||||
122 test cases - 51 failed (677 assertions - 110 failed)
|
||||
123 test cases - 52 failed (678 assertions - 111 failed)
|
||||
|
||||
|
Reference in New Issue
Block a user