diff options
| author | Martin Hořeňovský | 2021-01-16 15:27:47 +0100 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-01-16 15:27:56 +0100 |
| commit | 74f2f4ba5e84355e4f123ec807c1ec3b29a0daa7 (patch) | |
| tree | dfd00fd5eb5da2d638b1ddfebce1d5c89fc0ca8d /src/catch2/interfaces | |
| parent | ba8150516800dd5e18f818346a2a12c45b6ec542 (diff) | |
| download | catch3-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.hpp | 5 |
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: |