MCPcopy Create free account
hub / github.com/RenderKit/embree / listReporters

Function listReporters

tutorials/external/catch.hpp:9226–9246  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9224 }
9225
9226 std::size_t listReporters() {
9227 Catch::cout() << "Available reporters:\n";
9228 IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
9229 std::size_t maxNameLen = 0;
9230 for( auto const& factoryKvp : factories )
9231 maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
9232
9233 for( auto const& factoryKvp : factories ) {
9234 Catch::cout()
9235 << Column( factoryKvp.first + ":" )
9236 .indent(2)
9237 .width( 5+maxNameLen )
9238 + Column( factoryKvp.second->getDescription() )
9239 .initialIndent(0)
9240 .indent(2)
9241 .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
9242 << "\n";
9243 }
9244 Catch::cout() << std::endl;
9245 return factories.size();
9246 }
9247
9248 Option<std::size_t> list( std::shared_ptr<Config> const& config ) {
9249 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