| 2411 | // ========================================================================================= |
| 2412 | |
| 2413 | void report_query(const QueryData& in) override { |
| 2414 | test_run_start(); |
| 2415 | if(opt.list_reporters) { |
| 2416 | for(auto& curr : getListeners()) |
| 2417 | xml.scopedElement("Listener") |
| 2418 | .writeAttribute("priority", curr.first.first) |
| 2419 | .writeAttribute("name", curr.first.second); |
| 2420 | for(auto& curr : getReporters()) |
| 2421 | xml.scopedElement("Reporter") |
| 2422 | .writeAttribute("priority", curr.first.first) |
| 2423 | .writeAttribute("name", curr.first.second); |
| 2424 | } else if(opt.count || opt.list_test_cases) { |
| 2425 | for(unsigned i = 0; i < in.num_data; ++i) { |
| 2426 | xml.scopedElement("TestCase").writeAttribute("name", in.data[i]->m_name) |
| 2427 | .writeAttribute("testsuite", in.data[i]->m_test_suite) |
| 2428 | .writeAttribute("filename", skipPathFromFilename(in.data[i]->m_file.c_str())) |
| 2429 | .writeAttribute("line", line(in.data[i]->m_line)) |
| 2430 | .writeAttribute("skipped", in.data[i]->m_skip); |
| 2431 | } |
| 2432 | xml.scopedElement("OverallResultsTestCases") |
| 2433 | .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); |
| 2434 | } else if(opt.list_test_suites) { |
| 2435 | for(unsigned i = 0; i < in.num_data; ++i) |
| 2436 | xml.scopedElement("TestSuite").writeAttribute("name", in.data[i]->m_test_suite); |
| 2437 | xml.scopedElement("OverallResultsTestCases") |
| 2438 | .writeAttribute("unskipped", in.run_stats->numTestCasesPassingFilters); |
| 2439 | xml.scopedElement("OverallResultsTestSuites") |
| 2440 | .writeAttribute("unskipped", in.run_stats->numTestSuitesPassingFilters); |
| 2441 | } |
| 2442 | xml.endElement(); |
| 2443 | } |
| 2444 | |
| 2445 | void test_run_start() override { |
| 2446 | xml.writeDeclaration(); |
nothing calls this directly
no test coverage detected