Added FAIL_CHECK

Works like FAIL, but does not abort test.
As proposed in #765
This commit is contained in:
Phil Nash
2017-03-08 15:40:20 +00:00
parent a2515755c3
commit 5dd0639520
8 changed files with 84 additions and 23 deletions

View File

@@ -53,6 +53,13 @@ TEST_CASE( "INFO gets logged on failure, even if captured before successful asse
TEST_CASE( "FAIL aborts the test", "[failing][messages][.]" )
{
FAIL( "This is a " << "failure" ); // This should output the message and abort
WARN( "We should never see this");
}
TEST_CASE( "FAIL_CHECK does not abort the test", "[failing][messages][.]" )
{
FAIL_CHECK( "This is a " << "failure" ); // This should output the message then continue
WARN( "This message appears in the output");
}
#ifdef CATCH_CONFIG_VARIADIC_MACROS