| 16610 | } |
| 16611 | |
| 16612 | void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) { |
| 16613 | TestCaseStats const& stats = testCaseNode.value; |
| 16614 | |
| 16615 | // All test cases have exactly one section - which represents the |
| 16616 | // test case itself. That section may have 0-n nested sections |
| 16617 | assert( testCaseNode.children.size() == 1 ); |
| 16618 | SectionNode const& rootSection = *testCaseNode.children.front(); |
| 16619 | |
| 16620 | std::string className = stats.testInfo.className; |
| 16621 | |
| 16622 | if( className.empty() ) { |
| 16623 | className = fileNameTag(stats.testInfo.tags); |
| 16624 | if ( className.empty() ) |
| 16625 | className = "global"; |
| 16626 | } |
| 16627 | |
| 16628 | if ( !m_config->name().empty() ) |
| 16629 | className = m_config->name() + "." + className; |
| 16630 | |
| 16631 | writeSection( className, "", rootSection ); |
| 16632 | } |
| 16633 | |
| 16634 | void JunitReporter::writeSection( std::string const& className, |
| 16635 | std::string const& rootName, |
nothing calls this directly
no test coverage detected