| 2387 | // ========================================================================================= |
| 2388 | |
| 2389 | void report_query(const QueryData& in) override { |
| 2390 | test_run_start(); |
| 2391 | if(opt.list_reporters) { |
| 2392 | for(auto& curr : getListeners()) |
| 2393 | xml.scopedElement("Listener") |
| 2394 | .writeAttribute("priority", curr.first.first) |
| 2395 | .writeAttribute("name", curr.first.second); |
| 2396 | for(auto& curr : getReporters()) |
| 2397 | xml.scopedElement("Reporter") |
| 2398 | .writeAttribute("priority", curr.first.first) |
| 2399 | .writeAttribute("name", curr.first.second); |
| 2400 | } else if(opt.count || opt.list_test_cases) { |
| 2401 | for(unsigned i = 0; i < in.num_data; ++i) { |
| 2402 | xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name) |
| 2403 | .writeAttribute("testsuite", in.data[i]->m_test_suite) |
| 2404 | .writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str())) |
| 2405 | .writeAttribute("line", line(in.data[i]->m_line)) |
| 2406 | .writeAttribute("skipped", in.data[i]->m_skip); |
| 2407 | } |
| 2408 | xml.scopedElement("OverallResultsTestCases") |
| 2409 | .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); |
| 2410 | } else if(opt.list_test_suites) { |
| 2411 | for(unsigned i = 0; i < in.num_data; ++i) |
| 2412 | xml.scopedElement("TestSuite").writeAttribute("name", in.data[i]->m_test_suite); |
| 2413 | xml.scopedElement("OverallResultsTestCases") |
| 2414 | .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); |
| 2415 | xml.scopedElement("OverallResultsTestSuites") |
| 2416 | .writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters); |
| 2417 | } |
| 2418 | xml.endElement(); |
| 2419 | } |
| 2420 | |
| 2421 | void test_run_start() override { |
| 2422 | xml.writeDeclaration(); |
nothing calls this directly
no test coverage detected