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

Function listReporters

tests/catch.hpp:9000–9020  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

8998 }
8999
9000 std::size_t listReporters() {
9001 Catch::cout() << "Available reporters:\n";
9002 IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
9003 std::size_t maxNameLen = 0;
9004 for( auto const& factoryKvp : factories )
9005 maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
9006
9007 for( auto const& factoryKvp : factories ) {
9008 Catch::cout()
9009 << Column( factoryKvp.first + ":" )
9010 .indent(2)
9011 .width( 5+maxNameLen )
9012 + Column( factoryKvp.second->getDescription() )
9013 .initialIndent(0)
9014 .indent(2)
9015 .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
9016 << "\n";
9017 }
9018 Catch::cout() << std::endl;
9019 return factories.size();
9020 }
9021
9022 Option<std::size_t> list( std::shared_ptr<Config> const& config ) {
9023 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