diff options
| author | Martin Hořeňovský | 2021-09-15 21:17:28 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2021-09-15 21:17:39 +0200 |
| commit | 785436cd74ac629fea3bcb98343b9ff18f52598b (patch) | |
| tree | b065831b3101eedf84c96de6b887e30154c4b2ba /src/catch2/interfaces | |
| parent | f314fa1f8c9576f1879fb0a8a9b038f1108599c2 (diff) | |
| download | catch3-785436cd74ac629fea3bcb98343b9ff18f52598b.tar.gz | |
Make benchmark* and fatalError reporter events pure virtual
Diffstat (limited to 'src/catch2/interfaces')
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_reporter.cpp | 2 | ||||
| -rw-r--r-- | src/catch2/interfaces/catch_interfaces_reporter.hpp | 13 |
2 files changed, 7 insertions, 8 deletions
diff --git a/src/catch2/interfaces/catch_interfaces_reporter.cpp b/src/catch2/interfaces/catch_interfaces_reporter.cpp index 22994309..89a86f59 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.cpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.cpp @@ -81,6 +81,6 @@ namespace Catch { aborting( _aborting ) {} - void IStreamingReporter::fatalErrorEncountered( StringRef ) {} + IStreamingReporter::~IStreamingReporter() = default; } // end namespace Catch diff --git a/src/catch2/interfaces/catch_interfaces_reporter.hpp b/src/catch2/interfaces/catch_interfaces_reporter.hpp index 75eadee7..681c8e4d 100644 --- a/src/catch2/interfaces/catch_interfaces_reporter.hpp +++ b/src/catch2/interfaces/catch_interfaces_reporter.hpp @@ -162,7 +162,7 @@ namespace Catch { public: IStreamingReporter( IConfig const* config ): m_config( config ) {} - virtual ~IStreamingReporter() = default; + virtual ~IStreamingReporter(); // = default; // Implementing class must also provide the following static methods: // static std::string getDescription(); @@ -182,10 +182,10 @@ namespace Catch { virtual void testCasePartialStarting( TestCaseInfo const& testInfo, uint64_t partNumber ) = 0; virtual void sectionStarting( SectionInfo const& sectionInfo ) = 0; - virtual void benchmarkPreparing( StringRef ) {} - virtual void benchmarkStarting( BenchmarkInfo const& ) {} - virtual void benchmarkEnded( BenchmarkStats<> const& ) {} - virtual void benchmarkFailed( StringRef ) {} + virtual void benchmarkPreparing( StringRef benchmarkName ) = 0; + virtual void benchmarkStarting( BenchmarkInfo const& benchmarkInfo ) = 0; + virtual void benchmarkEnded( BenchmarkStats<> const& benchmarkStats ) = 0; + virtual void benchmarkFailed( StringRef benchmarkName ) = 0; virtual void assertionStarting( AssertionInfo const& assertionInfo ) = 0; @@ -200,8 +200,7 @@ namespace Catch { virtual void skipTest( TestCaseInfo const& testInfo ) = 0; - // Default empty implementation provided - virtual void fatalErrorEncountered( StringRef name ); + virtual void fatalErrorEncountered( StringRef error ) = 0; //! Writes out information about provided reporters using reporter-specific format virtual void listReporters(std::vector<ReporterDescription> const& descriptions) = 0; |