Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Use Columns to format reporter list

Commit
c91639e1d7bb4e19c9252a55c5484d61e8934a19
Author
Phil Nash ·
Parents
3a37f45a9727

Files · Download .tar.gz

Changes

 include/internal/catch_list.cpp | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

diff --git a/include/internal/catch_list.cpp b/include/internal/catch_list.cpp
index 84b58ac7..c411115b 100644
--- a/include/internal/catch_list.cpp
+++ b/include/internal/catch_list.cpp
@@ -133,16 +133,15 @@ namespace Catch {
             maxNameLen = (std::max)( maxNameLen, factoryKvp.first.size() );
 
         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()
-                    << "  "
-                    << factoryKvp.first
-                    << ':'
-                    << std::string( maxNameLen - factoryKvp.first.size() + 2, ' ' )
-                    << wrapper << '\n';
+                    << Column( factoryKvp.first + ":" )
+                            .indent(2)
+                            .width( 5+maxNameLen )
+                    +  Column( factoryKvp.second->getDescription() )
+                            .initialIndent(0)
+                            .indent(2)
+                            .width( CATCH_CONFIG_CONSOLE_WIDTH - maxNameLen-8 )
+                    << "\n";
         }
         Catch::cout() << std::endl;
         return factories.size();