Pass the whole IStream wrapper into reporter

This will become useful when reworking colour support, because
Win32 colour support requires checking whether the output is
stdout, which is done through the `IStream` wrapper.
This commit is contained in:
Martin Hořeňovský
2022-03-06 16:34:13 +01:00
parent 9b01c404f5
commit 61d0f7a9af
12 changed files with 48 additions and 27 deletions
+3 -3
View File
@@ -107,8 +107,8 @@ namespace Catch {
return m_data.reporterSpecifications;
}
std::ostream& Config::getReporterOutputStream(std::size_t reporterIdx) const {
return m_reporterStreams.at(reporterIdx)->stream();
IStream const* Config::getReporterOutputStream(std::size_t reporterIdx) const {
return m_reporterStreams.at(reporterIdx).get();
}
TestSpec const& Config::testSpec() const { return m_testSpec; }
@@ -118,7 +118,7 @@ namespace Catch {
// IConfig interface
bool Config::allowThrows() const { return !m_data.noThrow; }
std::ostream& Config::defaultStream() const { return m_defaultStream->stream(); }
IStream const* Config::defaultStream() const { return m_defaultStream.get(); }
StringRef Config::name() const { return m_data.name.empty() ? m_data.processName : m_data.name; }
bool Config::includeSuccessfulResults() const { return m_data.showSuccessfulTests; }
bool Config::warnAboutMissingAssertions() const {