OTest2
A C++ testing framework
include
otest2
testmarkprinter.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 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_TESTMARKPRINTER_H_
21
#define OTest2__INCLUDE_OTEST2_TESTMARKPRINTER_H_
22
23
#include <string>
24
#include <vector>
25
26
#include <
otest2/testmark.h
>
27
28
namespace
OTest2
{
29
30
class
TestMarkFormatter;
31
35
class
TestMarkPrinter
{
36
private
:
37
struct
Impl;
38
Impl* pimpl;
39
40
public
:
50
explicit
TestMarkPrinter
(
51
const
std::vector<TestMark::LinearizedRecord>* array_,
52
int
& index_);
53
57
~TestMarkPrinter
();
58
59
/* -- avoid copying */
60
TestMarkPrinter
(
61
const
TestMarkPrinter
&) =
delete
;
62
TestMarkPrinter
&
operator =
(
63
const
TestMarkPrinter
&) =
delete
;
64
71
bool
printLine
(
72
TestMarkFormatter
& formatter_);
73
80
bool
printDeleted
(
81
TestMarkFormatter
& formatter_);
82
89
bool
printAdded
(
90
TestMarkFormatter
& formatter_);
91
99
bool
skipLine
(
100
TestMarkFormatter
& os_);
101
};
102
103
}
/* namespace OTest2 */
104
105
#endif
/* OTest2__INCLUDE_OTEST2_TESTMARKPRINTER_H_ */
OTest2::TestMarkPrinter::skipLine
bool skipLine(TestMarkFormatter &os_)
Skip current line.
Definition:
testmarkprinter.cpp:160
OTest2::TestMarkPrinter::~TestMarkPrinter
~TestMarkPrinter()
Dtor.
Definition:
testmarkprinter.cpp:138
OTest2::TestMarkPrinter
Printer of testmarks.
Definition:
testmarkprinter.h:35
OTest2
Definition:
assertbean.h:25
OTest2::TestMarkPrinter::operator=
TestMarkPrinter & operator=(const TestMarkPrinter &)=delete
OTest2::TestMarkPrinter::TestMarkPrinter
TestMarkPrinter(const std::vector< TestMark::LinearizedRecord > *array_, int &index_)
Ctor.
Definition:
testmarkprinter.cpp:131
testmark.h
OTest2::TestMarkPrinter::printAdded
bool printAdded(TestMarkFormatter &formatter_)
Print added line.
Definition:
testmarkprinter.cpp:154
OTest2::TestMarkPrinter::printLine
bool printLine(TestMarkFormatter &formatter_)
Print current line into a stream.
Definition:
testmarkprinter.cpp:142
OTest2::TestMarkPrinter::printDeleted
bool printDeleted(TestMarkFormatter &formatter_)
Print deleted line.
Definition:
testmarkprinter.cpp:148
OTest2::TestMarkFormatter
Generic interface of the testmark formatter.
Definition:
testmarkformatter.h:32
Generated by
1.8.17