MCPcopy Create free account
hub / github.com/apache/trafficserver / listReporters

Function listReporters

lib/catch2/catch.hpp:11364–11384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11362 }
11363
11364 std::size_t listReporters() {
11365 Catch::cout() << "Available reporters:\n";
11366 IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
11367 std::size_t maxNameLen = 0;
11368 for( auto const& factoryKvp : factories )
11369 maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
11370
11371 for( auto const& factoryKvp : factories ) {
11372 Catch::cout()
11373 << Column( factoryKvp.first + ":" )
11374 .indent(2)
11375 .width( 5+maxNameLen )
11376 + Column( factoryKvp.second->getDescription() )
11377 .initialIndent(0)
11378 .indent(2)
11379 .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
11380 << "\n";
11381 }
11382 Catch::cout() << std::endl;
11383 return factories.size();
11384 }
11385
11386 Option<std::size_t> list( std::shared_ptr<Config> const& config ) {
11387 Option<std::size_t> listedCount;

Callers 1

listFunction · 0.85

Calls 6

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

Tested by

no test coverage detected