mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 13:26:10 +01:00
Added stdout and stderr to XML Reporter
This commit is contained in:
parent
a189387f49
commit
23eb4cc580
@ -164,6 +164,11 @@ namespace Catch {
|
|||||||
if ( m_config->showDurations() == ShowDurations::Always )
|
if ( m_config->showDurations() == ShowDurations::Always )
|
||||||
e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() );
|
e.writeAttribute( "durationInSeconds", m_testCaseTimer.getElapsedSeconds() );
|
||||||
|
|
||||||
|
if( !testCaseStats.stdOut.empty() )
|
||||||
|
m_xml.scopedElement( "StdOut" ).writeText( trim( testCaseStats.stdOut ), false );
|
||||||
|
if( !testCaseStats.stdErr.empty() )
|
||||||
|
m_xml.scopedElement( "StdErr" ).writeText( trim( testCaseStats.stdErr ), false );
|
||||||
|
|
||||||
m_xml.endElement();
|
m_xml.endElement();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -6799,7 +6799,14 @@ re>"
|
|||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="Sends stuff to stdout and stderr">
|
<TestCase name="Sends stuff to stdout and stderr">
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true">
|
||||||
|
<StdOut>
|
||||||
|
A string sent directly to stdout
|
||||||
|
</StdOut>
|
||||||
|
<StdErr>
|
||||||
|
A string sent directly to stderr
|
||||||
|
</StdErr>
|
||||||
|
</OverallResult>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="Some simple comparisons between doubles">
|
<TestCase name="Some simple comparisons between doubles">
|
||||||
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ApproxTests.cpp" >
|
<Expression success="true" type="REQUIRE" filename="projects/<exe-name>/ApproxTests.cpp" >
|
||||||
@ -6859,7 +6866,12 @@ re>"
|
|||||||
<Section name="two">
|
<Section name="two">
|
||||||
<OverallResults successes="0" failures="1" expectedFailures="0"/>
|
<OverallResults successes="0" failures="1" expectedFailures="0"/>
|
||||||
</Section>
|
</Section>
|
||||||
<OverallResult success="false"/>
|
<OverallResult success="false">
|
||||||
|
<StdOut>
|
||||||
|
Message from section one
|
||||||
|
Message from section two
|
||||||
|
</StdOut>
|
||||||
|
</OverallResult>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="StartsWith string matcher">
|
<TestCase name="StartsWith string matcher">
|
||||||
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MiscTests.cpp" >
|
<Expression success="false" type="CHECK_THAT" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||||
@ -6908,7 +6920,12 @@ re>"
|
|||||||
<OverallResult success="true"/>
|
<OverallResult success="true"/>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="Strings can be rendered with colour">
|
<TestCase name="Strings can be rendered with colour">
|
||||||
<OverallResult success="true"/>
|
<OverallResult success="true">
|
||||||
|
<StdOut>
|
||||||
|
hello
|
||||||
|
hello
|
||||||
|
</StdOut>
|
||||||
|
</OverallResult>
|
||||||
</TestCase>
|
</TestCase>
|
||||||
<TestCase name="Tabs and newlines show in output">
|
<TestCase name="Tabs and newlines show in output">
|
||||||
<Expression success="false" type="CHECK" filename="projects/<exe-name>/MiscTests.cpp" >
|
<Expression success="false" type="CHECK" filename="projects/<exe-name>/MiscTests.cpp" >
|
||||||
|
Loading…
Reference in New Issue
Block a user