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

Move some impls of StreamingReporterBase members to .cpp file

Commit
c9b4867441940c11c483d86b05eac0032abc5038
Author
Martin Hořeňovský ·
Parents
258cac63f819

Files · Download .tar.gz

Changes

 src/catch2/reporters/catch_reporter_bases.cpp | 12 ++++++++++++
 src/catch2/reporters/catch_reporter_bases.hpp | 10 ++--------
 2 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/src/catch2/reporters/catch_reporter_bases.cpp b/src/catch2/reporters/catch_reporter_bases.cpp
index afcfcafc..3fcd9bfb 100644
--- a/src/catch2/reporters/catch_reporter_bases.cpp
+++ b/src/catch2/reporters/catch_reporter_bases.cpp
@@ -99,6 +99,18 @@ namespace Catch {
 
 
     StreamingReporterBase::~StreamingReporterBase() = default;
+
+    void StreamingReporterBase::testGroupEnded( TestGroupStats const& ) {
+        currentGroupInfo.reset();
+    }
+
+    void StreamingReporterBase::testRunEnded( TestRunStats const& ) {
+        currentTestCaseInfo = nullptr;
+        currentGroupInfo.reset();
+        currentTestRunInfo.reset();
+    }
+
+
     CumulativeReporterBase::~CumulativeReporterBase() = default;
 
     void
diff --git a/src/catch2/reporters/catch_reporter_bases.hpp b/src/catch2/reporters/catch_reporter_bases.hpp
index 55cbd2d0..76aea01f 100644
--- a/src/catch2/reporters/catch_reporter_bases.hpp
+++ b/src/catch2/reporters/catch_reporter_bases.hpp
@@ -67,14 +67,8 @@ namespace Catch {
         void testCaseEnded(TestCaseStats const& /* _testCaseStats */) override {
             currentTestCaseInfo = nullptr;
         }
-        void testGroupEnded(TestGroupStats const& /* _testGroupStats */) override {
-            currentGroupInfo.reset();
-        }
-        void testRunEnded(TestRunStats const& /* _testRunStats */) override {
-            currentTestCaseInfo = nullptr;
-            currentGroupInfo.reset();
-            currentTestRunInfo.reset();
-        }
+        void testGroupEnded( TestGroupStats const& ) override;
+        void testRunEnded( TestRunStats const& /* _testRunStats */ ) override;
 
         void skipTest(TestCaseInfo const&) override {
             // Don't do anything with this by default.