OTest2
A C++ testing framework
|
Go to the documentation of this file.
20 #ifndef OTest2_INCLUDE_OTEST2_ASSERTSTREAM_H_
21 #define OTest2_INCLUDE_OTEST2_ASSERTSTREAM_H_
24 #include <initializer_list>
45 std::initializer_list<const char*> parameters;
66 std::initializer_list<const char*> parameters_);
131 template<
typename... Values_>
135 std::tuple<Values_...> args;
142 std::ostream& os_)
const;
150 template<
typename... Values_>
Private::Manipulator resetAttrs()
Reset color and style attributes - manipulator.
void printParameter(int index_)
Print assertion parameter at the zero based index_.
Private::Manipulator< Style > textStyle(Style style_)
Text style manipulator.
void resetAttributes()
Reset the color and style attributes.
Style
Style of shown text.
Private::Manipulator< int > assertPar(int index_)
Print assertion parameter.
virtual ~AssertStream()
Dtor.
bool getResult()
Return the assertion result.
Private::Manipulator commitMsg()
Commit current assertion message.
void setTextStyle(Style style_)
Set text style.
AssertStream(const AssertStream &)=delete
void setForeground(Color color_)
Set foreground color.
Color
List of colors supported by the reporters.
void commitMessage()
Commit the assertion message.
void setBackground(Color color_)
Set background color.
std::ostream & operator<<(std::ostream &os_, const Private::Manipulator< Values_... > &manip_)
Application of manipulators.
std::shared_ptr< AssertBuffer > AssertBufferPtr
Manipulator(void(AssertStream::*fce_)(Values_...), Values_... args_)
AssertStream & operator=(const AssertStream &)=delete
Private::Manipulator< Color > background(Color color_)
Background color manipulator.
std::ostream & doTheJob(std::ostream &os_) const
Private::Manipulator< Color > foreground(Color color_)
Foreground color manipulator.