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

Remove IStreamingReporter::isMulti query

This was previously used to avoid `dynamic_cast` inside our code,
when we were creating more than one reporter, or a reporter
together with listeners. However, since then the offending code
was refactored to be smarter instead, and this query member function
is no longer needed nor used.
Commit
727b26ab354bcb43ed59ee76bbe9f56c2935f6a1
Author
Martin Hořeňovský ·
Parents
9de6eae6bbf2

Files · Download .tar.gz

Changes

 src/catch2/catch_interfaces_reporter.cpp          | 1 -
 src/catch2/catch_interfaces_reporter.h            | 2 --
 src/catch2/reporters/catch_reporter_listening.cpp | 4 ----
 src/catch2/reporters/catch_reporter_listening.h   | 1 -
 4 files changed, 8 deletions(-)

diff --git a/src/catch2/catch_interfaces_reporter.cpp b/src/catch2/catch_interfaces_reporter.cpp
index 1986b806..4fa753c0 100644
--- a/src/catch2/catch_interfaces_reporter.cpp
+++ b/src/catch2/catch_interfaces_reporter.cpp
@@ -112,7 +112,6 @@ namespace Catch {
     TestRunStats::~TestRunStats() = default;
 
     void IStreamingReporter::fatalErrorEncountered( StringRef ) {}
-    bool IStreamingReporter::isMulti() const { return false; }
 
     void IStreamingReporter::listReporters(std::vector<ReporterDescription> const& descriptions, Config const& config) {
         Catch::cout() << "Available reporters:\n";
diff --git a/src/catch2/catch_interfaces_reporter.h b/src/catch2/catch_interfaces_reporter.h
index 97ad6cae..a4cd9d8b 100644
--- a/src/catch2/catch_interfaces_reporter.h
+++ b/src/catch2/catch_interfaces_reporter.h
@@ -241,8 +241,6 @@ namespace Catch {
         // Default empty implementation provided
         virtual void fatalErrorEncountered( StringRef name );
 
-        virtual bool isMulti() const;
-
         // Listing support
         virtual void listReporters(std::vector<ReporterDescription> const& descriptions, Config const& config);
         virtual void listTests(std::vector<TestCaseHandle> const& tests, Config const& config);
diff --git a/src/catch2/reporters/catch_reporter_listening.cpp b/src/catch2/reporters/catch_reporter_listening.cpp
index 01335a49..08f30659 100644
--- a/src/catch2/reporters/catch_reporter_listening.cpp
+++ b/src/catch2/reporters/catch_reporter_listening.cpp
@@ -150,10 +150,6 @@ namespace Catch {
         m_reporter->skipTest( testInfo );
     }
 
-    bool ListeningReporter::isMulti() const {
-        return true;
-    }
-
     void ListeningReporter::listReporters(std::vector<ReporterDescription> const& descriptions, Config const& config) {
         for (auto const& listener : m_listeners) {
             listener->listReporters(descriptions, config);
diff --git a/src/catch2/reporters/catch_reporter_listening.h b/src/catch2/reporters/catch_reporter_listening.h
index e33aa283..032d8a18 100644
--- a/src/catch2/reporters/catch_reporter_listening.h
+++ b/src/catch2/reporters/catch_reporter_listening.h
@@ -50,7 +50,6 @@ namespace Catch {
         void testRunEnded( TestRunStats const& testRunStats ) override;
 
         void skipTest( TestCaseInfo const& testInfo ) override;
-        bool isMulti() const override;
 
         void listReporters(std::vector<ReporterDescription> const& descriptions, Config const& config) override;
         void listTests(std::vector<TestCaseHandle> const& tests, Config const& config) override;