MCPcopy Create free account
hub / github.com/ChaiScript/ChaiScript / writeTestCase

Method writeTestCase

unittests/catch.hpp:12306–12326  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12304 }
12305
12306 void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) {
12307 TestCaseStats const& stats = testCaseNode.value;
12308
12309 // All test cases have exactly one section - which represents the
12310 // test case itself. That section may have 0-n nested sections
12311 assert( testCaseNode.children.size() == 1 );
12312 SectionNode const& rootSection = *testCaseNode.children.front();
12313
12314 std::string className = stats.testInfo.className;
12315
12316 if( className.empty() ) {
12317 className = fileNameTag(stats.testInfo.tags);
12318 if ( className.empty() )
12319 className = "global";
12320 }
12321
12322 if ( !m_config->name().empty() )
12323 className = m_config->name() + "." + className;
12324
12325 writeSection( className, "", rootSection );
12326 }
12327
12328 void JunitReporter::writeSection( std::string const& className,
12329 std::string const& rootName,

Callers

nothing calls this directly

Calls 5

fileNameTagFunction · 0.85
frontMethod · 0.80
sizeMethod · 0.45
emptyMethod · 0.45
nameMethod · 0.45

Tested by

no test coverage detected