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

Changed initialization order to avoid some warnings when compiling with g++.

Commit
4aa36f607185e8e2800b30d3d749f21877e2bc5b
Author
Michael Mortensen ·
Parents
1b96cec8f270

Files · Download .tar.gz

Changes

 internal/catch_resultinfo.hpp   | 14 +++++++-------
 internal/catch_runner_impl.hpp  |  6 +++---
 internal/catch_runnerconfig.hpp |  4 ++--
 3 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/internal/catch_resultinfo.hpp b/internal/catch_resultinfo.hpp
index dd99ea4d..8a6c58a9 100644
--- a/internal/catch_resultinfo.hpp
+++ b/internal/catch_resultinfo.hpp
@@ -40,20 +40,20 @@ namespace Catch
     public:
         
         ResultInfo()
-        :   m_result( ResultWas::Unknown ),
+        :   m_line( 0 ),
+            m_result( ResultWas::Unknown ),
             m_isNot( false ),
-            m_line( 0 ),
             m_expressionIncomplete( false )
         {}
         
         ResultInfo( const std::string& expr, ResultWas::OfType result, bool isNot, const std::string& filename, std::size_t line, const std::string& macroName )
-        :   m_expr( expr ),
+        :   m_macroName( macroName ),
+            m_filename( filename ),
+            m_line( line ),
+            m_expr( expr ),
+            m_op( m_expr[0] == '!' ? "!" : "" ),
             m_result( result ),
             m_isNot( isNot ),
-            m_op( m_expr[0] == '!' ? "!" : "" ),
-            m_filename( filename ),
-            m_line( line ), 
-            m_macroName( macroName ),
             m_expressionIncomplete( false )
         {
         }
diff --git a/internal/catch_runner_impl.hpp b/internal/catch_runner_impl.hpp
index ce2d929e..2bd49431 100644
--- a/internal/catch_runner_impl.hpp
+++ b/internal/catch_runner_impl.hpp
@@ -74,9 +74,9 @@ namespace Catch
     {
     public:
         explicit Runner( const RunnerConfig& config )
-        :   m_successes( 0 ),
+        :   m_config( config ),
+            m_successes( 0 ),
             m_failures( 0 ),
-            m_config( config ),
             m_reporter( m_config.getReporter() )
         {
             m_reporter->StartTesting();
@@ -219,4 +219,4 @@ namespace Catch
     };
 }
 
-#endif // TWOBLUECUBES_INTERNAL_CATCH_RUNNER_HPP_INCLUDED
\ No newline at end of file
+#endif // TWOBLUECUBES_INTERNAL_CATCH_RUNNER_HPP_INCLUDED
diff --git a/internal/catch_runnerconfig.hpp b/internal/catch_runnerconfig.hpp
index ea18d2f6..cf750e26 100644
--- a/internal/catch_runnerconfig.hpp
+++ b/internal/catch_runnerconfig.hpp
@@ -43,8 +43,8 @@ namespace Catch
         
         
         RunnerConfig()
-        :   m_listSpec( listNone ),
-            m_reporter( NULL ),
+        :   m_reporter( NULL ),
+            m_listSpec( listNone ),
             m_shouldDebugBreak( false )
         {}