diff options
| author | Martin Hořeňovský | 2022-04-12 20:59:01 +0200 |
|---|---|---|
| committer | Martin Hořeňovský | 2022-04-13 14:59:39 +0200 |
| commit | 4f09f1120ba0a28f218a00821a8347a443042ecb (patch) | |
| tree | af5dc04a3e0c91476e0b03e60d914d5bf2b11693 /tests | |
| parent | 9934b7de13ef303e0d7b1bccf519422be73c6a03 (diff) | |
| download | catch3-4f09f1120ba0a28f218a00821a8347a443042ecb.tar.gz | |
Make IStream::stream non-const
This way it makes much more sense from logically-const point
of view, and also means that concrete implementations don't
have to always have a `mutable` keyword on the stream member.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp | 4 | ||||
| -rw-r--r-- | tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp b/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp index 4da7c4b3..716d6033 100644 --- a/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/ColourImpl.tests.cpp @@ -21,9 +21,9 @@ namespace { }; class TestStringStream : public Catch::IStream { - mutable std::stringstream m_stream; + std::stringstream m_stream; public: - std::ostream& stream() const override { + std::ostream& stream() override { return m_stream; } diff --git a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp index 708f0903..84f2b689 100644 --- a/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp +++ b/tests/SelfTest/IntrospectiveTests/Reporters.tests.cpp @@ -29,10 +29,10 @@ namespace { class StringIStream : public Catch::IStream { public: - std::ostream& stream() const override { return sstr; } + std::ostream& stream() override { return sstr; } std::string str() const { return sstr.str(); } private: - mutable std::stringstream sstr; + std::stringstream sstr; }; } |