mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-24 21:49:24 +00:00
Unchecked exceptions don't report previous assertions message (only its line number)
This commit is contained in:
parent
3e2e318eeb
commit
d0cc33f284
3 changed files with 36 additions and 21 deletions
|
@ -55,6 +55,13 @@ TEST_CASE_NORETURN( "./failing/exceptions/implicit", "When unchecked exceptions
|
|||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
TEST_CASE_NORETURN( "./failing/exceptions/implicit/2", "An unchecked exception reports the line of the last assertion" )
|
||||
{
|
||||
CHECK( 1 == 1 );
|
||||
throw std::domain_error( "unexpected exception" );
|
||||
/*NOTREACHED*/
|
||||
}
|
||||
|
||||
TEST_CASE( "./succeeding/exceptions/implicit", "When unchecked exceptions are thrown, but caught, they do not affect the test" )
|
||||
{
|
||||
try
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue