mirror of
https://github.com/catchorg/Catch2.git
synced 2024-12-22 11:23:29 +01:00
Fix Listening reporter use of ReporterPreferences
This commit is contained in:
parent
797d3b04df
commit
12a8dfa2f2
@ -11,6 +11,11 @@
|
||||
|
||||
namespace Catch {
|
||||
|
||||
ListeningReporter::ListeningReporter() {
|
||||
// We will assume that listeners will always want all assertions
|
||||
m_preferences.shouldReportAllAssertions = true;
|
||||
}
|
||||
|
||||
void ListeningReporter::addListener( IStreamingReporterPtr&& listener ) {
|
||||
m_listeners.push_back( std::move( listener ) );
|
||||
}
|
||||
@ -18,10 +23,11 @@ namespace Catch {
|
||||
void ListeningReporter::addReporter(IStreamingReporterPtr&& reporter) {
|
||||
assert(!m_reporter && "Listening reporter can wrap only 1 real reporter");
|
||||
m_reporter = std::move( reporter );
|
||||
m_preferences.shouldRedirectStdOut = m_reporter->getPreferences().shouldRedirectStdOut;
|
||||
}
|
||||
|
||||
ReporterPreferences ListeningReporter::getPreferences() const {
|
||||
return m_reporter->getPreferences();
|
||||
return m_preferences;
|
||||
}
|
||||
|
||||
std::set<Verbosity> ListeningReporter::getSupportedVerbosities() {
|
||||
|
@ -15,8 +15,11 @@ namespace Catch {
|
||||
using Reporters = std::vector<IStreamingReporterPtr>;
|
||||
Reporters m_listeners;
|
||||
IStreamingReporterPtr m_reporter = nullptr;
|
||||
ReporterPreferences m_preferences;
|
||||
|
||||
public:
|
||||
ListeningReporter();
|
||||
|
||||
void addListener( IStreamingReporterPtr&& listener );
|
||||
void addReporter( IStreamingReporterPtr&& reporter );
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user