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:
12 files changed
+48
-27
No files matched your search
@@ -160,7 +160,7 @@ namespace {
|
||||
void setColour( const char* _escapeCode ) {
|
||||
// The escape sequence must be flushed to console, otherwise if
|
||||
// stdin and stderr are intermixed, we'd get accidentally coloured output.
|
||||
getCurrentContext().getConfig()->defaultStream()
|
||||
getCurrentContext().getConfig()->defaultStream()->stream()
|
||||
<< '\033' << _escapeCode << std::flush;
|
||||
}
|
||||
};
|
||||
|
||||
@@ -22,7 +22,8 @@ namespace Catch {
|
||||
std::ostream& cerr();
|
||||
std::ostream& clog();
|
||||
|
||||
struct IStream {
|
||||
class IStream {
|
||||
public:
|
||||
virtual ~IStream(); // = default
|
||||
virtual std::ostream& stream() const = 0;
|
||||
// Win32 colour supports requires us to identify whether a stream
|
||||
|
||||
Reference in new issue
Block a user