From 767f1588dc208ef6b22b83e18e645786770ce204 Mon Sep 17 00:00:00 2001 From: Phil Nash Date: Mon, 4 Mar 2013 12:19:15 +0100 Subject: [PATCH] Added StringMaker (for partially specialising string conversions), extended BDD macros and moved file/line info to top of message. Re-enable ANSI colour by default - hopefully properly excluding Windows this time --- README | 2 +- generateSingleHeader.py | 9 +- .../internal/catch_console_colour_impl.hpp | 13 +- .../catch_expressionresult_builder.hpp | 6 +- include/internal/catch_runner_impl.hpp | 2 +- include/internal/catch_running_test.hpp | 8 +- include/internal/catch_tostring.hpp | 62 +- include/internal/catch_version.hpp | 2 +- include/reporters/catch_reporter_console.hpp | 9 +- projects/SelfTest/ApproxTests.cpp | 9 + .../SelfTest/Baselines/approvedResults.txt | 1589 ++++++++--------- .../CatchSelfTest.xcodeproj/project.pbxproj | 2 - .../CatchSelfTest/CatchSelfTest/BDDTests.cpp | 13 +- single_include/catch.hpp | 98 +- 14 files changed, 952 insertions(+), 872 deletions(-) diff --git a/README b/README index be0d2fa0..b3cb66b9 100644 --- a/README +++ b/README @@ -1,4 +1,4 @@ -CATCH v0.9 build 20 (integration branch) +CATCH v0.9 build 21 (integration branch) --------------------------------------------- CATCH is an automated test framework for C, C++ and Objective-C. diff --git a/generateSingleHeader.py b/generateSingleHeader.py index caec29bd..ea16a1b7 100644 --- a/generateSingleHeader.py +++ b/generateSingleHeader.py @@ -17,6 +17,8 @@ versionPath = os.path.join( rootPath, "internal/catch_version.hpp" ) readmePath = os.path.join( catchPath, "README" ) #outputPath = os.path.join( catchPath, 'single_include/catch.hpp' ) +bumpVersion = len(sys.argv) < 2 or sys.argv[1] <> "nobump" + def parseFile( path, filename ): f = open( path + filename, 'r' ) blanks = 0 @@ -86,9 +88,10 @@ class Version: def generateSingleInclude(): v = Version() - v.incrementBuildNumber() - v.updateVersionFile() - v.updateReadmeFile() + if bumpVersion: + v.incrementBuildNumber() + v.updateVersionFile() + v.updateReadmeFile() print "/*" print " * CATCH v{0}.{1} build {2} ({3} branch)".format( v.majorVersion, v.minorVersion, v.buildNumber, v.branchName ) print " * Generated: " + str( datetime.datetime.now() ) diff --git a/include/internal/catch_console_colour_impl.hpp b/include/internal/catch_console_colour_impl.hpp index 340628d6..d3b1c12c 100644 --- a/include/internal/catch_console_colour_impl.hpp +++ b/include/internal/catch_console_colour_impl.hpp @@ -10,6 +10,10 @@ #include "catch_console_colour.hpp" +#if !defined(CATCH_CONFIG_USE_ANSI_COLOUR_CODES) && !defined(CATCH_PLATFORM_WINDOWS) +#define CATCH_CONFIG_USE_ANSI_COLOUR_CODES 1 +#endif + #if defined( CATCH_CONFIG_USE_ANSI_COLOUR_CODES ) #include @@ -31,8 +35,15 @@ namespace Catch { namespace { const char colourEscape = '\033'; } + inline bool shouldUseColour() { + static bool s_shouldUseColour + = CATCH_CONFIG_USE_ANSI_COLOUR_CODES != 0 && + isatty( fileno(stdout) ) && + !isDebuggerActive(); + return s_shouldUseColour; + } void TextColour::set( Colours colour ) { - if( isatty( fileno(stdout) ) && !isDebuggerActive() ) { + if( shouldUseColour() ) { switch( colour ) { case TextColour::FileName: std::cout << colourEscape << "[0m"; // white/ normal diff --git a/include/internal/catch_expressionresult_builder.hpp b/include/internal/catch_expressionresult_builder.hpp index f0a8cccc..a0921c9a 100644 --- a/include/internal/catch_expressionresult_builder.hpp +++ b/include/internal/catch_expressionresult_builder.hpp @@ -82,12 +82,10 @@ namespace Catch { else if( m_exprComponents.op == "matches" ) return m_exprComponents.lhs + " " + m_exprComponents.rhs; else if( m_exprComponents.op != "!" ) { - if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 30 ) + if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 ) return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs; - else if( m_exprComponents.lhs.size() < 70 && m_exprComponents.rhs.size() < 70 ) - return "\n\t" + m_exprComponents.lhs + "\n\t" + m_exprComponents.op + "\n\t" + m_exprComponents.rhs; else - return "\n" + m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs + "\n\n"; + return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs; } else return "{can't expand - use " + info.macroName + "_FALSE( " + info.capturedExpression.substr(1) + " ) instead of " + info.macroName + "( " + info.capturedExpression + " ) for better diagnostics}"; diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp index a699057f..2dcf92ae 100644 --- a/include/internal/catch_runner_impl.hpp +++ b/include/internal/catch_runner_impl.hpp @@ -216,7 +216,7 @@ namespace Catch { missingAssertions = true; } - m_runningTest->endSection( info.name ); + m_runningTest->endSection( info.name, false ); m_reporter->sectionEnded( SectionStats( info, assertions, missingAssertions ) ); m_messages.clear(); diff --git a/include/internal/catch_running_test.hpp b/include/internal/catch_running_test.hpp index 0b234c09..88ac27d8 100644 --- a/include/internal/catch_running_test.hpp +++ b/include/internal/catch_running_test.hpp @@ -78,13 +78,15 @@ namespace Catch { return false; } - void endSection( const std::string& ) { + void endSection( const std::string&, bool stealth ) { if( m_currentSection->ran() ) { - m_runStatus = RanAtLeastOneSection; + if( !stealth ) + m_runStatus = RanAtLeastOneSection; m_changed = true; } else if( m_runStatus == EncounteredASection ) { - m_runStatus = RanAtLeastOneSection; + if( !stealth ) + m_runStatus = RanAtLeastOneSection; m_lastSectionToRun = m_currentSection; } m_currentSection = m_currentSection->getParent(); diff --git a/include/internal/catch_tostring.hpp b/include/internal/catch_tostring.hpp index b6802af9..ef9b5efc 100644 --- a/include/internal/catch_tostring.hpp +++ b/include/internal/catch_tostring.hpp @@ -10,6 +10,8 @@ #include "catch_common.h" #include +#include +#include #ifdef __OBJC__ #include "catch_objc_arc.hpp" @@ -22,37 +24,53 @@ namespace Detail { template NonStreamable( const T& ){} }; - // If the type does not have its own << overload for ostream then - // this one will be used instead - inline std::ostream& operator << ( std::ostream& ss, NonStreamable ){ - return ss << "{?}"; - } - - template - inline std::string makeString( const T& value ) { +} // end namespace Detail + +// If the type does not have its own << overload for ostream then +// this one will be used instead +inline std::ostream& operator << ( std::ostream& ss, Detail::NonStreamable ){ + return ss << "{?}"; +} + +template +struct StringMaker { + static std::string convert( T const& value ) { std::ostringstream oss; oss << value; return oss.str(); - } - - template - inline std::string makeString( T* p ) { + } +}; +template +struct StringMaker { + static std::string convert( T const* p ) { if( !p ) return INTERNAL_CATCH_STRINGIFY( NULL ); std::ostringstream oss; oss << p; return oss.str(); - } + } +}; - template - inline std::string makeString( const T* p ) { - if( !p ) - return INTERNAL_CATCH_STRINGIFY( NULL ); +template +struct StringMaker > { + static std::string convert( std::vector const& v ) { std::ostringstream oss; - oss << p; + oss << "{ "; + for( std::size_t i = 0; i < v.size(); ++ i ) { + oss << v[i]; + if( i < v.size() - 1 ) + oss << ", "; + } + oss << " }"; return oss.str(); - } + } +}; +namespace Detail { + template + inline std::string makeString( const T& value ) { + return StringMaker::convert( value ); + } } // end namespace Detail /// \brief converts any type to a string @@ -64,7 +82,8 @@ namespace Detail { /// to provide an ostream overload for. template std::string toString( const T& value ) { - return Detail::makeString( value ); + return StringMaker::convert( value ); +// return Detail::makeString( value ); } // Built in overloads @@ -111,7 +130,8 @@ inline std::string toString( unsigned int value ) { inline std::string toString( const double value ) { std::ostringstream oss; - oss << value; + oss << std::setprecision (std::numeric_limits::digits10 + 1) + << value; return oss.str(); } diff --git a/include/internal/catch_version.hpp b/include/internal/catch_version.hpp index b272246c..15dc2633 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, 20, "integration" ); + Version libraryVersion( 0, 9, 21, "integration" ); } #endif // TWOBLUECUBES_CATCH_VERSION_HPP_INCLUDED diff --git a/include/reporters/catch_reporter_console.hpp b/include/reporters/catch_reporter_console.hpp index 3acfb8e9..bb7fc236 100644 --- a/include/reporters/catch_reporter_console.hpp +++ b/include/reporters/catch_reporter_console.hpp @@ -174,13 +174,18 @@ namespace Catch { } void print() const { + printSourceInfo(); if( stats.totals.assertions.total() > 0 ) { + if( result.isOk() ) + stream << "\n"; printResultType(); printOriginalExpression(); printReconstructedExpression(); } + else { + stream << "\n"; + } printMessage(); - printSourceInfo(); } private: @@ -222,7 +227,7 @@ namespace Catch { } void printSourceInfo() const { TextColour colourGuard( TextColour::FileName ); - stream << result.getSourceInfo() << ":\n"; + stream << result.getSourceInfo() << ": "; } static std::string wrapLongStrings( std::string const& _string ){ diff --git a/projects/SelfTest/ApproxTests.cpp b/projects/SelfTest/ApproxTests.cpp index 5101c865..acf96c99 100644 --- a/projects/SelfTest/ApproxTests.cpp +++ b/projects/SelfTest/ApproxTests.cpp @@ -101,3 +101,12 @@ TEST_CASE REQUIRE( approx( d ) != 1.25 ); } +inline double divide( double a, double b ) { + return a/b; +} + +TEST_CASE( "Approximate PI", "[Approx][PI]" ) +{ + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ); + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ); +} diff --git a/projects/SelfTest/Baselines/approvedResults.txt b/projects/SelfTest/Baselines/approvedResults.txt index 96f71267..6e83e3b4 100644 --- a/projects/SelfTest/Baselines/approvedResults.txt +++ b/projects/SelfTest/Baselines/approvedResults.txt @@ -1,1074 +1,1037 @@ -CatchSelfTest is a CATCH v0.9 b19 (integration) host application. +CatchSelfTest is a CATCH v0.9 b21 (integration) host application. Run with -? for options ------------------------------------------------------------------------------- ./succeeding/Approx/simple ............................................................................... +ApproxTests.cpp:20: PASSED: REQUIRE( d == Approx( 1.23 ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:20: +ApproxTests.cpp:21: PASSED: REQUIRE( d != Approx( 1.22 ) ) with expansion: 1.23 != Approx( 1.22 ) -ApproxTests.cpp:21: +ApproxTests.cpp:22: PASSED: REQUIRE( d != Approx( 1.24 ) ) with expansion: 1.23 != Approx( 1.24 ) -ApproxTests.cpp:22: +ApproxTests.cpp:24: PASSED: REQUIRE( Approx( d ) == 1.23 ) with expansion: Approx( 1.23 ) == 1.23 -ApproxTests.cpp:24: +ApproxTests.cpp:25: PASSED: REQUIRE( Approx( d ) != 1.22 ) with expansion: Approx( 1.23 ) != 1.22 -ApproxTests.cpp:25: +ApproxTests.cpp:26: PASSED: REQUIRE( Approx( d ) != 1.24 ) with expansion: Approx( 1.23 ) != 1.24 -ApproxTests.cpp:26: ------------------------------------------------------------------------------- ./succeeding/Approx/epsilon ............................................................................... +ApproxTests.cpp:38: PASSED: REQUIRE( d != Approx( 1.231 ) ) with expansion: 1.23 != Approx( 1.231 ) -ApproxTests.cpp:38: +ApproxTests.cpp:39: PASSED: REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) with expansion: 1.23 == Approx( 1.231 ) -ApproxTests.cpp:39: ------------------------------------------------------------------------------- ./succeeding/Approx/float ............................................................................... +ApproxTests.cpp:49: PASSED: REQUIRE( 1.23f == Approx( 1.23f ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:49: +ApproxTests.cpp:50: PASSED: REQUIRE( 0.0f == Approx( 0.0f ) ) with expansion: 0 == Approx( 0 ) -ApproxTests.cpp:50: ------------------------------------------------------------------------------- ./succeeding/Approx/int ............................................................................... +ApproxTests.cpp:60: PASSED: REQUIRE( 1 == Approx( 1 ) ) -ApproxTests.cpp:60: +ApproxTests.cpp:61: PASSED: REQUIRE( 0 == Approx( 0 ) ) -ApproxTests.cpp:61: ------------------------------------------------------------------------------- ./succeeding/Approx/mixed ............................................................................... +ApproxTests.cpp:75: PASSED: REQUIRE( 1.0f == Approx( 1 ) ) with expansion: 1 == Approx( 1 ) -ApproxTests.cpp:75: +ApproxTests.cpp:76: PASSED: REQUIRE( 0 == Approx( dZero) ) with expansion: 0 == Approx( 0 ) -ApproxTests.cpp:76: +ApproxTests.cpp:77: PASSED: REQUIRE( 0 == Approx( dSmall ).epsilon( 0.001 ) ) with expansion: 0 == Approx( 1e-05 ) -ApproxTests.cpp:77: +ApproxTests.cpp:78: PASSED: REQUIRE( 1.234f == Approx( dMedium ) ) with expansion: 1.234 == Approx( 1.234 ) -ApproxTests.cpp:78: +ApproxTests.cpp:79: PASSED: REQUIRE( dMedium == Approx( 1.234f ) ) with expansion: 1.234 == Approx( 1.234 ) -ApproxTests.cpp:79: ------------------------------------------------------------------------------- ./succeeding/Approx/custom ............................................................................... +ApproxTests.cpp:93: PASSED: REQUIRE( d == approx( 1.23 ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:93: +ApproxTests.cpp:94: PASSED: REQUIRE( d == approx( 1.22 ) ) with expansion: 1.23 == Approx( 1.22 ) -ApproxTests.cpp:94: +ApproxTests.cpp:95: PASSED: REQUIRE( d == approx( 1.24 ) ) with expansion: 1.23 == Approx( 1.24 ) -ApproxTests.cpp:95: +ApproxTests.cpp:96: PASSED: REQUIRE( d != approx( 1.25 ) ) with expansion: 1.23 != Approx( 1.25 ) -ApproxTests.cpp:96: +ApproxTests.cpp:98: PASSED: REQUIRE( approx( d ) == 1.23 ) with expansion: Approx( 1.23 ) == 1.23 -ApproxTests.cpp:98: +ApproxTests.cpp:99: PASSED: REQUIRE( approx( d ) == 1.22 ) with expansion: Approx( 1.23 ) == 1.22 -ApproxTests.cpp:99: +ApproxTests.cpp:100: PASSED: REQUIRE( approx( d ) == 1.24 ) with expansion: Approx( 1.23 ) == 1.24 -ApproxTests.cpp:100: +ApproxTests.cpp:101: PASSED: REQUIRE( approx( d ) != 1.25 ) with expansion: Approx( 1.23 ) != 1.25 -ApproxTests.cpp:101: + +------------------------------------------------------------------------------- +Approximate PI +............................................................................... + +ApproxTests.cpp:110: +PASSED: + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) +with expansion: + 3.142857142857143 == Approx( 3.141 ) + +ApproxTests.cpp:111: +PASSED: + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) +with expansion: + 3.142857142857143 != Approx( 3.141 ) ------------------------------------------------------------------------------- ./succeeding/TestClass/succeedingCase ............................................................................... +ClassTests.cpp:24: PASSED: REQUIRE( s == "hello" ) with expansion: "hello" == "hello" -ClassTests.cpp:24: ------------------------------------------------------------------------------- ./failing/TestClass/failingCase ............................................................................... -FAILED: +ClassTests.cpp:28: FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -ClassTests.cpp:28: ------------------------------------------------------------------------------- ./succeeding/Fixture/succeedingCase ............................................................................... +ClassTests.cpp:47: PASSED: REQUIRE( m_a == 1 ) with expansion: 1 == 1 -ClassTests.cpp:47: ------------------------------------------------------------------------------- ./failing/Fixture/failingCase ............................................................................... -FAILED: +ClassTests.cpp:55: FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -ClassTests.cpp:55: ------------------------------------------------------------------------------- ./succeeding/conditions/equality ............................................................................... +ConditionTests.cpp:55: PASSED: REQUIRE( data.int_seven == 7 ) with expansion: 7 == 7 -ConditionTests.cpp:55: +ConditionTests.cpp:56: PASSED: REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) with expansion: 9.1 == Approx( 9.1 ) -ConditionTests.cpp:56: +ConditionTests.cpp:57: PASSED: REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) with expansion: - 3.14159 == Approx( 3.14159 ) -ConditionTests.cpp:57: + 3.1415926535 == Approx( 3.14159 ) +ConditionTests.cpp:58: PASSED: REQUIRE( data.str_hello == "hello" ) with expansion: "hello" == "hello" -ConditionTests.cpp:58: +ConditionTests.cpp:59: PASSED: REQUIRE( "hello" == data.str_hello ) with expansion: "hello" == "hello" -ConditionTests.cpp:59: +ConditionTests.cpp:60: PASSED: REQUIRE( data.str_hello.size() == 5 ) with expansion: 5 == 5 -ConditionTests.cpp:60: +ConditionTests.cpp:63: PASSED: REQUIRE( x == Approx( 1.3 ) ) with expansion: 1.3 == Approx( 1.3 ) -ConditionTests.cpp:63: ------------------------------------------------------------------------------- ./failing/conditions/equality ............................................................................... -FAILED: +ConditionTests.cpp:71: FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -ConditionTests.cpp:71: -FAILED: +ConditionTests.cpp:72: FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -ConditionTests.cpp:72: -FAILED: +ConditionTests.cpp:73: FAILED: CHECK( data.int_seven == 0 ) with expansion: 7 == 0 -ConditionTests.cpp:73: -FAILED: +ConditionTests.cpp:74: FAILED: CHECK( data.float_nine_point_one == Approx( 9.11f ) ) with expansion: 9.1 == Approx( 9.11 ) -ConditionTests.cpp:74: -FAILED: +ConditionTests.cpp:75: FAILED: CHECK( data.float_nine_point_one == Approx( 9.0f ) ) with expansion: 9.1 == Approx( 9 ) -ConditionTests.cpp:75: -FAILED: +ConditionTests.cpp:76: FAILED: CHECK( data.float_nine_point_one == Approx( 1 ) ) with expansion: 9.1 == Approx( 1 ) -ConditionTests.cpp:76: -FAILED: +ConditionTests.cpp:77: FAILED: CHECK( data.float_nine_point_one == Approx( 0 ) ) with expansion: 9.1 == Approx( 0 ) -ConditionTests.cpp:77: -FAILED: +ConditionTests.cpp:78: FAILED: CHECK( data.double_pi == Approx( 3.1415 ) ) with expansion: - 3.14159 == Approx( 3.1415 ) -ConditionTests.cpp:78: + 3.1415926535 == Approx( 3.1415 ) -FAILED: +ConditionTests.cpp:79: FAILED: CHECK( data.str_hello == "goodbye" ) with expansion: "hello" == "goodbye" -ConditionTests.cpp:79: -FAILED: +ConditionTests.cpp:80: FAILED: CHECK( data.str_hello == "hell" ) with expansion: "hello" == "hell" -ConditionTests.cpp:80: -FAILED: +ConditionTests.cpp:81: FAILED: CHECK( data.str_hello == "hello1" ) with expansion: "hello" == "hello1" -ConditionTests.cpp:81: -FAILED: +ConditionTests.cpp:82: FAILED: CHECK( data.str_hello.size() == 6 ) with expansion: 5 == 6 -ConditionTests.cpp:82: -FAILED: +ConditionTests.cpp:85: FAILED: CHECK( x == Approx( 1.301 ) ) with expansion: 1.3 == Approx( 1.301 ) -ConditionTests.cpp:85: ------------------------------------------------------------------------------- ./succeeding/conditions/inequality ............................................................................... +ConditionTests.cpp:93: PASSED: REQUIRE( data.int_seven != 6 ) with expansion: 7 != 6 -ConditionTests.cpp:93: +ConditionTests.cpp:94: PASSED: REQUIRE( data.int_seven != 8 ) with expansion: 7 != 8 -ConditionTests.cpp:94: +ConditionTests.cpp:95: PASSED: REQUIRE( data.float_nine_point_one != Approx( 9.11f ) ) with expansion: 9.1 != Approx( 9.11 ) -ConditionTests.cpp:95: +ConditionTests.cpp:96: PASSED: REQUIRE( data.float_nine_point_one != Approx( 9.0f ) ) with expansion: 9.1 != Approx( 9 ) -ConditionTests.cpp:96: +ConditionTests.cpp:97: PASSED: REQUIRE( data.float_nine_point_one != Approx( 1 ) ) with expansion: 9.1 != Approx( 1 ) -ConditionTests.cpp:97: +ConditionTests.cpp:98: PASSED: REQUIRE( data.float_nine_point_one != Approx( 0 ) ) with expansion: 9.1 != Approx( 0 ) -ConditionTests.cpp:98: +ConditionTests.cpp:99: PASSED: REQUIRE( data.double_pi != Approx( 3.1415 ) ) with expansion: - 3.14159 != Approx( 3.1415 ) -ConditionTests.cpp:99: + 3.1415926535 != Approx( 3.1415 ) +ConditionTests.cpp:100: PASSED: REQUIRE( data.str_hello != "goodbye" ) with expansion: "hello" != "goodbye" -ConditionTests.cpp:100: +ConditionTests.cpp:101: PASSED: REQUIRE( data.str_hello != "hell" ) with expansion: "hello" != "hell" -ConditionTests.cpp:101: +ConditionTests.cpp:102: PASSED: REQUIRE( data.str_hello != "hello1" ) with expansion: "hello" != "hello1" -ConditionTests.cpp:102: +ConditionTests.cpp:103: PASSED: REQUIRE( data.str_hello.size() != 6 ) with expansion: 5 != 6 -ConditionTests.cpp:103: ------------------------------------------------------------------------------- ./failing/conditions/inequality ............................................................................... -FAILED: +ConditionTests.cpp:111: FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -ConditionTests.cpp:111: -FAILED: +ConditionTests.cpp:112: FAILED: CHECK( data.float_nine_point_one != Approx( 9.1f ) ) with expansion: 9.1 != Approx( 9.1 ) -ConditionTests.cpp:112: -FAILED: +ConditionTests.cpp:113: FAILED: CHECK( data.double_pi != Approx( 3.1415926535 ) ) with expansion: - 3.14159 != Approx( 3.14159 ) -ConditionTests.cpp:113: + 3.1415926535 != Approx( 3.14159 ) -FAILED: +ConditionTests.cpp:114: FAILED: CHECK( data.str_hello != "hello" ) with expansion: "hello" != "hello" -ConditionTests.cpp:114: -FAILED: +ConditionTests.cpp:115: FAILED: CHECK( data.str_hello.size() != 5 ) with expansion: 5 != 5 -ConditionTests.cpp:115: ------------------------------------------------------------------------------- ./succeeding/conditions/ordered ............................................................................... +ConditionTests.cpp:124: PASSED: REQUIRE( data.int_seven < 8 ) with expansion: 7 < 8 -ConditionTests.cpp:124: +ConditionTests.cpp:125: PASSED: REQUIRE( data.int_seven > 6 ) with expansion: 7 > 6 -ConditionTests.cpp:125: +ConditionTests.cpp:126: PASSED: REQUIRE( data.int_seven > 0 ) with expansion: 7 > 0 -ConditionTests.cpp:126: +ConditionTests.cpp:127: PASSED: REQUIRE( data.int_seven > -1 ) with expansion: 7 > -1 -ConditionTests.cpp:127: +ConditionTests.cpp:129: PASSED: REQUIRE( data.int_seven >= 7 ) with expansion: 7 >= 7 -ConditionTests.cpp:129: +ConditionTests.cpp:130: PASSED: REQUIRE( data.int_seven >= 6 ) with expansion: 7 >= 6 -ConditionTests.cpp:130: +ConditionTests.cpp:131: PASSED: REQUIRE( data.int_seven <= 7 ) with expansion: 7 <= 7 -ConditionTests.cpp:131: +ConditionTests.cpp:132: PASSED: REQUIRE( data.int_seven <= 8 ) with expansion: 7 <= 8 -ConditionTests.cpp:132: +ConditionTests.cpp:134: PASSED: REQUIRE( data.float_nine_point_one > 9 ) with expansion: 9.1 > 9 -ConditionTests.cpp:134: +ConditionTests.cpp:135: PASSED: REQUIRE( data.float_nine_point_one < 10 ) with expansion: 9.1 < 10 -ConditionTests.cpp:135: +ConditionTests.cpp:136: PASSED: REQUIRE( data.float_nine_point_one < 9.2 ) with expansion: - 9.1 < 9.2 -ConditionTests.cpp:136: + 9.1 < 9.199999999999999 +ConditionTests.cpp:138: PASSED: REQUIRE( data.str_hello <= "hello" ) with expansion: "hello" <= "hello" -ConditionTests.cpp:138: +ConditionTests.cpp:139: PASSED: REQUIRE( data.str_hello >= "hello" ) with expansion: "hello" >= "hello" -ConditionTests.cpp:139: +ConditionTests.cpp:141: PASSED: REQUIRE( data.str_hello < "hellp" ) with expansion: "hello" < "hellp" -ConditionTests.cpp:141: +ConditionTests.cpp:142: PASSED: REQUIRE( data.str_hello < "zebra" ) with expansion: "hello" < "zebra" -ConditionTests.cpp:142: +ConditionTests.cpp:143: PASSED: REQUIRE( data.str_hello > "hellm" ) with expansion: "hello" > "hellm" -ConditionTests.cpp:143: +ConditionTests.cpp:144: PASSED: REQUIRE( data.str_hello > "a" ) with expansion: "hello" > "a" -ConditionTests.cpp:144: ------------------------------------------------------------------------------- ./failing/conditions/ordered ............................................................................... -FAILED: +ConditionTests.cpp:152: FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -ConditionTests.cpp:152: -FAILED: +ConditionTests.cpp:153: FAILED: CHECK( data.int_seven < 7 ) with expansion: 7 < 7 -ConditionTests.cpp:153: -FAILED: +ConditionTests.cpp:154: FAILED: CHECK( data.int_seven > 8 ) with expansion: 7 > 8 -ConditionTests.cpp:154: -FAILED: +ConditionTests.cpp:155: FAILED: CHECK( data.int_seven < 6 ) with expansion: 7 < 6 -ConditionTests.cpp:155: -FAILED: +ConditionTests.cpp:156: FAILED: CHECK( data.int_seven < 0 ) with expansion: 7 < 0 -ConditionTests.cpp:156: -FAILED: +ConditionTests.cpp:157: FAILED: CHECK( data.int_seven < -1 ) with expansion: 7 < -1 -ConditionTests.cpp:157: -FAILED: +ConditionTests.cpp:159: FAILED: CHECK( data.int_seven >= 8 ) with expansion: 7 >= 8 -ConditionTests.cpp:159: -FAILED: +ConditionTests.cpp:160: FAILED: CHECK( data.int_seven <= 6 ) with expansion: 7 <= 6 -ConditionTests.cpp:160: -FAILED: +ConditionTests.cpp:162: FAILED: CHECK( data.float_nine_point_one < 9 ) with expansion: 9.1 < 9 -ConditionTests.cpp:162: -FAILED: +ConditionTests.cpp:163: FAILED: CHECK( data.float_nine_point_one > 10 ) with expansion: 9.1 > 10 -ConditionTests.cpp:163: -FAILED: +ConditionTests.cpp:164: FAILED: CHECK( data.float_nine_point_one > 9.2 ) with expansion: - 9.1 > 9.2 -ConditionTests.cpp:164: + 9.1 > 9.199999999999999 -FAILED: +ConditionTests.cpp:166: FAILED: CHECK( data.str_hello > "hello" ) with expansion: "hello" > "hello" -ConditionTests.cpp:166: -FAILED: +ConditionTests.cpp:167: FAILED: CHECK( data.str_hello < "hello" ) with expansion: "hello" < "hello" -ConditionTests.cpp:167: -FAILED: +ConditionTests.cpp:168: FAILED: CHECK( data.str_hello > "hellp" ) with expansion: "hello" > "hellp" -ConditionTests.cpp:168: -FAILED: +ConditionTests.cpp:169: FAILED: CHECK( data.str_hello > "z" ) with expansion: "hello" > "z" -ConditionTests.cpp:169: -FAILED: +ConditionTests.cpp:170: FAILED: CHECK( data.str_hello < "hellm" ) with expansion: "hello" < "hellm" -ConditionTests.cpp:170: -FAILED: +ConditionTests.cpp:171: FAILED: CHECK( data.str_hello < "a" ) with expansion: "hello" < "a" -ConditionTests.cpp:171: -FAILED: +ConditionTests.cpp:173: FAILED: CHECK( data.str_hello >= "z" ) with expansion: "hello" >= "z" -ConditionTests.cpp:173: -FAILED: +ConditionTests.cpp:174: FAILED: CHECK( data.str_hello <= "a" ) with expansion: "hello" <= "a" -ConditionTests.cpp:174: ------------------------------------------------------------------------------- ./succeeding/conditions/int literals ............................................................................... +ConditionTests.cpp:188: PASSED: REQUIRE( i == 1 ) with expansion: 1 == 1 -ConditionTests.cpp:188: +ConditionTests.cpp:189: PASSED: REQUIRE( ui == 2 ) with expansion: 2 == 2 -ConditionTests.cpp:189: +ConditionTests.cpp:190: PASSED: REQUIRE( l == 3 ) with expansion: 3 == 3 -ConditionTests.cpp:190: +ConditionTests.cpp:191: PASSED: REQUIRE( ul == 4 ) with expansion: 4 == 4 -ConditionTests.cpp:191: +ConditionTests.cpp:192: PASSED: REQUIRE( c == 5 ) with expansion: 5 == 5 -ConditionTests.cpp:192: +ConditionTests.cpp:193: PASSED: REQUIRE( uc == 6 ) with expansion: 6 == 6 -ConditionTests.cpp:193: +ConditionTests.cpp:195: PASSED: REQUIRE( 1 == i ) with expansion: 1 == 1 -ConditionTests.cpp:195: +ConditionTests.cpp:196: PASSED: REQUIRE( 2 == ui ) with expansion: 2 == 2 -ConditionTests.cpp:196: +ConditionTests.cpp:197: PASSED: REQUIRE( 3 == l ) with expansion: 3 == 3 -ConditionTests.cpp:197: +ConditionTests.cpp:198: PASSED: REQUIRE( 4 == ul ) with expansion: 4 == 4 -ConditionTests.cpp:198: +ConditionTests.cpp:199: PASSED: REQUIRE( 5 == c ) with expansion: 5 == 5 -ConditionTests.cpp:199: +ConditionTests.cpp:200: PASSED: REQUIRE( 6 == uc ) with expansion: 6 == 6 -ConditionTests.cpp:200: +ConditionTests.cpp:202: PASSED: REQUIRE( (std::numeric_limits::max)() > ul ) with expansion: 0x > 4 -ConditionTests.cpp:202: ------------------------------------------------------------------------------- ./succeeding/conditions//long_to_unsigned_x ............................................................................... +ConditionTests.cpp:223: PASSED: REQUIRE( long_var == unsigned_char_var ) with expansion: 1 == 1 -ConditionTests.cpp:223: +ConditionTests.cpp:224: PASSED: REQUIRE( long_var == unsigned_short_var ) with expansion: 1 == 1 -ConditionTests.cpp:224: +ConditionTests.cpp:225: PASSED: REQUIRE( long_var == unsigned_int_var ) with expansion: 1 == 1 -ConditionTests.cpp:225: +ConditionTests.cpp:226: PASSED: REQUIRE( long_var == unsigned_long_var ) with expansion: 1 == 1 -ConditionTests.cpp:226: ------------------------------------------------------------------------------- ./succeeding/conditions/const ints to int literal ............................................................................... +ConditionTests.cpp:237: PASSED: REQUIRE( unsigned_char_var == 1 ) with expansion: 1 == 1 -ConditionTests.cpp:237: +ConditionTests.cpp:238: PASSED: REQUIRE( unsigned_short_var == 1 ) with expansion: 1 == 1 -ConditionTests.cpp:238: +ConditionTests.cpp:239: PASSED: REQUIRE( unsigned_int_var == 1 ) with expansion: 1 == 1 -ConditionTests.cpp:239: +ConditionTests.cpp:240: PASSED: REQUIRE( unsigned_long_var == 1 ) with expansion: 1 == 1 -ConditionTests.cpp:240: ------------------------------------------------------------------------------- ./succeeding/conditions/negative ints ............................................................................... +ConditionTests.cpp:246: PASSED: CHECK( ( -1 > 2u ) ) with expansion: true -ConditionTests.cpp:246: +ConditionTests.cpp:247: PASSED: CHECK( -1 > 2u ) with expansion: -1 > 2 -ConditionTests.cpp:247: +ConditionTests.cpp:249: PASSED: CHECK( ( 2u < -1 ) ) with expansion: true -ConditionTests.cpp:249: +ConditionTests.cpp:250: PASSED: CHECK( 2u < -1 ) with expansion: 2 < -1 -ConditionTests.cpp:250: +ConditionTests.cpp:253: PASSED: CHECK( ( minInt > 2u ) ) with expansion: true -ConditionTests.cpp:253: +ConditionTests.cpp:254: PASSED: CHECK( minInt > 2u ) with expansion: -2147483648 > 2 -ConditionTests.cpp:254: ------------------------------------------------------------------------------- ./succeeding/conditions/computed ints ............................................................................... +ConditionTests.cpp:269: PASSED: CHECK( 54 == 6*9 ) with expansion: 54 == 54 -ConditionTests.cpp:269: ------------------------------------------------------------------------------- ./succeeding/conditions/ptr ............................................................................... +ConditionTests.cpp:285: PASSED: REQUIRE( p == __null ) with expansion: __null == 0 -ConditionTests.cpp:285: +ConditionTests.cpp:286: PASSED: REQUIRE( p == pNULL ) with expansion: __null == __null -ConditionTests.cpp:286: +ConditionTests.cpp:291: PASSED: REQUIRE( p != __null ) with expansion: 0x != 0 -ConditionTests.cpp:291: +ConditionTests.cpp:294: PASSED: REQUIRE( cp != __null ) with expansion: 0x != 0 -ConditionTests.cpp:294: +ConditionTests.cpp:297: PASSED: REQUIRE( cpc != __null ) with expansion: 0x != 0 -ConditionTests.cpp:297: +ConditionTests.cpp:299: PASSED: REQUIRE( returnsNull() == __null ) with expansion: {null string} == 0 -ConditionTests.cpp:299: +ConditionTests.cpp:300: PASSED: REQUIRE( returnsConstNull() == __null ) with expansion: {null string} == 0 -ConditionTests.cpp:300: +ConditionTests.cpp:302: PASSED: REQUIRE( __null != p ) with expansion: 0 != 0x -ConditionTests.cpp:302: ------------------------------------------------------------------------------- ./succeeding/conditions/not ............................................................................... +ConditionTests.cpp:317: PASSED: REQUIRE( false == false ) -ConditionTests.cpp:317: +ConditionTests.cpp:318: PASSED: REQUIRE( true == true ) -ConditionTests.cpp:318: +ConditionTests.cpp:319: PASSED: REQUIRE( !false ) with expansion: true -ConditionTests.cpp:319: +ConditionTests.cpp:320: PASSED: REQUIRE_FALSE( !false ) -ConditionTests.cpp:320: +ConditionTests.cpp:322: PASSED: REQUIRE( !falseValue ) with expansion: true -ConditionTests.cpp:322: +ConditionTests.cpp:323: PASSED: REQUIRE_FALSE( !falseValue ) with expansion: !false -ConditionTests.cpp:323: +ConditionTests.cpp:325: PASSED: REQUIRE( !(1 == 2) ) with expansion: true -ConditionTests.cpp:325: +ConditionTests.cpp:326: PASSED: REQUIRE_FALSE( !1 == 2 ) with expansion: !(1 == 2) -ConditionTests.cpp:326: ------------------------------------------------------------------------------- ./failing/conditions/not ............................................................................... -FAILED: +ConditionTests.cpp:334: FAILED: CHECK( false != false ) -ConditionTests.cpp:334: -FAILED: +ConditionTests.cpp:335: FAILED: CHECK( true != true ) -ConditionTests.cpp:335: -FAILED: +ConditionTests.cpp:336: FAILED: CHECK( !true ) with expansion: false -ConditionTests.cpp:336: -FAILED: +ConditionTests.cpp:337: FAILED: CHECK_FALSE( !true ) -ConditionTests.cpp:337: -FAILED: +ConditionTests.cpp:339: FAILED: CHECK( !trueValue ) with expansion: false -ConditionTests.cpp:339: -FAILED: +ConditionTests.cpp:340: FAILED: CHECK_FALSE( !trueValue ) with expansion: !true -ConditionTests.cpp:340: -FAILED: +ConditionTests.cpp:342: FAILED: CHECK( !(1 == 1) ) with expansion: false -ConditionTests.cpp:342: -FAILED: +ConditionTests.cpp:343: FAILED: CHECK_FALSE( !1 == 1 ) with expansion: !(1 == 1) -ConditionTests.cpp:343: ------------------------------------------------------------------------------- ./succeeding/exceptions/explicit ............................................................................... +ExceptionTests.cpp:39: PASSED: REQUIRE_THROWS_AS( thisThrows() ) -ExceptionTests.cpp:39: +ExceptionTests.cpp:40: PASSED: REQUIRE_NOTHROW( thisDoesntThrow() ) -ExceptionTests.cpp:40: +ExceptionTests.cpp:41: PASSED: REQUIRE_THROWS( thisThrows() ) -ExceptionTests.cpp:41: ------------------------------------------------------------------------------- ./failing/exceptions/explicit ............................................................................... -FAILED: +ExceptionTests.cpp:47: FAILED: CHECK_THROWS_AS( thisThrows() ) due to unexpected exception with message: expected exception -ExceptionTests.cpp:47: -FAILED: +ExceptionTests.cpp:48: FAILED: CHECK_THROWS_AS( thisDoesntThrow() ) because no exception was thrown where one was expected: -ExceptionTests.cpp:48: -FAILED: +ExceptionTests.cpp:49: FAILED: CHECK_NOTHROW( thisThrows() ) due to unexpected exception with message: expected exception -ExceptionTests.cpp:49: ------------------------------------------------------------------------------- ./failing/exceptions/implicit ............................................................................... -FAILED: +ExceptionTests.cpp:52: FAILED: due to unexpected exception with message: unexpected exception -ExceptionTests.cpp:52: ------------------------------------------------------------------------------- ./failing/exceptions/implicit/2 ............................................................................... +ExceptionTests.cpp:60: PASSED: CHECK( 1 == 1 ) -ExceptionTests.cpp:60: -FAILED: +ExceptionTests.cpp:60: FAILED: {Unknown expression after the reported line} due to unexpected exception with message: unexpected exception -ExceptionTests.cpp:60: ------------------------------------------------------------------------------- ./failing/exceptions/implicit/3 section name ............................................................................... -FAILED: +ExceptionTests.cpp:66: FAILED: due to unexpected exception with message: unexpected exception -ExceptionTests.cpp:66: ------------------------------------------------------------------------------- ./succeeding/exceptions/implicit @@ -1081,940 +1044,936 @@ No assertions in test case, './succeeding/exceptions/implicit' ./failing/exceptions/custom ............................................................................... -FAILED: +ExceptionTests.cpp:110: FAILED: due to unexpected exception with message: custom exception -ExceptionTests.cpp:110: ------------------------------------------------------------------------------- ./failing/exceptions/custom/nothrow ............................................................................... -FAILED: +ExceptionTests.cpp:117: FAILED: REQUIRE_NOTHROW( throw CustomException( "unexpected custom exception" ) ) due to unexpected exception with message: unexpected custom exception -ExceptionTests.cpp:117: ------------------------------------------------------------------------------- ./failing/exceptions/custom/throw ............................................................................... -FAILED: +ExceptionTests.cpp:122: FAILED: REQUIRE_THROWS_AS( throw CustomException( "custom exception - not std" ) ) due to unexpected exception with message: custom exception - not std -ExceptionTests.cpp:122: ------------------------------------------------------------------------------- ./failing/exceptions/custom/double ............................................................................... -FAILED: +ExceptionTests.cpp:126: FAILED: due to unexpected exception with message: 3.14 -ExceptionTests.cpp:126: ------------------------------------------------------------------------------- ./succeeding/exceptions/notimplemented ............................................................................... +ExceptionTests.cpp:137: PASSED: REQUIRE_THROWS( thisFunctionNotImplemented( 7 ) ) -ExceptionTests.cpp:137: ------------------------------------------------------------------------------- ./succeeding/generators/1 ............................................................................... +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 200 == 200 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 202 == 202 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 204 == 204 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 206 == 206 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 208 == 208 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 210 == 210 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 212 == 212 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 2 == 2 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 4 == 4 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 6 == 6 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 8 == 8 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 10 == 10 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 30 == 30 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 40 == 40 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 42 == 42 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: +GeneratorTests.cpp:26: PASSED: CATCH_REQUIRE( multiply( i, 2 ) == i*2 ) with expansion: 72 == 72 -GeneratorTests.cpp:26: +GeneratorTests.cpp:27: PASSED: CATCH_REQUIRE( multiply( j, 2 ) == j*2 ) with expansion: 214 == 214 -GeneratorTests.cpp:27: ------------------------------------------------------------------------------- ./succeeding/generators/2 ............................................................................... +GeneratorTests.cpp:40: PASSED: CATCH_REQUIRE( i->first == i->second-1 ) with expansion: 0 == 0 -GeneratorTests.cpp:40: +GeneratorTests.cpp:40: PASSED: CATCH_REQUIRE( i->first == i->second-1 ) with expansion: 2 == 2 -GeneratorTests.cpp:40: ------------------------------------------------------------------------------- ./succeeding/message ............................................................................... +MessageTests.cpp:14: warning: this is a message this is a warning -MessageTests.cpp:14: No assertions in test case, './succeeding/message' @@ -2023,88 +1982,82 @@ No assertions in test case, './succeeding/message' ./succeeding/succeed ............................................................................... +MessageTests.cpp:18: PASSED: with message: this is a success -MessageTests.cpp:18: ------------------------------------------------------------------------------- ./failing/message/info/1 ............................................................................... -FAILED: +MessageTests.cpp:26: FAILED: REQUIRE( a == 1 ) with expansion: 2 == 1 with messages: this message should be logged so should this -MessageTests.cpp:26: ------------------------------------------------------------------------------- ./mixed/message/info/2 ............................................................................... +MessageTests.cpp:33: PASSED: CHECK( a == 2 ) with expansion: 2 == 2 with message: this message should not be logged -MessageTests.cpp:33: -FAILED: +MessageTests.cpp:37: FAILED: CHECK( a == 1 ) with expansion: 2 == 1 with message: this message should be logged -MessageTests.cpp:37: -FAILED: +MessageTests.cpp:41: FAILED: CHECK( a == 0 ) with expansion: 2 == 0 with message: and this, but later -MessageTests.cpp:41: +MessageTests.cpp:45: PASSED: CHECK( a == 2 ) with expansion: 2 == 2 with message: but not this -MessageTests.cpp:45: ------------------------------------------------------------------------------- ./failing/message/fail ............................................................................... -FAILED: +MessageTests.cpp:51: FAILED: explicitly with message: This is a failure -MessageTests.cpp:51: ------------------------------------------------------------------------------- ./failing/message/sections one ............................................................................... -FAILED: +MessageTests.cpp:58: FAILED: explicitly with message: Message from section one -MessageTests.cpp:58: ------------------------------------------------------------------------------- ./failing/message/sections two ............................................................................... -FAILED: +MessageTests.cpp:63: FAILED: explicitly with message: Message from section two -MessageTests.cpp:63: Message from section one ------------------------------------------------------------------------------- @@ -2128,6 +2081,7 @@ No assertions in section, 'two' ./mixed/message/scoped ............................................................................... +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2135,8 +2089,8 @@ with expansion: with messages: current counter 0 i := 0 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2144,8 +2098,8 @@ with expansion: with messages: current counter 1 i := 1 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2153,8 +2107,8 @@ with expansion: with messages: current counter 2 i := 2 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2162,8 +2116,8 @@ with expansion: with messages: current counter 3 i := 3 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2171,8 +2125,8 @@ with expansion: with messages: current counter 4 i := 4 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2180,8 +2134,8 @@ with expansion: with messages: current counter 5 i := 5 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2189,8 +2143,8 @@ with expansion: with messages: current counter 6 i := 6 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2198,8 +2152,8 @@ with expansion: with messages: current counter 7 i := 7 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2207,8 +2161,8 @@ with expansion: with messages: current counter 8 i := 8 -MessageTests.cpp:86: +MessageTests.cpp:86: PASSED: REQUIRE( i < 10 ) with expansion: @@ -2216,24 +2170,22 @@ with expansion: with messages: current counter 9 i := 9 -MessageTests.cpp:86: -FAILED: +MessageTests.cpp:86: FAILED: REQUIRE( i < 10 ) with expansion: 10 < 10 with messages: current counter 10 i := 10 -MessageTests.cpp:86: ------------------------------------------------------------------------------- ./succeeding/nofail ............................................................................... +MessageTests.cpp:92: FAILED - but was ok: CHECK_NOFAIL( 1 == 2 ) -MessageTests.cpp:92: No assertions in test case, './succeeding/nofail' @@ -2249,55 +2201,54 @@ No assertions in test case, 'just info' just failure ............................................................................... -FAILED: +MessageTests.cpp:101: FAILED: explicitly with message: Previous info should not be seen -MessageTests.cpp:101: ------------------------------------------------------------------------------- ./succeeding/Misc/Sections s1 ............................................................................... -PASSED: - REQUIRE( a != b ) -with expansion: - 1 != 2 MiscTests.cpp:25: +PASSED: + REQUIRE( a != b ) +with expansion: + 1 != 2 +MiscTests.cpp:26: PASSED: REQUIRE( b != a ) with expansion: 2 != 1 -MiscTests.cpp:26: ------------------------------------------------------------------------------- ./succeeding/Misc/Sections s2 ............................................................................... +MiscTests.cpp:31: PASSED: REQUIRE( a != b ) with expansion: 1 != 2 -MiscTests.cpp:31: ------------------------------------------------------------------------------- ./succeeding/Misc/Sections/nested s1 ............................................................................... +MiscTests.cpp:42: PASSED: REQUIRE( a != b ) with expansion: 1 != 2 -MiscTests.cpp:42: +MiscTests.cpp:43: PASSED: REQUIRE( b != a ) with expansion: 2 != 1 -MiscTests.cpp:43: ------------------------------------------------------------------------------- ./succeeding/Misc/Sections/nested @@ -2305,11 +2256,11 @@ MiscTests.cpp:43: s2 ............................................................................... +MiscTests.cpp:47: PASSED: REQUIRE( a != b ) with expansion: 1 != 2 -MiscTests.cpp:47: ------------------------------------------------------------------------------- ./mixed/Misc/Sections/nested2 @@ -2317,11 +2268,10 @@ MiscTests.cpp:47: s2 ............................................................................... -FAILED: +MiscTests.cpp:61: FAILED: REQUIRE( a == b ) with expansion: 1 == 2 -MiscTests.cpp:61: ------------------------------------------------------------------------------- ./mixed/Misc/Sections/nested2 @@ -2329,11 +2279,11 @@ MiscTests.cpp:61: s3 ............................................................................... +MiscTests.cpp:66: PASSED: REQUIRE( a != b ) with expansion: 1 != 2 -MiscTests.cpp:66: ------------------------------------------------------------------------------- ./mixed/Misc/Sections/nested2 @@ -2341,11 +2291,11 @@ MiscTests.cpp:66: s4 ............................................................................... +MiscTests.cpp:70: PASSED: REQUIRE( a < b ) with expansion: 1 < 2 -MiscTests.cpp:70: ------------------------------------------------------------------------------- ./Sections/nested/a/b @@ -2378,79 +2328,72 @@ No assertions in section, 'f (leaf)' s1 ............................................................................... -FAILED: +MiscTests.cpp:103: FAILED: CHECK( b > a ) with expansion: 0 > 1 -MiscTests.cpp:103: ------------------------------------------------------------------------------- ./mixed/Misc/loops ............................................................................... -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[0] (1) is even -MiscTests.cpp:115: -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[1] (1) is even -MiscTests.cpp:115: +MiscTests.cpp:115: PASSED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 0 == 0 with message: Testing if fib[2] (2) is even -MiscTests.cpp:115: -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[3] (3) is even -MiscTests.cpp:115: -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[4] (5) is even -MiscTests.cpp:115: +MiscTests.cpp:115: PASSED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 0 == 0 with message: Testing if fib[5] (8) is even -MiscTests.cpp:115: -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[6] (13) is even -MiscTests.cpp:115: -FAILED: +MiscTests.cpp:115: FAILED: CHECK( ( fib[i] % 2 ) == 0 ) with expansion: 1 == 0 with message: Testing if fib[7] (21) is even -MiscTests.cpp:115: Some information An error @@ -2465,92 +2408,87 @@ No assertions in test case, './succeeding/Misc/stdout,stderr' ./succeeding/Misc/null strings ............................................................................... +MiscTests.cpp:133: PASSED: REQUIRE( makeString( false ) != static_cast(__null) ) with expansion: "valid string" != {null string} -MiscTests.cpp:133: +MiscTests.cpp:134: PASSED: REQUIRE( makeString( true ) == static_cast(__null) ) with expansion: {null string} == {null string} -MiscTests.cpp:134: ------------------------------------------------------------------------------- ./failing/info ............................................................................... -FAILED: +MiscTests.cpp:142: FAILED: REQUIRE( false ) with messages: hi i := 7 -MiscTests.cpp:142: ------------------------------------------------------------------------------- ./succeeding/checkedif ............................................................................... +MiscTests.cpp:147: PASSED: CHECKED_IF( flag ) with expansion: true -MiscTests.cpp:147: +MiscTests.cpp:155: PASSED: REQUIRE( testCheckedIf( true ) ) with expansion: true -MiscTests.cpp:155: ------------------------------------------------------------------------------- ./failing/checkedif ............................................................................... -FAILED: +MiscTests.cpp:147: FAILED: CHECKED_IF( flag ) with expansion: false -MiscTests.cpp:147: -FAILED: +MiscTests.cpp:160: FAILED: REQUIRE( testCheckedIf( false ) ) with expansion: false -MiscTests.cpp:160: ------------------------------------------------------------------------------- ./succeeding/checkedelse ............................................................................... +MiscTests.cpp:165: PASSED: CHECKED_ELSE( flag ) with expansion: true -MiscTests.cpp:165: +MiscTests.cpp:173: PASSED: REQUIRE( testCheckedElse( true ) ) with expansion: true -MiscTests.cpp:173: ------------------------------------------------------------------------------- ./failing/checkedelse ............................................................................... -FAILED: +MiscTests.cpp:165: FAILED: CHECKED_ELSE( flag ) with expansion: false -MiscTests.cpp:165: -FAILED: +MiscTests.cpp:178: FAILED: REQUIRE( testCheckedElse( false ) ) with expansion: false -MiscTests.cpp:178: ------------------------------------------------------------------------------- ./misc/xmlentitycheck @@ -2572,163 +2510,158 @@ No assertions in section, 'encoded chars' ./manual/onechar ............................................................................... -FAILED: +MiscTests.cpp:196: FAILED: REQUIRE( false ) with message: 3 -MiscTests.cpp:196: ------------------------------------------------------------------------------- ./succeeding/atomic if ............................................................................... +MiscTests.cpp:206: PASSED: REQUIRE( x == 0 ) with expansion: 0 == 0 -MiscTests.cpp:206: ------------------------------------------------------------------------------- ./succeeding/matchers ............................................................................... +MiscTests.cpp:216: PASSED: REQUIRE_THAT( testStringForMatching() Contains( "string" ) ) with expansion: "this string contains 'abc' as a substring" contains: "string" -MiscTests.cpp:216: +MiscTests.cpp:217: PASSED: CHECK_THAT( testStringForMatching() Contains( "abc" ) ) with expansion: "this string contains 'abc' as a substring" contains: "abc" -MiscTests.cpp:217: +MiscTests.cpp:219: PASSED: CHECK_THAT( testStringForMatching() StartsWith( "this" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "this" -MiscTests.cpp:219: +MiscTests.cpp:220: PASSED: CHECK_THAT( testStringForMatching() EndsWith( "substring" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "substring" -MiscTests.cpp:220: ------------------------------------------------------------------------------- ./failing/matchers/Contains ............................................................................... -FAILED: +MiscTests.cpp:225: FAILED: CHECK_THAT( testStringForMatching() Contains( "not there" ) ) with expansion: "this string contains 'abc' as a substring" contains: "not there" -MiscTests.cpp:225: ------------------------------------------------------------------------------- ./failing/matchers/StartsWith ............................................................................... -FAILED: +MiscTests.cpp:230: FAILED: CHECK_THAT( testStringForMatching() StartsWith( "string" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "string" -MiscTests.cpp:230: ------------------------------------------------------------------------------- ./failing/matchers/EndsWith ............................................................................... -FAILED: +MiscTests.cpp:235: FAILED: CHECK_THAT( testStringForMatching() EndsWith( "this" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "this" -MiscTests.cpp:235: ------------------------------------------------------------------------------- ./failing/matchers/Equals ............................................................................... -FAILED: +MiscTests.cpp:240: FAILED: CHECK_THAT( testStringForMatching() Equals( "something else" ) ) with expansion: "this string contains 'abc' as a substring" equals: "something else" -MiscTests.cpp:240: ------------------------------------------------------------------------------- ./succeeding/matchers/AllOf ............................................................................... +MiscTests.cpp:248: PASSED: CHECK_THAT( testStringForMatching() AllOf( Catch::Contains( "string" ), Catch::Contains( "abc" ) ) ) with expansion: "this string contains 'abc' as a substring" ( contains: "string" and contains: "abc" ) -MiscTests.cpp:248: ------------------------------------------------------------------------------- ./succeeding/matchers/AnyOf ............................................................................... +MiscTests.cpp:252: PASSED: CHECK_THAT( testStringForMatching() AnyOf( Catch::Contains( "string" ), Catch::Contains( "not there" ) ) ) with expansion: "this string contains 'abc' as a substring" ( contains: "string" or contains: "not there" ) -MiscTests.cpp:252: +MiscTests.cpp:253: PASSED: CHECK_THAT( testStringForMatching() AnyOf( Catch::Contains( "not there" ), Catch::Contains( "string" ) ) ) with expansion: "this string contains 'abc' as a substring" ( contains: "not there" or contains: "string" ) -MiscTests.cpp:253: ------------------------------------------------------------------------------- ./succeeding/matchers/Equals ............................................................................... +MiscTests.cpp:258: PASSED: CHECK_THAT( testStringForMatching() Equals( "this string contains 'abc' as a substring" ) ) with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'abc' as a substring" -MiscTests.cpp:258: ------------------------------------------------------------------------------- example/factorial ............................................................................... +MiscTests.cpp:269: PASSED: REQUIRE( Factorial(0) == 1 ) with expansion: 1 == 1 -MiscTests.cpp:269: +MiscTests.cpp:270: PASSED: REQUIRE( Factorial(1) == 1 ) with expansion: 1 == 1 -MiscTests.cpp:270: +MiscTests.cpp:271: PASSED: REQUIRE( Factorial(2) == 2 ) with expansion: 2 == 2 -MiscTests.cpp:271: +MiscTests.cpp:272: PASSED: REQUIRE( Factorial(3) == 6 ) with expansion: 6 == 6 -MiscTests.cpp:272: +MiscTests.cpp:273: PASSED: REQUIRE( Factorial(10) == 3628800 ) with expansion: 0x == 3628800 -MiscTests.cpp:273: ------------------------------------------------------------------------------- empty @@ -2741,9 +2674,9 @@ No assertions in test case, 'empty' Nice descriptive name ............................................................................... +MiscTests.cpp:282: warning: This one ran -MiscTests.cpp:282: No assertions in test case, 'Nice descriptive name' @@ -2768,135 +2701,135 @@ selftest/main selftest/expected result/failing tests ............................................................................... +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: +catch_self_test.hpp:114: PASSED: with message: Tests failed, as expected -catch_self_test.hpp:114: ------------------------------------------------------------------------------- selftest/main @@ -2904,239 +2837,239 @@ selftest/main selftest/expected result/succeeding tests ............................................................................... +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: Message from section one Message from section two +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: Some information An error +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: +catch_self_test.hpp:103: PASSED: with message: Tests passed, as expected -catch_self_test.hpp:103: Message from section one Message from section two @@ -3148,17 +3081,17 @@ selftest/main selftest/test counts/succeeding tests ............................................................................... +TestMain.cpp:40: PASSED: CHECK( totals.assertions.passed == 296 ) with expansion: 296 == 296 -TestMain.cpp:40: +TestMain.cpp:41: PASSED: CHECK( totals.assertions.failed == 0 ) with expansion: 0 == 0 -TestMain.cpp:41: ------------------------------------------------------------------------------- selftest/main @@ -3166,66 +3099,66 @@ selftest/main selftest/test counts/failing tests ............................................................................... +TestMain.cpp:47: PASSED: CHECK( totals.assertions.passed == 1 ) with expansion: 1 == 1 -TestMain.cpp:47: +TestMain.cpp:48: PASSED: CHECK( totals.assertions.failed == 73 ) with expansion: 73 == 73 -TestMain.cpp:48: ------------------------------------------------------------------------------- meta/Misc/Sections ............................................................................... +TestMain.cpp:57: PASSED: CHECK( totals.assertions.passed == 2 ) with expansion: 2 == 2 -TestMain.cpp:57: +TestMain.cpp:58: PASSED: CHECK( totals.assertions.failed == 1 ) with expansion: 1 == 1 -TestMain.cpp:58: ------------------------------------------------------------------------------- selftest/parser/2 default ............................................................................... +TestMain.cpp:97: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:97: +TestMain.cpp:99: PASSED: CHECK( config.shouldDebugBreak == false ) with expansion: false == false -TestMain.cpp:99: +TestMain.cpp:100: PASSED: CHECK( config.cutoff == -1 ) with expansion: -1 == -1 -TestMain.cpp:100: +TestMain.cpp:101: PASSED: CHECK( config.allowThrows == true ) with expansion: true == true -TestMain.cpp:101: +TestMain.cpp:102: PASSED: CHECK( config.reporter.empty() ) with expansion: true -TestMain.cpp:102: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3233,27 +3166,27 @@ selftest/parser/2 -t/1 ............................................................................... +TestMain.cpp:108: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:108: +TestMain.cpp:110: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:110: +TestMain.cpp:111: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false ) with expansion: false == false -TestMain.cpp:111: +TestMain.cpp:112: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) ) with expansion: true -TestMain.cpp:112: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3261,27 +3194,27 @@ selftest/parser/2 -t/exclude:1 ............................................................................... +TestMain.cpp:116: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:116: +TestMain.cpp:118: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:118: +TestMain.cpp:119: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false ) with expansion: false == false -TestMain.cpp:119: +TestMain.cpp:120: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) ) with expansion: true -TestMain.cpp:120: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3289,27 +3222,27 @@ selftest/parser/2 --test/1 ............................................................................... +TestMain.cpp:125: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:125: +TestMain.cpp:127: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:127: +TestMain.cpp:128: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false ) with expansion: false == false -TestMain.cpp:128: +TestMain.cpp:129: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) ) with expansion: true -TestMain.cpp:129: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3317,27 +3250,27 @@ selftest/parser/2 --test/exclude:1 ............................................................................... +TestMain.cpp:134: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:134: +TestMain.cpp:136: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:136: +TestMain.cpp:137: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false ) with expansion: false == false -TestMain.cpp:137: +TestMain.cpp:138: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) ) with expansion: true -TestMain.cpp:138: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3345,27 +3278,27 @@ selftest/parser/2 --test/exclude:2 ............................................................................... +TestMain.cpp:143: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:143: +TestMain.cpp:145: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:145: +TestMain.cpp:146: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) == false ) with expansion: false == false -TestMain.cpp:146: +TestMain.cpp:147: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "alwaysIncluded" ) ) ) with expansion: true -TestMain.cpp:147: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3373,33 +3306,33 @@ selftest/parser/2 -t/2 ............................................................................... +TestMain.cpp:152: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:152: +TestMain.cpp:154: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:154: +TestMain.cpp:155: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false ) with expansion: false == false -TestMain.cpp:155: +TestMain.cpp:156: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) ) with expansion: true -TestMain.cpp:156: +TestMain.cpp:157: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test2" ) ) ) with expansion: true -TestMain.cpp:157: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3407,12 +3340,12 @@ selftest/parser/2 -t/0 ............................................................................... +TestMain.cpp:162: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "at least 1" ) ) with expansion: "Error while parsing arguments. Expected at least 1 argument." contains: "at least 1" -TestMain.cpp:162: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3420,15 +3353,15 @@ selftest/parser/2 -r/console ............................................................................... +TestMain.cpp:169: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:169: +TestMain.cpp:171: PASSED: REQUIRE( config.reporter == "console" ) with expansion: "console" == "console" -TestMain.cpp:171: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3436,15 +3369,15 @@ selftest/parser/2 -r/xml ............................................................................... +TestMain.cpp:175: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:175: +TestMain.cpp:177: PASSED: REQUIRE( config.reporter == "xml" ) with expansion: "xml" == "xml" -TestMain.cpp:177: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3452,15 +3385,15 @@ selftest/parser/2 --reporter/junit ............................................................................... +TestMain.cpp:181: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:181: +TestMain.cpp:183: PASSED: REQUIRE( config.reporter == "junit" ) with expansion: "junit" == "junit" -TestMain.cpp:183: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3468,12 +3401,12 @@ selftest/parser/2 -r/error ............................................................................... +TestMain.cpp:187: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "1 argument" ) ) with expansion: "Error while parsing arguments. Expected 1 argument. Arguments were: one two" contains: "1 argument" -TestMain.cpp:187: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3481,15 +3414,15 @@ selftest/parser/2 -b ............................................................................... +TestMain.cpp:194: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:194: +TestMain.cpp:196: PASSED: REQUIRE( config.shouldDebugBreak == true ) with expansion: true == true -TestMain.cpp:196: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3497,15 +3430,15 @@ selftest/parser/2 --break ............................................................................... +TestMain.cpp:200: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:200: +TestMain.cpp:202: PASSED: REQUIRE( config.shouldDebugBreak ) with expansion: true -TestMain.cpp:202: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3513,12 +3446,12 @@ selftest/parser/2 -b ............................................................................... +TestMain.cpp:206: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "0 arguments" ) ) with expansion: "Error while parsing arguments. Expected 0 arguments. Arguments were: unexpected" contains: "0 arguments" -TestMain.cpp:206: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3526,15 +3459,15 @@ selftest/parser/2 -a ............................................................................... +TestMain.cpp:213: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:213: +TestMain.cpp:215: PASSED: REQUIRE( config.cutoff == 1 ) with expansion: 1 == 1 -TestMain.cpp:215: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3542,15 +3475,15 @@ selftest/parser/2 -a/2 ............................................................................... +TestMain.cpp:219: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:219: +TestMain.cpp:221: PASSED: REQUIRE( config.cutoff == 2 ) with expansion: 2 == 2 -TestMain.cpp:221: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3558,12 +3491,12 @@ selftest/parser/2 -a/error/0 ............................................................................... +TestMain.cpp:225: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) ) with expansion: "Error while parsing arguments. threshold must be a number greater than zero. Arguments were: 0" contains: "greater than zero" -TestMain.cpp:225: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3571,12 +3504,12 @@ selftest/parser/2 -a/error/non numeric ............................................................................... +TestMain.cpp:229: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "greater than zero" ) ) with expansion: "Error while parsing arguments. threshold must be a number greater than zero. Arguments were: oops" contains: "greater than zero" -TestMain.cpp:229: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3584,12 +3517,12 @@ selftest/parser/2 -a/error/two args ............................................................................... +TestMain.cpp:233: PASSED: REQUIRE_THAT( parseIntoConfigAndReturnError( argv, config ) Contains( "0 and 1 argument" ) ) with expansion: "Error while parsing arguments. Expected between 0 and 1 argument. Arguments were: 1 2" contains: "0 and 1 argument" -TestMain.cpp:233: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3597,15 +3530,15 @@ selftest/parser/2 -nt ............................................................................... +TestMain.cpp:240: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:240: +TestMain.cpp:242: PASSED: REQUIRE( config.allowThrows == false ) with expansion: false == false -TestMain.cpp:242: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3613,15 +3546,15 @@ selftest/parser/2 --nothrow ............................................................................... +TestMain.cpp:246: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:246: +TestMain.cpp:248: PASSED: REQUIRE( config.allowThrows == false ) with expansion: false == false -TestMain.cpp:248: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3629,21 +3562,21 @@ selftest/parser/2 -o filename ............................................................................... +TestMain.cpp:255: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:255: +TestMain.cpp:257: PASSED: REQUIRE( config.outputFilename == "filename.ext" ) with expansion: "filename.ext" == "filename.ext" -TestMain.cpp:257: +TestMain.cpp:258: PASSED: REQUIRE( config.stream.empty() ) with expansion: true -TestMain.cpp:258: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3651,21 +3584,21 @@ selftest/parser/2 -o %stdout ............................................................................... +TestMain.cpp:262: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:262: +TestMain.cpp:264: PASSED: REQUIRE( config.stream == "stdout" ) with expansion: "stdout" == "stdout" -TestMain.cpp:264: +TestMain.cpp:265: PASSED: REQUIRE( config.outputFilename.empty() ) with expansion: true -TestMain.cpp:265: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3673,15 +3606,15 @@ selftest/parser/2 --out ............................................................................... +TestMain.cpp:269: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:269: +TestMain.cpp:271: PASSED: REQUIRE( config.outputFilename == "filename.ext" ) with expansion: "filename.ext" == "filename.ext" -TestMain.cpp:271: ------------------------------------------------------------------------------- selftest/parser/2 @@ -3689,386 +3622,383 @@ selftest/parser/2 -a -b ............................................................................... +TestMain.cpp:278: PASSED: CHECK_NOTHROW( parseIntoConfig( argv, config ) ) -TestMain.cpp:278: +TestMain.cpp:280: PASSED: CHECK( config.cutoff == 1 ) with expansion: 1 == 1 -TestMain.cpp:280: +TestMain.cpp:281: PASSED: CHECK( config.shouldDebugBreak ) with expansion: true -TestMain.cpp:281: +TestMain.cpp:282: PASSED: CHECK( config.allowThrows == false ) with expansion: false == false -TestMain.cpp:282: ------------------------------------------------------------------------------- selftest/test filter ............................................................................... +TestMain.cpp:291: PASSED: CHECK( matchAny.shouldInclude( fakeTestCase( "any" ) ) ) with expansion: true -TestMain.cpp:291: +TestMain.cpp:292: PASSED: CHECK( matchNone.shouldInclude( fakeTestCase( "any" ) ) == false ) with expansion: false == false -TestMain.cpp:292: +TestMain.cpp:297: PASSED: CHECK( matchHidden.shouldInclude( fakeTestCase( "any" ) ) == false ) with expansion: false == false -TestMain.cpp:297: +TestMain.cpp:298: PASSED: CHECK( matchNonHidden.shouldInclude( fakeTestCase( "any" ) ) ) with expansion: true -TestMain.cpp:298: +TestMain.cpp:300: PASSED: CHECK( matchHidden.shouldInclude( fakeTestCase( "./any" ) ) ) with expansion: true -TestMain.cpp:300: +TestMain.cpp:301: PASSED: CHECK( matchNonHidden.shouldInclude( fakeTestCase( "./any" ) ) == false ) with expansion: false == false -TestMain.cpp:301: ------------------------------------------------------------------------------- selftest/test filters ............................................................................... +TestMain.cpp:312: PASSED: CHECK( matchHidden.shouldInclude( fakeTestCase( "./something" ) ) ) with expansion: true -TestMain.cpp:312: +TestMain.cpp:314: PASSED: CHECK( filters.shouldInclude( fakeTestCase( "any" ) ) == false ) with expansion: false == false -TestMain.cpp:314: +TestMain.cpp:315: PASSED: CHECK( filters.shouldInclude( fakeTestCase( "./something" ) ) ) with expansion: true -TestMain.cpp:315: +TestMain.cpp:316: PASSED: CHECK( filters.shouldInclude( fakeTestCase( "./anything" ) ) == false ) with expansion: false == false -TestMain.cpp:316: ------------------------------------------------------------------------------- selftest/filter/prefix wildcard ............................................................................... +TestMain.cpp:322: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "big badger" ) ) ) with expansion: true -TestMain.cpp:322: +TestMain.cpp:323: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "little badgers" ) ) == false ) with expansion: false == false -TestMain.cpp:323: ------------------------------------------------------------------------------- selftest/filter/wildcard at both ends ............................................................................... +TestMain.cpp:328: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "big badger" ) ) ) with expansion: true -TestMain.cpp:328: +TestMain.cpp:329: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "little badgers" ) ) ) with expansion: true -TestMain.cpp:329: +TestMain.cpp:330: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "badgers are big" ) ) ) with expansion: true -TestMain.cpp:330: +TestMain.cpp:331: PASSED: CHECK( matchBadgers.shouldInclude( fakeTestCase( "hedgehogs" ) ) == false ) with expansion: false == false -TestMain.cpp:331: ------------------------------------------------------------------------------- selftest/option parsers ............................................................................... +TestMain.cpp:351: PASSED: CHECK_NOTHROW( opt.parseIntoConfig( parser, config ) ) -TestMain.cpp:351: +TestMain.cpp:353: PASSED: REQUIRE( config.filters.size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:353: +TestMain.cpp:354: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "notIncluded" ) ) == false ) with expansion: false == false -TestMain.cpp:354: +TestMain.cpp:355: PASSED: REQUIRE( config.filters[0].shouldInclude( fakeTestCase( "test1" ) ) ) with expansion: true -TestMain.cpp:355: ------------------------------------------------------------------------------- selftest/tags one tag ............................................................................... +TestMain.cpp:369: PASSED: CHECK( oneTag.getTestCaseInfo().description == "" ) with expansion: "" == "" -TestMain.cpp:369: +TestMain.cpp:370: PASSED: CHECK( oneTag.hasTag( "one" ) ) with expansion: true -TestMain.cpp:370: +TestMain.cpp:371: PASSED: CHECK( oneTag.getTags().size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:371: +TestMain.cpp:373: PASSED: CHECK( oneTag.matchesTags( p1 ) == true ) with expansion: true == true -TestMain.cpp:373: +TestMain.cpp:374: PASSED: CHECK( oneTag.matchesTags( p2 ) == true ) with expansion: true == true -TestMain.cpp:374: +TestMain.cpp:375: PASSED: CHECK( oneTag.matchesTags( p3 ) == false ) with expansion: false == false -TestMain.cpp:375: +TestMain.cpp:376: PASSED: CHECK( oneTag.matchesTags( p4 ) == false ) with expansion: false == false -TestMain.cpp:376: +TestMain.cpp:377: PASSED: CHECK( oneTag.matchesTags( p5 ) == false ) with expansion: false == false -TestMain.cpp:377: ------------------------------------------------------------------------------- selftest/tags two tags ............................................................................... +TestMain.cpp:383: PASSED: CHECK( twoTags.getTestCaseInfo().description == "" ) with expansion: "" == "" -TestMain.cpp:383: +TestMain.cpp:384: PASSED: CHECK( twoTags.hasTag( "one" ) ) with expansion: true -TestMain.cpp:384: +TestMain.cpp:385: PASSED: CHECK( twoTags.hasTag( "two" ) ) with expansion: true -TestMain.cpp:385: +TestMain.cpp:386: PASSED: CHECK( twoTags.hasTag( "three" ) == false ) with expansion: false == false -TestMain.cpp:386: +TestMain.cpp:387: PASSED: CHECK( twoTags.getTags().size() == 2 ) with expansion: 2 == 2 -TestMain.cpp:387: +TestMain.cpp:389: PASSED: CHECK( twoTags.matchesTags( p1 ) == true ) with expansion: true == true -TestMain.cpp:389: +TestMain.cpp:390: PASSED: CHECK( twoTags.matchesTags( p2 ) == true ) with expansion: true == true -TestMain.cpp:390: +TestMain.cpp:391: PASSED: CHECK( twoTags.matchesTags( p3 ) == true ) with expansion: true == true -TestMain.cpp:391: +TestMain.cpp:392: PASSED: CHECK( twoTags.matchesTags( p4 ) == true ) with expansion: true == true -TestMain.cpp:392: +TestMain.cpp:393: PASSED: CHECK( twoTags.matchesTags( p5 ) == true ) with expansion: true == true -TestMain.cpp:393: ------------------------------------------------------------------------------- selftest/tags one tag with characters either side ............................................................................... +TestMain.cpp:399: PASSED: CHECK( oneTagWithExtras.getTestCaseInfo().description == "1234" ) with expansion: "1234" == "1234" -TestMain.cpp:399: +TestMain.cpp:400: PASSED: CHECK( oneTagWithExtras.hasTag( "one" ) ) with expansion: true -TestMain.cpp:400: +TestMain.cpp:401: PASSED: CHECK( oneTagWithExtras.hasTag( "two" ) == false ) with expansion: false == false -TestMain.cpp:401: +TestMain.cpp:402: PASSED: CHECK( oneTagWithExtras.getTags().size() == 1 ) with expansion: 1 == 1 -TestMain.cpp:402: ------------------------------------------------------------------------------- selftest/tags start of a tag, but not closed ............................................................................... +TestMain.cpp:409: PASSED: CHECK( oneTagOpen.getTestCaseInfo().description == "[one" ) with expansion: "[one" == "[one" -TestMain.cpp:409: +TestMain.cpp:410: PASSED: CHECK( oneTagOpen.hasTag( "one" ) == false ) with expansion: false == false -TestMain.cpp:410: +TestMain.cpp:411: PASSED: CHECK( oneTagOpen.getTags().size() == 0 ) with expansion: 0 == 0 -TestMain.cpp:411: ------------------------------------------------------------------------------- selftest/tags hidden ............................................................................... +TestMain.cpp:417: PASSED: CHECK( oneTag.getTestCaseInfo().description == "" ) with expansion: "" == "" -TestMain.cpp:417: +TestMain.cpp:418: PASSED: CHECK( oneTag.hasTag( "hide" ) ) with expansion: true -TestMain.cpp:418: +TestMain.cpp:419: PASSED: CHECK( oneTag.isHidden() ) with expansion: true -TestMain.cpp:419: +TestMain.cpp:421: PASSED: CHECK( oneTag.matchesTags( "~[hide]" ) == false ) with expansion: false == false -TestMain.cpp:421: ------------------------------------------------------------------------------- ./succeeding/Tricky/std::pair ............................................................................... +TrickyTests.cpp:37: PASSED: REQUIRE( (std::pair( 1, 2 )) == aNicePair ) with expansion: - - std::pair( 1, 2 ) - == - std::pair( 1, 2 ) -TrickyTests.cpp:37: + std::pair( 1, 2 ) == std::pair( 1, 2 ) ------------------------------------------------------------------------------- ./inprogress/failing/Tricky/trailing expression ............................................................................... +TrickyTests.cpp:55: warning: Uncomment the code in this test to check that it gives a sensible compiler error -TrickyTests.cpp:55: No assertions in test case, './inprogress/failing/Tricky/trailing expression' @@ -4077,10 +4007,10 @@ No assertions in test case, './inprogress/failing/Tricky/trailing expression' ./inprogress/failing/Tricky/compound lhs ............................................................................... +TrickyTests.cpp:71: warning: Uncomment the code in this test to check that it gives a sensible compiler error -TrickyTests.cpp:71: No assertions in test case, './inprogress/failing/Tricky/compound lhs' @@ -4089,482 +4019,506 @@ No assertions in test case, './inprogress/failing/Tricky/compound lhs' ./failing/Tricky/non streamable type ............................................................................... -FAILED: +TrickyTests.cpp:95: FAILED: CHECK( &o1 == &o2 ) with expansion: 0x == 0x -TrickyTests.cpp:95: -FAILED: +TrickyTests.cpp:96: FAILED: CHECK( o1 == o2 ) with expansion: {?} == {?} -TrickyTests.cpp:96: ------------------------------------------------------------------------------- ./failing/string literals ............................................................................... -FAILED: +TrickyTests.cpp:106: FAILED: REQUIRE( std::string( "first" ) == "second" ) with expansion: "first" == "second" -TrickyTests.cpp:106: ------------------------------------------------------------------------------- ./succeeding/side-effects ............................................................................... +TrickyTests.cpp:119: PASSED: REQUIRE( i++ == 7 ) with expansion: 7 == 7 -TrickyTests.cpp:119: +TrickyTests.cpp:120: PASSED: REQUIRE( i++ == 8 ) with expansion: 8 == 8 -TrickyTests.cpp:120: ------------------------------------------------------------------------------- ./succeeding/koenig ............................................................................... +TrickyTests.cpp:186: PASSED: REQUIRE( 0x == o ) with expansion: 0x == {?} -TrickyTests.cpp:186: ------------------------------------------------------------------------------- ./succeeding/non-const== ............................................................................... +TrickyTests.cpp:212: PASSED: REQUIRE( t == 1u ) with expansion: {?} == 1 -TrickyTests.cpp:212: ------------------------------------------------------------------------------- ./succeeding/enum/bits ............................................................................... +TrickyTests.cpp:224: PASSED: REQUIRE( 0x == bit30and31 ) with expansion: 0x == 3221225472 -TrickyTests.cpp:224: ------------------------------------------------------------------------------- ./succeeding/boolean member ............................................................................... +TrickyTests.cpp:239: PASSED: REQUIRE( obj.prop != __null ) with expansion: 0x != 0 -TrickyTests.cpp:239: ------------------------------------------------------------------------------- ./succeeding/unimplemented static bool compare to true ............................................................................... +TrickyTests.cpp:259: PASSED: REQUIRE( is_true::value == true ) with expansion: true == true -TrickyTests.cpp:259: +TrickyTests.cpp:260: PASSED: REQUIRE( true == is_true::value ) with expansion: true == true -TrickyTests.cpp:260: ------------------------------------------------------------------------------- ./succeeding/unimplemented static bool compare to false ............................................................................... +TrickyTests.cpp:264: PASSED: REQUIRE( is_true::value == false ) with expansion: false == false -TrickyTests.cpp:264: +TrickyTests.cpp:265: PASSED: REQUIRE( false == is_true::value ) with expansion: false == false -TrickyTests.cpp:265: ------------------------------------------------------------------------------- ./succeeding/unimplemented static bool negation ............................................................................... +TrickyTests.cpp:270: PASSED: REQUIRE( !is_true::value ) with expansion: true -TrickyTests.cpp:270: ------------------------------------------------------------------------------- ./succeeding/unimplemented static bool double negation ............................................................................... +TrickyTests.cpp:275: PASSED: REQUIRE( !!is_true::value ) with expansion: true -TrickyTests.cpp:275: ------------------------------------------------------------------------------- ./succeeding/unimplemented static bool direct ............................................................................... +TrickyTests.cpp:280: PASSED: REQUIRE( is_true::value ) with expansion: true -TrickyTests.cpp:280: +TrickyTests.cpp:281: PASSED: REQUIRE_FALSE( !is_true::value ) with expansion: !false -TrickyTests.cpp:281: ------------------------------------------------------------------------------- ./succeeding/SafeBool ............................................................................... +TrickyTests.cpp:313: PASSED: CHECK( True ) with expansion: true -TrickyTests.cpp:313: +TrickyTests.cpp:314: PASSED: CHECK( !False ) with expansion: true -TrickyTests.cpp:314: +TrickyTests.cpp:315: PASSED: CHECK_FALSE( !False ) with expansion: !false -TrickyTests.cpp:315: ------------------------------------------------------------------------------- Scenario: Do that thing with the thing - Given: This stuff exists - When: I do this - Then: it should do this + Given: This stuff exists + When: I do this + Then: it should do this ............................................................................... +BDDTests.cpp:33: PASSED: REQUIRE( itDoesThis() ) with expansion: true -BDDTests.cpp:29: + +------------------------------------------------------------------------------- +Scenario: Do that thing with the thing + Given: This stuff exists + When: I do this + Then: it should do this + And: do that +............................................................................... + +BDDTests.cpp:35: +PASSED: + REQUIRE( itDoesThat() ) +with expansion: + true =============================================================================== -99 test cases - 47 failed (616 assertions - 104 failed) +100 test cases - 47 failed (619 assertions - 104 failed) -CatchSelfTest is a CATCH v0.9 b19 (integration) host application. +CatchSelfTest is a CATCH v0.9 b21 (integration) host application. Run with -? for options ------------------------------------------------------------------------------- ./succeeding/Approx/simple ............................................................................... +ApproxTests.cpp:20: PASSED: REQUIRE( d == Approx( 1.23 ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:20: +ApproxTests.cpp:21: PASSED: REQUIRE( d != Approx( 1.22 ) ) with expansion: 1.23 != Approx( 1.22 ) -ApproxTests.cpp:21: +ApproxTests.cpp:22: PASSED: REQUIRE( d != Approx( 1.24 ) ) with expansion: 1.23 != Approx( 1.24 ) -ApproxTests.cpp:22: +ApproxTests.cpp:24: PASSED: REQUIRE( Approx( d ) == 1.23 ) with expansion: Approx( 1.23 ) == 1.23 -ApproxTests.cpp:24: +ApproxTests.cpp:25: PASSED: REQUIRE( Approx( d ) != 1.22 ) with expansion: Approx( 1.23 ) != 1.22 -ApproxTests.cpp:25: +ApproxTests.cpp:26: PASSED: REQUIRE( Approx( d ) != 1.24 ) with expansion: Approx( 1.23 ) != 1.24 -ApproxTests.cpp:26: ------------------------------------------------------------------------------- ./succeeding/Approx/epsilon ............................................................................... +ApproxTests.cpp:38: PASSED: REQUIRE( d != Approx( 1.231 ) ) with expansion: 1.23 != Approx( 1.231 ) -ApproxTests.cpp:38: +ApproxTests.cpp:39: PASSED: REQUIRE( d == Approx( 1.231 ).epsilon( 0.1 ) ) with expansion: 1.23 == Approx( 1.231 ) -ApproxTests.cpp:39: ------------------------------------------------------------------------------- ./succeeding/Approx/float ............................................................................... +ApproxTests.cpp:49: PASSED: REQUIRE( 1.23f == Approx( 1.23f ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:49: +ApproxTests.cpp:50: PASSED: REQUIRE( 0.0f == Approx( 0.0f ) ) with expansion: 0 == Approx( 0 ) -ApproxTests.cpp:50: ------------------------------------------------------------------------------- ./succeeding/Approx/int ............................................................................... +ApproxTests.cpp:60: PASSED: REQUIRE( 1 == Approx( 1 ) ) -ApproxTests.cpp:60: +ApproxTests.cpp:61: PASSED: REQUIRE( 0 == Approx( 0 ) ) -ApproxTests.cpp:61: ------------------------------------------------------------------------------- ./succeeding/Approx/mixed ............................................................................... +ApproxTests.cpp:75: PASSED: REQUIRE( 1.0f == Approx( 1 ) ) with expansion: 1 == Approx( 1 ) -ApproxTests.cpp:75: +ApproxTests.cpp:76: PASSED: REQUIRE( 0 == Approx( dZero) ) with expansion: 0 == Approx( 0 ) -ApproxTests.cpp:76: +ApproxTests.cpp:77: PASSED: REQUIRE( 0 == Approx( dSmall ).epsilon( 0.001 ) ) with expansion: 0 == Approx( 1e-05 ) -ApproxTests.cpp:77: +ApproxTests.cpp:78: PASSED: REQUIRE( 1.234f == Approx( dMedium ) ) with expansion: 1.234 == Approx( 1.234 ) -ApproxTests.cpp:78: +ApproxTests.cpp:79: PASSED: REQUIRE( dMedium == Approx( 1.234f ) ) with expansion: 1.234 == Approx( 1.234 ) -ApproxTests.cpp:79: ------------------------------------------------------------------------------- ./succeeding/Approx/custom ............................................................................... +ApproxTests.cpp:93: PASSED: REQUIRE( d == approx( 1.23 ) ) with expansion: 1.23 == Approx( 1.23 ) -ApproxTests.cpp:93: +ApproxTests.cpp:94: PASSED: REQUIRE( d == approx( 1.22 ) ) with expansion: 1.23 == Approx( 1.22 ) -ApproxTests.cpp:94: +ApproxTests.cpp:95: PASSED: REQUIRE( d == approx( 1.24 ) ) with expansion: 1.23 == Approx( 1.24 ) -ApproxTests.cpp:95: +ApproxTests.cpp:96: PASSED: REQUIRE( d != approx( 1.25 ) ) with expansion: 1.23 != Approx( 1.25 ) -ApproxTests.cpp:96: +ApproxTests.cpp:98: PASSED: REQUIRE( approx( d ) == 1.23 ) with expansion: Approx( 1.23 ) == 1.23 -ApproxTests.cpp:98: +ApproxTests.cpp:99: PASSED: REQUIRE( approx( d ) == 1.22 ) with expansion: Approx( 1.23 ) == 1.22 -ApproxTests.cpp:99: +ApproxTests.cpp:100: PASSED: REQUIRE( approx( d ) == 1.24 ) with expansion: Approx( 1.23 ) == 1.24 -ApproxTests.cpp:100: +ApproxTests.cpp:101: PASSED: REQUIRE( approx( d ) != 1.25 ) with expansion: Approx( 1.23 ) != 1.25 -ApproxTests.cpp:101: + +------------------------------------------------------------------------------- +Approximate PI +............................................................................... + +ApproxTests.cpp:110: +PASSED: + REQUIRE( divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) ) +with expansion: + 3.142857142857143 == Approx( 3.141 ) + +ApproxTests.cpp:111: +PASSED: + REQUIRE( divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) ) +with expansion: + 3.142857142857143 != Approx( 3.141 ) ------------------------------------------------------------------------------- ./succeeding/TestClass/succeedingCase ............................................................................... +ClassTests.cpp:24: PASSED: REQUIRE( s == "hello" ) with expansion: "hello" == "hello" -ClassTests.cpp:24: ------------------------------------------------------------------------------- ./failing/TestClass/failingCase ............................................................................... -FAILED: +ClassTests.cpp:28: FAILED: REQUIRE( s == "world" ) with expansion: "hello" == "world" -ClassTests.cpp:28: ------------------------------------------------------------------------------- ./succeeding/Fixture/succeedingCase ............................................................................... +ClassTests.cpp:47: PASSED: REQUIRE( m_a == 1 ) with expansion: 1 == 1 -ClassTests.cpp:47: ------------------------------------------------------------------------------- ./failing/Fixture/failingCase ............................................................................... -FAILED: +ClassTests.cpp:55: FAILED: REQUIRE( m_a == 2 ) with expansion: 1 == 2 -ClassTests.cpp:55: ------------------------------------------------------------------------------- ./succeeding/conditions/equality ............................................................................... +ConditionTests.cpp:55: PASSED: REQUIRE( data.int_seven == 7 ) with expansion: 7 == 7 -ConditionTests.cpp:55: +ConditionTests.cpp:56: PASSED: REQUIRE( data.float_nine_point_one == Approx( 9.1f ) ) with expansion: 9.1 == Approx( 9.1 ) -ConditionTests.cpp:56: +ConditionTests.cpp:57: PASSED: REQUIRE( data.double_pi == Approx( 3.1415926535 ) ) with expansion: - 3.14159 == Approx( 3.14159 ) -ConditionTests.cpp:57: + 3.1415926535 == Approx( 3.14159 ) +ConditionTests.cpp:58: PASSED: REQUIRE( data.str_hello == "hello" ) with expansion: "hello" == "hello" -ConditionTests.cpp:58: +ConditionTests.cpp:59: PASSED: REQUIRE( "hello" == data.str_hello ) with expansion: "hello" == "hello" -ConditionTests.cpp:59: +ConditionTests.cpp:60: PASSED: REQUIRE( data.str_hello.size() == 5 ) with expansion: 5 == 5 -ConditionTests.cpp:60: +ConditionTests.cpp:63: PASSED: REQUIRE( x == Approx( 1.3 ) ) with expansion: 1.3 == Approx( 1.3 ) -ConditionTests.cpp:63: ------------------------------------------------------------------------------- ./failing/conditions/equality ............................................................................... -FAILED: +ConditionTests.cpp:71: FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -ConditionTests.cpp:71: -FAILED: +ConditionTests.cpp:72: FAILED: CHECK( data.int_seven == 8 ) with expansion: 7 == 8 -ConditionTests.cpp:72: =============================================================================== -12 test cases - 3 failed (38 assertions - 4 failed) +13 test cases - 3 failed (40 assertions - 4 failed) - + + @@ -4600,7 +4554,7 @@ ConditionTests.cpp:76 ConditionTests.cpp:77 - + ConditionTests.cpp:78 @@ -4627,7 +4581,7 @@ ConditionTests.cpp:111 ConditionTests.cpp:112 - + ConditionTests.cpp:113 @@ -4669,7 +4623,7 @@ ConditionTests.cpp:162 ConditionTests.cpp:163 - + ConditionTests.cpp:164 @@ -5235,6 +5189,25 @@ ApproxTests.cpp" line="101"> + +ApproxTests.cpp" line="110"> + + divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) + + + 3.142857142857143 == Approx( 3.141 ) + + +ApproxTests.cpp" line="111"> + + divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) + + + 3.142857142857143 != Approx( 3.141 ) + + + + ClassTests.cpp" line="24"> @@ -5301,7 +5274,7 @@ ConditionTests.cpp" line="57"> data.double_pi == Approx( 3.1415926535 ) - 3.14159 == Approx( 3.14159 ) + 3.1415926535 == Approx( 3.14159 ) ConditionTests.cpp" line="58"> @@ -5400,7 +5373,7 @@ ConditionTests.cpp" line="78"> data.double_pi == Approx( 3.1415 ) - 3.14159 == Approx( 3.1415 ) + 3.1415926535 == Approx( 3.1415 ) ConditionTests.cpp" line="79"> @@ -5499,7 +5472,7 @@ ConditionTests.cpp" line="99"> data.double_pi != Approx( 3.1415 ) - 3.14159 != Approx( 3.1415 ) + 3.1415926535 != Approx( 3.1415 ) ConditionTests.cpp" line="100"> @@ -5558,7 +5531,7 @@ ConditionTests.cpp" line="113"> data.double_pi != Approx( 3.1415926535 ) - 3.14159 != Approx( 3.14159 ) + 3.1415926535 != Approx( 3.14159 ) ConditionTests.cpp" line="114"> @@ -5665,7 +5638,7 @@ ConditionTests.cpp" line="136"> data.float_nine_point_one < 9.2 - 9.1 < 9.2 + 9.1 < 9.199999999999999 ConditionTests.cpp" line="138"> @@ -5804,7 +5777,7 @@ ConditionTests.cpp" line="164"> data.float_nine_point_one > 9.2 - 9.1 > 9.2 + 9.1 > 9.199999999999999 ConditionTests.cpp" line="166"> @@ -9579,10 +9552,7 @@ TrickyTests.cpp" line="37"> (std::pair<int, int>( 1, 2 )) == aNicePair - - std::pair( 1, 2 ) - == - std::pair( 1, 2 ) + std::pair( 1, 2 ) == std::pair( 1, 2 ) @@ -9802,10 +9772,10 @@ TrickyTests.cpp" line="315"> -
-
-
-BDDTests.cpp" line="29"> +
+
+
+BDDTests.cpp" line="33"> itDoesThis() @@ -9813,17 +9783,28 @@ BDDTests.cpp" line="29"> true - +
+BDDTests.cpp" line="35"> + + itDoesThat() + + + true + + + +
+
- +
- +
- + - + [Started testing: CatchSelfTest] [Started group: '~dummy'] @@ -9871,6 +9852,11 @@ 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)] +[Running: Approximate PI] +ApproxTests.cpp:110: divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) succeeded for: 3.142857142857143 == Approx( 3.141 ) +ApproxTests.cpp:111: divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) succeeded for: 3.142857142857143 != Approx( 3.141 ) +[Finished: 'Approximate PI' All tests passed (2 assertions in 1 test case)] + [Running: ./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)] @@ -9890,7 +9876,7 @@ ClassTests.cpp:55: m_a == 2 failed for: 1 == 2 [Running: ./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 ) +ConditionTests.cpp:57: data.double_pi == Approx( 3.1415926535 ) succeeded for: 3.1415926535 == Approx( 3.14159 ) ConditionTests.cpp:58: data.str_hello == "hello" succeeded for: "hello" == "hello" ConditionTests.cpp:59: "hello" == data.str_hello succeeded for: "hello" == "hello" ConditionTests.cpp:60: data.str_hello.size() == 5 succeeded for: 5 == 5 @@ -9905,7 +9891,7 @@ ConditionTests.cpp:74: data.float_nine_point_one == Approx( 9.11f ) failed for: ConditionTests.cpp:75: data.float_nine_point_one == Approx( 9.0f ) failed for: 9.1 == Approx( 9 ) ConditionTests.cpp:76: data.float_nine_point_one == Approx( 1 ) failed for: 9.1 == Approx( 1 ) ConditionTests.cpp:77: data.float_nine_point_one == Approx( 0 ) failed for: 9.1 == Approx( 0 ) -ConditionTests.cpp:78: data.double_pi == Approx( 3.1415 ) failed for: 3.14159 == Approx( 3.1415 ) +ConditionTests.cpp:78: data.double_pi == Approx( 3.1415 ) failed for: 3.1415926535 == Approx( 3.1415 ) ConditionTests.cpp:79: data.str_hello == "goodbye" failed for: "hello" == "goodbye" ConditionTests.cpp:80: data.str_hello == "hell" failed for: "hello" == "hell" ConditionTests.cpp:81: data.str_hello == "hello1" failed for: "hello" == "hello1" @@ -9920,7 +9906,7 @@ ConditionTests.cpp:95: data.float_nine_point_one != Approx( 9.11f ) succeeded fo ConditionTests.cpp:96: data.float_nine_point_one != Approx( 9.0f ) succeeded for: 9.1 != Approx( 9 ) ConditionTests.cpp:97: data.float_nine_point_one != Approx( 1 ) succeeded for: 9.1 != Approx( 1 ) ConditionTests.cpp:98: data.float_nine_point_one != Approx( 0 ) succeeded for: 9.1 != Approx( 0 ) -ConditionTests.cpp:99: data.double_pi != Approx( 3.1415 ) succeeded for: 3.14159 != Approx( 3.1415 ) +ConditionTests.cpp:99: data.double_pi != Approx( 3.1415 ) succeeded for: 3.1415926535 != Approx( 3.1415 ) ConditionTests.cpp:100: data.str_hello != "goodbye" succeeded for: "hello" != "goodbye" ConditionTests.cpp:101: data.str_hello != "hell" succeeded for: "hello" != "hell" ConditionTests.cpp:102: data.str_hello != "hello1" succeeded for: "hello" != "hello1" @@ -9930,7 +9916,7 @@ ConditionTests.cpp:103: data.str_hello.size() != 6 succeeded for: 5 != 6 [Running: ./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:113: data.double_pi != Approx( 3.1415926535 ) failed for: 3.1415926535 != 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)] @@ -9946,7 +9932,7 @@ ConditionTests.cpp:131: data.int_seven <= 7 succeeded for: 7 <= 7 ConditionTests.cpp:132: data.int_seven <= 8 succeeded for: 7 <= 8 ConditionTests.cpp:134: data.float_nine_point_one > 9 succeeded for: 9.1 > 9 ConditionTests.cpp:135: data.float_nine_point_one < 10 succeeded for: 9.1 < 10 -ConditionTests.cpp:136: data.float_nine_point_one < 9.2 succeeded for: 9.1 < 9.2 +ConditionTests.cpp:136: data.float_nine_point_one < 9.2 succeeded for: 9.1 < 9.199999999999999 ConditionTests.cpp:138: data.str_hello <= "hello" succeeded for: "hello" <= "hello" ConditionTests.cpp:139: data.str_hello >= "hello" succeeded for: "hello" >= "hello" ConditionTests.cpp:141: data.str_hello < "hellp" succeeded for: "hello" < "hellp" @@ -9966,7 +9952,7 @@ ConditionTests.cpp:159: data.int_seven >= 8 failed for: 7 >= 8 ConditionTests.cpp:160: data.int_seven <= 6 failed for: 7 <= 6 ConditionTests.cpp:162: data.float_nine_point_one < 9 failed for: 9.1 < 9 ConditionTests.cpp:163: data.float_nine_point_one > 10 failed for: 9.1 > 10 -ConditionTests.cpp:164: data.float_nine_point_one > 9.2 failed for: 9.1 > 9.2 +ConditionTests.cpp:164: data.float_nine_point_one > 9.2 failed for: 9.1 > 9.199999999999999 ConditionTests.cpp:166: data.str_hello > "hello" failed for: "hello" > "hello" ConditionTests.cpp:167: data.str_hello < "hello" failed for: "hello" < "hello" ConditionTests.cpp:168: data.str_hello > "hellp" failed for: "hello" > "hellp" @@ -11079,11 +11065,7 @@ TestMain.cpp:421: oneTag.matchesTags( "~[hide]" ) == false succeeded for: false [Finished: 'selftest/tags' All tests passed (29 assertions in 1 test case)] [Running: ./succeeding/Tricky/std::pair] -TrickyTests.cpp:37: (std::pair( 1, 2 )) == aNicePair succeeded for: - - std::pair( 1, 2 ) - == - std::pair( 1, 2 ) +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)] [Running: ./inprogress/failing/Tricky/trailing expression] @@ -11163,21 +11145,25 @@ TrickyTests.cpp:315: !False succeeded for: !false [Finished: './succeeding/SafeBool' All tests passed (3 assertions in 1 test case)] [Running: Scenario: Do that thing with the thing] -[Started section: ' Given: This stuff exists'] -[Started section: ' When: I do this'] -[Started section: ' Then: it should do this'] -BDDTests.cpp:29: itDoesThis() succeeded for: true -[End of section: ' Then: it should do this' 1 assertion passed] +[Started section: 'Given: This stuff exists'] +[Started section: ' When: I do this'] +[Started section: ' Then: it should do this'] +BDDTests.cpp:33: itDoesThis() succeeded for: true +[Started section: ' And: do that'] +BDDTests.cpp:35: itDoesThat() succeeded for: true +[End of section: ' And: do that' 1 assertion passed] -[End of section: ' When: I do this' 1 assertion passed] +[End of section: ' Then: it should do this' All 2 assertions passed] -[End of section: ' Given: This stuff exists' 1 assertion passed] +[End of section: ' When: I do this' All 2 assertions passed] -[Finished: 'Scenario: Do that thing with the thing' All tests passed (1 assertion in 1 test case)] -[End of group: '~dummy'. 47 of 99 test cases failed (104 of 616 assertions failed)] +[End of section: 'Given: This stuff exists' All 2 assertions passed] + +[Finished: 'Scenario: Do that thing with the thing' All tests passed (2 assertions in 1 test case)] +[End of group: '~dummy'. 47 of 100 test cases failed (104 of 619 assertions failed)] -[Testing completed. 47 of 99 test cases failed (104 of 616 assertions failed)] +[Testing completed. 47 of 100 test cases failed (104 of 619 assertions failed)] [Started testing: CatchSelfTest] [Started group: '~dummy'] @@ -11225,6 +11211,11 @@ 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)] +[Running: Approximate PI] +ApproxTests.cpp:110: divide( 22, 7 ) == Approx( 3.141 ).epsilon( 0.001 ) succeeded for: 3.142857142857143 == Approx( 3.141 ) +ApproxTests.cpp:111: divide( 22, 7 ) != Approx( 3.141 ).epsilon( 0.0001 ) succeeded for: 3.142857142857143 != Approx( 3.141 ) +[Finished: 'Approximate PI' All tests passed (2 assertions in 1 test case)] + [Running: ./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)] @@ -11244,7 +11235,7 @@ ClassTests.cpp:55: m_a == 2 failed for: 1 == 2 [Running: ./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 ) +ConditionTests.cpp:57: data.double_pi == Approx( 3.1415926535 ) succeeded for: 3.1415926535 == Approx( 3.14159 ) ConditionTests.cpp:58: data.str_hello == "hello" succeeded for: "hello" == "hello" ConditionTests.cpp:59: "hello" == data.str_hello succeeded for: "hello" == "hello" ConditionTests.cpp:60: data.str_hello.size() == 5 succeeded for: 5 == 5 @@ -11255,8 +11246,8 @@ ConditionTests.cpp:63: x == Approx( 1.3 ) succeeded for: 1.3 == Approx( 1.3 ) 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)] -[End of group: '~dummy'. 3 of 12 test cases failed (4 of 38 assertions failed)] +[End of group: '~dummy'. 3 of 13 test cases failed (4 of 40 assertions failed)] -[Testing aborted. 3 of 12 test cases failed (4 of 38 assertions failed)] +[Testing aborted. 3 of 13 test cases failed (4 of 40 assertions failed)] diff --git a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj index f2777cb7..1f4395b8 100644 --- a/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj +++ b/projects/XCode4/CatchSelfTest/CatchSelfTest.xcodeproj/project.pbxproj @@ -580,7 +580,6 @@ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++98"; CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; - GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( @@ -596,7 +595,6 @@ CLANG_ANALYZER_SECURITY_FLOATLOOPCOUNTER = YES; CLANG_CXX_LANGUAGE_STANDARD = "gnu++98"; CLANG_WARN__DUPLICATE_METHOD_MATCH = NO; - GCC_PREPROCESSOR_DEFINITIONS = CATCH_CONFIG_USE_ANSI_COLOUR_CODES; GCC_VERSION = com.apple.compilers.llvm.clang.1_0; PRODUCT_NAME = "$(TARGET_NAME)"; WARNING_CFLAGS = ( diff --git a/projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp b/projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp index 43d40068..e9971bd3 100644 --- a/projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp +++ b/projects/XCode4/CatchSelfTest/CatchSelfTest/BDDTests.cpp @@ -14,11 +14,14 @@ // !TBD: story scenarios map to class based tests #define SCENARIO( name, tags ) TEST_CASE( "Scenario: " name, tags ) -#define GIVEN( desc ) SECTION( " Given: " desc, "" ) -#define WHEN( desc ) SECTION( " When: " desc, "" ) -#define THEN( desc ) SECTION( " Then: " desc, "" ) +#define GIVEN( desc ) SECTION( "Given: " desc, "" ) +#define WHEN( desc ) SECTION( " When: " desc, "" ) +#define AND_WHEN( desc ) SECTION( " And: " desc, "" ) +#define THEN( desc ) SECTION( " Then: " desc, "" ) +#define AND_THEN( desc ) SECTION( " And: " desc, "" ) inline bool itDoesThis(){ return true; } +inline bool itDoesThat(){ return true; } SCENARIO( "Do that thing with the thing", "[tags]" ) { GIVEN( "This stuff exists" ) { @@ -26,7 +29,11 @@ SCENARIO( "Do that thing with the thing", "[tags]" ) { WHEN( "I do this" ) { // do this THEN( "it should do this") + { REQUIRE( itDoesThis() ); + AND_THEN( "do that") + REQUIRE( itDoesThat() ); + } } } diff --git a/single_include/catch.hpp b/single_include/catch.hpp index f0fa4193..49f8afc5 100644 --- a/single_include/catch.hpp +++ b/single_include/catch.hpp @@ -1,6 +1,6 @@ /* - * CATCH v0.9 build 20 (integration branch) - * Generated: 2013-02-19 19:57:51.967870 + * CATCH v0.9 build 21 (integration branch) + * Generated: 2013-03-04 12:17:59.865403 * ---------------------------------------------------------- * This file has been merged from multiple headers. Please don't edit it directly * Copyright (c) 2012 Two Blue Cubes Ltd. All rights reserved. @@ -440,6 +440,8 @@ private: #define TWOBLUECUBES_CATCH_TOSTRING_HPP_INCLUDED #include +#include +#include #ifdef __OBJC__ // #included from: catch_objc_arc.hpp @@ -494,37 +496,53 @@ namespace Detail { template NonStreamable( const T& ){} }; - // If the type does not have its own << overload for ostream then - // this one will be used instead - inline std::ostream& operator << ( std::ostream& ss, NonStreamable ){ - return ss << "{?}"; - } +} // end namespace Detail - template - inline std::string makeString( const T& value ) { +// If the type does not have its own << overload for ostream then +// this one will be used instead +inline std::ostream& operator << ( std::ostream& ss, Detail::NonStreamable ){ + return ss << "{?}"; +} + +template +struct StringMaker { + static std::string convert( T const& value ) { std::ostringstream oss; oss << value; return oss.str(); } - - template - inline std::string makeString( T* p ) { +}; +template +struct StringMaker { + static std::string convert( T const* p ) { if( !p ) return INTERNAL_CATCH_STRINGIFY( NULL ); std::ostringstream oss; oss << p; return oss.str(); } +}; - template - inline std::string makeString( const T* p ) { - if( !p ) - return INTERNAL_CATCH_STRINGIFY( NULL ); +template +struct StringMaker > { + static std::string convert( std::vector const& v ) { std::ostringstream oss; - oss << p; + oss << "{ "; + for( std::size_t i = 0; i < v.size(); ++ i ) { + oss << v[i]; + if( i < v.size() - 1 ) + oss << ", "; + } + oss << " }"; return oss.str(); } +}; +namespace Detail { + template + inline std::string makeString( const T& value ) { + return StringMaker::convert( value ); + } } // end namespace Detail /// \brief converts any type to a string @@ -536,7 +554,8 @@ namespace Detail { /// to provide an ostream overload for. template std::string toString( const T& value ) { - return Detail::makeString( value ); + return StringMaker::convert( value ); +// return Detail::makeString( value ); } // Built in overloads @@ -583,7 +602,8 @@ inline std::string toString( unsigned int value ) { inline std::string toString( const double value ) { std::ostringstream oss; - oss << value; + oss << std::setprecision (std::numeric_limits::digits10 + 1) + << value; return oss.str(); } @@ -4318,13 +4338,15 @@ namespace Catch { return false; } - void endSection( const std::string& ) { + void endSection( const std::string&, bool stealth ) { if( m_currentSection->ran() ) { - m_runStatus = RanAtLeastOneSection; + if( !stealth ) + m_runStatus = RanAtLeastOneSection; m_changed = true; } else if( m_runStatus == EncounteredASection ) { - m_runStatus = RanAtLeastOneSection; + if( !stealth ) + m_runStatus = RanAtLeastOneSection; m_lastSectionToRun = m_currentSection; } m_currentSection = m_currentSection->getParent(); @@ -4544,7 +4566,7 @@ namespace Catch { missingAssertions = true; } - m_runningTest->endSection( info.name ); + m_runningTest->endSection( info.name, false ); m_reporter->sectionEnded( SectionStats( info, assertions, missingAssertions ) ); m_messages.clear(); @@ -5352,6 +5374,10 @@ namespace Catch { } // end namespace Catch +#if !defined(CATCH_CONFIG_USE_ANSI_COLOUR_CODES) && !defined(CATCH_PLATFORM_WINDOWS) +#define CATCH_CONFIG_USE_ANSI_COLOUR_CODES 1 +#endif + #if defined( CATCH_CONFIG_USE_ANSI_COLOUR_CODES ) #include @@ -5373,8 +5399,15 @@ namespace Catch { namespace { const char colourEscape = '\033'; } + inline bool shouldUseColour() { + static bool s_shouldUseColour + = CATCH_CONFIG_USE_ANSI_COLOUR_CODES != 0 && + isatty( fileno(stdout) ) && + !isDebuggerActive(); + return s_shouldUseColour; + } void TextColour::set( Colours colour ) { - if( isatty( fileno(stdout) ) && !isDebuggerActive() ) { + if( shouldUseColour() ) { switch( colour ) { case TextColour::FileName: std::cout << colourEscape << "[0m"; // white/ normal @@ -5711,12 +5744,10 @@ namespace Catch { else if( m_exprComponents.op == "matches" ) return m_exprComponents.lhs + " " + m_exprComponents.rhs; else if( m_exprComponents.op != "!" ) { - if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 30 ) + if( m_exprComponents.lhs.size() + m_exprComponents.rhs.size() < 40 ) return m_exprComponents.lhs + " " + m_exprComponents.op + " " + m_exprComponents.rhs; - else if( m_exprComponents.lhs.size() < 70 && m_exprComponents.rhs.size() < 70 ) - return "\n\t" + m_exprComponents.lhs + "\n\t" + m_exprComponents.op + "\n\t" + m_exprComponents.rhs; else - return "\n" + m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs + "\n\n"; + return m_exprComponents.lhs + "\n" + m_exprComponents.op + "\n" + m_exprComponents.rhs; } else return "{can't expand - use " + info.macroName + "_FALSE( " + info.capturedExpression.substr(1) + " ) instead of " + info.macroName + "( " + info.capturedExpression + " ) for better diagnostics}"; @@ -5838,7 +5869,7 @@ namespace Catch { namespace Catch { // These numbers are maintained by a script - Version libraryVersion( 0, 9, 20, "integration" ); + Version libraryVersion( 0, 9, 21, "integration" ); } // #included from: catch_line_wrap.hpp @@ -7083,13 +7114,18 @@ namespace Catch { } void print() const { + printSourceInfo(); if( stats.totals.assertions.total() > 0 ) { + if( result.isOk() ) + stream << "\n"; printResultType(); printOriginalExpression(); printReconstructedExpression(); } + else { + stream << "\n"; + } printMessage(); - printSourceInfo(); } private: @@ -7131,7 +7167,7 @@ namespace Catch { } void printSourceInfo() const { TextColour colourGuard( TextColour::FileName ); - stream << result.getSourceInfo() << ":\n"; + stream << result.getSourceInfo() << ": "; } static std::string wrapLongStrings( std::string const& _string ){