OTest2
A C++ testing framework
|
An implementation of the assertion buffer keeping messages in a memory buffer. More...
#include <assertbufferstr.h>
Public Member Functions | |
AssertBufferStr (const AssertBufferStr &)=delete | |
AssertBufferStr & | operator= (const AssertBufferStr &)=delete |
AssertBufferStr (AssertBufferListener *listener_) | |
Ctor. More... | |
virtual | ~AssertBufferStr () |
Dtor. More... | |
void | openAssertion (const AssertBufferAssertData &data_) |
Open an assertion. More... | |
void | openError () |
Open an internal error. More... | |
virtual void | setForeground (Color color_) override |
Set foreground color. More... | |
virtual void | setBackground (Color color_) override |
Set background color. More... | |
virtual void | setTextStyle (Style style_) override |
Set style of the shown text. More... | |
virtual void | resetAttributes () override |
Reset currently set text attributes. More... | |
virtual void | commitMessage (const Context &context_) override final |
Commit (flush) current assertion message. More... | |
virtual void | commitAssertion (const Context &context_) override final |
Finish current assertion. More... | |
![]() | |
AssertBuffer (const AssertBuffer &)=delete | |
AssertBuffer & | operator= (const AssertBuffer &)=delete |
AssertBuffer () | |
Ctor. More... | |
virtual | ~AssertBuffer () |
Dtor. More... | |
Protected Member Functions | |
virtual int | overflow (int c_) override final |
An implementation of the assertion buffer keeping messages in a memory buffer.
Definition at line 117 of file assertbufferstr.h.
|
delete |
|
explicit |
Ctor.
listener_ | Listener of the buffer. The ownership is not taken. |
Definition at line 29 of file assertbufferstr.cpp.
|
virtual |
Dtor.
Definition at line 38 of file assertbufferstr.cpp.
|
finaloverridevirtual |
Finish current assertion.
context_ | The OTest2 context |
Implements OTest2::AssertBuffer.
Definition at line 144 of file assertbufferstr.cpp.
|
finaloverridevirtual |
Commit (flush) current assertion message.
context_ | The OTest2 context |
Implements OTest2::AssertBuffer.
Definition at line 98 of file assertbufferstr.cpp.
void OTest2::AssertBufferStr::openAssertion | ( | const AssertBufferAssertData & | data_ | ) |
Open an assertion.
data_ | Data kept about the assertion |
Definition at line 42 of file assertbufferstr.cpp.
void OTest2::AssertBufferStr::openError | ( | ) |
Open an internal error.
Definition at line 51 of file assertbufferstr.cpp.
|
delete |
|
finaloverrideprotectedvirtual |
Definition at line 66 of file assertbufferstr.cpp.
|
overridevirtual |
Reset currently set text attributes.
Implements OTest2::AssertBuffer.
Definition at line 94 of file assertbufferstr.cpp.
|
overridevirtual |
Set background color.
color_ | The color |
Implements OTest2::AssertBuffer.
Definition at line 84 of file assertbufferstr.cpp.
|
overridevirtual |
Set foreground color.
color_ | The color |
Implements OTest2::AssertBuffer.
Definition at line 79 of file assertbufferstr.cpp.
|
overridevirtual |
Set style of the shown text.
style_ | The style |
Implements OTest2::AssertBuffer.
Definition at line 89 of file assertbufferstr.cpp.