diff --git a/src/catch2/reporters/catch_reporter_junit.cpp b/src/catch2/reporters/catch_reporter_junit.cpp index 3be4e2f9..00b45876 100644 --- a/src/catch2/reporters/catch_reporter_junit.cpp +++ b/src/catch2/reporters/catch_reporter_junit.cpp @@ -241,70 +241,77 @@ namespace Catch { void JunitReporter::writeAssertions( SectionNode const& sectionNode ) { for (auto const& assertionOrBenchmark : sectionNode.assertionsAndBenchmarks) { if (assertionOrBenchmark.isAssertion()) { - writeAssertion(assertionOrBenchmark.asAssertion()); + // JUnit XML format supports only 1 error/failure/skip + // assertion elements per test case + if (writeAssertion(assertionOrBenchmark.asAssertion())) { + break; + } } } } - void JunitReporter::writeAssertion( AssertionStats const& stats ) { + bool JunitReporter::writeAssertion( AssertionStats const& stats ) { AssertionResult const& result = stats.assertionResult; - if ( !result.isOk() || - result.getResultType() == ResultWas::ExplicitSkip ) { - std::string elementName; - switch( result.getResultType() ) { - case ResultWas::ThrewException: - case ResultWas::FatalErrorCondition: - elementName = "error"; - break; - case ResultWas::ExplicitFailure: - case ResultWas::ExpressionFailed: - case ResultWas::DidntThrowException: - elementName = "failure"; - break; - case ResultWas::ExplicitSkip: - elementName = "skipped"; - break; - // We should never see these here: - case ResultWas::Info: - case ResultWas::Warning: - case ResultWas::Ok: - case ResultWas::Unknown: - case ResultWas::FailureBit: - case ResultWas::Exception: - elementName = "internalError"; - break; - } - - XmlWriter::ScopedElement e = xml.scopedElement( elementName ); - - xml.writeAttribute( "message"_sr, result.getExpression() ); - xml.writeAttribute( "type"_sr, result.getTestMacroName() ); - - ReusableStringStream rss; - if ( result.getResultType() == ResultWas::ExplicitSkip ) { - rss << "SKIPPED\n"; - } else { - rss << "FAILED:\n"; - if (result.hasExpression()) { - rss << " "; - rss << result.getExpressionInMacro(); - rss << '\n'; - } - if (result.hasExpandedExpression()) { - rss << "with expansion:\n"; - rss << TextFlow::Column(result.getExpandedExpression()).indent(2) << '\n'; - } - } - - if( result.hasMessage() ) - rss << result.getMessage() << '\n'; - for( auto const& msg : stats.infoMessages ) - if( msg.type == ResultWas::Info ) - rss << msg.message << '\n'; - - rss << "at " << result.getSourceInfo(); - xml.writeText( rss.str(), XmlFormatting::Newline ); + if ( result.isOk() && + result.getResultType() != ResultWas::ExplicitSkip ) { + return false; } + std::string elementName; + switch ( result.getResultType() ) { + case ResultWas::ThrewException: + case ResultWas::FatalErrorCondition: + elementName = "error"; + break; + case ResultWas::ExplicitFailure: + case ResultWas::ExpressionFailed: + case ResultWas::DidntThrowException: + elementName = "failure"; + break; + case ResultWas::ExplicitSkip: + elementName = "skipped"; + break; + // We should never see these here: + case ResultWas::Info: + case ResultWas::Warning: + case ResultWas::Ok: + case ResultWas::Unknown: + case ResultWas::FailureBit: + case ResultWas::Exception: + elementName = "internalError"; + break; + } + + XmlWriter::ScopedElement e = xml.scopedElement( elementName ); + + xml.writeAttribute( "message"_sr, result.getExpression() ); + xml.writeAttribute( "type"_sr, result.getTestMacroName() ); + + ReusableStringStream rss; + if ( result.getResultType() == ResultWas::ExplicitSkip ) { + rss << "SKIPPED\n"; + } else { + rss << "FAILED:\n"; + if ( result.hasExpression() ) { + rss << " "; + rss << result.getExpressionInMacro(); + rss << '\n'; + } + if ( result.hasExpandedExpression() ) { + rss << "with expansion:\n"; + rss << TextFlow::Column( result.getExpandedExpression() ) + .indent( 2 ) + << '\n'; + } + } + + if ( result.hasMessage() ) { rss << result.getMessage() << '\n'; } + for ( auto const& msg : stats.infoMessages ) { + if ( msg.type == ResultWas::Info ) { rss << msg.message << '\n'; } + } + + rss << "at " << result.getSourceInfo(); + xml.writeText( rss.str(), XmlFormatting::Newline ); + return true; } } // end namespace Catch diff --git a/src/catch2/reporters/catch_reporter_junit.hpp b/src/catch2/reporters/catch_reporter_junit.hpp index 7cb53c25..a265f78a 100644 --- a/src/catch2/reporters/catch_reporter_junit.hpp +++ b/src/catch2/reporters/catch_reporter_junit.hpp @@ -41,7 +41,7 @@ namespace Catch { bool testOkToFail ); void writeAssertions(SectionNode const& sectionNode); - void writeAssertion(AssertionStats const& stats); + bool writeAssertion(AssertionStats const& stats); XmlWriter xml; Timer suiteTimer; diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt index 59622d9d..f191b33f 100644 --- a/tests/SelfTest/Baselines/junit.sw.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.approved.txt @@ -105,51 +105,6 @@ at Misc.tests.cpp: FAILED: CHECK( false != false ) -at Condition.tests.cpp: - - -FAILED: - CHECK( true != true ) -at Condition.tests.cpp: - - -FAILED: - CHECK( !true ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( true ) -with expansion: - !true -at Condition.tests.cpp: - - -FAILED: - CHECK( !trueValue ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( trueValue ) -with expansion: - !true -at Condition.tests.cpp: - - -FAILED: - CHECK( !(1 == 1) ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( 1 == 1 ) at Condition.tests.cpp: @@ -358,13 +313,6 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x == 0x -at Tricky.tests.cpp: - - -FAILED: - CHECK( o1 == o2 ) -with expansion: - {?} == {?} at Tricky.tests.cpp: @@ -400,12 +348,6 @@ with expansion: 2 > 10 at AssertionHandler.tests.cpp: - -FAILED: - CHECK( foo( 2 ) == 2 ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -416,12 +358,6 @@ with expansion: 2 > 10 at AssertionHandler.tests.cpp: - -FAILED: - REQUIRE( foo( 2 ) == 2 ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -511,13 +447,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "STRING" at Matchers.tests.cpp: @@ -574,14 +503,6 @@ FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" ends with: "this" (case - insensitive) at Matchers.tests.cpp: @@ -595,96 +516,6 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven == 8 ) -with expansion: - 7 == 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven == 0 ) -with expansion: - 7 == 0 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 9.11f ) ) -with expansion: - 9.100000381f - == - Approx( 9.10999965667724609 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 9.0f ) ) -with expansion: - 9.100000381f == Approx( 9.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 1 ) ) -with expansion: - 9.100000381f == Approx( 1.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 0 ) ) -with expansion: - 9.100000381f == Approx( 0.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.double_pi == Approx( 3.1415 ) ) -with expansion: - 3.14159265350000005 - == - Approx( 3.14150000000000018 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "goodbye" ) -with expansion: - "hello" == "goodbye" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "hell" ) -with expansion: - "hello" == "hell" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "hello1" ) -with expansion: - "hello" == "hello1" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello.size() == 6 ) -with expansion: - 5 == 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( x == Approx( 1.301 ) ) -with expansion: - 1.30000000000000027 - == - Approx( 1.30099999999999993 ) at Condition.tests.cpp: @@ -697,14 +528,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "something else" (case - insensitive) at Matchers.tests.cpp: @@ -713,11 +536,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) at Matchers.tests.cpp: @@ -726,12 +544,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) -Unknown exception at Matchers.tests.cpp: @@ -741,13 +553,6 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) -with expansion: - SpecialException::what special exception has value of 1 at Matchers.tests.cpp: @@ -764,17 +569,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -at Exception.tests.cpp: - - -FAILED: - CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -at Exception.tests.cpp: - - -FAILED: - CHECK_NOTHROW( thisThrows() ) -expected exception at Exception.tests.cpp: @@ -792,12 +586,6 @@ FAILED: Throw a Catch::TestFailureException at AssertionHandler.tests.cpp: - -FAILED: - CHECK_NOTHROW( do_fail() ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -931,16 +719,6 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -at Message.tests.cpp: - - -FAILED: - CHECK( a == 0 ) -with expansion: - 2 == 0 -this message may be logged later -this message should be logged -and this, but later at Message.tests.cpp: @@ -971,38 +749,6 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one != Approx( 9.1f ) ) -with expansion: - 9.100000381f - != - Approx( 9.10000038146972656 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.double_pi != Approx( 3.1415926535 ) ) -with expansion: - 3.14159265350000005 - != - Approx( 3.14159265350000005 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello != "hello" ) -with expansion: - "hello" != "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello.size() != 5 ) -with expansion: - 5 != 5 at Condition.tests.cpp: @@ -1127,132 +873,6 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 7 ) -with expansion: - 7 < 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven > 8 ) -with expansion: - 7 > 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 6 ) -with expansion: - 7 < 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 0 ) -with expansion: - 7 < 0 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < -1 ) -with expansion: - 7 < -1 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven >= 8 ) -with expansion: - 7 >= 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven <= 6 ) -with expansion: - 7 <= 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one < 9 ) -with expansion: - 9.100000381f < 9 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one > 10 ) -with expansion: - 9.100000381f > 10 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one > 9.2 ) -with expansion: - 9.100000381f > 9.19999999999999929 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "hello" ) -with expansion: - "hello" > "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "hello" ) -with expansion: - "hello" < "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "hellp" ) -with expansion: - "hello" > "hellp" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "z" ) -with expansion: - "hello" > "z" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "hellm" ) -with expansion: - "hello" < "hellm" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "a" ) -with expansion: - "hello" < "a" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello >= "z" ) -with expansion: - "hello" >= "z" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello <= "a" ) -with expansion: - "hello" <= "a" at Condition.tests.cpp: @@ -1382,22 +1002,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) -with expansion: - "this string contains 'abc' as a substring" matches "contains 'abc' as a - substring" case sensitively -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) -with expansion: - "this string contains 'abc' as a substring" matches "this string contains - 'abc' as a" case sensitively at Matchers.tests.cpp: @@ -1462,12 +1066,6 @@ at Matchers.tests.cpp: FAILED: CHECK( false ) This will be reported multiple times -at Message.tests.cpp: - - -FAILED: - CHECK( false ) -This will be reported multiple times at Message.tests.cpp: @@ -1512,14 +1110,6 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" starts with: "string" (case - insensitive) at Matchers.tests.cpp: @@ -1873,13 +1463,6 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, VectorContains( 1 ) ) -with expansion: - { } Contains: 1 at Matchers.tests.cpp: @@ -1889,13 +1472,6 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v, Contains( v2 ) ) -with expansion: - { 1, 2, 3 } Contains: { 1, 2, 4 } at Matchers.tests.cpp: @@ -1905,27 +1481,6 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v2, Equals( v ) ) -with expansion: - { 1, 2 } Equals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, Equals( v ) ) -with expansion: - { } Equals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v, Equals( empty ) ) -with expansion: - { 1, 2, 3 } Equals: { } at Matchers.tests.cpp: @@ -1935,27 +1490,6 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, UnorderedEquals( v ) ) -with expansion: - { } UnorderedEquals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( permuted, UnorderedEquals( v ) ) -with expansion: - { 1, 3 } UnorderedEquals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( permuted, UnorderedEquals( v ) ) -with expansion: - { 3, 1 } UnorderedEquals: { 1, 2, 3 } at Matchers.tests.cpp: @@ -2063,11 +1597,6 @@ at Misc.tests.cpp: SKIPPED skipping because answer = 41 -at Skip.tests.cpp: - - -SKIPPED -skipping because answer = 43 at Skip.tests.cpp: @@ -2086,28 +1615,12 @@ FAILED: CHECK( 3 == 4 ) at Skip.tests.cpp: - -SKIPPED -at Skip.tests.cpp: - FAILED: at Skip.tests.cpp: - -SKIPPED -at Skip.tests.cpp: - - -FAILED: -at Skip.tests.cpp: - - -SKIPPED -at Skip.tests.cpp: - @@ -2176,46 +1689,6 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[1] (1) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[3] (3) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[4] (5) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[6] (13) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[7] (21) is even at Misc.tests.cpp: @@ -2360,15 +1833,6 @@ Count 1 to 3... 1 2 3 -at Message.tests.cpp: - - -FAILED: - CHECK( false ) -Count 4 to 6... -4 -5 -6 at Message.tests.cpp: diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt index 0f136363..3c152dc7 100644 --- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt +++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt @@ -104,51 +104,6 @@ at Misc.tests.cpp: FAILED: CHECK( false != false ) -at Condition.tests.cpp: - - -FAILED: - CHECK( true != true ) -at Condition.tests.cpp: - - -FAILED: - CHECK( !true ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( true ) -with expansion: - !true -at Condition.tests.cpp: - - -FAILED: - CHECK( !trueValue ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( trueValue ) -with expansion: - !true -at Condition.tests.cpp: - - -FAILED: - CHECK( !(1 == 1) ) -with expansion: - false -at Condition.tests.cpp: - - -FAILED: - CHECK_FALSE( 1 == 1 ) at Condition.tests.cpp: @@ -357,13 +312,6 @@ FAILED: CHECK( &o1 == &o2 ) with expansion: 0x == 0x -at Tricky.tests.cpp: - - -FAILED: - CHECK( o1 == o2 ) -with expansion: - {?} == {?} at Tricky.tests.cpp: @@ -399,12 +347,6 @@ with expansion: 2 > 10 at AssertionHandler.tests.cpp: - -FAILED: - CHECK( foo( 2 ) == 2 ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -415,12 +357,6 @@ with expansion: 2 > 10 at AssertionHandler.tests.cpp: - -FAILED: - REQUIRE( foo( 2 ) == 2 ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -510,13 +446,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" contains: "not there" (case insensitive) -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), ContainsSubstring( "STRING" ) ) -with expansion: - "this string contains 'abc' as a substring" contains: "STRING" at Matchers.tests.cpp: @@ -573,14 +502,6 @@ FAILED: CHECK_THAT( testStringForMatching(), EndsWith( "Substring" ) ) with expansion: "this string contains 'abc' as a substring" ends with: "Substring" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), EndsWith( "this", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" ends with: "this" (case - insensitive) at Matchers.tests.cpp: @@ -594,96 +515,6 @@ FAILED: CHECK( data.int_seven == 6 ) with expansion: 7 == 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven == 8 ) -with expansion: - 7 == 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven == 0 ) -with expansion: - 7 == 0 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 9.11f ) ) -with expansion: - 9.100000381f - == - Approx( 9.10999965667724609 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 9.0f ) ) -with expansion: - 9.100000381f == Approx( 9.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 1 ) ) -with expansion: - 9.100000381f == Approx( 1.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one == Approx( 0 ) ) -with expansion: - 9.100000381f == Approx( 0.0 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.double_pi == Approx( 3.1415 ) ) -with expansion: - 3.14159265350000005 - == - Approx( 3.14150000000000018 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "goodbye" ) -with expansion: - "hello" == "goodbye" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "hell" ) -with expansion: - "hello" == "hell" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello == "hello1" ) -with expansion: - "hello" == "hello1" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello.size() == 6 ) -with expansion: - 5 == 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( x == Approx( 1.301 ) ) -with expansion: - 1.30000000000000027 - == - Approx( 1.30099999999999993 ) at Condition.tests.cpp: @@ -696,14 +527,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" equals: "this string contains 'ABC' as a substring" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Equals( "something else", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" equals: "something else" (case - insensitive) at Matchers.tests.cpp: @@ -712,11 +535,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( doesNotThrow(), SpecialException, ExceptionMatcher{ 1 } ) at Matchers.tests.cpp: @@ -725,12 +543,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) Unknown exception -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( throwsAsInt( 1 ), SpecialException, ExceptionMatcher{ 1 } ) -Unknown exception at Matchers.tests.cpp: @@ -740,13 +552,6 @@ FAILED: CHECK_THROWS_MATCHES( throwsSpecialException( 3 ), SpecialException, ExceptionMatcher{ 1 } ) with expansion: SpecialException::what special exception has value of 1 -at Matchers.tests.cpp: - - -FAILED: - REQUIRE_THROWS_MATCHES( throwsSpecialException( 4 ), SpecialException, ExceptionMatcher{ 1 } ) -with expansion: - SpecialException::what special exception has value of 1 at Matchers.tests.cpp: @@ -763,17 +568,6 @@ at Matchers.tests.cpp: FAILED: CHECK_THROWS_AS( thisThrows(), std::string ) expected exception -at Exception.tests.cpp: - - -FAILED: - CHECK_THROWS_AS( thisDoesntThrow(), std::domain_error ) -at Exception.tests.cpp: - - -FAILED: - CHECK_NOTHROW( thisThrows() ) -expected exception at Exception.tests.cpp: @@ -791,12 +585,6 @@ FAILED: Throw a Catch::TestFailureException at AssertionHandler.tests.cpp: - -FAILED: - CHECK_NOTHROW( do_fail() ) -{ nested assertion failed } -at AssertionHandler.tests.cpp: - @@ -930,16 +718,6 @@ with expansion: 2 == 1 this message may be logged later this message should be logged -at Message.tests.cpp: - - -FAILED: - CHECK( a == 0 ) -with expansion: - 2 == 0 -this message may be logged later -this message should be logged -and this, but later at Message.tests.cpp: @@ -970,38 +748,6 @@ FAILED: CHECK( data.int_seven != 7 ) with expansion: 7 != 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one != Approx( 9.1f ) ) -with expansion: - 9.100000381f - != - Approx( 9.10000038146972656 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.double_pi != Approx( 3.1415926535 ) ) -with expansion: - 3.14159265350000005 - != - Approx( 3.14159265350000005 ) -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello != "hello" ) -with expansion: - "hello" != "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello.size() != 5 ) -with expansion: - 5 != 5 at Condition.tests.cpp: @@ -1126,132 +872,6 @@ FAILED: CHECK( data.int_seven > 7 ) with expansion: 7 > 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 7 ) -with expansion: - 7 < 7 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven > 8 ) -with expansion: - 7 > 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 6 ) -with expansion: - 7 < 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < 0 ) -with expansion: - 7 < 0 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven < -1 ) -with expansion: - 7 < -1 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven >= 8 ) -with expansion: - 7 >= 8 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.int_seven <= 6 ) -with expansion: - 7 <= 6 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one < 9 ) -with expansion: - 9.100000381f < 9 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one > 10 ) -with expansion: - 9.100000381f > 10 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.float_nine_point_one > 9.2 ) -with expansion: - 9.100000381f > 9.19999999999999929 -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "hello" ) -with expansion: - "hello" > "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "hello" ) -with expansion: - "hello" < "hello" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "hellp" ) -with expansion: - "hello" > "hellp" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello > "z" ) -with expansion: - "hello" > "z" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "hellm" ) -with expansion: - "hello" < "hellm" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello < "a" ) -with expansion: - "hello" < "a" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello >= "z" ) -with expansion: - "hello" >= "z" -at Condition.tests.cpp: - - -FAILED: - CHECK( data.str_hello <= "a" ) -with expansion: - "hello" <= "a" at Condition.tests.cpp: @@ -1381,22 +1001,6 @@ FAILED: with expansion: "this string contains 'abc' as a substring" matches "this STRING contains 'abc' as a substring" case sensitively -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Matches( "contains 'abc' as a substring" ) ) -with expansion: - "this string contains 'abc' as a substring" matches "contains 'abc' as a - substring" case sensitively -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), Matches( "this string contains 'abc' as a" ) ) -with expansion: - "this string contains 'abc' as a substring" matches "this string contains - 'abc' as a" case sensitively at Matchers.tests.cpp: @@ -1461,12 +1065,6 @@ at Matchers.tests.cpp: FAILED: CHECK( false ) This will be reported multiple times -at Message.tests.cpp: - - -FAILED: - CHECK( false ) -This will be reported multiple times at Message.tests.cpp: @@ -1511,14 +1109,6 @@ FAILED: CHECK_THAT( testStringForMatching(), StartsWith( "This String" ) ) with expansion: "this string contains 'abc' as a substring" starts with: "This String" -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( testStringForMatching(), StartsWith( "string", Catch::CaseSensitive::No ) ) -with expansion: - "this string contains 'abc' as a substring" starts with: "string" (case - insensitive) at Matchers.tests.cpp: @@ -1872,13 +1462,6 @@ FAILED: CHECK_THAT( v, VectorContains( -1 ) ) with expansion: { 1, 2, 3 } Contains: -1 -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, VectorContains( 1 ) ) -with expansion: - { } Contains: 1 at Matchers.tests.cpp: @@ -1888,13 +1471,6 @@ FAILED: CHECK_THAT( empty, Contains( v ) ) with expansion: { } Contains: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v, Contains( v2 ) ) -with expansion: - { 1, 2, 3 } Contains: { 1, 2, 4 } at Matchers.tests.cpp: @@ -1904,27 +1480,6 @@ FAILED: CHECK_THAT( v, Equals( v2 ) ) with expansion: { 1, 2, 3 } Equals: { 1, 2 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v2, Equals( v ) ) -with expansion: - { 1, 2 } Equals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, Equals( v ) ) -with expansion: - { } Equals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( v, Equals( empty ) ) -with expansion: - { 1, 2, 3 } Equals: { } at Matchers.tests.cpp: @@ -1934,27 +1489,6 @@ FAILED: CHECK_THAT( v, UnorderedEquals( empty ) ) with expansion: { 1, 2, 3 } UnorderedEquals: { } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( empty, UnorderedEquals( v ) ) -with expansion: - { } UnorderedEquals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( permuted, UnorderedEquals( v ) ) -with expansion: - { 1, 3 } UnorderedEquals: { 1, 2, 3 } -at Matchers.tests.cpp: - - -FAILED: - CHECK_THAT( permuted, UnorderedEquals( v ) ) -with expansion: - { 3, 1 } UnorderedEquals: { 1, 2, 3 } at Matchers.tests.cpp: @@ -2062,11 +1596,6 @@ at Misc.tests.cpp: SKIPPED skipping because answer = 41 -at Skip.tests.cpp: - - -SKIPPED -skipping because answer = 43 at Skip.tests.cpp: @@ -2085,28 +1614,12 @@ FAILED: CHECK( 3 == 4 ) at Skip.tests.cpp: - -SKIPPED -at Skip.tests.cpp: - FAILED: at Skip.tests.cpp: - -SKIPPED -at Skip.tests.cpp: - - -FAILED: -at Skip.tests.cpp: - - -SKIPPED -at Skip.tests.cpp: - @@ -2175,46 +1688,6 @@ FAILED: with expansion: 1 == 0 Testing if fib[0] (1) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[1] (1) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[3] (3) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[4] (5) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[6] (13) is even -at Misc.tests.cpp: - - -FAILED: - CHECK( ( fib[i] % 2 ) == 0 ) -with expansion: - 1 == 0 -Testing if fib[7] (21) is even at Misc.tests.cpp: @@ -2359,15 +1832,6 @@ Count 1 to 3... 1 2 3 -at Message.tests.cpp: - - -FAILED: - CHECK( false ) -Count 4 to 6... -4 -5 -6 at Message.tests.cpp: