Fixed more gcc warnings

This commit is contained in:
Phil Nash
2011-01-31 20:15:40 +00:00
parent db378d8939
commit d1ee964f5d
5 changed files with 18 additions and 2 deletions

View File

@@ -17,9 +17,13 @@
namespace
{
ATTRIBUTE_NORETURN
int thisThrows();
int thisThrows()
{
throw std::domain_error( "expected exception" );
/*NOTREACHED*/
}
int thisDoesntThrow()
@@ -42,9 +46,10 @@ TEST_CASE( "./failing/exceptions/explicit", "When checked exceptions are thrown
CHECK_NOTHROW( thisThrows() );
}
TEST_CASE( "./failing/exceptions/implicit", "When unchecked exceptions are thrown they are always failures" )
INTERNAL_CATCH_TESTCASE_NORETURN( "./failing/exceptions/implicit", "When unchecked exceptions are thrown they are always failures" )
{
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" )