PhoenixSwarm
6.1.0
Persistent processing programs exchanging data over sockets
Toggle main menu visibility
Loading...
Searching...
No Matches
main.cpp
Go to the documentation of this file.
1
/***************************************
2
Auteur : Pierre Aubert
3
Mail : pierre.aubert@lapp.in2p3.fr
4
Licence : LGPL-3.0-only
5
****************************************/
6
7
#include "
Shadok.h
"
8
10
14
bool
checkShadokEquality
(
Shadok
& var,
Shadok
& reference){
15
bool
b(
true
);
16
b &= var.
getAge
() == reference.
getAge
();
17
return
b;
18
}
19
21
25
bool
checkShadokEqualityConst
(
const
Shadok
& var,
const
Shadok
& reference){
26
bool
b(
true
);
27
b &= var.
getAge
() == reference.
getAge
();
28
return
b;
29
}
30
32
bool
checkShadokCopy
(){
33
Shadok
reference;
34
//Let's use the setters
35
reference.
setAge
(42);
36
Shadok
varCopy(reference);
37
Shadok
varEqual;
38
varEqual = reference;
39
bool
b(
true
);
40
b &=
checkShadokEquality
(varCopy, reference);
41
b &=
checkShadokEqualityConst
(varCopy, reference);
42
b &=
checkShadokEquality
(varEqual, reference);
43
b &=
checkShadokEqualityConst
(varEqual, reference);
44
b &= phoenix_getTypeToStr<Shadok>() ==
"Shadok"
;
45
return
b;
46
}
47
48
int
main
(
int
argc,
char
** argv){
49
bool
b(
checkShadokCopy
());
50
return
b - 1;
51
}
Shadok.h
main
int main(int argc, char **argv)
Definition
main.cpp:21
checkShadokCopy
bool checkShadokCopy()
Check copy of class Shadok.
Definition
main.cpp:32
checkShadokEqualityConst
bool checkShadokEqualityConst(const Shadok &var, const Shadok &reference)
Check the equality between two Shadok classes.
Definition
main.cpp:25
checkShadokEquality
bool checkShadokEquality(Shadok &var, Shadok &reference)
Check the equality between two Shadok classes.
Definition
main.cpp:14
Shadok
Test Shadok.
Definition
Shadok.h:15
Shadok::setAge
void setAge(int age)
Sets the age of the Shadok.
Definition
Shadok.cpp:47
Shadok::getAge
int getAge() const
Gets the age of the Shadok.
Definition
Shadok.cpp:61
platex
TESTS
TEST_FUNCTIONS
TEST_DATA_PROCESSING
TEST_SHADOK
main.cpp
Generated by
1.18.0