From bcad093af74659761eb8fbce0a8c6ad42a933681 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 10 Dec 2012 08:54:57 +0000 Subject: [PATCH] Console reporter is now the default --- README | 2 +- include/catch_runner.hpp | 2 +- include/internal/catch_version.hpp | 2 +- include/reporters/catch_reporter_console.hpp | 50 +- .../SelfTest/Baselines/approvedResults.txt | 822 +++++++++--------- projects/SelfTest/TestMain.cpp | 4 +- projects/SelfTest/catch_self_test.hpp | 2 +- single_include/catch.hpp | 206 ++++- 8 files changed, 613 insertions(+), 477 deletions(-) diff --git a/README b/README index b5f5bb33..41f6f7c7 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -CATCH v0.9 build 9 (integration branch) +CATCH v0.9 build 10 (integration branch) --------------------------------------------- CATCH is an automated test framework for C, C++ and Objective-C. diff --git a/include/catch_runner.hpp b/include/catch_runner.hpp index 55f3d30a..71f91981 100644 --- a/include/catch_runner.hpp +++ b/include/catch_runner.hpp @@ -95,7 +95,7 @@ namespace Catch { } void makeReporter() { std::string reporterName = m_config.reporter.empty() - ? "basic" + ? "console" : m_config.reporter; ReporterConfig reporterConfig( m_configWrapper.stream(), m_config ); diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index d0c7736f..78c4d938 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, 9, "integration" ); + Version libraryVersion( 0, 9, 10, "integration" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp index fabcc4f7..5c1d99ab 100644 --- a/include/reporters/catch_reporter_console.hpp +++ b/include/reporters/catch_reporter_console.hpp @@ -35,36 +35,17 @@ namespace Catch { } void lazyPrintGroupInfo() { if( !unusedGroupInfo->name.empty() ) -// stream << "[Group: '" << unusedGroupInfo->name << "']" << std::endl; - stream << "[Started group: '" << unusedGroupInfo->name << "']" << std::endl; + stream << "[Group: '" << unusedGroupInfo->name << "']" << std::endl; +// stream << "[Started group: '" << unusedGroupInfo->name << "']" << std::endl; unusedGroupInfo.reset(); } void lazyPrintTestCaseInfo() { -// stream << "[Test case: '" << unusedTestCaseInfo->name << "']" << std::endl; - stream << "[Running: " << unusedTestCaseInfo->name << "]" << std::endl; + stream << "[Test case: '" << unusedTestCaseInfo->name << "']" << std::endl; +// stream << "[Running: " << unusedTestCaseInfo->name << "]" << std::endl; unusedTestCaseInfo.reset(); } - std::string makeSectionPath( ThreadedSectionInfo const * section, std::string const& delimiter ) { - std::string sectionPath = "'" + section->name + "'"; - - // !TBD: Do this without the assignment in the while as it causes warnings: - while( ( section = section->parent.get() ) ) - sectionPath = "'" + section->name + "'" + delimiter + sectionPath; - return sectionPath; - } - void lazyPrintSectionInfo() { - // !TBD use printed flag - ThreadedSectionInfo* section = unusedSectionInfo.get(); - - std::string sectionPath = makeSectionPath( section, ", " ); - if( sectionPath.size() > 60 ) - sectionPath = makeSectionPath( section, ",\n " ); - - stream << "[Section: " << sectionPath << "]" << std::endl; - unusedSectionInfo.reset(); - } - void lazyPrintSectionInfoLegacy() { + void lazyPrintSectionInfo() { std::vector sections; for( ThreadedSectionInfo* section = unusedSectionInfo.get(); section && !section->printed; @@ -73,7 +54,8 @@ namespace Catch { typedef std::vector::const_reverse_iterator It; for( It it = sections.rbegin(), itEnd = sections.rend(); it != itEnd; ++it ) { - stream << "[Started section: " << "'" + (*it)->name + "'" << "]" << std::endl; +// stream << "[Started section: " << "'" + (*it)->name + "'" << "]" << std::endl; + stream << "[Section: " << "'" + (*it)->name + "'" << "]" << std::endl; (*it)->printed = true; } unusedSectionInfo.reset(); @@ -86,7 +68,7 @@ namespace Catch { if( unusedTestCaseInfo ) lazyPrintTestCaseInfo(); if( currentSectionInfo && !currentSectionInfo->printed ) - lazyPrintSectionInfoLegacy(); // !TBD + lazyPrintSectionInfo(); } virtual void assertionStarting( AssertionInfo const& ) { @@ -248,8 +230,8 @@ namespace Catch { stream << "\nNo assertions in section, '" << _sectionStats->sectionInfo.name << "'\n" << std::endl; } if( currentSectionInfo && currentSectionInfo->printed ) { -// stream << "[Summary for section '" << _sectionStats->sectionInfo.name << "': "; - stream << "[End of section: '" << _sectionStats->sectionInfo.name << "' "; + stream << "[Summary for section '" << _sectionStats->sectionInfo.name << "': "; +// stream << "[End of section: '" << _sectionStats->sectionInfo.name << "' "; Counts const& assertions = _sectionStats->assertions; if( assertions.failed ) { TextColour colour( TextColour::ResultError ); @@ -271,8 +253,8 @@ namespace Catch { stream << "\nNo assertions in test case, '" << _testCaseStats->testInfo.name << "'\n" << std::endl; } if( !unusedTestCaseInfo ) { -// stream << "[Summary for test case '" << _testCaseStats->testInfo.name << "': "; - stream << "[Finished: '" << _testCaseStats->testInfo.name << "' "; + stream << "[Summary for test case '" << _testCaseStats->testInfo.name << "': "; +// stream << "[Finished: '" << _testCaseStats->testInfo.name << "' "; printTotals( _testCaseStats->totals ); stream << "]\n" << std::endl; } @@ -280,8 +262,8 @@ namespace Catch { } virtual void testGroupEnded( Ptr const& _testGroupStats ) { if( !unusedGroupInfo ) { -// stream << "[Summary for group '" << _testGroupStats->groupInfo.name << "': "; - stream << "[End of group '" << _testGroupStats->groupInfo.name << "'. "; + stream << "[Summary for group '" << _testGroupStats->groupInfo.name << "': "; +// stream << "[End of group '" << _testGroupStats->groupInfo.name << "'. "; printTotals( _testGroupStats->totals ); stream << "]\n" << std::endl; } @@ -289,8 +271,8 @@ namespace Catch { } virtual void testRunEnded( Ptr const& _testRunStats ) { if( !unusedTestCaseInfo ) { -// stream << "[Summary for '" << _testRunStats->runInfo.name << "': "; - stream << "[Testing completed. "; + stream << "[Summary for '" << _testRunStats->runInfo.name << "': "; +// stream << "[Testing completed. "; printTotals( _testRunStats->totals ); stream << "]\n" << std::endl; } diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index f2f31a07..cfdb4648 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -1,38 +1,38 @@ [Started testing: CatchSelfTest] -[Started group: '~dummy'] -[Running: ./succeeding/Approx/simple] +[Group: '~dummy'] +[Test case: './succeeding/Approx/simple'] ApproxTests.cpp:20: d == Approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:21: d != Approx( 1.22 ) succeeded for: 1.23 != Approx( 1.22 ) ApproxTests.cpp:22: d != Approx( 1.24 ) succeeded for: 1.23 != Approx( 1.24 ) ApproxTests.cpp:24: Approx( d ) == 1.23 succeeded for: Approx( 1.23 ) == 1.23 ApproxTests.cpp:25: Approx( d ) != 1.22 succeeded for: Approx( 1.23 ) != 1.22 ApproxTests.cpp:26: Approx( d ) != 1.24 succeeded for: Approx( 1.23 ) != 1.24 -[Finished: './succeeding/Approx/simple' All tests passed (6 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/simple': All tests passed (6 assertions in 1 test case)] -[Running: ./succeeding/Approx/epsilon] +[Test case: './succeeding/Approx/epsilon'] ApproxTests.cpp:38: d != Approx( 1.231 ) succeeded for: 1.23 != Approx( 1.231 ) ApproxTests.cpp:39: d == Approx( 1.231 ).epsilon( 0.1 ) succeeded for: 1.23 == Approx( 1.231 ) -[Finished: './succeeding/Approx/epsilon' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/epsilon': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/float] +[Test case: './succeeding/Approx/float'] ApproxTests.cpp:49: 1.23f == Approx( 1.23f ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:50: 0.0f == Approx( 0.0f ) succeeded for: 0 == Approx( 0 ) -[Finished: './succeeding/Approx/float' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/float': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/int] +[Test case: './succeeding/Approx/int'] ApproxTests.cpp:60: 1 == Approx( 1 ) succeeded ApproxTests.cpp:61: 0 == Approx( 0 ) succeeded -[Finished: './succeeding/Approx/int' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/int': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/mixed] +[Test case: './succeeding/Approx/mixed'] ApproxTests.cpp:75: 1.0f == Approx( 1 ) succeeded for: 1 == Approx( 1 ) ApproxTests.cpp:76: 0 == Approx( dZero) succeeded for: 0 == Approx( 0 ) ApproxTests.cpp:77: 0 == Approx( dSmall ).epsilon( 0.001 ) succeeded for: 0 == Approx( 1e-05 ) ApproxTests.cpp:78: 1.234f == Approx( dMedium ) succeeded for: 1.234 == Approx( 1.234 ) ApproxTests.cpp:79: dMedium == Approx( 1.234f ) succeeded for: 1.234 == Approx( 1.234 ) -[Finished: './succeeding/Approx/mixed' All tests passed (5 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/mixed': All tests passed (5 assertions in 1 test case)] -[Running: ./succeeding/Approx/custom] +[Test case: './succeeding/Approx/custom'] ApproxTests.cpp:93: d == approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:94: d == approx( 1.22 ) succeeded for: 1.23 == Approx( 1.22 ) ApproxTests.cpp:95: d == approx( 1.24 ) succeeded for: 1.23 == Approx( 1.24 ) @@ -41,25 +41,25 @@ ApproxTests.cpp:98: approx( d ) == 1.23 succeeded for: Approx( 1.23 ) == 1.23 ApproxTests.cpp:99: approx( d ) == 1.22 succeeded for: Approx( 1.23 ) == 1.22 ApproxTests.cpp:100: approx( d ) == 1.24 succeeded for: Approx( 1.23 ) == 1.24 ApproxTests.cpp:101: approx( d ) != 1.25 succeeded for: Approx( 1.23 ) != 1.25 -[Finished: './succeeding/Approx/custom' All tests passed (8 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/custom': All tests passed (8 assertions in 1 test case)] -[Running: ./succeeding/TestClass/succeedingCase] +[Test case: './succeeding/TestClass/succeedingCase'] ClassTests.cpp:24: s == "hello" succeeded for: "hello" == "hello" -[Finished: './succeeding/TestClass/succeedingCase' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/TestClass/succeedingCase': All tests passed (1 assertion in 1 test case)] -[Running: ./failing/TestClass/failingCase] +[Test case: './failing/TestClass/failingCase'] ClassTests.cpp:28: s == "world" failed for: "hello" == "world" -[Finished: './failing/TestClass/failingCase' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/TestClass/failingCase': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/Fixture/succeedingCase] +[Test case: './succeeding/Fixture/succeedingCase'] ClassTests.cpp:47: m_a == 1 succeeded for: 1 == 1 -[Finished: './succeeding/Fixture/succeedingCase' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/Fixture/succeedingCase': All tests passed (1 assertion in 1 test case)] -[Running: ./failing/Fixture/failingCase] +[Test case: './failing/Fixture/failingCase'] ClassTests.cpp:55: m_a == 2 failed for: 1 == 2 -[Finished: './failing/Fixture/failingCase' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/Fixture/failingCase': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/conditions/equality] +[Test case: './succeeding/conditions/equality'] ConditionTests.cpp:55: data.int_seven == 7 succeeded for: 7 == 7 ConditionTests.cpp:56: data.float_nine_point_one == Approx( 9.1f ) succeeded for: 9.1 == Approx( 9.1 ) ConditionTests.cpp:57: data.double_pi == Approx( 3.1415926535 ) succeeded for: 3.14159 == Approx( 3.14159 ) @@ -67,9 +67,9 @@ ConditionTests.cpp:58: data.str_hello == "hello" succeeded for: "hello" == "hell ConditionTests.cpp:59: "hello" == data.str_hello succeeded for: "hello" == "hello" ConditionTests.cpp:60: data.str_hello.size() == 5 succeeded for: 5 == 5 ConditionTests.cpp:63: x == Approx( 1.3 ) succeeded for: 1.3 == Approx( 1.3 ) -[Finished: './succeeding/conditions/equality' All tests passed (7 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/equality': All tests passed (7 assertions in 1 test case)] -[Running: ./failing/conditions/equality] +[Test case: './failing/conditions/equality'] ConditionTests.cpp:71: data.int_seven == 6 failed for: 7 == 6 ConditionTests.cpp:72: data.int_seven == 8 failed for: 7 == 8 ConditionTests.cpp:73: data.int_seven == 0 failed for: 7 == 0 @@ -83,9 +83,9 @@ ConditionTests.cpp:80: data.str_hello == "hell" failed for: "hello" == "hell" ConditionTests.cpp:81: data.str_hello == "hello1" failed for: "hello" == "hello1" ConditionTests.cpp:82: data.str_hello.size() == 6 failed for: 5 == 6 ConditionTests.cpp:85: x == Approx( 1.301 ) failed for: 1.3 == Approx( 1.301 ) -[Finished: './failing/conditions/equality' 1 test case failed (All 13 assertions failed)] +[Summary for test case './failing/conditions/equality': 1 test case failed (All 13 assertions failed)] -[Running: ./succeeding/conditions/inequality] +[Test case: './succeeding/conditions/inequality'] ConditionTests.cpp:93: data.int_seven != 6 succeeded for: 7 != 6 ConditionTests.cpp:94: data.int_seven != 8 succeeded for: 7 != 8 ConditionTests.cpp:95: data.float_nine_point_one != Approx( 9.11f ) succeeded for: 9.1 != Approx( 9.11 ) @@ -97,17 +97,17 @@ ConditionTests.cpp:100: data.str_hello != "goodbye" succeeded for: "hello" != "g ConditionTests.cpp:101: data.str_hello != "hell" succeeded for: "hello" != "hell" ConditionTests.cpp:102: data.str_hello != "hello1" succeeded for: "hello" != "hello1" ConditionTests.cpp:103: data.str_hello.size() != 6 succeeded for: 5 != 6 -[Finished: './succeeding/conditions/inequality' All tests passed (11 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/inequality': All tests passed (11 assertions in 1 test case)] -[Running: ./failing/conditions/inequality] +[Test case: './failing/conditions/inequality'] ConditionTests.cpp:111: data.int_seven != 7 failed for: 7 != 7 ConditionTests.cpp:112: data.float_nine_point_one != Approx( 9.1f ) failed for: 9.1 != Approx( 9.1 ) ConditionTests.cpp:113: data.double_pi != Approx( 3.1415926535 ) failed for: 3.14159 != Approx( 3.14159 ) ConditionTests.cpp:114: data.str_hello != "hello" failed for: "hello" != "hello" ConditionTests.cpp:115: data.str_hello.size() != 5 failed for: 5 != 5 -[Finished: './failing/conditions/inequality' 1 test case failed (All 5 assertions failed)] +[Summary for test case './failing/conditions/inequality': 1 test case failed (All 5 assertions failed)] -[Running: ./succeeding/conditions/ordered] +[Test case: './succeeding/conditions/ordered'] ConditionTests.cpp:124: data.int_seven < 8 succeeded for: 7 < 8 ConditionTests.cpp:125: data.int_seven > 6 succeeded for: 7 > 6 ConditionTests.cpp:126: data.int_seven > 0 succeeded for: 7 > 0 @@ -125,9 +125,9 @@ ConditionTests.cpp:141: data.str_hello < "hellp" succeeded for: "hello" < "hellp ConditionTests.cpp:142: data.str_hello < "zebra" succeeded for: "hello" < "zebra" ConditionTests.cpp:143: data.str_hello > "hellm" succeeded for: "hello" > "hellm" ConditionTests.cpp:144: data.str_hello > "a" succeeded for: "hello" > "a" -[Finished: './succeeding/conditions/ordered' All tests passed (17 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/ordered': All tests passed (17 assertions in 1 test case)] -[Running: ./failing/conditions/ordered] +[Test case: './failing/conditions/ordered'] ConditionTests.cpp:152: data.int_seven > 7 failed for: 7 > 7 ConditionTests.cpp:153: data.int_seven < 7 failed for: 7 < 7 ConditionTests.cpp:154: data.int_seven > 8 failed for: 7 > 8 @@ -147,9 +147,9 @@ ConditionTests.cpp:170: data.str_hello < "hellm" failed for: "hello" < "hellm" ConditionTests.cpp:171: data.str_hello < "a" failed for: "hello" < "a" ConditionTests.cpp:173: data.str_hello >= "z" failed for: "hello" >= "z" ConditionTests.cpp:174: data.str_hello <= "a" failed for: "hello" <= "a" -[Finished: './failing/conditions/ordered' 1 test case failed (All 19 assertions failed)] +[Summary for test case './failing/conditions/ordered': 1 test case failed (All 19 assertions failed)] -[Running: ./succeeding/conditions/int literals] +[Test case: './succeeding/conditions/int literals'] ConditionTests.cpp:188: i == 1 succeeded for: 1 == 1 ConditionTests.cpp:189: ui == 2 succeeded for: 2 == 2 ConditionTests.cpp:190: l == 3 succeeded for: 3 == 3 @@ -163,36 +163,36 @@ ConditionTests.cpp:198: 4 == ul succeeded for: 4 == 4 ConditionTests.cpp:199: 5 == c succeeded for: 5 == 5 ConditionTests.cpp:200: 6 == uc succeeded for: 6 ==  ConditionTests.cpp:202: (std::numeric_limits::max)() > ul succeeded for: 0x > 4 -[Finished: './succeeding/conditions/int literals' All tests passed (13 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/int literals': All tests passed (13 assertions in 1 test case)] -[Running: ./succeeding/conditions//long_to_unsigned_x] +[Test case: './succeeding/conditions//long_to_unsigned_x'] ConditionTests.cpp:223: long_var == unsigned_char_var succeeded for: 1 ==  ConditionTests.cpp:224: long_var == unsigned_short_var succeeded for: 1 == 1 ConditionTests.cpp:225: long_var == unsigned_int_var succeeded for: 1 == 1 ConditionTests.cpp:226: long_var == unsigned_long_var succeeded for: 1 == 1 -[Finished: './succeeding/conditions//long_to_unsigned_x' All tests passed (4 assertions in 1 test case)] +[Summary for test case './succeeding/conditions//long_to_unsigned_x': All tests passed (4 assertions in 1 test case)] -[Running: ./succeeding/conditions/const ints to int literal] +[Test case: './succeeding/conditions/const ints to int literal'] ConditionTests.cpp:237: unsigned_char_var == 1 succeeded for:  == 1 ConditionTests.cpp:238: unsigned_short_var == 1 succeeded for: 1 == 1 ConditionTests.cpp:239: unsigned_int_var == 1 succeeded for: 1 == 1 ConditionTests.cpp:240: unsigned_long_var == 1 succeeded for: 1 == 1 -[Finished: './succeeding/conditions/const ints to int literal' All tests passed (4 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/const ints to int literal': All tests passed (4 assertions in 1 test case)] -[Running: ./succeeding/conditions/negative ints] +[Test case: './succeeding/conditions/negative ints'] ConditionTests.cpp:246: ( -1 > 2u ) succeeded for: true ConditionTests.cpp:247: -1 > 2u succeeded for: -1 > 2 ConditionTests.cpp:249: ( 2u < -1 ) succeeded for: true ConditionTests.cpp:250: 2u < -1 succeeded for: 2 < -1 ConditionTests.cpp:253: ( minInt > 2u ) succeeded for: true ConditionTests.cpp:254: minInt > 2u succeeded for: -2147483648 > 2 -[Finished: './succeeding/conditions/negative ints' All tests passed (6 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/negative ints': All tests passed (6 assertions in 1 test case)] -[Running: ./succeeding/conditions/computed ints] +[Test case: './succeeding/conditions/computed ints'] ConditionTests.cpp:269: 54 == 6*9 succeeded for: 54 == 54 -[Finished: './succeeding/conditions/computed ints' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/conditions/computed ints': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/conditions/ptr] +[Test case: './succeeding/conditions/ptr'] ConditionTests.cpp:285: p == __null succeeded for: __null == 0 ConditionTests.cpp:286: p == pNULL succeeded for: __null == __null ConditionTests.cpp:291: p != __null succeeded for: 0x != 0 @@ -201,9 +201,9 @@ ConditionTests.cpp:297: cpc != __null succeeded for: 0x != 0 ConditionTests.cpp:299: returnsNull() == __null succeeded for: {null string} == 0 ConditionTests.cpp:300: returnsConstNull() == __null succeeded for: {null string} == 0 ConditionTests.cpp:302: __null != p succeeded for: 0 != 0x -[Finished: './succeeding/conditions/ptr' All tests passed (8 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/ptr': All tests passed (8 assertions in 1 test case)] -[Running: ./succeeding/conditions/not] +[Test case: './succeeding/conditions/not'] ConditionTests.cpp:317: false == false succeeded ConditionTests.cpp:318: true == true succeeded ConditionTests.cpp:319: !false succeeded for: true @@ -212,9 +212,9 @@ ConditionTests.cpp:322: !falseValue succeeded for: true ConditionTests.cpp:323: !falseValue succeeded for: !false ConditionTests.cpp:325: !(1 == 2) succeeded for: true ConditionTests.cpp:326: !1 == 2 succeeded for: !(1 == 2) -[Finished: './succeeding/conditions/not' All tests passed (8 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/not': All tests passed (8 assertions in 1 test case)] -[Running: ./failing/conditions/not] +[Test case: './failing/conditions/not'] ConditionTests.cpp:334: false != false failed ConditionTests.cpp:335: true != true failed ConditionTests.cpp:336: !true failed for: false @@ -223,56 +223,56 @@ ConditionTests.cpp:339: !trueValue failed for: false ConditionTests.cpp:340: !trueValue failed for: !true ConditionTests.cpp:342: !(1 == 1) failed for: false ConditionTests.cpp:343: !1 == 1 failed for: !(1 == 1) -[Finished: './failing/conditions/not' 1 test case failed (All 8 assertions failed)] +[Summary for test case './failing/conditions/not': 1 test case failed (All 8 assertions failed)] -[Running: ./succeeding/exceptions/explicit] +[Test case: './succeeding/exceptions/explicit'] ExceptionTests.cpp:39: thisThrows() succeeded ExceptionTests.cpp:40: thisDoesntThrow() succeeded ExceptionTests.cpp:41: thisThrows() succeeded -[Finished: './succeeding/exceptions/explicit' All tests passed (3 assertions in 1 test case)] +[Summary for test case './succeeding/exceptions/explicit': All tests passed (3 assertions in 1 test case)] -[Running: ./failing/exceptions/explicit] +[Test case: './failing/exceptions/explicit'] ExceptionTests.cpp:47: thisThrows() failed with unexpected exception with message: 'expected exception' ExceptionTests.cpp:48: thisDoesntThrow() failed because no exception was thrown where one was expected ExceptionTests.cpp:49: thisThrows() failed with unexpected exception with message: 'expected exception' -[Finished: './failing/exceptions/explicit' 1 test case failed (All 3 assertions failed)] +[Summary for test case './failing/exceptions/explicit': 1 test case failed (All 3 assertions failed)] -[Running: ./failing/exceptions/implicit] +[Test case: './failing/exceptions/implicit'] ExceptionTests.cpp:52: Unexpected exception with message: 'unexpected exception' -[Finished: './failing/exceptions/implicit' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/exceptions/implicit': 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/implicit/2] +[Test case: './failing/exceptions/implicit/2'] ExceptionTests.cpp:60: 1 == 1 succeeded ExceptionTests.cpp:60: {Unknown expression after this line} failed with unexpected exception with message: 'unexpected exception' -[Finished: './failing/exceptions/implicit/2' 1 test case failed (1 of 2 assertions failed)] +[Summary for test case './failing/exceptions/implicit/2': 1 test case failed (1 of 2 assertions failed)] -[Running: ./succeeding/exceptions/implicit] +[Test case: './succeeding/exceptions/implicit'] No assertions in test case, './succeeding/exceptions/implicit' -[Finished: './succeeding/exceptions/implicit' 1 test case failed (1 assertion failed)] +[Summary for test case './succeeding/exceptions/implicit': 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/custom] +[Test case: './failing/exceptions/custom'] ExceptionTests.cpp:102: Unexpected exception with message: 'custom exception' -[Finished: './failing/exceptions/custom' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/exceptions/custom': 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/custom/nothrow] +[Test case: './failing/exceptions/custom/nothrow'] ExceptionTests.cpp:109: throw CustomException( "unexpected custom exception" ) failed with unexpected exception with message: 'unexpected custom exception' -[Finished: './failing/exceptions/custom/nothrow' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/exceptions/custom/nothrow': 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/custom/throw] +[Test case: './failing/exceptions/custom/throw'] ExceptionTests.cpp:114: throw CustomException( "custom exception - not std" ) failed with unexpected exception with message: 'custom exception - not std' -[Finished: './failing/exceptions/custom/throw' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/exceptions/custom/throw': 1 test case failed (1 assertion failed)] -[Running: ./failing/exceptions/custom/double] +[Test case: './failing/exceptions/custom/double'] ExceptionTests.cpp:118: Unexpected exception with message: '3.14' -[Finished: './failing/exceptions/custom/double' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/exceptions/custom/double': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/exceptions/notimplemented] +[Test case: './succeeding/exceptions/notimplemented'] ExceptionTests.cpp:129: thisFunctionNotImplemented( 7 ) succeeded -[Finished: './succeeding/exceptions/notimplemented' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/exceptions/notimplemented': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/generators/1] +[Test case: './succeeding/generators/1'] GeneratorTests.cpp:26: multiply( i, 2 ) == i*2 succeeded for: 2 == 2 GeneratorTests.cpp:27: multiply( j, 2 ) == j*2 succeeded for: 200 == 200 GeneratorTests.cpp:26: multiply( i, 2 ) == i*2 succeeded for: 4 == 4 @@ -417,27 +417,27 @@ GeneratorTests.cpp:26: multiply( i, 2 ) == i*2 succeeded for: 42 == 42 GeneratorTests.cpp:27: multiply( j, 2 ) == j*2 succeeded for: 214 == 214 GeneratorTests.cpp:26: multiply( i, 2 ) == i*2 succeeded for: 72 == 72 GeneratorTests.cpp:27: multiply( j, 2 ) == j*2 succeeded for: 214 == 214 -[Finished: './succeeding/generators/1' All tests passed (144 assertions in 1 test case)] +[Summary for test case './succeeding/generators/1': All tests passed (144 assertions in 1 test case)] -[Running: ./succeeding/message] +[Test case: './succeeding/message'] MessageTests.cpp:14: [warning: this is a warning] No assertions in test case, './succeeding/message' -[Finished: './succeeding/message' 1 test case failed (1 assertion failed)] +[Summary for test case './succeeding/message': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/succeed] +[Test case: './succeeding/succeed'] MessageTests.cpp:18: succeeded [with message: this is a success] -[Finished: './succeeding/succeed' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/succeed': All tests passed (1 assertion in 1 test case)] -[Running: ./failing/message/info/1] +[Test case: './failing/message/info/1'] MessageTests.cpp:23: [info: this message should be logged] MessageTests.cpp:24: [info: so should this] MessageTests.cpp:26: a == 1 failed for: 2 == 1 -[Finished: './failing/message/info/1' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/message/info/1': 1 test case failed (1 assertion failed)] -[Running: ./mixed/message/info/2] +[Test case: './mixed/message/info/2'] MessageTests.cpp:33: a == 2 succeeded for: 2 == 2 MessageTests.cpp:31: [info: this message should be logged] MessageTests.cpp:35: [info: this message should be logged, too] @@ -445,41 +445,41 @@ MessageTests.cpp:37: a == 1 failed for: 2 == 1 MessageTests.cpp:39: [info: and this, but later] MessageTests.cpp:41: a == 0 failed for: 2 == 0 MessageTests.cpp:45: a == 2 succeeded for: 2 == 2 -[Finished: './mixed/message/info/2' 1 test case failed (2 of 4 assertions failed)] +[Summary for test case './mixed/message/info/2': 1 test case failed (2 of 4 assertions failed)] -[Running: ./failing/message/fail] +[Test case: './failing/message/fail'] MessageTests.cpp:51: failed with message: 'This is a failure' -[Finished: './failing/message/fail' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/message/fail': 1 test case failed (1 assertion failed)] -[Running: ./failing/message/sections] -[Started section: 'one'] +[Test case: './failing/message/sections'] +[Section: 'one'] MessageTests.cpp:58: failed with message: 'Message from section one' -[End of section: 'one' 1 assertion failed] +[Summary for section 'one': 1 assertion failed] -[Started section: 'two'] +[Section: 'two'] MessageTests.cpp:63: failed with message: 'Message from section two' -[End of section: 'two' 1 assertion failed] +[Summary for section 'two': 1 assertion failed] -[Finished: './failing/message/sections' 1 test case failed (All 2 assertions failed)] +[Summary for test case './failing/message/sections': 1 test case failed (All 2 assertions failed)] Message from section one -[Running: ./succeeding/message/sections/stdout] -[Started section: 'one'] +[Test case: './succeeding/message/sections/stdout'] +[Section: 'one'] No assertions in section, 'one' -[End of section: 'one' 1 assertion failed] +[Summary for section 'one': 1 assertion failed] Message from section two -[Started section: 'two'] +[Section: 'two'] No assertions in section, 'two' -[End of section: 'two' 1 assertion failed] +[Summary for section 'two': 1 assertion failed] -[Finished: './succeeding/message/sections/stdout' 1 test case failed (All 2 assertions failed)] +[Summary for test case './succeeding/message/sections/stdout': 1 test case failed (All 2 assertions failed)] -[Running: ./mixed/message/scoped] +[Test case: './mixed/message/scoped'] MessageTests.cpp:86: i < 10 succeeded for: 0 < 10 MessageTests.cpp:86: i < 10 succeeded for: 1 < 10 MessageTests.cpp:86: i < 10 succeeded for: 2 < 10 @@ -493,98 +493,98 @@ MessageTests.cpp:86: i < 10 succeeded for: 9 < 10 MessageTests.cpp:86: i < 10 succeeded[info: current counter 10] MessageTests.cpp:86: i < 10 succeeded[info: i := 10] MessageTests.cpp:86: i < 10 failed for: 10 < 10 -[Finished: './mixed/message/scoped' 1 test case failed (1 of 11 assertions failed)] +[Summary for test case './mixed/message/scoped': 1 test case failed (1 of 11 assertions failed)] -[Running: ./succeeding/nofail] +[Test case: './succeeding/nofail'] MessageTests.cpp:92: 1 == 2 failed - but was ok No assertions in test case, './succeeding/nofail' -[Finished: './succeeding/nofail' 1 test case failed (1 assertion failed)] +[Summary for test case './succeeding/nofail': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/Misc/Sections] -[Started section: 's1'] +[Test case: './succeeding/Misc/Sections'] +[Section: 's1'] MiscTests.cpp:25: a != b succeeded for: 1 != 2 MiscTests.cpp:26: b != a succeeded for: 2 != 1 -[End of section: 's1' All 2 assertions passed] +[Summary for section 's1': All 2 assertions passed] -[Started section: 's2'] +[Section: 's2'] MiscTests.cpp:31: a != b succeeded for: 1 != 2 -[End of section: 's2' 1 assertion passed] +[Summary for section 's2': 1 assertion passed] -[Finished: './succeeding/Misc/Sections' All tests passed (3 assertions in 1 test case)] +[Summary for test case './succeeding/Misc/Sections': All tests passed (3 assertions in 1 test case)] -[Running: ./succeeding/Misc/Sections/nested] -[Started section: 's1'] +[Test case: './succeeding/Misc/Sections/nested'] +[Section: 's1'] MiscTests.cpp:42: a != b succeeded for: 1 != 2 MiscTests.cpp:43: b != a succeeded for: 2 != 1 -[Started section: 's2'] +[Section: 's2'] MiscTests.cpp:47: a != b succeeded for: 1 != 2 -[End of section: 's2' 1 assertion passed] +[Summary for section 's2': 1 assertion passed] -[End of section: 's1' All 3 assertions passed] +[Summary for section 's1': All 3 assertions passed] -[Finished: './succeeding/Misc/Sections/nested' All tests passed (3 assertions in 1 test case)] +[Summary for test case './succeeding/Misc/Sections/nested': All tests passed (3 assertions in 1 test case)] -[Running: ./mixed/Misc/Sections/nested2] -[Started section: 's1'] -[Started section: 's2'] +[Test case: './mixed/Misc/Sections/nested2'] +[Section: 's1'] +[Section: 's2'] MiscTests.cpp:61: a == b failed for: 1 == 2 -[End of section: 's2' 1 assertion failed] +[Summary for section 's2': 1 assertion failed] -[End of section: 's1' 1 assertion failed] +[Summary for section 's1': 1 assertion failed] -[Started section: 's1'] -[Started section: 's3'] +[Section: 's1'] +[Section: 's3'] MiscTests.cpp:66: a != b succeeded for: 1 != 2 -[End of section: 's3' 1 assertion passed] +[Summary for section 's3': 1 assertion passed] -[End of section: 's1' 1 assertion passed] +[Summary for section 's1': 1 assertion passed] -[Started section: 's1'] -[Started section: 's4'] +[Section: 's1'] +[Section: 's4'] MiscTests.cpp:70: a < b succeeded for: 1 < 2 -[End of section: 's4' 1 assertion passed] +[Summary for section 's4': 1 assertion passed] -[End of section: 's1' 1 assertion passed] +[Summary for section 's1': 1 assertion passed] -[Finished: './mixed/Misc/Sections/nested2' 1 test case failed (1 of 3 assertions failed)] +[Summary for test case './mixed/Misc/Sections/nested2': 1 test case failed (1 of 3 assertions failed)] -[Running: ./Sections/nested/a/b] -[Started section: 'c'] -[Started section: 'd (leaf)'] +[Test case: './Sections/nested/a/b'] +[Section: 'c'] +[Section: 'd (leaf)'] No assertions in section, 'd (leaf)' -[End of section: 'd (leaf)' 1 assertion failed] +[Summary for section 'd (leaf)': 1 assertion failed] -[End of section: 'c' 1 assertion failed] +[Summary for section 'c': 1 assertion failed] -[Started section: 'c'] -[Started section: 'e (leaf)'] +[Section: 'c'] +[Section: 'e (leaf)'] No assertions in section, 'e (leaf)' -[End of section: 'e (leaf)' 1 assertion failed] +[Summary for section 'e (leaf)': 1 assertion failed] -[End of section: 'c' 1 assertion failed] +[Summary for section 'c': 1 assertion failed] -[Started section: 'f (leaf)'] +[Section: 'f (leaf)'] No assertions in section, 'f (leaf)' -[End of section: 'f (leaf)' 1 assertion failed] +[Summary for section 'f (leaf)': 1 assertion failed] -[Finished: './Sections/nested/a/b' 1 test case failed (All 3 assertions failed)] +[Summary for test case './Sections/nested/a/b': 1 test case failed (All 3 assertions failed)] -[Running: ./mixed/Misc/Sections/loops] -[Started section: 's1'] +[Test case: './mixed/Misc/Sections/loops'] +[Section: 's1'] MiscTests.cpp:103: b > a failed for: 0 > 1 -[End of section: 's1' 1 assertion failed] +[Summary for section 's1': 1 assertion failed] -[Finished: './mixed/Misc/Sections/loops' 1 test case failed (1 assertion failed)] +[Summary for test case './mixed/Misc/Sections/loops': 1 test case failed (1 assertion failed)] -[Running: ./mixed/Misc/loops] +[Test case: './mixed/Misc/loops'] MiscTests.cpp:114: [info: Testing if fib[0] (1) is even] MiscTests.cpp:115: ( fib[i] % 2 ) == 0 failed for: 1 == 0 MiscTests.cpp:114: [info: Testing if fib[1] (1) is even] @@ -601,72 +601,72 @@ MiscTests.cpp:114: [info: Testing if fib[6] (13) is even] MiscTests.cpp:115: ( fib[i] % 2 ) == 0 failed for: 1 == 0 MiscTests.cpp:114: [info: Testing if fib[7] (21) is even] MiscTests.cpp:115: ( fib[i] % 2 ) == 0 failed for: 1 == 0 -[Finished: './mixed/Misc/loops' 1 test case failed (6 of 8 assertions failed)] +[Summary for test case './mixed/Misc/loops': 1 test case failed (6 of 8 assertions failed)] Some information An error -[Running: ./succeeding/Misc/stdout,stderr] +[Test case: './succeeding/Misc/stdout,stderr'] No assertions in test case, './succeeding/Misc/stdout,stderr' -[Finished: './succeeding/Misc/stdout,stderr' 1 test case failed (1 assertion failed)] +[Summary for test case './succeeding/Misc/stdout,stderr': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/Misc/null strings] +[Test case: './succeeding/Misc/null strings'] MiscTests.cpp:133: makeString( false ) != static_cast(__null) succeeded for: "valid string" != {null string} MiscTests.cpp:134: makeString( true ) == static_cast(__null) succeeded for: {null string} == {null string} -[Finished: './succeeding/Misc/null strings' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Misc/null strings': All tests passed (2 assertions in 1 test case)] -[Running: ./failing/info] +[Test case: './failing/info'] MiscTests.cpp:139: [info: hi] MiscTests.cpp:141: [info: i := 7] MiscTests.cpp:142: false failed -[Finished: './failing/info' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/info': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/checkedif] +[Test case: './succeeding/checkedif'] MiscTests.cpp:147: flag succeeded for: true MiscTests.cpp:155: testCheckedIf( true ) succeeded for: true -[Finished: './succeeding/checkedif' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/checkedif': All tests passed (2 assertions in 1 test case)] -[Running: ./failing/checkedif] +[Test case: './failing/checkedif'] MiscTests.cpp:147: flag failed for: false MiscTests.cpp:160: testCheckedIf( false ) failed for: false -[Finished: './failing/checkedif' 1 test case failed (All 2 assertions failed)] +[Summary for test case './failing/checkedif': 1 test case failed (All 2 assertions failed)] -[Running: ./succeeding/checkedelse] +[Test case: './succeeding/checkedelse'] MiscTests.cpp:165: flag succeeded for: true MiscTests.cpp:173: testCheckedElse( true ) succeeded for: true -[Finished: './succeeding/checkedelse' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/checkedelse': All tests passed (2 assertions in 1 test case)] -[Running: ./failing/checkedelse] +[Test case: './failing/checkedelse'] MiscTests.cpp:165: flag failed for: false MiscTests.cpp:178: testCheckedElse( false ) failed for: false -[Finished: './failing/checkedelse' 1 test case failed (All 2 assertions failed)] +[Summary for test case './failing/checkedelse': 1 test case failed (All 2 assertions failed)] -[Running: ./misc/xmlentitycheck] -[Started section: 'embedded xml'] +[Test case: './misc/xmlentitycheck'] +[Section: 'embedded xml'] No assertions in section, 'embedded xml' -[End of section: 'embedded xml' 1 assertion failed] +[Summary for section 'embedded xml': 1 assertion failed] -[Started section: 'encoded chars'] +[Section: 'encoded chars'] No assertions in section, 'encoded chars' -[End of section: 'encoded chars' 1 assertion failed] +[Summary for section 'encoded chars': 1 assertion failed] -[Finished: './misc/xmlentitycheck' 1 test case failed (All 2 assertions failed)] +[Summary for test case './misc/xmlentitycheck': 1 test case failed (All 2 assertions failed)] -[Running: ./manual/onechar] +[Test case: './manual/onechar'] MiscTests.cpp:195: [info: 3] MiscTests.cpp:196: false failed -[Finished: './manual/onechar' 1 test case failed (1 assertion failed)] +[Summary for test case './manual/onechar': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/atomic if] +[Test case: './succeeding/atomic if'] MiscTests.cpp:206: x == 0 succeeded for: 0 == 0 -[Finished: './succeeding/atomic if' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/atomic if': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/matchers] +[Test case: './succeeding/matchers'] MiscTests.cpp:216: testStringForMatching() Contains( "string" ) succeeded for: "this string contains 'abc' as a substring" contains: "string" MiscTests.cpp:217: testStringForMatching() Contains( "abc" ) succeeded for: @@ -675,81 +675,81 @@ MiscTests.cpp:219: testStringForMatching() StartsWith( "this" ) succeeded for: "this string contains 'abc' as a substring" starts with: "this" MiscTests.cpp:220: testStringForMatching() EndsWith( "substring" ) succeeded for: "this string contains 'abc' as a substring" ends with: "substring" -[Finished: './succeeding/matchers' All tests passed (4 assertions in 1 test case)] +[Summary for test case './succeeding/matchers': All tests passed (4 assertions in 1 test case)] -[Running: ./failing/matchers/Contains] +[Test case: './failing/matchers/Contains'] MiscTests.cpp:225: testStringForMatching() Contains( "not there" ) failed for: "this string contains 'abc' as a substring" contains: "not there" -[Finished: './failing/matchers/Contains' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/matchers/Contains': 1 test case failed (1 assertion failed)] -[Running: ./failing/matchers/StartsWith] +[Test case: './failing/matchers/StartsWith'] MiscTests.cpp:230: testStringForMatching() StartsWith( "string" ) failed for: "this string contains 'abc' as a substring" starts with: "string" -[Finished: './failing/matchers/StartsWith' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/matchers/StartsWith': 1 test case failed (1 assertion failed)] -[Running: ./failing/matchers/EndsWith] +[Test case: './failing/matchers/EndsWith'] MiscTests.cpp:235: testStringForMatching() EndsWith( "this" ) failed for: "this string contains 'abc' as a substring" ends with: "this" -[Finished: './failing/matchers/EndsWith' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/matchers/EndsWith': 1 test case failed (1 assertion failed)] -[Running: ./failing/matchers/Equals] +[Test case: './failing/matchers/Equals'] MiscTests.cpp:240: testStringForMatching() Equals( "something else" ) failed for: "this string contains 'abc' as a substring" equals: "something else" -[Finished: './failing/matchers/Equals' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/matchers/Equals': 1 test case failed (1 assertion failed)] -[Running: /succeeding/matchers/AllOf] +[Test case: '/succeeding/matchers/AllOf'] MiscTests.cpp:245: testStringForMatching() AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) succeeded for: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" ) -[Finished: '/succeeding/matchers/AllOf' All tests passed (1 assertion in 1 test case)] +[Summary for test case '/succeeding/matchers/AllOf': All tests passed (1 assertion in 1 test case)] -[Running: /succeeding/matchers/AnyOf] +[Test case: '/succeeding/matchers/AnyOf'] MiscTests.cpp:249: testStringForMatching() AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) succeeded for: "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" ) MiscTests.cpp:250: testStringForMatching() AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) succeeded for: "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" ) -[Finished: '/succeeding/matchers/AnyOf' All tests passed (2 assertions in 1 test case)] +[Summary for test case '/succeeding/matchers/AnyOf': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/matchers/Equals] +[Test case: './succeeding/matchers/Equals'] MiscTests.cpp:255: testStringForMatching() Equals( "this string contains 'abc' as a substring" ) succeeded for: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" -[Finished: './succeeding/matchers/Equals' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/matchers/Equals': All tests passed (1 assertion in 1 test case)] -[Running: example/factorial] +[Test case: 'example/factorial'] MiscTests.cpp:266: Factorial(0) == 1 succeeded for: 1 == 1 MiscTests.cpp:267: Factorial(1) == 1 succeeded for: 1 == 1 MiscTests.cpp:268: Factorial(2) == 2 succeeded for: 2 == 2 MiscTests.cpp:269: Factorial(3) == 6 succeeded for: 6 == 6 MiscTests.cpp:270: Factorial(10) == 3628800 succeeded for: 0x == 3628800 -[Finished: 'example/factorial' All tests passed (5 assertions in 1 test case)] +[Summary for test case 'example/factorial': All tests passed (5 assertions in 1 test case)] -[Running: empty] +[Test case: 'empty'] No assertions in test case, 'empty' -[Finished: 'empty' 1 test case failed (1 assertion failed)] +[Summary for test case 'empty': 1 test case failed (1 assertion failed)] -[Running: Nice descriptive name] +[Test case: 'Nice descriptive name'] MiscTests.cpp:279: [warning: This one ran] No assertions in test case, 'Nice descriptive name' -[Finished: 'Nice descriptive name' 1 test case failed (1 assertion failed)] +[Summary for test case 'Nice descriptive name': 1 test case failed (1 assertion failed)] -[Running: first tag] +[Test case: 'first tag'] No assertions in test case, 'first tag' -[Finished: 'first tag' 1 test case failed (1 assertion failed)] +[Summary for test case 'first tag': 1 test case failed (1 assertion failed)] -[Running: second tag] +[Test case: 'second tag'] No assertions in test case, 'second tag' -[Finished: 'second tag' 1 test case failed (1 assertion failed)] +[Summary for test case 'second tag': 1 test case failed (1 assertion failed)] -[Running: selftest/main] -[Started section: 'selftest/expected result'] -[Started section: 'selftest/expected result/failing tests'] +[Test case: 'selftest/main'] +[Section: 'selftest/expected result'] +[Section: 'selftest/expected result/failing tests'] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:106: succeeded [with message: Tests failed, as expected] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:106: succeeded @@ -800,12 +800,12 @@ No assertions in test case, 'second tag' [with message: Tests failed, as expected] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:106: succeeded [with message: Tests failed, as expected] -[End of section: 'selftest/expected result/failing tests' All 25 assertions passed] +[Summary for section 'selftest/expected result/failing tests': All 25 assertions passed] -[End of section: 'selftest/expected result' All 25 assertions passed] +[Summary for section 'selftest/expected result': All 25 assertions passed] -[Started section: 'selftest/expected result'] -[Started section: 'selftest/expected result/succeeding tests'] +[Section: 'selftest/expected result'] +[Section: 'selftest/expected result/succeeding tests'] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:95: succeeded [with message: Tests passed, as expected] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:95: succeeded @@ -896,302 +896,302 @@ An error [with message: Tests passed, as expected] /Users/Phil/Dev/OSS/Catch/projects/XCode4/CatchSelfTest/CatchSelfTest/../../../SelfTest/catch_self_test.hpp:95: succeeded [with message: Tests passed, as expected] -[End of section: 'selftest/expected result/succeeding tests' All 43 assertions passed] +[Summary for section 'selftest/expected result/succeeding tests': All 43 assertions passed] -[End of section: 'selftest/expected result' All 43 assertions passed] +[Summary for section 'selftest/expected result': All 43 assertions passed] Message from section one Message from section two Some information An error -[Started section: 'selftest/test counts'] -[Started section: 'selftest/test counts/succeeding tests'] +[Section: 'selftest/test counts'] +[Section: 'selftest/test counts/succeeding tests'] TestMain.cpp:40: totals.assertions.passed == 291 succeeded for: 291 == 291 TestMain.cpp:41: totals.assertions.failed == 0 succeeded for: 0 == 0 -[End of section: 'selftest/test counts/succeeding tests' All 2 assertions passed] +[Summary for section 'selftest/test counts/succeeding tests': All 2 assertions passed] -[End of section: 'selftest/test counts' All 2 assertions passed] +[Summary for section 'selftest/test counts': All 2 assertions passed] -[Started section: 'selftest/test counts'] -[Started section: 'selftest/test counts/failing tests'] +[Section: 'selftest/test counts'] +[Section: 'selftest/test counts/failing tests'] TestMain.cpp:47: totals.assertions.passed == 1 succeeded for: 1 == 1 TestMain.cpp:48: totals.assertions.failed == 72 succeeded for: 72 == 72 -[End of section: 'selftest/test counts/failing tests' All 2 assertions passed] +[Summary for section 'selftest/test counts/failing tests': All 2 assertions passed] -[End of section: 'selftest/test counts' All 2 assertions passed] +[Summary for section 'selftest/test counts': All 2 assertions passed] -[Finished: 'selftest/main' All tests passed (72 assertions in 1 test case)] +[Summary for test case 'selftest/main': All tests passed (72 assertions in 1 test case)] -[Running: meta/Misc/Sections] +[Test case: 'meta/Misc/Sections'] TestMain.cpp:57: totals.assertions.passed == 2 succeeded for: 2 == 2 TestMain.cpp:58: totals.assertions.failed == 1 succeeded for: 1 == 1 -[Finished: 'meta/Misc/Sections' All tests passed (2 assertions in 1 test case)] +[Summary for test case 'meta/Misc/Sections': All tests passed (2 assertions in 1 test case)] -[Running: selftest/parser/2] -[Started section: 'default'] +[Test case: 'selftest/parser/2'] +[Section: 'default'] TestMain.cpp:97: parseIntoConfig( argv, config ) succeeded TestMain.cpp:99: config.shouldDebugBreak == false succeeded for: false == false TestMain.cpp:100: config.cutoff == -1 succeeded for: -1 == -1 TestMain.cpp:101: config.allowThrows == true succeeded for: true == true TestMain.cpp:102: config.reporter.empty() succeeded for: true -[End of section: 'default' All 5 assertions passed] +[Summary for section 'default': All 5 assertions passed] -[Started section: 'test lists'] -[Started section: '-t/1'] +[Section: 'test lists'] +[Section: '-t/1'] TestMain.cpp:108: parseIntoConfig( argv, config ) succeeded TestMain.cpp:110: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:111: config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false succeeded for: false == false TestMain.cpp:112: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) succeeded for: true -[End of section: '-t/1' All 4 assertions passed] +[Summary for section '-t/1': All 4 assertions passed] -[End of section: 'test lists' All 4 assertions passed] +[Summary for section 'test lists': All 4 assertions passed] -[Started section: 'test lists'] -[Started section: '-t/exclude:1'] +[Section: 'test lists'] +[Section: '-t/exclude:1'] TestMain.cpp:116: parseIntoConfig( argv, config ) succeeded TestMain.cpp:118: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:119: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false succeeded for: false == false TestMain.cpp:120: config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) succeeded for: true -[End of section: '-t/exclude:1' All 4 assertions passed] +[Summary for section '-t/exclude:1': All 4 assertions passed] -[End of section: 'test lists' All 4 assertions passed] +[Summary for section 'test lists': All 4 assertions passed] -[Started section: 'test lists'] -[Started section: '--test/1'] +[Section: 'test lists'] +[Section: '--test/1'] TestMain.cpp:125: parseIntoConfig( argv, config ) succeeded TestMain.cpp:127: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:128: config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false succeeded for: false == false TestMain.cpp:129: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) succeeded for: true -[End of section: '--test/1' All 4 assertions passed] +[Summary for section '--test/1': All 4 assertions passed] -[End of section: 'test lists' All 4 assertions passed] +[Summary for section 'test lists': All 4 assertions passed] -[Started section: 'test lists'] -[Started section: '--test/exclude:1'] +[Section: 'test lists'] +[Section: '--test/exclude:1'] TestMain.cpp:134: parseIntoConfig( argv, config ) succeeded TestMain.cpp:136: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:137: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false succeeded for: false == false TestMain.cpp:138: config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) succeeded for: true -[End of section: '--test/exclude:1' All 4 assertions passed] +[Summary for section '--test/exclude:1': All 4 assertions passed] -[End of section: 'test lists' All 4 assertions passed] +[Summary for section 'test lists': All 4 assertions passed] -[Started section: 'test lists'] -[Started section: '--test/exclude:2'] +[Section: 'test lists'] +[Section: '--test/exclude:2'] TestMain.cpp:143: parseIntoConfig( argv, config ) succeeded TestMain.cpp:145: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:146: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false succeeded for: false == false TestMain.cpp:147: config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) succeeded for: true -[End of section: '--test/exclude:2' All 4 assertions passed] +[Summary for section '--test/exclude:2': All 4 assertions passed] -[End of section: 'test lists' All 4 assertions passed] +[Summary for section 'test lists': All 4 assertions passed] -[Started section: 'test lists'] -[Started section: '-t/2'] +[Section: 'test lists'] +[Section: '-t/2'] TestMain.cpp:152: parseIntoConfig( argv, config ) succeeded TestMain.cpp:154: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:155: config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false succeeded for: false == false TestMain.cpp:156: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) succeeded for: true TestMain.cpp:157: config.filters[0].shouldInclude( fakeTestCase( "test2" ) ) succeeded for: true -[End of section: '-t/2' All 5 assertions passed] +[Summary for section '-t/2': All 5 assertions passed] -[End of section: 'test lists' All 5 assertions passed] +[Summary for section 'test lists': All 5 assertions passed] -[Started section: 'test lists'] -[Started section: '-t/0'] +[Section: 'test lists'] +[Section: '-t/0'] TestMain.cpp:162: parseIntoConfigAndReturnError( argv, config ) Contains( "at least 1" ) succeeded for: "Error while parsing arguments. Expected at least 1 argument." contains: "at least 1" -[End of section: '-t/0' 1 assertion passed] +[Summary for section '-t/0': 1 assertion passed] -[End of section: 'test lists' 1 assertion passed] +[Summary for section 'test lists': 1 assertion passed] -[Started section: 'reporter'] -[Started section: '-r/basic'] +[Section: 'reporter'] +[Section: '-r/basic'] TestMain.cpp:169: parseIntoConfig( argv, config ) succeeded -TestMain.cpp:171: config.reporter == "basic" succeeded for: "basic" == "basic" -[End of section: '-r/basic' All 2 assertions passed] +TestMain.cpp:171: config.reporter == "console" succeeded for: "console" == "console" +[Summary for section '-r/basic': All 2 assertions passed] -[End of section: 'reporter' All 2 assertions passed] +[Summary for section 'reporter': All 2 assertions passed] -[Started section: 'reporter'] -[Started section: '-r/xml'] +[Section: 'reporter'] +[Section: '-r/xml'] TestMain.cpp:175: parseIntoConfig( argv, config ) succeeded TestMain.cpp:177: config.reporter == "xml" succeeded for: "xml" == "xml" -[End of section: '-r/xml' All 2 assertions passed] +[Summary for section '-r/xml': All 2 assertions passed] -[End of section: 'reporter' All 2 assertions passed] +[Summary for section 'reporter': All 2 assertions passed] -[Started section: 'reporter'] -[Started section: '--reporter/junit'] +[Section: 'reporter'] +[Section: '--reporter/junit'] TestMain.cpp:181: parseIntoConfig( argv, config ) succeeded TestMain.cpp:183: config.reporter == "junit" succeeded for: "junit" == "junit" -[End of section: '--reporter/junit' All 2 assertions passed] +[Summary for section '--reporter/junit': All 2 assertions passed] -[End of section: 'reporter' All 2 assertions passed] +[Summary for section 'reporter': All 2 assertions passed] -[Started section: 'reporter'] -[Started section: '-r/error'] +[Section: 'reporter'] +[Section: '-r/error'] TestMain.cpp:187: parseIntoConfigAndReturnError( argv, config ) Contains( "1 argument" ) succeeded for: "Error while parsing arguments. Expected 1 argument. Arguments were: one two" contains: "1 argument" -[End of section: '-r/error' 1 assertion passed] +[Summary for section '-r/error': 1 assertion passed] -[End of section: 'reporter' 1 assertion passed] +[Summary for section 'reporter': 1 assertion passed] -[Started section: 'debugger'] -[Started section: '-b'] +[Section: 'debugger'] +[Section: '-b'] TestMain.cpp:194: parseIntoConfig( argv, config ) succeeded TestMain.cpp:196: config.shouldDebugBreak == true succeeded for: true == true -[End of section: '-b' All 2 assertions passed] +[Summary for section '-b': All 2 assertions passed] -[End of section: 'debugger' All 2 assertions passed] +[Summary for section 'debugger': All 2 assertions passed] -[Started section: 'debugger'] -[Started section: '--break'] +[Section: 'debugger'] +[Section: '--break'] TestMain.cpp:200: parseIntoConfig( argv, config ) succeeded TestMain.cpp:202: config.shouldDebugBreak succeeded for: true -[End of section: '--break' All 2 assertions passed] +[Summary for section '--break': All 2 assertions passed] -[End of section: 'debugger' All 2 assertions passed] +[Summary for section 'debugger': All 2 assertions passed] -[Started section: 'debugger'] -[Started section: '-b'] +[Section: 'debugger'] +[Section: '-b'] TestMain.cpp:206: parseIntoConfigAndReturnError( argv, config ) Contains( "0 arguments" ) succeeded for: "Error while parsing arguments. Expected 0 arguments. Arguments were: unexpected" contains: "0 arguments" -[End of section: '-b' 1 assertion passed] +[Summary for section '-b': 1 assertion passed] -[End of section: 'debugger' 1 assertion passed] +[Summary for section 'debugger': 1 assertion passed] -[Started section: 'abort'] -[Started section: '-a'] +[Section: 'abort'] +[Section: '-a'] TestMain.cpp:213: parseIntoConfig( argv, config ) succeeded TestMain.cpp:215: config.cutoff == 1 succeeded for: 1 == 1 -[End of section: '-a' All 2 assertions passed] +[Summary for section '-a': All 2 assertions passed] -[End of section: 'abort' All 2 assertions passed] +[Summary for section 'abort': All 2 assertions passed] -[Started section: 'abort'] -[Started section: '-a/2'] +[Section: 'abort'] +[Section: '-a/2'] TestMain.cpp:219: parseIntoConfig( argv, config ) succeeded TestMain.cpp:221: config.cutoff == 2 succeeded for: 2 == 2 -[End of section: '-a/2' All 2 assertions passed] +[Summary for section '-a/2': All 2 assertions passed] -[End of section: 'abort' All 2 assertions passed] +[Summary for section 'abort': All 2 assertions passed] -[Started section: 'abort'] -[Started section: '-a/error/0'] +[Section: 'abort'] +[Section: '-a/error/0'] TestMain.cpp:225: parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) succeeded for: "Error while parsing arguments. threshold must be a number greater than zero. Arguments were: 0" contains: "greater than zero" -[End of section: '-a/error/0' 1 assertion passed] +[Summary for section '-a/error/0': 1 assertion passed] -[End of section: 'abort' 1 assertion passed] +[Summary for section 'abort': 1 assertion passed] -[Started section: 'abort'] -[Started section: '-a/error/non numeric'] +[Section: 'abort'] +[Section: '-a/error/non numeric'] TestMain.cpp:229: parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) succeeded for: "Error while parsing arguments. threshold must be a number greater than zero. Arguments were: oops" contains: "greater than zero" -[End of section: '-a/error/non numeric' 1 assertion passed] +[Summary for section '-a/error/non numeric': 1 assertion passed] -[End of section: 'abort' 1 assertion passed] +[Summary for section 'abort': 1 assertion passed] -[Started section: 'abort'] -[Started section: '-a/error/two args'] +[Section: 'abort'] +[Section: '-a/error/two args'] TestMain.cpp:233: parseIntoConfigAndReturnError( argv, config ) Contains( "0 and 1 argument" ) succeeded for: "Error while parsing arguments. Expected between 0 and 1 argument. Arguments were: 1 2" contains: "0 and 1 argument" -[End of section: '-a/error/two args' 1 assertion passed] +[Summary for section '-a/error/two args': 1 assertion passed] -[End of section: 'abort' 1 assertion passed] +[Summary for section 'abort': 1 assertion passed] -[Started section: 'nothrow'] -[Started section: '-nt'] +[Section: 'nothrow'] +[Section: '-nt'] TestMain.cpp:240: parseIntoConfig( argv, config ) succeeded TestMain.cpp:242: config.allowThrows == false succeeded for: false == false -[End of section: '-nt' All 2 assertions passed] +[Summary for section '-nt': All 2 assertions passed] -[End of section: 'nothrow' All 2 assertions passed] +[Summary for section 'nothrow': All 2 assertions passed] -[Started section: 'nothrow'] -[Started section: '--nothrow'] +[Section: 'nothrow'] +[Section: '--nothrow'] TestMain.cpp:246: parseIntoConfig( argv, config ) succeeded TestMain.cpp:248: config.allowThrows == false succeeded for: false == false -[End of section: '--nothrow' All 2 assertions passed] +[Summary for section '--nothrow': All 2 assertions passed] -[End of section: 'nothrow' All 2 assertions passed] +[Summary for section 'nothrow': All 2 assertions passed] -[Started section: 'streams'] -[Started section: '-o filename'] +[Section: 'streams'] +[Section: '-o filename'] TestMain.cpp:255: parseIntoConfig( argv, config ) succeeded TestMain.cpp:257: config.outputFilename == "filename.ext" succeeded for: "filename.ext" == "filename.ext" TestMain.cpp:258: config.stream.empty() succeeded for: true -[End of section: '-o filename' All 3 assertions passed] +[Summary for section '-o filename': All 3 assertions passed] -[End of section: 'streams' All 3 assertions passed] +[Summary for section 'streams': All 3 assertions passed] -[Started section: 'streams'] -[Started section: '-o %stdout'] +[Section: 'streams'] +[Section: '-o %stdout'] TestMain.cpp:262: parseIntoConfig( argv, config ) succeeded TestMain.cpp:264: config.stream == "stdout" succeeded for: "stdout" == "stdout" TestMain.cpp:265: config.outputFilename.empty() succeeded for: true -[End of section: '-o %stdout' All 3 assertions passed] +[Summary for section '-o %stdout': All 3 assertions passed] -[End of section: 'streams' All 3 assertions passed] +[Summary for section 'streams': All 3 assertions passed] -[Started section: 'streams'] -[Started section: '--out'] +[Section: 'streams'] +[Section: '--out'] TestMain.cpp:269: parseIntoConfig( argv, config ) succeeded TestMain.cpp:271: config.outputFilename == "filename.ext" succeeded for: "filename.ext" == "filename.ext" -[End of section: '--out' All 2 assertions passed] +[Summary for section '--out': All 2 assertions passed] -[End of section: 'streams' All 2 assertions passed] +[Summary for section 'streams': All 2 assertions passed] -[Started section: 'combinations'] -[Started section: '-a -b'] +[Section: 'combinations'] +[Section: '-a -b'] TestMain.cpp:278: parseIntoConfig( argv, config ) succeeded TestMain.cpp:280: config.cutoff == 1 succeeded for: 1 == 1 TestMain.cpp:281: config.shouldDebugBreak succeeded for: true TestMain.cpp:282: config.allowThrows == false succeeded for: false == false -[End of section: '-a -b' All 4 assertions passed] +[Summary for section '-a -b': All 4 assertions passed] -[End of section: 'combinations' All 4 assertions passed] +[Summary for section 'combinations': All 4 assertions passed] -[Finished: 'selftest/parser/2' All tests passed (66 assertions in 1 test case)] +[Summary for test case 'selftest/parser/2': All tests passed (66 assertions in 1 test case)] -[Running: selftest/test filter] +[Test case: 'selftest/test filter'] TestMain.cpp:291: matchAny.shouldInclude( fakeTestCase( "any" ) ) succeeded for: true TestMain.cpp:292: matchNone.shouldInclude( fakeTestCase( "any" ) ) == false succeeded for: false == false TestMain.cpp:297: matchHidden.shouldInclude( fakeTestCase( "any" ) ) == false succeeded for: false == false TestMain.cpp:298: matchNonHidden.shouldInclude( fakeTestCase( "any" ) ) succeeded for: true TestMain.cpp:300: matchHidden.shouldInclude( fakeTestCase( "./any" ) ) succeeded for: true TestMain.cpp:301: matchNonHidden.shouldInclude( fakeTestCase( "./any" ) ) == false succeeded for: false == false -[Finished: 'selftest/test filter' All tests passed (6 assertions in 1 test case)] +[Summary for test case 'selftest/test filter': All tests passed (6 assertions in 1 test case)] -[Running: selftest/test filters] +[Test case: 'selftest/test filters'] TestMain.cpp:312: matchHidden.shouldInclude( fakeTestCase( "./something" ) ) succeeded for: true TestMain.cpp:314: filters.shouldInclude( fakeTestCase( "any" ) ) == false succeeded for: false == false TestMain.cpp:315: filters.shouldInclude( fakeTestCase( "./something" ) ) succeeded for: true TestMain.cpp:316: filters.shouldInclude( fakeTestCase( "./anything" ) ) == false succeeded for: false == false -[Finished: 'selftest/test filters' All tests passed (4 assertions in 1 test case)] +[Summary for test case 'selftest/test filters': All tests passed (4 assertions in 1 test case)] -[Running: selftest/filter/prefix wildcard] +[Test case: 'selftest/filter/prefix wildcard'] TestMain.cpp:322: matchBadgers.shouldInclude( fakeTestCase( "big badger" ) ) succeeded for: true TestMain.cpp:323: matchBadgers.shouldInclude( fakeTestCase( "little badgers" ) ) == false succeeded for: false == false -[Finished: 'selftest/filter/prefix wildcard' All tests passed (2 assertions in 1 test case)] +[Summary for test case 'selftest/filter/prefix wildcard': All tests passed (2 assertions in 1 test case)] -[Running: selftest/filter/wildcard at both ends] +[Test case: 'selftest/filter/wildcard at both ends'] TestMain.cpp:328: matchBadgers.shouldInclude( fakeTestCase( "big badger" ) ) succeeded for: true TestMain.cpp:329: matchBadgers.shouldInclude( fakeTestCase( "little badgers" ) ) succeeded for: true TestMain.cpp:330: matchBadgers.shouldInclude( fakeTestCase( "badgers are big" ) ) succeeded for: true TestMain.cpp:331: matchBadgers.shouldInclude( fakeTestCase( "hedgehogs" ) ) == false succeeded for: false == false -[Finished: 'selftest/filter/wildcard at both ends' All tests passed (4 assertions in 1 test case)] +[Summary for test case 'selftest/filter/wildcard at both ends': All tests passed (4 assertions in 1 test case)] -[Running: selftest/option parsers] +[Test case: 'selftest/option parsers'] TestMain.cpp:351: opt.parseIntoConfig( parser, config ) succeeded TestMain.cpp:353: config.filters.size() == 1 succeeded for: 1 == 1 TestMain.cpp:354: config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false succeeded for: false == false TestMain.cpp:355: config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) succeeded for: true -[Finished: 'selftest/option parsers' All tests passed (4 assertions in 1 test case)] +[Summary for test case 'selftest/option parsers': All tests passed (4 assertions in 1 test case)] -[Running: selftest/tags] -[Started section: 'one tag'] +[Test case: 'selftest/tags'] +[Section: 'one tag'] TestMain.cpp:369: oneTag.getTestCaseInfo().description == "" succeeded for: "" == "" TestMain.cpp:370: oneTag.hasTag( "one" ) succeeded for: true TestMain.cpp:371: oneTag.getTags().size() == 1 succeeded for: 1 == 1 @@ -1200,9 +1200,9 @@ TestMain.cpp:374: oneTag.matchesTags( p2 ) == true succeeded for: true == true TestMain.cpp:375: oneTag.matchesTags( p3 ) == false succeeded for: false == false TestMain.cpp:376: oneTag.matchesTags( p4 ) == false succeeded for: false == false TestMain.cpp:377: oneTag.matchesTags( p5 ) == false succeeded for: false == false -[End of section: 'one tag' All 8 assertions passed] +[Summary for section 'one tag': All 8 assertions passed] -[Started section: 'two tags'] +[Section: 'two tags'] TestMain.cpp:383: twoTags.getTestCaseInfo().description == "" succeeded for: "" == "" TestMain.cpp:384: twoTags.hasTag( "one" ) succeeded for: true TestMain.cpp:385: twoTags.hasTag( "two" ) succeeded for: true @@ -1213,166 +1213,166 @@ TestMain.cpp:390: twoTags.matchesTags( p2 ) == true succeeded for: true == true TestMain.cpp:391: twoTags.matchesTags( p3 ) == true succeeded for: true == true TestMain.cpp:392: twoTags.matchesTags( p4 ) == true succeeded for: true == true TestMain.cpp:393: twoTags.matchesTags( p5 ) == true succeeded for: true == true -[End of section: 'two tags' All 10 assertions passed] +[Summary for section 'two tags': All 10 assertions passed] -[Started section: 'one tag with characters either side'] +[Section: 'one tag with characters either side'] TestMain.cpp:399: oneTagWithExtras.getTestCaseInfo().description == "1234" succeeded for: "1234" == "1234" TestMain.cpp:400: oneTagWithExtras.hasTag( "one" ) succeeded for: true TestMain.cpp:401: oneTagWithExtras.hasTag( "two" ) == false succeeded for: false == false TestMain.cpp:402: oneTagWithExtras.getTags().size() == 1 succeeded for: 1 == 1 -[End of section: 'one tag with characters either side' All 4 assertions passed] +[Summary for section 'one tag with characters either side': All 4 assertions passed] -[Started section: 'start of a tag, but not closed'] +[Section: 'start of a tag, but not closed'] TestMain.cpp:409: oneTagOpen.getTestCaseInfo().description == "[one" succeeded for: "[one" == "[one" TestMain.cpp:410: oneTagOpen.hasTag( "one" ) == false succeeded for: false == false TestMain.cpp:411: oneTagOpen.getTags().size() == 0 succeeded for: 0 == 0 -[End of section: 'start of a tag, but not closed' All 3 assertions passed] +[Summary for section 'start of a tag, but not closed': All 3 assertions passed] -[Started section: 'hidden'] +[Section: 'hidden'] TestMain.cpp:417: oneTag.getTestCaseInfo().description == "" succeeded for: "" == "" TestMain.cpp:418: oneTag.hasTag( "hide" ) succeeded for: true TestMain.cpp:419: oneTag.isHidden() succeeded for: true TestMain.cpp:421: oneTag.matchesTags( "~[hide]" ) == false succeeded for: false == false -[End of section: 'hidden' All 4 assertions passed] +[Summary for section 'hidden': All 4 assertions passed] -[Finished: 'selftest/tags' All tests passed (29 assertions in 1 test case)] +[Summary for test case 'selftest/tags': All tests passed (29 assertions in 1 test case)] -[Running: ./succeeding/Tricky/std::pair] +[Test case: './succeeding/Tricky/std::pair'] TrickyTests.cpp:37: (std::pair( 1, 2 )) == aNicePair succeeded for: std::pair( 1, 2 ) == std::pair( 1, 2 ) -[Finished: './succeeding/Tricky/std::pair' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/Tricky/std::pair': All tests passed (1 assertion in 1 test case)] -[Running: ./inprogress/failing/Tricky/trailing expression] +[Test case: './inprogress/failing/Tricky/trailing expression'] TrickyTests.cpp:55: [warning: Uncomment the code in this test to check that it gives a sensible compiler error] No assertions in test case, './inprogress/failing/Tricky/trailing expression' -[Finished: './inprogress/failing/Tricky/trailing expression' 1 test case failed (1 assertion failed)] +[Summary for test case './inprogress/failing/Tricky/trailing expression': 1 test case failed (1 assertion failed)] -[Running: ./inprogress/failing/Tricky/compound lhs] +[Test case: './inprogress/failing/Tricky/compound lhs'] TrickyTests.cpp:71: [warning: Uncomment the code in this test to check that it gives a sensible compiler error] No assertions in test case, './inprogress/failing/Tricky/compound lhs' -[Finished: './inprogress/failing/Tricky/compound lhs' 1 test case failed (1 assertion failed)] +[Summary for test case './inprogress/failing/Tricky/compound lhs': 1 test case failed (1 assertion failed)] -[Running: ./failing/Tricky/non streamable type] +[Test case: './failing/Tricky/non streamable type'] TrickyTests.cpp:95: &o1 == &o2 failed for: 0x == 0x TrickyTests.cpp:96: o1 == o2 failed for: {?} == {?} -[Finished: './failing/Tricky/non streamable type' 1 test case failed (All 2 assertions failed)] +[Summary for test case './failing/Tricky/non streamable type': 1 test case failed (All 2 assertions failed)] -[Running: ./failing/string literals] +[Test case: './failing/string literals'] TrickyTests.cpp:106: std::string( "first" ) == "second" failed for: "first" == "second" -[Finished: './failing/string literals' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/string literals': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/side-effects] +[Test case: './succeeding/side-effects'] TrickyTests.cpp:119: i++ == 7 succeeded for: 7 == 7 TrickyTests.cpp:120: i++ == 8 succeeded for: 8 == 8 -[Finished: './succeeding/side-effects' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/side-effects': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/koenig] +[Test case: './succeeding/koenig'] TrickyTests.cpp:186: 0x == o succeeded for: 0x == {?} -[Finished: './succeeding/koenig' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/koenig': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/non-const==] +[Test case: './succeeding/non-const=='] TrickyTests.cpp:212: t == 1u succeeded for: {?} == 1 -[Finished: './succeeding/non-const==' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/non-const==': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/enum/bits] +[Test case: './succeeding/enum/bits'] TrickyTests.cpp:224: 0x == bit30and31 succeeded for: 0x == 3221225472 -[Finished: './succeeding/enum/bits' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/enum/bits': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/boolean member] +[Test case: './succeeding/boolean member'] TrickyTests.cpp:239: obj.prop != __null succeeded for: 0x != 0 -[Finished: './succeeding/boolean member' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/boolean member': All tests passed (1 assertion in 1 test case)] -[Running: ./succeeding/unimplemented static bool] -[Started section: 'compare to true'] +[Test case: './succeeding/unimplemented static bool'] +[Section: 'compare to true'] TrickyTests.cpp:259: is_true::value == true succeeded for: true == true TrickyTests.cpp:260: true == is_true::value succeeded for: true == true -[End of section: 'compare to true' All 2 assertions passed] +[Summary for section 'compare to true': All 2 assertions passed] -[Started section: 'compare to false'] +[Section: 'compare to false'] TrickyTests.cpp:264: is_true::value == false succeeded for: false == false TrickyTests.cpp:265: false == is_true::value succeeded for: false == false -[End of section: 'compare to false' All 2 assertions passed] +[Summary for section 'compare to false': All 2 assertions passed] -[Started section: 'negation'] +[Section: 'negation'] TrickyTests.cpp:270: !is_true::value succeeded for: true -[End of section: 'negation' 1 assertion passed] +[Summary for section 'negation': 1 assertion passed] -[Started section: 'double negation'] +[Section: 'double negation'] TrickyTests.cpp:275: !!is_true::value succeeded for: true -[End of section: 'double negation' 1 assertion passed] +[Summary for section 'double negation': 1 assertion passed] -[Started section: 'direct'] +[Section: 'direct'] TrickyTests.cpp:280: is_true::value succeeded for: true TrickyTests.cpp:281: !is_true::value succeeded for: !false -[End of section: 'direct' All 2 assertions passed] +[Summary for section 'direct': All 2 assertions passed] -[Finished: './succeeding/unimplemented static bool' All tests passed (8 assertions in 1 test case)] +[Summary for test case './succeeding/unimplemented static bool': All tests passed (8 assertions in 1 test case)] -[Running: ./succeeding/SafeBool] +[Test case: './succeeding/SafeBool'] TrickyTests.cpp:313: True succeeded for: true TrickyTests.cpp:314: !False succeeded for: true TrickyTests.cpp:315: !False succeeded for: !false -[Finished: './succeeding/SafeBool' All tests passed (3 assertions in 1 test case)] +[Summary for test case './succeeding/SafeBool': All tests passed (3 assertions in 1 test case)] -[Running: scenario name] -[Started section: 'This stuff exists'] -[Started section: 'I do this'] -[Started section: 'it should do this'] +[Test case: 'scenario name'] +[Section: 'This stuff exists'] +[Section: 'I do this'] +[Section: 'it should do this'] BDDTests.cpp:37: itDoesThis() succeeded for: true -[End of section: 'it should do this' 1 assertion passed] +[Summary for section 'it should do this': 1 assertion passed] -[End of section: 'I do this' 1 assertion passed] +[Summary for section 'I do this': 1 assertion passed] -[End of section: 'This stuff exists' 1 assertion passed] +[Summary for section 'This stuff exists': 1 assertion passed] -[Finished: 'scenario name' All tests passed (1 assertion in 1 test case)] +[Summary for test case 'scenario name': All tests passed (1 assertion in 1 test case)] -[End of group '~dummy'. 44 of 95 test cases failed (101 of 607 assertions failed)] +[Summary for group '~dummy': 44 of 95 test cases failed (101 of 607 assertions failed)] -[Testing completed. 44 of 95 test cases failed (101 of 607 assertions failed)] +[Summary for 'CatchSelfTest': 44 of 95 test cases failed (101 of 607 assertions failed)] [Started testing: CatchSelfTest] -[Started group: '~dummy'] -[Running: ./succeeding/Approx/simple] +[Group: '~dummy'] +[Test case: './succeeding/Approx/simple'] ApproxTests.cpp:20: d == Approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:21: d != Approx( 1.22 ) succeeded for: 1.23 != Approx( 1.22 ) ApproxTests.cpp:22: d != Approx( 1.24 ) succeeded for: 1.23 != Approx( 1.24 ) ApproxTests.cpp:24: Approx( d ) == 1.23 succeeded for: Approx( 1.23 ) == 1.23 ApproxTests.cpp:25: Approx( d ) != 1.22 succeeded for: Approx( 1.23 ) != 1.22 ApproxTests.cpp:26: Approx( d ) != 1.24 succeeded for: Approx( 1.23 ) != 1.24 -[Finished: './succeeding/Approx/simple' All tests passed (6 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/simple': All tests passed (6 assertions in 1 test case)] -[Running: ./succeeding/Approx/epsilon] +[Test case: './succeeding/Approx/epsilon'] ApproxTests.cpp:38: d != Approx( 1.231 ) succeeded for: 1.23 != Approx( 1.231 ) ApproxTests.cpp:39: d == Approx( 1.231 ).epsilon( 0.1 ) succeeded for: 1.23 == Approx( 1.231 ) -[Finished: './succeeding/Approx/epsilon' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/epsilon': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/float] +[Test case: './succeeding/Approx/float'] ApproxTests.cpp:49: 1.23f == Approx( 1.23f ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:50: 0.0f == Approx( 0.0f ) succeeded for: 0 == Approx( 0 ) -[Finished: './succeeding/Approx/float' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/float': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/int] +[Test case: './succeeding/Approx/int'] ApproxTests.cpp:60: 1 == Approx( 1 ) succeeded ApproxTests.cpp:61: 0 == Approx( 0 ) succeeded -[Finished: './succeeding/Approx/int' All tests passed (2 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/int': All tests passed (2 assertions in 1 test case)] -[Running: ./succeeding/Approx/mixed] +[Test case: './succeeding/Approx/mixed'] ApproxTests.cpp:75: 1.0f == Approx( 1 ) succeeded for: 1 == Approx( 1 ) ApproxTests.cpp:76: 0 == Approx( dZero) succeeded for: 0 == Approx( 0 ) ApproxTests.cpp:77: 0 == Approx( dSmall ).epsilon( 0.001 ) succeeded for: 0 == Approx( 1e-05 ) ApproxTests.cpp:78: 1.234f == Approx( dMedium ) succeeded for: 1.234 == Approx( 1.234 ) ApproxTests.cpp:79: dMedium == Approx( 1.234f ) succeeded for: 1.234 == Approx( 1.234 ) -[Finished: './succeeding/Approx/mixed' All tests passed (5 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/mixed': All tests passed (5 assertions in 1 test case)] -[Running: ./succeeding/Approx/custom] +[Test case: './succeeding/Approx/custom'] ApproxTests.cpp:93: d == approx( 1.23 ) succeeded for: 1.23 == Approx( 1.23 ) ApproxTests.cpp:94: d == approx( 1.22 ) succeeded for: 1.23 == Approx( 1.22 ) ApproxTests.cpp:95: d == approx( 1.24 ) succeeded for: 1.23 == Approx( 1.24 ) @@ -1381,25 +1381,25 @@ ApproxTests.cpp:98: approx( d ) == 1.23 succeeded for: Approx( 1.23 ) == 1.23 ApproxTests.cpp:99: approx( d ) == 1.22 succeeded for: Approx( 1.23 ) == 1.22 ApproxTests.cpp:100: approx( d ) == 1.24 succeeded for: Approx( 1.23 ) == 1.24 ApproxTests.cpp:101: approx( d ) != 1.25 succeeded for: Approx( 1.23 ) != 1.25 -[Finished: './succeeding/Approx/custom' All tests passed (8 assertions in 1 test case)] +[Summary for test case './succeeding/Approx/custom': All tests passed (8 assertions in 1 test case)] -[Running: ./succeeding/TestClass/succeedingCase] +[Test case: './succeeding/TestClass/succeedingCase'] ClassTests.cpp:24: s == "hello" succeeded for: "hello" == "hello" -[Finished: './succeeding/TestClass/succeedingCase' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/TestClass/succeedingCase': All tests passed (1 assertion in 1 test case)] -[Running: ./failing/TestClass/failingCase] +[Test case: './failing/TestClass/failingCase'] ClassTests.cpp:28: s == "world" failed for: "hello" == "world" -[Finished: './failing/TestClass/failingCase' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/TestClass/failingCase': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/Fixture/succeedingCase] +[Test case: './succeeding/Fixture/succeedingCase'] ClassTests.cpp:47: m_a == 1 succeeded for: 1 == 1 -[Finished: './succeeding/Fixture/succeedingCase' All tests passed (1 assertion in 1 test case)] +[Summary for test case './succeeding/Fixture/succeedingCase': All tests passed (1 assertion in 1 test case)] -[Running: ./failing/Fixture/failingCase] +[Test case: './failing/Fixture/failingCase'] ClassTests.cpp:55: m_a == 2 failed for: 1 == 2 -[Finished: './failing/Fixture/failingCase' 1 test case failed (1 assertion failed)] +[Summary for test case './failing/Fixture/failingCase': 1 test case failed (1 assertion failed)] -[Running: ./succeeding/conditions/equality] +[Test case: './succeeding/conditions/equality'] ConditionTests.cpp:55: data.int_seven == 7 succeeded for: 7 == 7 ConditionTests.cpp:56: data.float_nine_point_one == Approx( 9.1f ) succeeded for: 9.1 == Approx( 9.1 ) ConditionTests.cpp:57: data.double_pi == Approx( 3.1415926535 ) succeeded for: 3.14159 == Approx( 3.14159 ) @@ -1407,16 +1407,16 @@ ConditionTests.cpp:58: data.str_hello == "hello" succeeded for: "hello" == "hell ConditionTests.cpp:59: "hello" == data.str_hello succeeded for: "hello" == "hello" ConditionTests.cpp:60: data.str_hello.size() == 5 succeeded for: 5 == 5 ConditionTests.cpp:63: x == Approx( 1.3 ) succeeded for: 1.3 == Approx( 1.3 ) -[Finished: './succeeding/conditions/equality' All tests passed (7 assertions in 1 test case)] +[Summary for test case './succeeding/conditions/equality': All tests passed (7 assertions in 1 test case)] -[Running: ./failing/conditions/equality] +[Test case: './failing/conditions/equality'] ConditionTests.cpp:71: data.int_seven == 6 failed for: 7 == 6 ConditionTests.cpp:72: data.int_seven == 8 failed for: 7 == 8 -[Finished: './failing/conditions/equality' 1 test case failed (All 2 assertions failed)] +[Summary for test case './failing/conditions/equality': 1 test case failed (All 2 assertions failed)] -[End of group '~dummy'. 3 of 12 test cases failed (4 of 38 assertions failed)] +[Summary for group '~dummy': 3 of 12 test cases failed (4 of 38 assertions failed)] -[Testing completed. 3 of 12 test cases failed (4 of 38 assertions failed)] +[Summary for 'CatchSelfTest': 3 of 12 test cases failed (4 of 38 assertions failed)] @@ -5691,10 +5691,10 @@ TestMain.cpp" line="169"> TestMain.cpp" line="171"> - config.reporter == "basic" + config.reporter == "console" - "basic" == "basic" + "console" == "console" diff --git a/projects/SelfTest/TestMain.cpp b/projects/SelfTest/TestMain.cpp index 2111ac22..064027b0 100644 --- a/projects/SelfTest/TestMain.cpp +++ b/projects/SelfTest/TestMain.cpp @@ -165,10 +165,10 @@ TEST_CASE( "selftest/parser/2", "ConfigData" ) { SECTION( "reporter", "" ) { SECTION( "-r/basic", "" ) { - const char* argv[] = { "test", "-r", "basic" }; + const char* argv[] = { "test", "-r", "console" }; CHECK_NOTHROW( parseIntoConfig( argv, config ) ); - REQUIRE( config.reporter == "basic" ); + REQUIRE( config.reporter == "console" ); } SECTION( "-r/xml", "" ) { const char* argv[] = { "test", "-r", "xml" }; diff --git a/projects/SelfTest/catch_self_test.hpp b/projects/SelfTest/catch_self_test.hpp index eeaff6e4..9454e221 100644 --- a/projects/SelfTest/catch_self_test.hpp +++ b/projects/SelfTest/catch_self_test.hpp @@ -53,7 +53,7 @@ namespace Catch { EmbeddedRunner() : m_reporter( new NullStreamingReporter() ) {} Totals runMatching( const std::string& rawTestSpec, - const std::string& reporter = "basic" ); + const std::string& reporter = "console" ); private: Ptr m_reporter; diff --git a/single_include/catch.hpp b/single_include/catch.hpp index 9e04ac30..aa49a4c6 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v0.9 build 9 (integration branch) - * Generated: 2012-12-06 08:42:33.813351 + * CATCH v0.9 build 10 (integration branch) + * Generated: 2012-12-10 08:54:04.228540 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -1990,12 +1990,14 @@ namespace Catch struct ThreadedSectionInfo : SectionInfo, SharedImpl<> { ThreadedSectionInfo( SectionInfo const& _sectionInfo, Ptr const& _parent = Ptr() ) : SectionInfo( _sectionInfo ), - parent( _parent ) + parent( _parent ), + printed( false ) {} virtual ~ThreadedSectionInfo(); std::vector > children; Ptr parent; + bool printed; }; struct AssertionStats : SharedImpl<> { @@ -2110,7 +2112,8 @@ namespace Catch struct AccumulatingReporter : SharedImpl { AccumulatingReporter( ReporterConfig const& _config ) - : stream( _config.stream() ) + : m_config( _config ), + stream( _config.stream() ) {} virtual ~AccumulatingReporter(); @@ -2151,6 +2154,7 @@ namespace Catch virtual void testRunEnded( Ptr const& /* _testRunStats */ ) { } + ReporterConfig m_config; Option testRunInfo; Option unusedGroupInfo; Option unusedTestCaseInfo; @@ -4595,7 +4599,7 @@ namespace Catch { } void makeReporter() { std::string reporterName = m_config.reporter.empty() - ? "basic" + ? "console" : m_config.reporter; ReporterConfig reporterConfig( m_configWrapper.stream(), m_config ); @@ -5706,7 +5710,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 9, "integration" ); + Version libraryVersion( 0, 9, 10, "integration" ); } // #included from: ../reporters/catch_reporter_basic.hpp @@ -6710,26 +6714,28 @@ namespace Catch { void lazyPrintGroupInfo() { if( !unusedGroupInfo->name.empty() ) stream << "[Group: '" << unusedGroupInfo->name << "']" << std::endl; +// stream << "[Started group: '" << unusedGroupInfo->name << "']" << std::endl; unusedGroupInfo.reset(); } void lazyPrintTestCaseInfo() { stream << "[Test case: '" << unusedTestCaseInfo->name << "']" << std::endl; +// stream << "[Running: " << unusedTestCaseInfo->name << "]" << std::endl; unusedTestCaseInfo.reset(); } - std::string makeSectionPath( ThreadedSectionInfo const * section, std::string const& delimiter ) { - std::string sectionPath = "'" + section->name + "'"; - while( ( section = section->parent.get() ) ) - sectionPath = "'" + section->name + "'" + delimiter + sectionPath; - return sectionPath; - } + void lazyPrintSectionInfo() { - ThreadedSectionInfo* section = unusedSectionInfo.get(); + std::vector sections; + for( ThreadedSectionInfo* section = unusedSectionInfo.get(); + section && !section->printed; + section = section->parent.get() ) + sections.push_back( section ); - std::string sectionPath = makeSectionPath( section, ", " ); - if( sectionPath.size() > 60 ) - sectionPath = makeSectionPath( section, ",\n " ); - - stream << "[Section: " << sectionPath << "]" << std::endl; + typedef std::vector::const_reverse_iterator It; + for( It it = sections.rbegin(), itEnd = sections.rend(); it != itEnd; ++it ) { +// stream << "[Started section: " << "'" + (*it)->name + "'" << "]" << std::endl; + stream << "[Section: " << "'" + (*it)->name + "'" << "]" << std::endl; + (*it)->printed = true; + } unusedSectionInfo.reset(); } void lazyPrint() { @@ -6739,15 +6745,132 @@ namespace Catch { lazyPrintGroupInfo(); if( unusedTestCaseInfo ) lazyPrintTestCaseInfo(); - if( unusedSectionInfo ) + if( currentSectionInfo && !currentSectionInfo->printed ) lazyPrintSectionInfo(); } - virtual void assertionStarting( AssertionInfo const& _assertionInfo ) { + virtual void assertionStarting( AssertionInfo const& ) { } virtual void assertionEnded( Ptr const& _assertionStats ) { - if( !_assertionStats->assertionResult.isOk() ) - lazyPrint(); + + AssertionResult const& result = _assertionStats->assertionResult; + + // Drop out if result was successful and we're not printing those + if( !m_config.includeSuccessfulResults() && result.isOk() ) + return; + + lazyPrint(); + + if( !result.getSourceInfo().empty() ) { + TextColour colour( TextColour::FileName ); + stream << result.getSourceInfo(); + } + + if( result.hasExpression() ) { + TextColour colour( TextColour::OriginalExpression ); + stream << result.getExpression(); + if( result.succeeded() ) { + TextColour successColour( TextColour::Success ); + stream << " succeeded"; + } + else { + TextColour errorColour( TextColour::Error ); + stream << " failed"; + if( result.isOk() ) { + TextColour okAnywayColour( TextColour::Success ); + stream << " - but was ok"; + } + } + } + + switch( result.getResultType() ) { + case ResultWas::ThrewException: + { + TextColour colour( TextColour::Error ); + if( result.hasExpression() ) + stream << " with unexpected"; + else + stream << "Unexpected"; + stream << " exception with message: '" << result.getMessage() << "'"; + } + break; + case ResultWas::DidntThrowException: + { + TextColour colour( TextColour::Error ); + if( result.hasExpression() ) + stream << " because no exception was thrown where one was expected"; + else + stream << "No exception thrown where one was expected"; + } + break; + case ResultWas::Info: + { + TextColour colour( TextColour::ReconstructedExpression ); + streamVariableLengthText( "info", result.getMessage() ); + } + break; + case ResultWas::Warning: + { + TextColour colour( TextColour::ReconstructedExpression ); + streamVariableLengthText( "warning", result.getMessage() ); + } + break; + case ResultWas::ExplicitFailure: + { + TextColour colour( TextColour::Error ); + stream << "failed with message: '" << result.getMessage() << "'"; + } + break; + case ResultWas::Unknown: // These cases are here to prevent compiler warnings + case ResultWas::Ok: + case ResultWas::FailureBit: + case ResultWas::ExpressionFailed: + case ResultWas::Exception: + if( !result.hasExpression() ) { + if( result.succeeded() ) { + TextColour colour( TextColour::Success ); + stream << " succeeded"; + } + else { + TextColour colour( TextColour::Error ); + stream << " failed"; + if( result.isOk() ) { + TextColour okAnywayColour( TextColour::Success ); + stream << " - but was ok"; + } + } + } + if( result.hasMessage() ) { + stream << "\n"; + TextColour colour( TextColour::ReconstructedExpression ); + streamVariableLengthText( "with message", result.getMessage() ); + } + break; + } + + if( result.hasExpandedExpression() ) { + stream << " for: "; + if( result.getExpandedExpression().size() > 40 ) { + stream << "\n"; + if( result.getExpandedExpression().size() < 70 ) + stream << "\t"; + } + TextColour colour( TextColour::ReconstructedExpression ); + stream << result.getExpandedExpression(); + } + + stream << std::endl; + } + + void streamVariableLengthText( std::string const& prefix, std::string const& text ) { + std::string trimmed = trim( text ); + if( trimmed.find_first_of( "\r\n" ) == std::string::npos ) { + stream << "[" << prefix << ": " << trimmed << "]"; + } + else { + stream << "\n[" << prefix << "] >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>\n" << trimmed + << "\n[end of " << prefix << "] <<<<<<<<<<<<<<<<<<<<<<<<\n"; + } } void printAssertionCounts( std::string const& label, Counts const& counts, std::string const& allPrefix = "All " ) { @@ -6779,27 +6902,58 @@ namespace Catch { } virtual void sectionEnded( Ptr const& _sectionStats ) { - if( !unusedSectionInfo ) { + if( _sectionStats->missingAssertions ) { + lazyPrint(); + TextColour colour( TextColour::ResultError ); + stream << "\nNo assertions in section, '" << _sectionStats->sectionInfo.name << "'\n" << std::endl; + } + if( currentSectionInfo && currentSectionInfo->printed ) { stream << "[Summary for section '" << _sectionStats->sectionInfo.name << "': "; - printAssertionCounts( "assertion", _sectionStats->assertions ); +// stream << "[End of section: '" << _sectionStats->sectionInfo.name << "' "; + Counts const& assertions = _sectionStats->assertions; + if( assertions.failed ) { + TextColour colour( TextColour::ResultError ); + printAssertionCounts( "assertion", assertions ); + } + else { + TextColour colour( TextColour::ResultSuccess ); + stream << ( assertions.passed > 1 ? "All " : "" ) + << pluralise( assertions.passed, "assertion" ) << " passed" ; + } stream << "]\n" << std::endl; } AccumulatingReporter::sectionEnded( _sectionStats ); } virtual void testCaseEnded( Ptr const& _testCaseStats ) { + if( _testCaseStats->missingAssertions ) { + lazyPrint(); + TextColour colour( TextColour::ResultError ); + stream << "\nNo assertions in test case, '" << _testCaseStats->testInfo.name << "'\n" << std::endl; + } if( !unusedTestCaseInfo ) { stream << "[Summary for test case '" << _testCaseStats->testInfo.name << "': "; +// stream << "[Finished: '" << _testCaseStats->testInfo.name << "' "; printTotals( _testCaseStats->totals ); stream << "]\n" << std::endl; } AccumulatingReporter::testCaseEnded( _testCaseStats ); } virtual void testGroupEnded( Ptr const& _testGroupStats ) { - // !TBD + if( !unusedGroupInfo ) { + stream << "[Summary for group '" << _testGroupStats->groupInfo.name << "': "; +// stream << "[End of group '" << _testGroupStats->groupInfo.name << "'. "; + printTotals( _testGroupStats->totals ); + stream << "]\n" << std::endl; + } AccumulatingReporter::testGroupEnded( _testGroupStats ); } virtual void testRunEnded( Ptr const& _testRunStats ) { - // !TBD + if( !unusedTestCaseInfo ) { + stream << "[Summary for '" << _testRunStats->runInfo.name << "': "; +// stream << "[Testing completed. "; + printTotals( _testRunStats->totals ); + stream << "]\n" << std::endl; + } AccumulatingReporter::testRunEnded( _testRunStats ); }