| 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; |
no test coverage detected