MCPcopy Create free account
hub / github.com/RenderKit/oidn / writeGroup

Method writeGroup

external/catch.hpp:16887–16923  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16885 }
16886
16887 void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
16888 XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" );
16889
16890 TestGroupStats const& stats = groupNode.value;
16891 xml.writeAttribute( "name", stats.groupInfo.name );
16892 xml.writeAttribute( "errors", unexpectedExceptions );
16893 xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions );
16894 xml.writeAttribute( "tests", stats.totals.assertions.total() );
16895 xml.writeAttribute( "hostname", "tbd" ); // !TBD
16896 if( m_config->showDurations() == ShowDurations::Never )
16897 xml.writeAttribute( "time", "" );
16898 else
16899 xml.writeAttribute( "time", suiteTime );
16900 xml.writeAttribute( "timestamp", getCurrentTimestamp() );
16901
16902 // Write properties if there are any
16903 if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {
16904 auto properties = xml.scopedElement("properties");
16905 if (m_config->hasTestFilters()) {
16906 xml.scopedElement("property")
16907 .writeAttribute("name", "filters")
16908 .writeAttribute("value", serializeFilters(m_config->getTestsOrTags()));
16909 }
16910 if (m_config->rngSeed() != 0) {
16911 xml.scopedElement("property")
16912 .writeAttribute("name", "random-seed")
16913 .writeAttribute("value", m_config->rngSeed());
16914 }
16915 }
16916
16917 // Write test cases
16918 for( auto const& child : groupNode.children )
16919 writeTestCase( *child );
16920
16921 xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );
16922 xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );
16923 }
16924
16925 void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {
16926 TestCaseStats const& stats = testCaseNode.value;

Callers

nothing calls this directly

Calls 8

getCurrentTimestampFunction · 0.85
serializeFiltersFunction · 0.85
trimFunction · 0.85
scopedElementMethod · 0.80
showDurationsMethod · 0.80
hasTestFiltersMethod · 0.80
rngSeedMethod · 0.80
totalMethod · 0.45

Tested by

no test coverage detected