| 12192 | } |
| 12193 | |
| 12194 | void JunitReporter::writeTestCase(TestCaseNode const &testCaseNode) { |
| 12195 | TestCaseStats const &stats = testCaseNode.value; |
| 12196 | |
| 12197 | // All test cases have exactly one section - which represents the |
| 12198 | // test case itself. That section may have 0-n nested sections |
| 12199 | assert(testCaseNode.children.size() == 1); |
| 12200 | SectionNode const &rootSection = *testCaseNode.children.front(); |
| 12201 | |
| 12202 | std::string className = stats.testInfo.className; |
| 12203 | |
| 12204 | if (className.empty()) { |
| 12205 | className = fileNameTag(stats.testInfo.tags); |
| 12206 | if (className.empty()) |
| 12207 | className = "global"; |
| 12208 | } |
| 12209 | |
| 12210 | if (!m_config->name().empty()) |
| 12211 | className = m_config->name() + "." + className; |
| 12212 | |
| 12213 | writeSection(className, "", rootSection); |
| 12214 | } |
| 12215 | |
| 12216 | void JunitReporter::writeSection(std::string const &className, std::string const &rootName, |
| 12217 | SectionNode const §ionNode) { |
nothing calls this directly
no test coverage detected