diff options
| author | Phil Nash | 2011-01-31 20:15:40 +0000 |
|---|---|---|
| committer | Phil Nash | 2011-01-31 20:15:40 +0000 |
| commit | d1ee964f5d203a1b5783e0fd8f54fd5f8db27491 (patch) | |
| tree | d9da26667c524a356695f6a54872065ed8851b0c /Test/ExceptionTests.cpp | |
| parent | db378d89391c962f4ffc3eb1e425e1c0170d7e94 (diff) | |
| download | catch3-d1ee964f5d203a1b5783e0fd8f54fd5f8db27491.tar.gz | |
Fixed more gcc warnings
Diffstat (limited to 'Test/ExceptionTests.cpp')
| -rw-r--r-- | Test/ExceptionTests.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Test/ExceptionTests.cpp b/Test/ExceptionTests.cpp index db5786cb..5fba0da8 100644 --- a/Test/ExceptionTests.cpp +++ b/Test/ExceptionTests.cpp @@ -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" ) |