mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 07:16:10 +01:00
struct -> class normalization for reporters
This commit is contained in:
parent
195a6ac941
commit
9abe49ec53
@ -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
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
@ -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) {
|
||||||
|
@ -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;
|
||||||
|
@ -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;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user