mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-04 06:15:41 +02:00
Add IStream::isStdOut
This commit is contained in:
@@ -99,6 +99,7 @@ namespace Detail {
|
||||
|
||||
public: // IStream
|
||||
std::ostream& stream() const override { return m_os; }
|
||||
bool isStdout() const override { return true; }
|
||||
};
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
@@ -25,6 +25,9 @@ namespace Catch {
|
||||
struct IStream {
|
||||
virtual ~IStream(); // = default
|
||||
virtual std::ostream& stream() const = 0;
|
||||
// Win32 colour supports requires us to identify whether a stream
|
||||
// is backed by stdout (so we can colour it) or not (and we can't).
|
||||
virtual bool isStdout() const { return false; }
|
||||
};
|
||||
|
||||
auto makeStream( std::string const& filename ) -> Detail::unique_ptr<IStream const>;
|
||||
|
Reference in New Issue
Block a user