Added _THROWS_WITH macros

- asserts on exception message
This commit is contained in:
Phil Nash
2015-07-13 06:34:41 +01:00
parent 5d5ed5a283
commit 85de743d70
9 changed files with 106 additions and 17 deletions

View File

@@ -152,3 +152,8 @@ TEST_CASE( "NotImplemented exception", "" )
{
REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) );
}
TEST_CASE( "Exception messages can be tested for", "[.][failing]" ) {
REQUIRE_THROWS_WITH( thisThrows(), "expected exception" );
REQUIRE_THROWS_WITH( thisThrows(), "should fail" );
}