MCPcopy Create free account
hub / github.com/apache/qpid-proton / writeGroup

Method writeGroup

tests/include/catch.hpp:16914–16950  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

16912 }
16913
16914 void JunitReporter::writeGroup( TestGroupNode const& groupNode, double suiteTime ) {
16915 XmlWriter::ScopedElement e = xml.scopedElement( "testsuite" );
16916
16917 TestGroupStats const& stats = groupNode.value;
16918 xml.writeAttribute( "name", stats.groupInfo.name );
16919 xml.writeAttribute( "errors", unexpectedExceptions );
16920 xml.writeAttribute( "failures", stats.totals.assertions.failed-unexpectedExceptions );
16921 xml.writeAttribute( "tests", stats.totals.assertions.total() );
16922 xml.writeAttribute( "hostname", "tbd" ); // !TBD
16923 if( m_config->showDurations() == ShowDurations::Never )
16924 xml.writeAttribute( "time", "" );
16925 else
16926 xml.writeAttribute( "time", formatDuration( suiteTime ) );
16927 xml.writeAttribute( "timestamp", getCurrentTimestamp() );
16928
16929 // Write properties if there are any
16930 if (m_config->hasTestFilters() || m_config->rngSeed() != 0) {
16931 auto properties = xml.scopedElement("properties");
16932 if (m_config->hasTestFilters()) {
16933 xml.scopedElement("property")
16934 .writeAttribute("name", "filters")
16935 .writeAttribute("value", serializeFilters(m_config->getTestsOrTags()));
16936 }
16937 if (m_config->rngSeed() != 0) {
16938 xml.scopedElement("property")
16939 .writeAttribute("name", "random-seed")
16940 .writeAttribute("value", m_config->rngSeed());
16941 }
16942 }
16943
16944 // Write test cases
16945 for( auto const& child : groupNode.children )
16946 writeTestCase( *child );
16947
16948 xml.scopedElement( "system-out" ).writeText( trim( stdOutForSuite ), XmlFormatting::Newline );
16949 xml.scopedElement( "system-err" ).writeText( trim( stdErrForSuite ), XmlFormatting::Newline );
16950 }
16951
16952 void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {
16953 TestCaseStats const& stats = testCaseNode.value;

Callers

nothing calls this directly

Calls 9

formatDurationFunction · 0.85
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