in Doctest_tests/doctest.h [5137:5176]
void report_query(const QueryData& in) override {
if(opt.version) {
printVersion();
} else if(opt.help) {
printHelp();
} else if(opt.list_reporters) {
printRegisteredReporters();
} else if(opt.count || opt.list_test_cases) {
if(opt.list_test_cases) {
s << Color::Cyan << "[doctest] " << Color::None
<< "listing all test case names\n";
separator_to_stream();
}
for(unsigned i = 0; i < in.num_data; ++i)
s << Color::None << in.data[i]->m_name << "\n";
separator_to_stream();
s << Color::Cyan << "[doctest] " << Color::None
<< "unskipped test cases passing the current filters: "
<< g_cs->numTestCasesPassingFilters << "\n";
} else if(opt.list_test_suites) {
s << Color::Cyan << "[doctest] " << Color::None << "listing all test suites\n";
separator_to_stream();
for(unsigned i = 0; i < in.num_data; ++i)
s << Color::None << in.data[i]->m_test_suite << "\n";
separator_to_stream();
s << Color::Cyan << "[doctest] " << Color::None
<< "unskipped test cases passing the current filters: "
<< g_cs->numTestCasesPassingFilters << "\n";
s << Color::Cyan << "[doctest] " << Color::None
<< "test suites with unskipped test cases passing the current filters: "
<< g_cs->numTestSuitesPassingFilters << "\n";
}
}