mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
parent
de67278e14
commit
b406ad52a7
@ -168,12 +168,13 @@ namespace Catch {
|
|||||||
if ( !m_config->name().empty() )
|
if ( !m_config->name().empty() )
|
||||||
className = static_cast<std::string>(m_config->name()) + '.' + className;
|
className = static_cast<std::string>(m_config->name()) + '.' + className;
|
||||||
|
|
||||||
writeSection( className, "", rootSection );
|
writeSection( className, "", rootSection, stats.testInfo->okToFail() );
|
||||||
}
|
}
|
||||||
|
|
||||||
void JunitReporter::writeSection( std::string const& className,
|
void JunitReporter::writeSection( std::string const& className,
|
||||||
std::string const& rootName,
|
std::string const& rootName,
|
||||||
SectionNode const& sectionNode ) {
|
SectionNode const& sectionNode,
|
||||||
|
bool testOkToFail) {
|
||||||
std::string name = trim( sectionNode.stats.sectionInfo.name );
|
std::string name = trim( sectionNode.stats.sectionInfo.name );
|
||||||
if( !rootName.empty() )
|
if( !rootName.empty() )
|
||||||
name = rootName + '/' + name;
|
name = rootName + '/' + name;
|
||||||
@ -197,8 +198,14 @@ namespace Catch {
|
|||||||
// events and write those out appropriately.
|
// events and write those out appropriately.
|
||||||
xml.writeAttribute( "status"_sr, "run"_sr );
|
xml.writeAttribute( "status"_sr, "run"_sr );
|
||||||
|
|
||||||
|
if (sectionNode.stats.assertions.failedButOk) {
|
||||||
|
xml.scopedElement("skipped")
|
||||||
|
.writeAttribute("message", "TEST_CASE tagged with !mayfail");
|
||||||
|
}
|
||||||
|
|
||||||
writeAssertions( sectionNode );
|
writeAssertions( sectionNode );
|
||||||
|
|
||||||
|
|
||||||
if( !sectionNode.stdOut.empty() )
|
if( !sectionNode.stdOut.empty() )
|
||||||
xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );
|
xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), XmlFormatting::Newline );
|
||||||
if( !sectionNode.stdErr.empty() )
|
if( !sectionNode.stdErr.empty() )
|
||||||
@ -206,9 +213,9 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
for( auto const& childNode : sectionNode.childSections )
|
for( auto const& childNode : sectionNode.childSections )
|
||||||
if( className.empty() )
|
if( className.empty() )
|
||||||
writeSection( name, "", *childNode );
|
writeSection( name, "", *childNode, testOkToFail );
|
||||||
else
|
else
|
||||||
writeSection( className, name, *childNode );
|
writeSection( className, name, *childNode, testOkToFail );
|
||||||
}
|
}
|
||||||
|
|
||||||
void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {
|
void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {
|
||||||
|
@ -39,7 +39,8 @@ namespace Catch {
|
|||||||
|
|
||||||
void writeSection( std::string const& className,
|
void writeSection( std::string const& className,
|
||||||
std::string const& rootName,
|
std::string const& rootName,
|
||||||
SectionNode const& sectionNode );
|
SectionNode const& sectionNode,
|
||||||
|
bool testOkToFail );
|
||||||
|
|
||||||
void writeAssertions(SectionNode const& sectionNode);
|
void writeAssertions(SectionNode const& sectionNode);
|
||||||
void writeAssertion(AssertionStats const& stats);
|
void writeAssertion(AssertionStats const& stats);
|
||||||
|
@ -164,6 +164,7 @@ Nor would this
|
|||||||
:test-result: FAIL Matchers can be composed with both && and || - failing
|
:test-result: FAIL Matchers can be composed with both && and || - failing
|
||||||
:test-result: PASS Matchers can be negated (Not) with the ! operator
|
:test-result: PASS Matchers can be negated (Not) with the ! operator
|
||||||
:test-result: FAIL Matchers can be negated (Not) with the ! operator - failing
|
:test-result: FAIL Matchers can be negated (Not) with the ! operator - failing
|
||||||
|
:test-result: XFAIL Mayfail test case with nested sections
|
||||||
:test-result: FAIL Mismatching exception messages failing the test
|
:test-result: FAIL Mismatching exception messages failing the test
|
||||||
:test-result: PASS Nested generators and captured variables
|
:test-result: PASS Nested generators and captured variables
|
||||||
:test-result: FAIL Nice descriptive name
|
:test-result: FAIL Nice descriptive name
|
||||||
|
@ -911,6 +911,10 @@ Matchers.tests.cpp:<line number>: passed: testStringForMatching(), ( ContainsSub
|
|||||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
|
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), ( ContainsSubstring( "string" ) || ContainsSubstring( "different" ) ) && ContainsSubstring( "random" ) for: "this string contains 'abc' as a substring" ( ( contains: "string" or contains: "different" ) and contains: "random" )
|
||||||
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
|
Matchers.tests.cpp:<line number>: passed: testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
|
||||||
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
|
Matchers.tests.cpp:<line number>: failed: testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
|
||||||
|
Condition.tests.cpp:<line number>: failed: explicitly
|
||||||
|
Condition.tests.cpp:<line number>: failed: explicitly
|
||||||
|
Condition.tests.cpp:<line number>: failed: explicitly
|
||||||
|
Condition.tests.cpp:<line number>: failed: explicitly
|
||||||
Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
|
Exception.tests.cpp:<line number>: passed: thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
|
||||||
Exception.tests.cpp:<line number>: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail"
|
Exception.tests.cpp:<line number>: failed: thisThrows(), "should fail" for: "expected exception" equals: "should fail"
|
||||||
Generators.tests.cpp:<line number>: passed: values > -6 for: 3 > -6
|
Generators.tests.cpp:<line number>: passed: values > -6 for: 3 > -6
|
||||||
|
@ -694,6 +694,46 @@ Matchers.tests.cpp:<line number>: FAILED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
"this string contains 'abc' as a substring" not contains: "substring"
|
"this string contains 'abc' as a substring" not contains: "substring"
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
A
|
||||||
|
1
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
A
|
||||||
|
2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
B
|
||||||
|
1
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
B
|
||||||
|
2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Mismatching exception messages failing the test
|
Mismatching exception messages failing the test
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -1386,6 +1426,6 @@ due to unexpected exception with message:
|
|||||||
Why would you throw a std::string?
|
Why would you throw a std::string?
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 371 | 295 passed | 70 failed | 6 failed as expected
|
test cases: 372 | 295 passed | 70 failed | 7 failed as expected
|
||||||
assertions: 2110 | 1958 passed | 129 failed | 23 failed as expected
|
assertions: 2114 | 1958 passed | 129 failed | 27 failed as expected
|
||||||
|
|
||||||
|
@ -6962,6 +6962,46 @@ Matchers.tests.cpp:<line number>: FAILED:
|
|||||||
with expansion:
|
with expansion:
|
||||||
"this string contains 'abc' as a substring" not contains: "substring"
|
"this string contains 'abc' as a substring" not contains: "substring"
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
A
|
||||||
|
1
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
A
|
||||||
|
2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
B
|
||||||
|
1
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Mayfail test case with nested sections
|
||||||
|
B
|
||||||
|
2
|
||||||
|
-------------------------------------------------------------------------------
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
...............................................................................
|
||||||
|
|
||||||
|
Condition.tests.cpp:<line number>: FAILED:
|
||||||
|
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
Mismatching exception messages failing the test
|
Mismatching exception messages failing the test
|
||||||
-------------------------------------------------------------------------------
|
-------------------------------------------------------------------------------
|
||||||
@ -16990,6 +17030,6 @@ Misc.tests.cpp:<line number>
|
|||||||
Misc.tests.cpp:<line number>: PASSED:
|
Misc.tests.cpp:<line number>: PASSED:
|
||||||
|
|
||||||
===============================================================================
|
===============================================================================
|
||||||
test cases: 371 | 279 passed | 86 failed | 6 failed as expected
|
test cases: 372 | 279 passed | 86 failed | 7 failed as expected
|
||||||
assertions: 2127 | 1958 passed | 146 failed | 23 failed as expected
|
assertions: 2131 | 1958 passed | 146 failed | 27 failed as expected
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<testsuitesloose text artifact
|
<testsuitesloose text artifact
|
||||||
>
|
>
|
||||||
<testsuite name="<exe-name>" errors="17" failures="129" tests="2127" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
<testsuite name="<exe-name>" errors="17" failures="129" tests="2131" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
|
||||||
<properties>
|
<properties>
|
||||||
<property name="random-seed" value="1"/>
|
<property name="random-seed" value="1"/>
|
||||||
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
|
<property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
|
||||||
@ -50,6 +50,7 @@ Nor would this
|
|||||||
<testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - double" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - double" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - float" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="#2152 - ULP checks between differently signed values were wrong - float" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/outside assertions" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<error type="TEST_CASE">
|
<error type="TEST_CASE">
|
||||||
FAILED:
|
FAILED:
|
||||||
expected exception
|
expected exception
|
||||||
@ -58,6 +59,7 @@ Exception.tests.cpp:<line number>
|
|||||||
</error>
|
</error>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="#748 - captures with unexpected exceptions/inside REQUIRE_NOTHROW" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<error message="thisThrows()" type="REQUIRE_NOTHROW">
|
<error message="thisThrows()" type="REQUIRE_NOTHROW">
|
||||||
FAILED:
|
FAILED:
|
||||||
REQUIRE_NOTHROW( thisThrows() )
|
REQUIRE_NOTHROW( thisThrows() )
|
||||||
@ -70,6 +72,7 @@ Exception.tests.cpp:<line number>
|
|||||||
<testcase classname="<exe-name>.global" name="#809" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="#809" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="#833" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="#833" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="#835 -- errno should not be touched by Catch" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="#835 -- errno should not be touched by Catch" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<failure message="f() == 0" type="CHECK">
|
<failure message="f() == 0" type="CHECK">
|
||||||
FAILED:
|
FAILED:
|
||||||
CHECK( f() == 0 )
|
CHECK( f() == 0 )
|
||||||
@ -463,6 +466,7 @@ Matchers.tests.cpp:<line number>
|
|||||||
<testcase classname="<exe-name>.global" name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="Enums in namespaces can quickly have stringification enabled using REGISTER_ENUM" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Epsilon only applies to Approx's value" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="Epsilon only applies to Approx's value" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Equality checks that should fail" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="Equality checks that should fail" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<failure message="data.int_seven == 6" type="CHECK">
|
<failure message="data.int_seven == 6" type="CHECK">
|
||||||
FAILED:
|
FAILED:
|
||||||
CHECK( data.int_seven == 6 )
|
CHECK( data.int_seven == 6 )
|
||||||
@ -756,6 +760,7 @@ Message.tests.cpp:<line number>
|
|||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="Inequality checks that should fail" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<failure message="data.int_seven != 7" type="CHECK">
|
<failure message="data.int_seven != 7" type="CHECK">
|
||||||
FAILED:
|
FAILED:
|
||||||
CHECK( data.int_seven != 7 )
|
CHECK( data.int_seven != 7 )
|
||||||
@ -819,6 +824,34 @@ with expansion:
|
|||||||
Matchers.tests.cpp:<line number>
|
Matchers.tests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
|
<testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/A" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
|
<failure type="FAIL">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/A" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
|
<failure type="FAIL">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/1/B" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
|
<failure type="FAIL">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
|
<testcase classname="<exe-name>.global" name="Mayfail test case with nested sections/2/B" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
|
<failure type="FAIL">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</failure>
|
||||||
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="Mismatching exception messages failing the test" time="{duration}" status="run">
|
||||||
<failure message="thisThrows(), "should fail"" type="REQUIRE_THROWS_WITH">
|
<failure message="thisThrows(), "should fail"" type="REQUIRE_THROWS_WITH">
|
||||||
FAILED:
|
FAILED:
|
||||||
@ -1285,12 +1318,14 @@ Misc.tests.cpp:<line number>
|
|||||||
<testcase classname="<exe-name>.global" name="Test with special, characters "in name" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="Test with special, characters "in name" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Testing checked-if" time="{duration}" status="run"/>
|
<testcase classname="<exe-name>.global" name="Testing checked-if" time="{duration}" status="run"/>
|
||||||
<testcase classname="<exe-name>.global" name="Testing checked-if 2" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="Testing checked-if 2" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
FAILED:
|
FAILED:
|
||||||
Misc.tests.cpp:<line number>
|
Misc.tests.cpp:<line number>
|
||||||
</failure>
|
</failure>
|
||||||
</testcase>
|
</testcase>
|
||||||
<testcase classname="<exe-name>.global" name="Testing checked-if 3" time="{duration}" status="run">
|
<testcase classname="<exe-name>.global" name="Testing checked-if 3" time="{duration}" status="run">
|
||||||
|
<skipped message="TEST_CASE tagged with !mayfail"/>
|
||||||
<failure type="FAIL">
|
<failure type="FAIL">
|
||||||
FAILED:
|
FAILED:
|
||||||
Misc.tests.cpp:<line number>
|
Misc.tests.cpp:<line number>
|
||||||
|
@ -660,6 +660,30 @@ Condition.tests.cpp:<line number>
|
|||||||
</skipped>
|
</skipped>
|
||||||
</testCase>
|
</testCase>
|
||||||
<testCase name="Inequality checks that should succeed" duration="{duration}"/>
|
<testCase name="Inequality checks that should succeed" duration="{duration}"/>
|
||||||
|
<testCase name="Mayfail test case with nested sections/1/A" duration="{duration}">
|
||||||
|
<skipped message="FAIL()">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</skipped>
|
||||||
|
</testCase>
|
||||||
|
<testCase name="Mayfail test case with nested sections/2/A" duration="{duration}">
|
||||||
|
<skipped message="FAIL()">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</skipped>
|
||||||
|
</testCase>
|
||||||
|
<testCase name="Mayfail test case with nested sections/1/B" duration="{duration}">
|
||||||
|
<skipped message="FAIL()">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</skipped>
|
||||||
|
</testCase>
|
||||||
|
<testCase name="Mayfail test case with nested sections/2/B" duration="{duration}">
|
||||||
|
<skipped message="FAIL()">
|
||||||
|
FAILED:
|
||||||
|
Condition.tests.cpp:<line number>
|
||||||
|
</skipped>
|
||||||
|
</testCase>
|
||||||
<testCase name="Ordering comparison checks that should fail" duration="{duration}">
|
<testCase name="Ordering comparison checks that should fail" duration="{duration}">
|
||||||
<failure message="CHECK(data.int_seven > 7)">
|
<failure message="CHECK(data.int_seven > 7)">
|
||||||
FAILED:
|
FAILED:
|
||||||
|
@ -1804,6 +1804,14 @@ not ok {test-number} - testStringForMatching(), ( ContainsSubstring( "string" )
|
|||||||
ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
|
ok {test-number} - testStringForMatching(), !ContainsSubstring( "different" ) for: "this string contains 'abc' as a substring" not contains: "different"
|
||||||
# Matchers can be negated (Not) with the ! operator - failing
|
# Matchers can be negated (Not) with the ! operator - failing
|
||||||
not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
|
not ok {test-number} - testStringForMatching(), !ContainsSubstring( "substring" ) for: "this string contains 'abc' as a substring" not contains: "substring"
|
||||||
|
# Mayfail test case with nested sections
|
||||||
|
not ok {test-number} - explicitly
|
||||||
|
# Mayfail test case with nested sections
|
||||||
|
not ok {test-number} - explicitly
|
||||||
|
# Mayfail test case with nested sections
|
||||||
|
not ok {test-number} - explicitly
|
||||||
|
# Mayfail test case with nested sections
|
||||||
|
not ok {test-number} - explicitly
|
||||||
# Mismatching exception messages failing the test
|
# Mismatching exception messages failing the test
|
||||||
ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
|
ok {test-number} - thisThrows(), "expected exception" for: "expected exception" equals: "expected exception"
|
||||||
# Mismatching exception messages failing the test
|
# Mismatching exception messages failing the test
|
||||||
@ -4256,5 +4264,5 @@ ok {test-number} - q3 == 23. for: 23.0 == 23.0
|
|||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
# xmlentitycheck
|
# xmlentitycheck
|
||||||
ok {test-number} -
|
ok {test-number} -
|
||||||
1..2127
|
1..2131
|
||||||
|
|
||||||
|
@ -406,6 +406,12 @@ Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringFor
|
|||||||
##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing']
|
##teamcity[testStarted name='Matchers can be negated (Not) with the ! operator - failing']
|
||||||
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n']
|
Matchers.tests.cpp:<line number>|nexpression failed|n CHECK_THAT( testStringForMatching(), !ContainsSubstring( "substring" ) )|nwith expansion:|n "this string contains |'abc|' as a substring" not contains: "substring"|n']
|
||||||
##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"]
|
##teamcity[testFinished name='Matchers can be negated (Not) with the ! operator - failing' duration="{duration}"]
|
||||||
|
##teamcity[testStarted name='Mayfail test case with nested sections']
|
||||||
|
Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n']
|
||||||
|
Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n']
|
||||||
|
Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n']
|
||||||
|
Condition.tests.cpp:<line number>|nexplicit failure- failure ignore as test marked as |'ok to fail|'|n']
|
||||||
|
##teamcity[testFinished name='Mayfail test case with nested sections' duration="{duration}"]
|
||||||
##teamcity[testStarted name='Mismatching exception messages failing the test']
|
##teamcity[testStarted name='Mismatching exception messages failing the test']
|
||||||
Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n']
|
Exception.tests.cpp:<line number>|nexpression failed|n REQUIRE_THROWS_WITH( thisThrows(), "should fail" )|nwith expansion:|n "expected exception" equals: "should fail"|n']
|
||||||
##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"]
|
##teamcity[testFinished name='Mismatching exception messages failing the test' duration="{duration}"]
|
||||||
|
@ -8426,6 +8426,43 @@ Nor would this
|
|||||||
</Expression>
|
</Expression>
|
||||||
<OverallResult success="false"/>
|
<OverallResult success="false"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
|
<TestCase name="Mayfail test case with nested sections" tags="[!mayfail]" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" />
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" />
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<Section name="A" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="0"/>
|
||||||
|
</Section>
|
||||||
|
<Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Section name="1" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" />
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Section name="2" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<Failure filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" />
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="1"/>
|
||||||
|
</Section>
|
||||||
|
<Section name="B" filename="tests/<exe-name>/UsageTests/Condition.tests.cpp" >
|
||||||
|
<OverallResults successes="0" failures="0" expectedFailures="0"/>
|
||||||
|
</Section>
|
||||||
|
<OverallResult success="true"/>
|
||||||
|
</TestCase>
|
||||||
<TestCase name="Mismatching exception messages failing the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
|
<TestCase name="Mismatching exception messages failing the test" tags="[!throws][.][failing]" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
|
||||||
<Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
|
<Expression success="true" type="REQUIRE_THROWS_WITH" filename="tests/<exe-name>/UsageTests/Exception.tests.cpp" >
|
||||||
<Original>
|
<Original>
|
||||||
@ -19990,6 +20027,6 @@ loose text artifact
|
|||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<OverallResults successes="1958" failures="146" expectedFailures="23"/>
|
<OverallResults successes="1958" failures="146" expectedFailures="27"/>
|
||||||
<OverallResultsCases successes="279" failures="86" expectedFailures="6"/>
|
<OverallResultsCases successes="279" failures="86" expectedFailures="7"/>
|
||||||
</Catch2TestRun>
|
</Catch2TestRun>
|
||||||
|
@ -86,6 +86,19 @@ TEST_CASE( "Equality checks that should fail", "[.][failing][!mayfail]" )
|
|||||||
CHECK( x == Approx( 1.301 ) );
|
CHECK( x == Approx( 1.301 ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Needed to test junit reporter's handling of mayfail test cases and sections
|
||||||
|
TEST_CASE("Mayfail test case with nested sections", "[!mayfail]") {
|
||||||
|
SECTION("A") {
|
||||||
|
SECTION("1") { FAIL(); }
|
||||||
|
SECTION("2") { FAIL(); }
|
||||||
|
}
|
||||||
|
SECTION("B") {
|
||||||
|
SECTION("1") { FAIL(); }
|
||||||
|
SECTION("2") { FAIL(); }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
TEST_CASE( "Inequality checks that should succeed" )
|
TEST_CASE( "Inequality checks that should succeed" )
|
||||||
{
|
{
|
||||||
TestData data;
|
TestData data;
|
||||||
|
Loading…
Reference in New Issue
Block a user