Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/Test/MessageTests.cpp
diff options
context:
space:
mode:
authorPhil Nash2010-12-27 22:18:33 +0000
committerPhil Nash2010-12-27 22:18:33 +0000
commit034c8b6248bc269a0d65c944ea570369075a0742 (patch)
tree03dd56615951f54040a8980e3eeec937a231b3f5 /Test/MessageTests.cpp
parent89c464709e77b5f7e2d9b67e2587314aa2b2f3c3 (diff)
downloadcatch3-034c8b6248bc269a0d65c944ea570369075a0742.tar.gz
INFO()s are only cleared by failures or end of test case
Diffstat (limited to 'Test/MessageTests.cpp')
-rw-r--r--Test/MessageTests.cpp18
1 files changed, 13 insertions, 5 deletions
diff --git a/Test/MessageTests.cpp b/Test/MessageTests.cpp
index 372a5489..1e8e6be8 100644
--- a/Test/MessageTests.cpp
+++ b/Test/MessageTests.cpp
@@ -21,20 +21,28 @@ TEST_CASE( "succeeding/message", "INFO and WARN do not abort tests" )
TEST_CASE( "failing/message/info/1", "INFO gets logged on failure" )
{
INFO( "this message should be logged" );
+ INFO( "so should this" );
int a = 2;
REQUIRE( a == 1 );
}
TEST_CASE( "failing/message/info/2", "INFO gets logged on failure" )
{
- INFO( "this message should not be logged" );
+ INFO( "this message should be logged" );
int a = 2;
- REQUIRE( a == 2 );
+ CHECK( a == 2 );
- INFO( "this message should be logged" );
- INFO( "so should this" );
+ INFO( "this message should be logged, too" );
- REQUIRE( a == 1 );
+ CHECK( a == 1 );
+
+ INFO( "and this, but later" );
+
+ CHECK( a == 0 );
+
+ INFO( "but not this" );
+
+ CHECK( a == 2 );
}
TEST_CASE( "failing/message/fail", "FAIL aborts the test" )