mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-04 05:09:53 +01:00
Use Columns to format reporter list
This commit is contained in:
parent
3a37f45a97
commit
c91639e1d7
@ -133,16 +133,15 @@ namespace Catch {
|
|||||||
maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
|
maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
|
||||||
|
|
||||||
for( auto const& factoryKvp : getRegistryHub().getReporterRegistry().getFactories() ) {
|
for( auto const& factoryKvp : getRegistryHub().getReporterRegistry().getFactories() ) {
|
||||||
auto wrapper = Column( factoryKvp.second->getDescription() )
|
|
||||||
.initialIndent( 0 )
|
|
||||||
.indent( 7+maxNameLen )
|
|
||||||
.width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 );
|
|
||||||
Catch::cout()
|
Catch::cout()
|
||||||
<< " "
|
<< Column( factoryKvp.first + ":" )
|
||||||
<< factoryKvp.first
|
.indent(2)
|
||||||
<< ':'
|
.width( 5+maxNameLen )
|
||||||
<< std::string( maxNameLen - factoryKvp.first.size() + 2, ' ' )
|
+ Column( factoryKvp.second->getDescription() )
|
||||||
<< wrapper << '\n';
|
.initialIndent(0)
|
||||||
|
.indent(2)
|
||||||
|
.width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
|
||||||
|
<< "\n";
|
||||||
}
|
}
|
||||||
Catch::cout() << std::endl;
|
Catch::cout() << std::endl;
|
||||||
return factories.size();
|
return factories.size();
|
||||||
|
Loading…
Reference in New Issue
Block a user