mirror of
https://github.com/catchorg/Catch2.git
synced 2025-09-19 19:25:38 +02:00
Added _THROWS_WITH macros
- asserts on exception message
This commit is contained in:
@@ -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" );
|
||||
}
|
||||
|
Reference in New Issue
Block a user