MCPcopy Create free account
hub / github.com/ObEngine/ObEngine / listReporters

Function listReporters

extlibs/catch/include/catch/catch.hpp:10941–10961  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

10939 }
10940
10941 std::size_t listReporters() {
10942 Catch::cout() << "Available reporters:\n";
10943 IReporterRegistry::FactoryMap const& factories = getRegistryHub().getReporterRegistry().getFactories();
10944 std::size_t maxNameLen = 0;
10945 for( auto const& factoryKvp : factories )
10946 maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
10947
10948 for( auto const& factoryKvp : factories ) {
10949 Catch::cout()
10950 << Column( factoryKvp.first + ":" )
10951 .indent(2)
10952 .width( 5+maxNameLen )
10953 + Column( factoryKvp.second->getDescription() )
10954 .initialIndent(0)
10955 .indent(2)
10956 .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
10957 << "\n";
10958 }
10959 Catch::cout() << std::endl;
10960 return factories.size();
10961 }
10962
10963 Option<std::size_t> list( std::shared_ptr<Config> const& config ) {
10964 Option<std::size_t> listedCount;

Callers 1

listFunction · 0.85

Calls 6

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

Tested by

no test coverage detected