OTest2
A C++ testing framework
|
Go to the documentation of this file.
20 #ifndef OTest2_INCLUDE_OTEST2_ASSERTBUFFERSTR_H_
21 #define OTest2_INCLUDE_OTEST2_ASSERTBUFFERSTR_H_
72 const std::string& message_) = 0;
80 const std::string& message_) = 0;
97 const std::string& message_) = 0;
104 const std::string& message_) = 0;
123 char tmp_buffer[TMP_SIZE];
126 std::stringbuf buffer;
143 void finishTmpBuffer();
181 int c_)
override final;
186 Color color_)
override;
188 Color color_)
override;
190 Style style_)
override;
193 const Context& context_)
override final;
195 const Context& context_)
override final;
Style
Style of shown text.
virtual int overflow(int c_) override final
AssertBufferListener & operator=(const AssertBufferListener &)=delete
virtual void assertionClose(const Context &context_, const AssertBufferAssertData &data_)=0
Closing of the assertion.
virtual void setBackground(Color color_) override
Set background color.
void openError()
Open an internal error.
virtual void commitMessage(const Context &context_) override final
Commit (flush) current assertion message.
An implementation of the assertion buffer keeping messages in a memory buffer.
virtual void setForeground(Color color_) override
Set foreground color.
AssertBufferStr & operator=(const AssertBufferStr &)=delete
virtual ~AssertBufferListener()
Dtor.
virtual ~AssertBufferStr()
Dtor.
AssertBufferStr(const AssertBufferStr &)=delete
Color
List of colors supported by the reporters.
Listener of the string assertion buffer.
virtual void setTextStyle(Style style_) override
Set style of the shown text.
Streambuffer interface used in the assertion API.
virtual void assertionAdditionalMessage(const Context &context_, const AssertBufferAssertData &data_, const std::string &message_)=0
Additional assertion message.
void openAssertion(const AssertBufferAssertData &data_)
Open an assertion.
virtual void errorClose(const Context &context_)=0
Closing of the internal error.
AssertBufferListener()
Ctor.
virtual void errorAdditionalMessage(const Context &context_, const std::string &message_)=0
Additional error message.
virtual void commitAssertion(const Context &context_) override final
Finish current assertion.
virtual void resetAttributes() override
Reset currently set text attributes.
virtual void assertionOpeningMessage(const Context &context_, const AssertBufferAssertData &data_, const std::string &message_)=0
First composed message of an assertion.
Common data kept for opened assertion.
virtual void errorOpeningMessage(const Context &context_, const std::string &message_)=0
First composed message of an internal error.