| 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, |
nothing calls this directly
no test coverage detected