OTest2
A C++ testing framework
include
otest2
testmarkbool.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_TESTMARKBOOL_H_
21
#define OTest2__INCLUDE_OTEST2_TESTMARKBOOL_H_
22
23
#include <
otest2/testmark.h
>
24
25
namespace
OTest2
{
26
27
struct
CtorMark;
28
32
class
TestMarkBool
:
public
TestMark
{
33
private
:
34
bool
value;
35
36
/* -- test mark interface */
37
virtual
TestMarkHashCode
doGetHashCode()
const
noexcept;
38
virtual
bool
doIsEqual(
39
const
TestMark
& other_,
40
long
double
precision_)
const
;
41
virtual
bool
doIsEqualValue(
42
const
TestMark
& other_,
43
long
double
precision_)
const
;
44
virtual
void
doDiffArray(
45
int
level_,
46
std::vector<LinearizedRecord>& array_)
const
;
47
virtual
void
doLinearizedMark(
48
int
level_,
49
const
std::string& label_,
50
std::vector<LinearizedRecord>& array_)
const
;
51
virtual
void
doPrintOpen(
52
std::ostream& os_,
53
const
std::string& prefix_)
const
;
54
virtual
void
doPrintClose(
55
std::ostream& os_,
56
const
std::string& prefix_)
const
;
57
virtual
void
doSerializeMark(
58
TestMarkOut
& serializer_)
const
;
59
virtual
void
doDeserializeMark(
60
TestMarkFactory
& factory_,
61
TestMarkIn
& deserializer_);
62
63
public
:
69
explicit
TestMarkBool
(
70
bool
value_);
71
75
explicit
TestMarkBool
(
76
const
CtorMark*);
77
81
virtual
~TestMarkBool
();
82
83
/* -- avoid copying */
84
TestMarkBool
(
85
const
TestMarkBool
&) =
delete
;
86
TestMarkBool
&
operator =
(
87
const
TestMarkBool
&) =
delete
;
88
89
static
const
char
*
typeMark
();
90
};
91
92
}
/* namespace OTest2 */
93
94
#endif
/* OTest2__INCLUDE_OTEST2_TESTMARKBOOL_H_ */
OTest2::TestMarkBool
Bool test mark.
Definition:
testmarkbool.h:32
OTest2::TestMarkBool::operator=
TestMarkBool & operator=(const TestMarkBool &)=delete
OTest2::TestMarkBool::TestMarkBool
TestMarkBool(bool value_)
Ctor.
Definition:
testmarkbool.cpp:39
OTest2::TestMarkIn
A generic interface of a testmark deserializer.
Definition:
testmarkin.h:35
OTest2::TestMarkHashCode
std::uint64_t TestMarkHashCode
Definition:
testmarkhashcode.h:28
OTest2::TestMarkBool::~TestMarkBool
virtual ~TestMarkBool()
Dtor.
Definition:
testmarkbool.cpp:51
OTest2::TestMarkOut
A generic interface of a serializer of test marks.
Definition:
testmarkout.h:31
OTest2
Definition:
assertbean.h:25
testmark.h
OTest2::TestMark
Generic interface of a test mark node.
Definition:
testmark.h:41
OTest2::TestMarkFactory
A factory of testmark objects used for deserialization.
Definition:
testmarkfactory.h:45
OTest2::TestMarkBool::typeMark
static const char * typeMark()
Definition:
testmarkbool.cpp:55
Generated by
1.8.17