OTest2
A C++ testing framework
testmarkformatterassert.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2021 Ondrej Starek
3  *
4  * This file is part of OTest2
5  *
6  * OTest2 is free software: you can redistribute it and/or modify it under
7  * the terms of the GNU Lesser General Public License as published by
8  * the Free Software Foundation, either version 3 of the License,
9  * or (at your option) any later version.
10  *
11  * OTest2 is distributed in the hope that it will be useful, but WITHOUT
12  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
13  * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
14  * License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public License
17  * along with OTest2. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #ifndef OTest2_INCLUDE_OTEST2_TESTMARKFORMATTERASSERT_H_
21 #define OTest2_INCLUDE_OTEST2_TESTMARKFORMATTERASSERT_H_
22 
24 #include <string>
25 
26 namespace OTest2 {
27 
28 class AssertStream;
29 
34  private:
35  AssertStream* stream;
36 
37  virtual void setTextForeground(
38  Color color_) override;
39  virtual void setTextStyle(
40  Style style_) override;
41  virtual void resetTextAttributes() override;
42 
43  public:
44  /* -- avoid copying */
46  const TestMarkFormatterAssert&) = delete;
48  const TestMarkFormatterAssert&) = delete;
49 
56  explicit TestMarkFormatterAssert(
57  AssertStream* stream_,
58  const std::string& prefix_);
59 
63  virtual ~TestMarkFormatterAssert();
64 };
65 
66 } /* -- namespace OTest2 */
67 
68 #endif /* -- OTest2_INCLUDE_OTEST2_TESTMARKFORMATTERASSERT_H_ */
testmarkformatterios.h
OTest2::Style
Style
Style of shown text.
Definition: reporterattributes.h:44
OTest2::TestMarkFormatterAssert
Testmark formatter working with the assertion stream.
Definition: testmarkformatterassert.h:33
OTest2::TestMarkFormatterAssert::TestMarkFormatterAssert
TestMarkFormatterAssert(const TestMarkFormatterAssert &)=delete
OTest2::TestMarkFormatterAssert::operator=
TestMarkFormatterAssert & operator=(const TestMarkFormatterAssert &)=delete
OTest2::Color
Color
List of colors supported by the reporters.
Definition: reporterattributes.h:30
OTest2
Definition: assertbean.h:25
OTest2::AssertStream
Assertion stream.
Definition: assertstream.h:40
OTest2::TestMarkFormatterAssert::~TestMarkFormatterAssert
virtual ~TestMarkFormatterAssert()
Dtor.
OTest2::TestMarkFormatterIOS
Implementation of the testmark formatter based on an IO stream.
Definition: testmarkformatterios.h:33