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

summaryrefslogtreecommitdiffhomepage
path: root/src/catch2
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-04-10 22:03:12 +0200
committerMartin Hořeňovský2022-04-11 12:58:58 +0200
commit9abe49ec53df1d9a33329975fd0280e456466f4f (patch)
treef30eceb6db550627e917cdc357427773387966ab /src/catch2
parent195a6ac94110fbda140ae4318a2338c9e2512804 (diff)
downloadcatch3-9abe49ec53df1d9a33329975fd0280e456466f4f.tar.gz
struct -> class normalization for reporters
Diffstat (limited to 'src/catch2')
-rw-r--r--src/catch2/reporters/catch_reporter_automake.hpp4
-rw-r--r--src/catch2/reporters/catch_reporter_compact.hpp4
-rw-r--r--src/catch2/reporters/catch_reporter_console.hpp6
-rw-r--r--src/catch2/reporters/catch_reporter_sonarqube.hpp4
-rw-r--r--src/catch2/reporters/catch_reporter_tap.hpp4
-rw-r--r--src/catch2/reporters/catch_reporter_teamcity.hpp4
6 files changed, 13 insertions, 13 deletions
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<TablePrinter> 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;
};