OTest2
A C++ testing framework
include
otest2
testmarkinbin.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2020 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_TESTMARKINBIN_H_
21
#define OTest2__INCLUDE_OTEST2_TESTMARKINBIN_H_
22
23
#include <cstdint>
24
#include <initializer_list>
25
26
#include <
otest2/testmarkin.h
>
27
28
namespace
OTest2
{
29
30
enum class
TestMarkOutBinTag
: std::uint8_t;
31
35
class
TestMarkInBin
:
public
TestMarkIn
{
36
private
:
43
virtual
void
readBinaryData(
44
std::uint64_t size_,
45
std::uint8_t* buffer_) = 0;
46
47
TestMarkOutBinTag
readTag(
48
std::initializer_list<TestMarkOutBinTag> tags_);
49
50
public
:
54
TestMarkInBin
();
55
59
virtual
~
TestMarkInBin
();
60
61
/* -- testmarkin */
62
virtual
std::string readTypeMark()
override
;
63
virtual
std::int64_t readInt()
override
;
64
virtual
long
double
readFloat()
override
;
65
virtual
std::string readString()
override
;
66
};
67
68
}
/* -- namespace OTest2 */
69
70
#endif
/* -- OTest2__INCLUDE_OTEST2_TESTMARKINBIN_H_ */
OTest2::TestMarkOutBinTag
TestMarkOutBinTag
Definition:
testmarkoutbintags.h:27
OTest2::TestMarkInBin
Testmark deserializer based on a binary stream.
Definition:
testmarkinbin.h:35
OTest2::TestMarkIn
A generic interface of a testmark deserializer.
Definition:
testmarkin.h:35
OTest2
Definition:
assertbean.h:25
testmarkin.h
Generated by
1.8.17