mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 15:26:11 +01:00
Untemplatize reporter bases
This commit is contained in:
parent
4f47d1c6c1
commit
c46deee024
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct AutomakeReporter : StreamingReporterBase<AutomakeReporter> {
|
struct AutomakeReporter : StreamingReporterBase {
|
||||||
AutomakeReporter( ReporterConfig const& _config )
|
AutomakeReporter( ReporterConfig const& _config )
|
||||||
: StreamingReporterBase( _config )
|
: StreamingReporterBase( _config )
|
||||||
{}
|
{}
|
||||||
|
@ -66,4 +66,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
StreamingReporterBase::~StreamingReporterBase() = default;
|
||||||
|
CumulativeReporterBase::~CumulativeReporterBase() = default;
|
||||||
|
|
||||||
} // end namespace Catch
|
} // end namespace Catch
|
||||||
|
@ -27,7 +27,6 @@ namespace Catch {
|
|||||||
|
|
||||||
std::string serializeFilters( std::vector<std::string> const& container );
|
std::string serializeFilters( std::vector<std::string> const& container );
|
||||||
|
|
||||||
template<typename DerivedT>
|
|
||||||
struct StreamingReporterBase : IStreamingReporter {
|
struct StreamingReporterBase : IStreamingReporter {
|
||||||
|
|
||||||
StreamingReporterBase( ReporterConfig const& _config )
|
StreamingReporterBase( ReporterConfig const& _config )
|
||||||
@ -41,7 +40,7 @@ namespace Catch {
|
|||||||
return m_reporterPrefs;
|
return m_reporterPrefs;
|
||||||
}
|
}
|
||||||
|
|
||||||
~StreamingReporterBase() override = default;
|
~StreamingReporterBase() override;
|
||||||
|
|
||||||
void noMatchingTestCases(std::string const&) override {}
|
void noMatchingTestCases(std::string const&) override {}
|
||||||
|
|
||||||
@ -93,7 +92,6 @@ namespace Catch {
|
|||||||
ReporterPreferences m_reporterPrefs;
|
ReporterPreferences m_reporterPrefs;
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename DerivedT>
|
|
||||||
struct CumulativeReporterBase : IStreamingReporter {
|
struct CumulativeReporterBase : IStreamingReporter {
|
||||||
template<typename T, typename ChildNodeT>
|
template<typename T, typename ChildNodeT>
|
||||||
struct Node {
|
struct Node {
|
||||||
@ -106,7 +104,6 @@ namespace Catch {
|
|||||||
};
|
};
|
||||||
struct SectionNode {
|
struct SectionNode {
|
||||||
explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}
|
explicit SectionNode(SectionStats const& _stats) : stats(_stats) {}
|
||||||
virtual ~SectionNode() = default;
|
|
||||||
|
|
||||||
bool operator == (SectionNode const& other) const {
|
bool operator == (SectionNode const& other) const {
|
||||||
return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;
|
return stats.sectionInfo.lineInfo == other.stats.sectionInfo.lineInfo;
|
||||||
@ -148,7 +145,7 @@ namespace Catch {
|
|||||||
{
|
{
|
||||||
m_reporterPrefs.shouldRedirectStdOut = false;
|
m_reporterPrefs.shouldRedirectStdOut = false;
|
||||||
}
|
}
|
||||||
~CumulativeReporterBase() override = default;
|
~CumulativeReporterBase() override;
|
||||||
|
|
||||||
ReporterPreferences getPreferences() const override {
|
ReporterPreferences getPreferences() const override {
|
||||||
return m_reporterPrefs;
|
return m_reporterPrefs;
|
||||||
@ -256,7 +253,7 @@ namespace Catch {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
struct TestEventListenerBase : StreamingReporterBase<TestEventListenerBase> {
|
struct TestEventListenerBase : StreamingReporterBase {
|
||||||
TestEventListenerBase( ReporterConfig const& _config );
|
TestEventListenerBase( ReporterConfig const& _config );
|
||||||
|
|
||||||
void assertionStarting(AssertionInfo const&) override;
|
void assertionStarting(AssertionInfo const&) override;
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct CompactReporter : StreamingReporterBase<CompactReporter> {
|
struct CompactReporter : StreamingReporterBase {
|
||||||
|
|
||||||
using StreamingReporterBase::StreamingReporterBase;
|
using StreamingReporterBase::StreamingReporterBase;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@ namespace Catch {
|
|||||||
struct SummaryColumn;
|
struct SummaryColumn;
|
||||||
class TablePrinter;
|
class TablePrinter;
|
||||||
|
|
||||||
struct ConsoleReporter : StreamingReporterBase<ConsoleReporter> {
|
struct ConsoleReporter : StreamingReporterBase {
|
||||||
std::unique_ptr<TablePrinter> m_tablePrinter;
|
std::unique_ptr<TablePrinter> m_tablePrinter;
|
||||||
|
|
||||||
ConsoleReporter(ReporterConfig const& config);
|
ConsoleReporter(ReporterConfig const& config);
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
class JunitReporter : public CumulativeReporterBase<JunitReporter> {
|
class JunitReporter : public CumulativeReporterBase {
|
||||||
public:
|
public:
|
||||||
JunitReporter(ReporterConfig const& _config);
|
JunitReporter(ReporterConfig const& _config);
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct SonarQubeReporter : CumulativeReporterBase<SonarQubeReporter> {
|
struct SonarQubeReporter : CumulativeReporterBase {
|
||||||
|
|
||||||
SonarQubeReporter(ReporterConfig const& config)
|
SonarQubeReporter(ReporterConfig const& config)
|
||||||
: CumulativeReporterBase(config)
|
: CumulativeReporterBase(config)
|
||||||
|
@ -19,7 +19,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct TAPReporter : StreamingReporterBase<TAPReporter> {
|
struct TAPReporter : StreamingReporterBase {
|
||||||
|
|
||||||
using StreamingReporterBase::StreamingReporterBase;
|
using StreamingReporterBase::StreamingReporterBase;
|
||||||
|
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
|
|
||||||
struct TeamCityReporter : StreamingReporterBase<TeamCityReporter> {
|
struct TeamCityReporter : StreamingReporterBase {
|
||||||
TeamCityReporter( ReporterConfig const& _config )
|
TeamCityReporter( ReporterConfig const& _config )
|
||||||
: StreamingReporterBase( _config )
|
: StreamingReporterBase( _config )
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
|
|
||||||
namespace Catch {
|
namespace Catch {
|
||||||
class XmlReporter : public StreamingReporterBase<XmlReporter> {
|
class XmlReporter : public StreamingReporterBase {
|
||||||
public:
|
public:
|
||||||
XmlReporter(ReporterConfig const& _config);
|
XmlReporter(ReporterConfig const& _config);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user