MCPcopy Create free account
hub / github.com/CodingGay/BlackDex / listReporters

Function listReporters

Bcore/src/main/cpp/Dobby/tests/catch.hpp:7620–7637  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

7618}
7619
7620std::size_t listReporters(Config const & /*config*/) {
7621 Catch::cout() << "Available reporters:\n";
7622 IReporterRegistry::FactoryMap const &factories = getRegistryHub().getReporterRegistry().getFactories();
7623 std::size_t maxNameLen = 0;
7624 for (auto const &factoryKvp : factories)
7625 maxNameLen = (std::max)(maxNameLen, factoryKvp.first.size());
7626
7627 for (auto const &factoryKvp : factories) {
7628 Catch::cout() << Column(factoryKvp.first + ":").indent(2).width(5 + maxNameLen) +
7629 Column(factoryKvp.second->getDescription())
7630 .initialIndent(0)
7631 .indent(2)
7632 .width(CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen - 8)
7633 << "\n";
7634 }
7635 Catch::cout() << std::endl;
7636 return factories.size();
7637}
7638
7639Option<std::size_t> list(Config const &config) {
7640 Option<std::size_t> listedCount;

Callers 1

listFunction · 0.85

Calls 6

ColumnClass · 0.85
widthMethod · 0.80
initialIndentMethod · 0.80
sizeMethod · 0.45
indentMethod · 0.45
getDescriptionMethod · 0.45

Tested by

no test coverage detected