diff --git a/README b/README index 5c8f882e..42812e92 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -CATCH v0.9 build 17 (integration branch) +CATCH v0.9 build 18 (integration branch) --------------------------------------------- CATCH is an automated test framework for C, C++ and Objective-C. diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp index 7ff442c2..b51a3828 100644 --- a/include/internal/catch_runner_impl.hpp +++ b/include/internal/catch_runner_impl.hpp @@ -267,6 +267,7 @@ namespace Catch { try { m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal ); m_runningTest->reset(); + if( m_reporter->getPreferences().shouldRedirectStdOut ) { StreamRedirect coutRedir( std::cout, redirectedCout ); StreamRedirect cerrRedir( std::cerr, redirectedCerr ); @@ -285,6 +286,7 @@ namespace Catch { exResult << translateActiveException(); actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) ); } + m_messages.clear(); } private: diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index 42bf18ff..380ffcb4 100644 --- a/include/internal/catch_version.hpp +++ b/include/internal/catch_version.hpp @@ -13,7 +13,7 @@ namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 17, "integration" ); + Version libraryVersion( 0, 9, 18, "integration" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index cdce6d3a..eaaa6139 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -2228,6 +2228,22 @@ MessageTests.cpp:92: No assertions in test case, './succeeding/nofail' +------------------------------------------------------------------------------- +just info +............................................................................... + + +No assertions in test case, 'just info' + +------------------------------------------------------------------------------- +just failure +............................................................................... + +FAILED: +explicitly with message: + Previous info should not be seen +MessageTests.cpp:101: + ------------------------------------------------------------------------------- ./succeeding/Misc/Sections s1 @@ -4235,7 +4251,7 @@ with expansion: BDDTests.cpp:29: =============================================================================== -96 test cases - 45 failed (610 assertions - 102 failed) +98 test cases - 47 failed (612 assertions - 104 failed) CatchSelfTest is a CATCH v0.9 b17 (integration) host application. @@ -4517,7 +4533,7 @@ ConditionTests.cpp:72: 12 test cases - 3 failed (38 assertions - 4 failed) - + @@ -4783,6 +4799,12 @@ MessageTests.cpp:86 MessageTests.cpp:92 + + + +MessageTests.cpp:101 + + @@ -7767,6 +7789,15 @@ MessageTests.cpp" line="92"> + + + + + + Previous info should not be seen + + +
MiscTests.cpp" line="25"> @@ -9754,9 +9785,9 @@ BDDTests.cpp" line="29">
- + - + [Started testing: CatchSelfTest] [Started group: '~dummy'] @@ -10262,6 +10293,16 @@ No assertions in test case, './succeeding/nofail' [Finished: './succeeding/nofail' 1 test case failed (1 assertion failed)] +[Running: just info] + +No assertions in test case, 'just info' + +[Finished: 'just info' 1 test case failed (1 assertion failed)] + +[Running: just failure] +MessageTests.cpp:101: failed with message: 'Previous info should not be seen' +[Finished: 'just failure' 1 test case failed (1 assertion failed)] + [Running: ./succeeding/Misc/Sections] [Started section: 's1'] MiscTests.cpp:25: a != b succeeded for: 1 != 2 @@ -11084,10 +11125,10 @@ BDDTests.cpp:29: itDoesThis() succeeded for: true [End of section: ' Given: This stuff exists' 1 assertion passed] [Finished: 'Scenario: Do that thing with the thing' All tests passed (1 assertion in 1 test case)] -[End of group: '~dummy'. 45 of 96 test cases failed (102 of 610 assertions failed)] +[End of group: '~dummy'. 47 of 98 test cases failed (104 of 612 assertions failed)] -[Testing completed. 45 of 96 test cases failed (102 of 610 assertions failed)] +[Testing completed. 47 of 98 test cases failed (104 of 612 assertions failed)] [Started testing: CatchSelfTest] [Started group: '~dummy'] diff --git a/projects/SelfTest/MessageTests.cpp b/projects/SelfTest/MessageTests.cpp index bdfa88d3..0e010f6c 100644 --- a/projects/SelfTest/MessageTests.cpp +++ b/projects/SelfTest/MessageTests.cpp @@ -91,3 +91,12 @@ TEST_CASE( "./succeeding/nofail", "The NO_FAIL macro reports a failure but does { CHECK_NOFAIL( 1 == 2 ); } + +TEST_CASE( "just info", "[info][isolated info]" ) +{ + INFO( "this should never be seen" ); +} +TEST_CASE( "just failure", "[fail][isolated info]" ) +{ + FAIL( "Previous info should not be seen" ); +} diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 0700af82..025f3c46 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v0.9 build 17 (integration branch) - * Generated: 2013-02-02 20:37:06.007152 + * CATCH v0.9 build 18 (integration branch) + * Generated: 2013-02-04 00:03:53.198397 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -4594,6 +4594,7 @@ namespace Catch { try { m_lastAssertionInfo = AssertionInfo( "TEST_CASE", m_runningTest->getTestCase().getTestCaseInfo().lineInfo, "", ResultDisposition::Normal ); m_runningTest->reset(); + if( m_reporter->getPreferences().shouldRedirectStdOut ) { StreamRedirect coutRedir( std::cout, redirectedCout ); StreamRedirect cerrRedir( std::cerr, redirectedCerr ); @@ -4612,6 +4613,7 @@ namespace Catch { exResult << translateActiveException(); actOnCurrentResult( exResult.buildResult( m_lastAssertionInfo ) ); } + m_messages.clear(); } private: @@ -5814,7 +5816,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 17, "integration" ); + Version libraryVersion( 0, 9, 18, "integration" ); } // #included from: catch_line_wrap.hpp