GCC Code Coverage Report
Directory: ./ Exec Total Coverage
File: tmp_project/FileParser/TESTS/TEST_PLOCATION/main.cpp Lines: 21 21 100.0 %
Date: 2024-09-10 03:06:26 Branches: 60 60 100.0 %

Line Branch Exec Source
1
2
/***************************************
3
	Auteur : Pierre Aubert
4
	Mail : pierre.aubert@lapp.in2p3.fr
5
	Licence : CeCILL-C
6
****************************************/
7
8
#include "phoenix_assert.h"
9
#include "phoenix_check.h"
10
#include "PLocation.h"
11
12
///Check the PLocation
13
1
void checkPLocation(){
14
3
	PLocation locRef("someFile.txt", 42, 23);
15
3
	PLocation locCopy(locRef), locEqual;
16
1
	locEqual = locRef;
17
18

1
	phoenix_assert(locRef == locCopy);
19

1
	phoenix_assert(locRef == locEqual);
20
21

1
	phoenix_assert(!(locRef != locCopy));
22

1
	phoenix_assert(!(locRef != locEqual));
23
24
2
	PLocation locSet;
25
1
	locSet.setFileName("someFile.txt");
26
1
	locSet.setLine(42);
27
1
	locSet.setColumn(23);
28
29

1
	phoenix_assert(locRef == locSet);
30

1
	phoenix_assert(!(locRef != locSet));
31
32

1
	phoenix_assert(locRef.getLine() == locSet.getLine());
33

1
	phoenix_assert(locRef.getColumn() == locSet.getColumn());
34

1
	phoenix_assert(locRef.getFileName() == locSet.getFileName());
35
1
}
36
37
38
1
int main(int argc, char** argv){
39
1
	checkPLocation();
40
1
	return 0;
41
}
42
43