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

Untemplatize reporter bases

Commit
c46deee0249db2e9c8e235b926a9457e23bd1640
Author
Martin Hořeňovský ·
Parents
4f47d1c6c1bf

Files · Download .tar.gz

Changes

 include/reporters/catch_reporter_automake.hpp  | 2 +-
 include/reporters/catch_reporter_bases.cpp     | 3 +++
 include/reporters/catch_reporter_bases.hpp     | 9 +++------
 include/reporters/catch_reporter_compact.h     | 2 +-
 include/reporters/catch_reporter_console.h     | 2 +-
 include/reporters/catch_reporter_junit.h       | 2 +-
 include/reporters/catch_reporter_sonarqube.hpp | 2 +-
 include/reporters/catch_reporter_tap.hpp       | 2 +-
 include/reporters/catch_reporter_teamcity.hpp  | 2 +-
 include/reporters/catch_reporter_xml.h         | 2 +-
 10 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/include/reporters/catch_reporter_automake.hpp b/include/reporters/catch_reporter_automake.hpp
index dbebe975..d7719a1b 100644
--- a/include/reporters/catch_reporter_automake.hpp
+++ b/include/reporters/catch_reporter_automake.hpp
@@ -16,7 +16,7 @@
 
 namespace Catch {
 
-    struct AutomakeReporter : StreamingReporterBase<AutomakeReporter> {
+    struct AutomakeReporter : StreamingReporterBase {
         AutomakeReporter( ReporterConfig const& _config )
           :   StreamingReporterBase( _config )
         {}
diff --git a/include/reporters/catch_reporter_bases.cpp b/include/reporters/catch_reporter_bases.cpp
index ae704ab2..79427283 100644
--- a/include/reporters/catch_reporter_bases.cpp
+++ b/include/reporters/catch_reporter_bases.cpp
@@ -66,4 +66,7 @@ namespace Catch {
     }
 
 
+    StreamingReporterBase::~StreamingReporterBase() = default;
+    CumulativeReporterBase::~CumulativeReporterBase() = default;
+
 } // end namespace Catch
diff --git a/include/reporters/catch_reporter_bases.hpp b/include/reporters/catch_reporter_bases.hpp
index a0ff487f..54a3a77a 100644
--- a/include/reporters/catch_reporter_bases.hpp
+++ b/include/reporters/catch_reporter_bases.hpp
@@ -27,7 +27,6 @@ namespace Catch {
 
     std::string serializeFilters( std::vector<std::string> const& container );
 
-    template<typename DerivedT>
     struct StreamingReporterBase : IStreamingReporter {
 
         StreamingReporterBase( ReporterConfig const& _config )
@@ -41,7 +40,7 @@ namespace Catch {
             return m_reporterPrefs;
         }
 
-        ~StreamingReporterBase() override = default;
+        ~StreamingReporterBase() override;
 
         void noMatchingTestCases(std::string const&) override {}
 
@@ -93,7 +92,6 @@ namespace Catch {
         ReporterPreferences m_reporterPrefs;
     };
 
-    template<typename DerivedT>
     struct CumulativeReporterBase : IStreamingReporter {
         template<typename T, typename ChildNodeT>
         struct Node {
@@ -106,7 +104,6 @@ namespace Catch {
         };
         struct SectionNode {
             explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}
-            virtual ~SectionNode() = default;
 
             bool operator == (SectionNode const& other) const {
                 return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;
@@ -148,7 +145,7 @@ namespace Catch {
         {
             m_reporterPrefs.shouldRedirectStdOut = false;
         }
-        ~CumulativeReporterBase() override = default;
+        ~CumulativeReporterBase() override;
 
         ReporterPreferences getPreferences() const override {
             return m_reporterPrefs;
@@ -256,7 +253,7 @@ namespace Catch {
     }
 
 
-    struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {
+    struct TestEventListenerBase : StreamingReporterBase {
         TestEventListenerBase( ReporterConfig const& _config );
 
         void assertionStarting(AssertionInfo const&) override;
diff --git a/include/reporters/catch_reporter_compact.h b/include/reporters/catch_reporter_compact.h
index 5002df7b..b1725070 100644
--- a/include/reporters/catch_reporter_compact.h
+++ b/include/reporters/catch_reporter_compact.h
@@ -14,7 +14,7 @@
 
 namespace Catch {
 
-    struct CompactReporter : StreamingReporterBase<CompactReporter> {
+    struct CompactReporter : StreamingReporterBase {
 
         using StreamingReporterBase::StreamingReporterBase;
 
diff --git a/include/reporters/catch_reporter_console.h b/include/reporters/catch_reporter_console.h
index 43024daf..e952daff 100644
--- a/include/reporters/catch_reporter_console.h
+++ b/include/reporters/catch_reporter_console.h
@@ -23,7 +23,7 @@ namespace Catch {
     struct SummaryColumn;
     class TablePrinter;
 
-    struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {
+    struct ConsoleReporter : StreamingReporterBase {
         std::unique_ptr<TablePrinter> m_tablePrinter;
 
         ConsoleReporter(ReporterConfig const& config);
diff --git a/include/reporters/catch_reporter_junit.h b/include/reporters/catch_reporter_junit.h
index 5ee3a570..c7657d18 100644
--- a/include/reporters/catch_reporter_junit.h
+++ b/include/reporters/catch_reporter_junit.h
@@ -14,7 +14,7 @@
 
 namespace Catch {
 
-    class JunitReporter : public CumulativeReporterBase<JunitReporter> {
+    class JunitReporter : public CumulativeReporterBase {
     public:
         JunitReporter(ReporterConfig const& _config);
 
diff --git a/include/reporters/catch_reporter_sonarqube.hpp b/include/reporters/catch_reporter_sonarqube.hpp
index bf7d9299..9a4e760b 100644
--- a/include/reporters/catch_reporter_sonarqube.hpp
+++ b/include/reporters/catch_reporter_sonarqube.hpp
@@ -19,7 +19,7 @@
 
 namespace Catch {
 
-    struct SonarQubeReporter : CumulativeReporterBase<SonarQubeReporter> {
+    struct SonarQubeReporter : CumulativeReporterBase {
 
         SonarQubeReporter(ReporterConfig const& config)
         : CumulativeReporterBase(config)
diff --git a/include/reporters/catch_reporter_tap.hpp b/include/reporters/catch_reporter_tap.hpp
index 1bfe4f5e..2e026fdf 100644
--- a/include/reporters/catch_reporter_tap.hpp
+++ b/include/reporters/catch_reporter_tap.hpp
@@ -19,7 +19,7 @@
 
 namespace Catch {
 
-    struct TAPReporter : StreamingReporterBase<TAPReporter> {
+    struct TAPReporter : StreamingReporterBase {
 
         using StreamingReporterBase::StreamingReporterBase;
 
diff --git a/include/reporters/catch_reporter_teamcity.hpp b/include/reporters/catch_reporter_teamcity.hpp
index 47b7e4aa..cdcc442c 100644
--- a/include/reporters/catch_reporter_teamcity.hpp
+++ b/include/reporters/catch_reporter_teamcity.hpp
@@ -23,7 +23,7 @@
 
 namespace Catch {
 
-    struct TeamCityReporter : StreamingReporterBase<TeamCityReporter> {
+    struct TeamCityReporter : StreamingReporterBase {
         TeamCityReporter( ReporterConfig const& _config )
         :   StreamingReporterBase( _config )
         {
diff --git a/include/reporters/catch_reporter_xml.h b/include/reporters/catch_reporter_xml.h
index 0013d2ee..3edb0143 100644
--- a/include/reporters/catch_reporter_xml.h
+++ b/include/reporters/catch_reporter_xml.h
@@ -14,7 +14,7 @@
 
 
 namespace Catch {
-    class XmlReporter : public StreamingReporterBase<XmlReporter> {
+    class XmlReporter : public StreamingReporterBase {
     public:
         XmlReporter(ReporterConfig const& _config);