struct -> class normalization for reporters

This commit is contained in:
Martin Hořeňovský 2022-04-10 22:03:12 +02:00
parent 195a6ac941
commit 9abe49ec53
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
6 changed files with 13 additions and 13 deletions

View File

@ -12,7 +12,8 @@
namespace Catch { namespace Catch {
struct AutomakeReporter final : StreamingReporterBase { class AutomakeReporter final : public StreamingReporterBase {
public:
AutomakeReporter( ReporterConfig const& _config ) AutomakeReporter( ReporterConfig const& _config )
: StreamingReporterBase( _config ) : StreamingReporterBase( _config )
{} {}
@ -26,7 +27,6 @@ namespace Catch {
void testCaseEnded(TestCaseStats const& _testCaseStats) override; void testCaseEnded(TestCaseStats const& _testCaseStats) override;
void skipTest(TestCaseInfo const& testInfo) override; void skipTest(TestCaseInfo const& testInfo) override;
}; };
} // end namespace Catch } // end namespace Catch

View File

@ -14,8 +14,8 @@
namespace Catch { namespace Catch {
struct CompactReporter final : StreamingReporterBase { class CompactReporter final : public StreamingReporterBase {
public:
using StreamingReporterBase::StreamingReporterBase; using StreamingReporterBase::StreamingReporterBase;
~CompactReporter() override; ~CompactReporter() override;

View File

@ -16,9 +16,10 @@ namespace Catch {
struct SummaryColumn; struct SummaryColumn;
class TablePrinter; class TablePrinter;
struct ConsoleReporter final : StreamingReporterBase { class ConsoleReporter final : public StreamingReporterBase {
Detail::unique_ptr<TablePrinter> m_tablePrinter; Detail::unique_ptr<TablePrinter> m_tablePrinter;
public:
ConsoleReporter(ReporterConfig const& config); ConsoleReporter(ReporterConfig const& config);
~ConsoleReporter() override; ~ConsoleReporter() override;
static std::string getDescription(); static std::string getDescription();
@ -41,8 +42,8 @@ namespace Catch {
void testCaseEnded(TestCaseStats const& _testCaseStats) override; void testCaseEnded(TestCaseStats const& _testCaseStats) override;
void testRunEnded(TestRunStats const& _testRunStats) override; void testRunEnded(TestRunStats const& _testRunStats) override;
void testRunStarting(TestRunInfo const& _testRunInfo) override; void testRunStarting(TestRunInfo const& _testRunInfo) override;
private:
private:
void lazyPrint(); void lazyPrint();
void lazyPrintWithoutClosingBenchmarkTable(); void lazyPrintWithoutClosingBenchmarkTable();
@ -64,7 +65,6 @@ namespace Catch {
void printSummaryDivider(); void printSummaryDivider();
void printTestFilters(); void printTestFilters();
private:
bool m_headerPrinted = false; bool m_headerPrinted = false;
bool m_testRunInfoPrinted = false; bool m_testRunInfoPrinted = false;
}; };

View File

@ -14,8 +14,8 @@
namespace Catch { namespace Catch {
struct SonarQubeReporter final : CumulativeReporterBase { class SonarQubeReporter final : public CumulativeReporterBase {
public:
SonarQubeReporter(ReporterConfig const& config) SonarQubeReporter(ReporterConfig const& config)
: CumulativeReporterBase(config) : CumulativeReporterBase(config)
, xml(m_stream) { , xml(m_stream) {

View File

@ -12,8 +12,8 @@
namespace Catch { namespace Catch {
struct TAPReporter final : StreamingReporterBase { class TAPReporter final : public StreamingReporterBase {
public:
TAPReporter( ReporterConfig const& config ): TAPReporter( ReporterConfig const& config ):
StreamingReporterBase( config ) { StreamingReporterBase( config ) {
m_preferences.shouldReportAllAssertions = true; m_preferences.shouldReportAllAssertions = true;

View File

@ -20,7 +20,8 @@
namespace Catch { namespace Catch {
struct TeamCityReporter final : StreamingReporterBase { class TeamCityReporter final : public StreamingReporterBase {
public:
TeamCityReporter( ReporterConfig const& _config ) TeamCityReporter( ReporterConfig const& _config )
: StreamingReporterBase( _config ) : StreamingReporterBase( _config )
{ {
@ -52,7 +53,6 @@ namespace Catch {
private: private:
void printSectionHeader(std::ostream& os); void printSectionHeader(std::ostream& os);
private:
bool m_headerPrintedForThisSection = false; bool m_headerPrintedForThisSection = false;
Timer m_testTimer; Timer m_testTimer;
}; };