MCPcopy Create free account
hub / github.com/RenderKit/embree / writeSection

Method writeSection

tutorials/external/catch.hpp:14159–14192  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

14157 }
14158
14159 void JunitReporter::writeSection( std::string const& className,
14160 std::string const& rootName,
14161 SectionNode const& sectionNode ) {
14162 std::string name = trim( sectionNode.stats.sectionInfo.name );
14163 if( !rootName.empty() )
14164 name = rootName + '/' + name;
14165
14166 if( !sectionNode.assertions.empty() ||
14167 !sectionNode.stdOut.empty() ||
14168 !sectionNode.stdErr.empty() ) {
14169 XmlWriter::ScopedElement e = xml.scopedElement( "testcase" );
14170 if( className.empty() ) {
14171 xml.writeAttribute( "classname", name );
14172 xml.writeAttribute( "name", "root" );
14173 }
14174 else {
14175 xml.writeAttribute( "classname", className );
14176 xml.writeAttribute( "name", name );
14177 }
14178 xml.writeAttribute( "time", ::Catch::Detail::stringify( sectionNode.stats.durationInSeconds ) );
14179
14180 writeAssertions( sectionNode );
14181
14182 if( !sectionNode.stdOut.empty() )
14183 xml.scopedElement( "system-out" ).writeText( trim( sectionNode.stdOut ), false );
14184 if( !sectionNode.stdErr.empty() )
14185 xml.scopedElement( "system-err" ).writeText( trim( sectionNode.stdErr ), false );
14186 }
14187 for( auto const& childNode : sectionNode.childSections )
14188 if( className.empty() )
14189 writeSection( name, "", *childNode );
14190 else
14191 writeSection( className, name, *childNode );
14192 }
14193
14194 void JunitReporter::writeAssertions( SectionNode const& sectionNode ) {
14195 for( auto const& assertion : sectionNode.assertions )

Callers

nothing calls this directly

Calls 4

trimFunction · 0.85
stringifyFunction · 0.85
scopedElementMethod · 0.80
emptyMethod · 0.45

Tested by

no test coverage detected