Unchecked exceptions don't report previous assertions message (only its line number)

This commit is contained in:
Phil Nash 2012-11-17 17:22:37 +00:00
parent 3e2e318eeb
commit d0cc33f284
3 changed files with 36 additions and 21 deletions

View file

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