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

Renamed RunnerConfig to just Config (now its the only one)

Commit
949d9ead049b49ac0a81220b7eb417a1daf69f93
Author
Phil Nash ·
Parents
50712a34c338

Files · Download .tar.gz

Changes

 catch_runner.hpp                |  4 ++--
 internal/catch_commandline.hpp  | 18 +++++++++---------
 internal/catch_list.hpp         |  8 ++++----
 internal/catch_runner_impl.hpp  |  4 ++--
 internal/catch_runnerconfig.hpp | 10 +++++-----
 5 files changed, 22 insertions(+), 22 deletions(-)

diff --git a/catch_runner.hpp b/catch_runner.hpp
index 9921e7f4..32593cf4 100644
--- a/catch_runner.hpp
+++ b/catch_runner.hpp
@@ -26,7 +26,7 @@ namespace Catch
 {
     inline int Main( int argc, char * const argv[] )
     {
-        RunnerConfig config;
+        Config config;
         ArgParser( argc, argv, config );     
         
         if( !config.m_message.empty() )
@@ -57,7 +57,7 @@ namespace Catch
         }
         
         // Handle list request
-        if( config.listWhat() != RunnerConfig::listNone )
+        if( config.listWhat() != Config::listNone )
             return List( config );
         
         // Open output file, if specified
diff --git a/internal/catch_commandline.hpp b/internal/catch_commandline.hpp
index be23f830..493d5949 100644
--- a/internal/catch_commandline.hpp
+++ b/internal/catch_commandline.hpp
@@ -47,7 +47,7 @@ namespace Catch
         };
         
     public:
-        ArgParser( int argc, char * const argv[], RunnerConfig& config )
+        ArgParser( int argc, char * const argv[], Config& config )
         :   m_mode( modeNone ),
             m_config( config )
         {
@@ -112,26 +112,26 @@ namespace Catch
                     }
                     else
                     {
-                        RunnerConfig::ListInfo listSpec = RunnerConfig::listAll;
+                        Config::ListInfo listSpec = Config::listAll;
                         if( m_args.size() >= 1 )
                         {
                             if( m_args[0] == "tests" )
-                                listSpec = RunnerConfig::listTests;
+                                listSpec = Config::listTests;
                             else if( m_args[0] == "reporters" )
-                                listSpec = RunnerConfig::listReports;
+                                listSpec = Config::listReports;
                             else
                                 return setErrorMode( m_command + " expected [tests] or [reporters] but recieved: [" + m_args[0] + "]" );                        
                         }
                         if( m_args.size() >= 2 )
                         {
                             if( m_args[1] == "xml" )
-                                listSpec = (RunnerConfig::ListInfo)( listSpec | RunnerConfig::listAsXml );
+                                listSpec = (Config::ListInfo)( listSpec | Config::listAsXml );
                             else if( m_args[1] == "text" )
-                                listSpec = (RunnerConfig::ListInfo)( listSpec | RunnerConfig::listAsText );
+                                listSpec = (Config::ListInfo)( listSpec | Config::listAsText );
                             else
                                 return setErrorMode( m_command + " expected [xml] or [text] but recieved: [" + m_args[1] + "]" );                        
                         }
-                        m_config.m_listSpec = (RunnerConfig::ListInfo)( m_config.m_listSpec | listSpec );
+                        m_config.m_listSpec = (Config::ListInfo)( m_config.m_listSpec | listSpec );
                     }
                     break;
                 case modeTest:
@@ -157,7 +157,7 @@ namespace Catch
                 case modeSuccess:
                     if( m_args.size() != 0 )
                         return setErrorMode( m_command + " does not accept arguments" );
-                    m_config.setIncludeWhat( RunnerConfig::Include::SuccessfulResults );
+                    m_config.setIncludeWhat( Config::Include::SuccessfulResults );
                     break;
                 case modeBreak:
                     if( m_args.size() != 0 )
@@ -188,7 +188,7 @@ namespace Catch
         Mode m_mode;
         std::string m_command;
         std::vector<std::string> m_args;
-        RunnerConfig& m_config;
+        Config& m_config;
     };
     
     
diff --git a/internal/catch_list.hpp b/internal/catch_list.hpp
index d8470e6d..a83bd83b 100644
--- a/internal/catch_list.hpp
+++ b/internal/catch_list.hpp
@@ -18,9 +18,9 @@
 
 namespace Catch
 {
-    inline int List( const RunnerConfig& config )
+    inline int List( const Config& config )
     {
-        if( config.listWhat() & RunnerConfig::listReports )
+        if( config.listWhat() & Config::listReports )
         {
             std::cout << "Available reports:\n";
             IReporterRegistry::FactoryMap::const_iterator it = Hub::getReporterRegistry().getFactories().begin();
@@ -32,7 +32,7 @@ namespace Catch
             }
             std::cout << std::endl;
         }
-        if( config.listWhat() & RunnerConfig::listTests )
+        if( config.listWhat() & Config::listTests )
         {
             std::cout << "Available tests:\n";
             std::vector<TestCaseInfo>::const_iterator it = TestRegistry::instance().getAllTests().begin();
@@ -44,7 +44,7 @@ namespace Catch
             }
             std::cout << std::endl;
         }
-        if( ( config.listWhat() & RunnerConfig::listAll ) == 0 )
+        if( ( config.listWhat() & Config::listAll ) == 0 )
         {
             std::cerr << "Unknown list type" << std::endl;
             return std::numeric_limits<int>::max();
diff --git a/internal/catch_runner_impl.hpp b/internal/catch_runner_impl.hpp
index e7b96072..791a3203 100644
--- a/internal/catch_runner_impl.hpp
+++ b/internal/catch_runner_impl.hpp
@@ -76,7 +76,7 @@ namespace Catch
         void operator =( const Runner& );
         
     public:
-        explicit Runner( const RunnerConfig& config )
+        explicit Runner( const Config& config )
         :   m_config( config ),
             m_successes( 0 ),
             m_failures( 0 ),
@@ -248,7 +248,7 @@ namespace Catch
     private:
         MutableResultInfo m_currentResult;
 
-        const RunnerConfig& m_config;
+        const Config& m_config;
         std::size_t m_successes;
         std::size_t m_failures;
         IReporter* m_reporter;
diff --git a/internal/catch_runnerconfig.hpp b/internal/catch_runnerconfig.hpp
index 7c187b6a..27bd919e 100644
--- a/internal/catch_runnerconfig.hpp
+++ b/internal/catch_runnerconfig.hpp
@@ -21,11 +21,11 @@
 
 namespace Catch
 {
-    class RunnerConfig : public IReporterConfig
+    class Config : public IReporterConfig
     {
     private:
-        RunnerConfig( const RunnerConfig& other );
-        RunnerConfig& operator = ( const RunnerConfig& other );
+        Config( const Config& other );
+        Config& operator = ( const Config& other );
     public:
         
         struct Include { enum What
@@ -51,7 +51,7 @@ namespace Catch
         };
         
         
-        RunnerConfig()
+        Config()
         :   m_reporter( NULL ),
             m_listSpec( listNone ),
             m_shouldDebugBreak( false ),
@@ -105,7 +105,7 @@ namespace Catch
         
         IReporter* getReporter() const
         {
-            return const_cast<RunnerConfig*>( this )->getReporter();
+            return const_cast<Config*>( this )->getReporter();
         }
         
         ListInfo listWhat() const