OTest2
A C++ testing framework
testmarkformatter.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_TESTMARKFORMATTER_H_
21 #define OTest2_INCLUDE_OTEST2_TESTMARKFORMATTER_H_
22 
23 #include <string>
24 
25 namespace OTest2 {
26 
27 class TestMark;
28 
33  public:
34  /* -- avoid copying */
36  const TestMarkFormatter&) = delete;
38  const TestMarkFormatter&) = delete;
39 
44 
48  virtual ~TestMarkFormatter();
49 
57  virtual void openMark(
58  const std::string& label_,
59  const TestMark* mark_,
60  int indent_) = 0;
61 
69  virtual void closeMark(
70  const std::string& label_,
71  const TestMark* mark_,
72  int indent_) = 0;
73 
81  virtual void openDeleted(
82  const std::string& label_,
83  const TestMark* mark_,
84  int indent_) = 0;
85 
93  virtual void closeDeleted(
94  const std::string& label_,
95  const TestMark* mark_,
96  int indent_) = 0;
97 
105  virtual void openAdded(
106  const std::string& label_,
107  const TestMark* mark_,
108  int indent_) = 0;
109 
117  virtual void closeAdded(
118  const std::string& label_,
119  const TestMark* mark_,
120  int indent_) = 0;
121 
125  virtual void printSeparator() = 0;
126 };
127 
128 } /* -- namespace OTest2 */
129 
130 #endif /* -- OTest2_INCLUDE_OTEST2_TESTMARKFORMATTER_H_ */
OTest2::TestMarkFormatter::TestMarkFormatter
TestMarkFormatter()
Ctor.
OTest2::TestMarkFormatter::openAdded
virtual void openAdded(const std::string &label_, const TestMark *mark_, int indent_)=0
Print opening of an added testmark.
OTest2::TestMarkFormatter::openDeleted
virtual void openDeleted(const std::string &label_, const TestMark *mark_, int indent_)=0
Print opening of a deleted testmark.
OTest2::TestMarkFormatter::operator=
TestMarkFormatter & operator=(const TestMarkFormatter &)=delete
OTest2::TestMarkFormatter::~TestMarkFormatter
virtual ~TestMarkFormatter()
Dtor.
OTest2::TestMarkFormatter::closeDeleted
virtual void closeDeleted(const std::string &label_, const TestMark *mark_, int indent_)=0
Print closing of a deleted testmark.
OTest2
Definition: assertbean.h:25
OTest2::TestMarkFormatter::printSeparator
virtual void printSeparator()=0
Print separator (used for unchanged blocks)
OTest2::TestMarkFormatter::closeAdded
virtual void closeAdded(const std::string &label_, const TestMark *mark_, int indent_)=0
Print closing of an added testmark.
OTest2::TestMarkFormatter::openMark
virtual void openMark(const std::string &label_, const TestMark *mark_, int indent_)=0
Print opening of a testmark.
OTest2::TestMarkFormatter::closeMark
virtual void closeMark(const std::string &label_, const TestMark *mark_, int indent_)=0
Print closing of a testmark.
OTest2::TestMark
Generic interface of a test mark node.
Definition: testmark.h:41
OTest2::TestMarkFormatter
Generic interface of the testmark formatter.
Definition: testmarkformatter.h:32