Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2/interfaces
diff options
context:
space:
mode:
authorMartin Hořeňovský2021-01-16 15:27:47 +0100
committerMartin Hořeňovský2021-01-16 15:27:56 +0100
commit74f2f4ba5e84355e4f123ec807c1ec3b29a0daa7 (patch)
treedfd00fd5eb5da2d638b1ddfebce1d5c89fc0ca8d /src/catch2/interfaces
parentba8150516800dd5e18f818346a2a12c45b6ec542 (diff)
downloadcatch3-74f2f4ba5e84355e4f123ec807c1ec3b29a0daa7.tar.gz
Hold reporter's IConfig instance in the interface
Previously, every base derived from the IStreamingReporter had its own `IConfig const* m_config` member, so this just centralizes the handling thereof. Part of #2061
Diffstat (limited to 'src/catch2/interfaces')
-rw-r--r--src/catch2/interfaces/catch_interfaces_reporter.hpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp
index 791cc992..9dbd1847 100644
--- a/src/catch2/interfaces/catch_interfaces_reporter.hpp
+++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp
@@ -176,7 +176,12 @@ namespace Catch {
protected:
//! Derived classes can set up their preferences here
ReporterPreferences m_preferences;
+ //! The test run's config as filled in from CLI and defaults
+ IConfig const* m_config;
+
public:
+ IStreamingReporter( IConfig const* config ): m_config( config ) {}
+
virtual ~IStreamingReporter() = default;
// Implementing class must also provide the following static methods: