MCPcopy Create free account
hub / github.com/InteractiveComputerGraphics/SPlisHSPlasH / listReporters

Function listReporters

extern/Catch2/catch.hpp:11362–11382  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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