diff options
| author | Phil Nash | 2017-03-08 15:40:20 +0000 |
|---|---|---|
| committer | Phil Nash | 2017-03-08 15:42:11 +0000 |
| commit | 5dd06395206e6abbfea2271507e1e01bb1bdc428 (patch) | |
| tree | 34bc39465c6b9fbed0b0224e3c6df2e79721ef42 /projects/SelfTest/MessageTests.cpp | |
| parent | a2515755c329e682c354ef470046967d14cb0496 (diff) | |
| download | catch3-5dd06395206e6abbfea2271507e1e01bb1bdc428.tar.gz | |
Added FAIL_CHECK
Works like FAIL, but does not abort test.
As proposed in #765
Diffstat (limited to 'projects/SelfTest/MessageTests.cpp')
| -rw-r--r-- | projects/SelfTest/MessageTests.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/projects/SelfTest/MessageTests.cpp b/projects/SelfTest/MessageTests.cpp index 87a85a82..bed9c137 100644 --- a/projects/SelfTest/MessageTests.cpp +++ b/projects/SelfTest/MessageTests.cpp @@ -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 |