mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
Fix bad error reporting for nested exceptions in default configuration
Bad handling of `TestFailureException` when translating unexpected exceptions inside assertion macros led to the unexpected exceptions handling erroring out through throwing the same exception again. This was then backstopped by the machinery for handling uncaught exceptions from assertions, which is normally used by the `CATCH_CONFIG_FAST_COMPILE` machinery, where we assume that it can only be invoked because the assertion macros are not configured to catch assertions. Closes #1292
This commit is contained in:
@@ -330,6 +330,11 @@ Compilation.tests.cpp:<line number>: passed: !(lhs & rhs) for: !(Val: 1 & Val: 2
|
||||
Compilation.tests.cpp:<line number>: passed: HasBitOperators{ 1 } & HasBitOperators{ 1 } for: Val: 1 & Val: 1
|
||||
Compilation.tests.cpp:<line number>: passed: lhs ^ rhs for: Val: 1 ^ Val: 2
|
||||
Compilation.tests.cpp:<line number>: passed: !(lhs ^ lhs) for: !(Val: 1 ^ Val: 1)
|
||||
AssertionHandler.tests.cpp:<line number>: failed: i > 10 for: 2 > 10
|
||||
AssertionHandler.tests.cpp:<line number>: failed: unexpected exception with message: '{ nested assertion failed }'; expression was: foo( 2 ) == 2
|
||||
AssertionHandler.tests.cpp:<line number>: passed: true
|
||||
AssertionHandler.tests.cpp:<line number>: failed: i > 10 for: 2 > 10
|
||||
AssertionHandler.tests.cpp:<line number>: failed: unexpected exception with message: '{ nested assertion failed }'; expression was: foo( 2 ) == 2
|
||||
Tricky.tests.cpp:<line number>: passed: true
|
||||
Tricky.tests.cpp:<line number>: passed: true
|
||||
Tricky.tests.cpp:<line number>: passed: true
|
||||
@@ -634,6 +639,8 @@ Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'e
|
||||
Exception.tests.cpp:<line number>: failed: expected exception, got none; expression was: thisDoesntThrow(), std::domain_error
|
||||
Exception.tests.cpp:<line number>: failed: unexpected exception with message: 'expected exception'; expression was: thisThrows()
|
||||
Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'This is a failure'
|
||||
AssertionHandler.tests.cpp:<line number>: failed: explicitly with 1 message: 'Throw a Catch::TestFailureException'
|
||||
AssertionHandler.tests.cpp:<line number>: failed: unexpected exception with message: '{ nested assertion failed }'; expression was: do_fail()
|
||||
Message.tests.cpp:<line number>: failed: explicitly
|
||||
Message.tests.cpp:<line number>: failed: explicitly with 1 message: 'This is a failure'
|
||||
Message.tests.cpp:<line number>: warning: 'This message appears in the output'
|
||||
@@ -2851,7 +2858,7 @@ InternalBenchmark.tests.cpp:<line number>: passed: med == 18. for: 18.0 == 18.0
|
||||
InternalBenchmark.tests.cpp:<line number>: passed: q3 == 23. for: 23.0 == 23.0
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
Misc.tests.cpp:<line number>: passed:
|
||||
test cases: 428 | 313 passed | 95 failed | 6 skipped | 14 failed as expected
|
||||
assertions: 2281 | 2089 passed | 157 failed | 35 failed as expected
|
||||
test cases: 431 | 313 passed | 95 failed | 6 skipped | 17 failed as expected
|
||||
assertions: 2288 | 2090 passed | 157 failed | 41 failed as expected
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user