| 11140 | } |
| 11141 | |
| 11142 | void JunitReporter::writeTestCase( TestCaseNode const& testCaseNode ) { |
| 11143 | TestCaseStats const& stats = testCaseNode.value; |
| 11144 | |
| 11145 | // All test cases have exactly one section - which represents the |
| 11146 | // test case itself. That section may have 0-n nested sections |
| 11147 | assert( testCaseNode.children.size() == 1 ); |
| 11148 | SectionNode const& rootSection = *testCaseNode.children.front(); |
| 11149 | |
| 11150 | std::string className = |
| 11151 | static_cast<std::string>( stats.testInfo->className ); |
| 11152 | |
| 11153 | if( className.empty() ) { |
| 11154 | className = fileNameTag(stats.testInfo->tags); |
| 11155 | if ( className.empty() ) { |
| 11156 | className = "global"; |
| 11157 | } |
| 11158 | } |
| 11159 | |
| 11160 | if ( !m_config->name().empty() ) |
| 11161 | className = static_cast<std::string>(m_config->name()) + '.' + className; |
| 11162 | |
| 11163 | normalizeNamespaceMarkers(className); |
| 11164 | |
| 11165 | writeSection( className, "", rootSection, stats.testInfo->okToFail() ); |
| 11166 | } |
| 11167 | |
| 11168 | void JunitReporter::writeSection( std::string const& className, |
| 11169 | std::string const& rootName, |
nothing calls this directly
no test coverage detected