diff --git a/src/catch2/reporters/catch_reporter_automake.hpp b/src/catch2/reporters/catch_reporter_automake.hpp index 84fad790..01735d34 100644 --- a/src/catch2/reporters/catch_reporter_automake.hpp +++ b/src/catch2/reporters/catch_reporter_automake.hpp @@ -12,7 +12,8 @@ namespace Catch { - struct AutomakeReporter final : StreamingReporterBase { + class AutomakeReporter final : public StreamingReporterBase { + public: AutomakeReporter( ReporterConfig const& _config ) : StreamingReporterBase( _config ) {} @@ -26,7 +27,6 @@ namespace Catch { void testCaseEnded(TestCaseStats const& _testCaseStats) override; void skipTest(TestCaseInfo const& testInfo) override; - }; } // end namespace Catch diff --git a/src/catch2/reporters/catch_reporter_compact.hpp b/src/catch2/reporters/catch_reporter_compact.hpp index b39bd18a..4232138c 100644 --- a/src/catch2/reporters/catch_reporter_compact.hpp +++ b/src/catch2/reporters/catch_reporter_compact.hpp @@ -14,8 +14,8 @@ namespace Catch { - struct CompactReporter final : StreamingReporterBase { - + class CompactReporter final : public StreamingReporterBase { + public: using StreamingReporterBase::StreamingReporterBase; ~CompactReporter() override; diff --git a/src/catch2/reporters/catch_reporter_console.hpp b/src/catch2/reporters/catch_reporter_console.hpp index cbf73844..c67a11eb 100644 --- a/src/catch2/reporters/catch_reporter_console.hpp +++ b/src/catch2/reporters/catch_reporter_console.hpp @@ -16,9 +16,10 @@ namespace Catch { struct SummaryColumn; class TablePrinter; - struct ConsoleReporter final : StreamingReporterBase { + class ConsoleReporter final : public StreamingReporterBase { Detail::unique_ptr m_tablePrinter; + public: ConsoleReporter(ReporterConfig const& config); ~ConsoleReporter() override; static std::string getDescription(); @@ -41,8 +42,8 @@ namespace Catch { void testCaseEnded(TestCaseStats const& _testCaseStats) override; void testRunEnded(TestRunStats const& _testRunStats) override; void testRunStarting(TestRunInfo const& _testRunInfo) override; - private: + private: void lazyPrint(); void lazyPrintWithoutClosingBenchmarkTable(); @@ -64,7 +65,6 @@ namespace Catch { void printSummaryDivider(); void printTestFilters(); - private: bool m_headerPrinted = false; bool m_testRunInfoPrinted = false; }; diff --git a/src/catch2/reporters/catch_reporter_sonarqube.hpp b/src/catch2/reporters/catch_reporter_sonarqube.hpp index ec22ecfa..e4c941be 100644 --- a/src/catch2/reporters/catch_reporter_sonarqube.hpp +++ b/src/catch2/reporters/catch_reporter_sonarqube.hpp @@ -14,8 +14,8 @@ namespace Catch { - struct SonarQubeReporter final : CumulativeReporterBase { - + class SonarQubeReporter final : public CumulativeReporterBase { + public: SonarQubeReporter(ReporterConfig const& config) : CumulativeReporterBase(config) , xml(m_stream) { diff --git a/src/catch2/reporters/catch_reporter_tap.hpp b/src/catch2/reporters/catch_reporter_tap.hpp index e7c22cfa..0e11460b 100644 --- a/src/catch2/reporters/catch_reporter_tap.hpp +++ b/src/catch2/reporters/catch_reporter_tap.hpp @@ -12,8 +12,8 @@ namespace Catch { - struct TAPReporter final : StreamingReporterBase { - + class TAPReporter final : public StreamingReporterBase { + public: TAPReporter( ReporterConfig const& config ): StreamingReporterBase( config ) { m_preferences.shouldReportAllAssertions = true; diff --git a/src/catch2/reporters/catch_reporter_teamcity.hpp b/src/catch2/reporters/catch_reporter_teamcity.hpp index 7abe8185..633870f0 100644 --- a/src/catch2/reporters/catch_reporter_teamcity.hpp +++ b/src/catch2/reporters/catch_reporter_teamcity.hpp @@ -20,7 +20,8 @@ namespace Catch { - struct TeamCityReporter final : StreamingReporterBase { + class TeamCityReporter final : public StreamingReporterBase { + public: TeamCityReporter( ReporterConfig const& _config ) : StreamingReporterBase( _config ) { @@ -52,7 +53,6 @@ namespace Catch { private: void printSectionHeader(std::ostream& os); - private: bool m_headerPrintedForThisSection = false; Timer m_testTimer; };