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

Capture RunInfo

Commit
e3e9e075b94a01b5422c1cec28584c8b9b3543d8
Author
Phil Nash ·
Parents
2632dca81d84

Files · Download .tar.gz

Changes

 include/internal/catch_runner_impl.hpp | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/include/internal/catch_runner_impl.hpp b/include/internal/catch_runner_impl.hpp
index 8deb4f7d..72c54467 100644
--- a/include/internal/catch_runner_impl.hpp
+++ b/include/internal/catch_runner_impl.hpp
@@ -57,7 +57,8 @@ namespace Catch {
     public:
 
         explicit Runner( const Config& config, const Ptr<IStreamingReporter>& reporter )
-        :   m_context( getCurrentMutableContext() ),
+        :   m_runInfo( config.data().name ),
+            m_context( getCurrentMutableContext() ),
             m_runningTest( NULL ),
             m_config( config ),
             m_reporter( reporter ),
@@ -68,11 +69,11 @@ namespace Catch {
             m_context.setRunner( this );
             m_context.setConfig( &m_config );
             m_context.setResultCapture( this );
-            m_reporter->testRunStarting( TestRunInfo( "" ) ); // !TBD - name
+            m_reporter->testRunStarting( m_runInfo );
         }
         
         virtual ~Runner() {
-            m_reporter->testRunEnded( new TestRunStats( TestRunInfo( "" ), m_totals, aborting() ) ); // !TBD - name
+            m_reporter->testRunEnded( new TestRunStats( m_runInfo, m_totals, aborting() ) );
             m_context.setRunner( m_prevRunner );
             m_context.setConfig( NULL );
             m_context.setResultCapture( m_prevResultCapture );
@@ -303,6 +304,7 @@ namespace Catch {
         }
 
     private:
+        TestRunInfo m_runInfo;
         IMutableContext& m_context;
         RunningTest* m_runningTest;
         AssertionResult m_lastResult;