MCPcopy Create free account
hub / github.com/catchorg/Catch2 / listTestNamesOnly

Function listTestNamesOnly

extras/catch_amalgamated.cpp:10278–10292  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10276
10277 namespace {
10278 void listTestNamesOnly(std::ostream& out,
10279 std::vector<TestCaseHandle> const& tests) {
10280 for (auto const& test : tests) {
10281 auto const& testCaseInfo = test.getTestCaseInfo();
10282
10283 if (startsWith(testCaseInfo.name, '#')) {
10284 out << '"' << testCaseInfo.name << '"';
10285 } else {
10286 out << testCaseInfo.name;
10287 }
10288
10289 out << '\n';
10290 }
10291 out << std::flush;
10292 }
10293 } // end unnamed namespace
10294
10295

Callers 1

defaultListTestsFunction · 0.70

Calls 1

startsWithFunction · 0.70

Tested by

no test coverage detected