MCPcopy Create free account
hub / github.com/Profactor/cv-plot / listReporters

Function listReporters

CvPlot/ext/catch2/inc/catch.hpp:11191–11211  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

11189 }
11190
11191 std::size_t listReporters() {
11192 Catch::cout() << "Available reporters:\n";
11193 IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
11194 std::size_t maxNameLen = 0;
11195 for( auto const& factoryKvp : factories )
11196 maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
11197
11198 for( auto const& factoryKvp : factories ) {
11199 Catch::cout()
11200 << Column( factoryKvp.first + ":" )
11201 .indent(2)
11202 .width( 5+maxNameLen )
11203 + Column( factoryKvp.second->getDescription() )
11204 .initialIndent(0)
11205 .indent(2)
11206 .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
11207 << "\n";
11208 }
11209 Catch::cout() << std::endl;
11210 return factories.size();
11211 }
11212
11213 Option<std::size_t> list( std::shared_ptr<Config> const& config ) {
11214 Option<std::size_t> listedCount;

Callers 1

listFunction · 0.85

Calls 6

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

Tested by

no test coverage detected