mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-02 05:15:39 +02:00
Event listeners no longer take reporter config in constructor
This also required splitting out Listener factory from the reporter factory hierarchy. In return, the listener factories only need to take in `IConfig const*`, which opens up further refactorings down the road in the colour selection and implementation.
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
namespace {
|
||||
class NonCapturingListener : public Catch::EventListenerBase {
|
||||
public:
|
||||
NonCapturingListener( Catch::ReporterConfig const& config ):
|
||||
NonCapturingListener( Catch::IConfig const* config ):
|
||||
EventListenerBase( config ) {
|
||||
m_preferences.shouldRedirectStdOut = false;
|
||||
std::cerr << "X24 - NonCapturingListener initialized.\n";
|
||||
|
@@ -25,7 +25,7 @@
|
||||
namespace {
|
||||
class CapturingListener : public Catch::EventListenerBase {
|
||||
public:
|
||||
CapturingListener( Catch::ReporterConfig const& config ):
|
||||
CapturingListener( Catch::IConfig const* config ):
|
||||
EventListenerBase( config ) {
|
||||
m_preferences.shouldRedirectStdOut = true;
|
||||
std::cerr << "CapturingListener initialized\n";
|
||||
|
@@ -30,7 +30,7 @@ namespace {
|
||||
|
||||
class TestListener : public Catch::EventListenerBase {
|
||||
public:
|
||||
TestListener( Catch::ReporterConfig const& config ):
|
||||
TestListener( Catch::IConfig const* config ):
|
||||
EventListenerBase( config ) {
|
||||
std::cout << "X28 - TestListener constructed.\n";
|
||||
}
|
||||
|
Reference in New Issue
Block a user