OTest2
A C++ testing framework
include
otest2
semanticstack.h
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 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_SEMANTICSTACK_H_
21
#define OTest2__INCLUDE_OTEST2_SEMANTICSTACK_H_
22
23
namespace
OTest2
{
24
31
class
SemanticStack
{
32
private
:
33
struct
Impl;
34
Impl* pimpl;
35
36
public
:
37
/* -- avoid copying */
38
SemanticStack
(
39
const
SemanticStack
&) =
delete
;
40
SemanticStack
&
operator =
(
41
const
SemanticStack
&) =
delete
;
42
46
SemanticStack
();
47
51
~SemanticStack
();
52
56
void
push
(
57
bool
value_);
58
62
bool
top
()
const
;
63
67
void
setTop
(
68
bool
value_);
69
73
void
pop
();
74
78
void
popAnd
();
79
84
bool
isFinished
()
const
;
85
};
86
87
}
/* namespace OTest2 */
88
89
#endif
/* OTest2__INCLUDE_OTEST2_SEMANTICSTACK_H_ */
OTest2::SemanticStack::isFinished
bool isFinished() const
Returns true if just one value is in the stack (result of the entire test).
Definition:
semanticstack.cpp:93
OTest2::SemanticStack::popAnd
void popAnd()
AND last two values and replace them by the result.
Definition:
semanticstack.cpp:86
OTest2::SemanticStack::SemanticStack
SemanticStack()
Ctor.
Definition:
semanticstack.cpp:56
OTest2::SemanticStack
Semantic stack.
Definition:
semanticstack.h:31
OTest2::SemanticStack::push
void push(bool value_)
Push a value.
Definition:
semanticstack.cpp:65
OTest2::SemanticStack::~SemanticStack
~SemanticStack()
Dtor.
Definition:
semanticstack.cpp:61
OTest2::SemanticStack::operator=
SemanticStack & operator=(const SemanticStack &)=delete
OTest2
Definition:
assertbean.h:25
OTest2::SemanticStack::pop
void pop()
Pop top value.
Definition:
semanticstack.cpp:81
OTest2::SemanticStack::setTop
void setTop(bool value_)
Set top value.
Definition:
semanticstack.cpp:75
OTest2::SemanticStack::top
bool top() const
Get top value.
Definition:
semanticstack.cpp:70
Generated by
1.8.17