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

Make ListeningReporter final

In general, for Catch2 v3 we are making virtual types `final`,
unless they were explicitly designed to be derived-from.
`ListeningReporter` is definitely not designed to be derived-from.
Commit
a15ffb735d895b9745b4465b70fe7574beb88f3e
Author
Martin Hořeňovský ·
Parents
727b26ab354b

Files · Download .tar.gz

Changes

 docs/release-notes.md                           | 5 +++++
 src/catch2/reporters/catch_reporter_listening.h | 2 +-
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/docs/release-notes.md b/docs/release-notes.md
index 113d54e7..169bcb67 100644
--- a/docs/release-notes.md
+++ b/docs/release-notes.md
@@ -56,11 +56,16 @@
 * Lvalues of composed matchers cannot be composed further
 * Uses of `REGISTER_TEST_CASE` macro need to be followed by a semicolon
   * This does not change `TEST_CASE` and friends in any way
+* `IStreamingReporter::IsMulti` member function was removed
+  * This is _very_ unlikely to actually affect anyone, as it was default-implemented in the interface, and only used internally
+* `ListeningReporter` is now final
+
 
 ### Fixes
 * The `INFO` macro no longer contains superfluous semicolon (#1456)
 * The `--list*` family of command line flags now return 0 on success (#1410, #1146)
 
+
 ### Other changes
 * `CATCH_CONFIG_DISABLE_MATCHERS` no longer exists.
   * If you do not want to use Matchers in a TU, do not include their header.
diff --git a/src/catch2/reporters/catch_reporter_listening.h b/src/catch2/reporters/catch_reporter_listening.h
index 032d8a18..8287e4a2 100644
--- a/src/catch2/reporters/catch_reporter_listening.h
+++ b/src/catch2/reporters/catch_reporter_listening.h
@@ -11,7 +11,7 @@
 
 namespace Catch {
 
-    class ListeningReporter : public IStreamingReporter {
+    class ListeningReporter final : public IStreamingReporter {
         using Reporters = std::vector<IStreamingReporterPtr>;
         Reporters m_listeners;
         IStreamingReporterPtr m_reporter = nullptr;