GCC Code Coverage Report


Directory: ./
File: TESTS/TEST_DOT_LOOP/main.cpp
Date: 2025-03-14 11:38:38
Exec Total Coverage
Lines: 17 17 100.0%
Branches: 18 18 100.0%

Line Branch Exec Source
1 /***************************************
2 Auteur : Pierre Aubert
3 Mail : pierre.aubert@lapp.in2p3.fr
4 Licence : CeCILL-C
5 ****************************************/
6
7 #include "Graph.h"
8
9 ///Test the graph conversion to dot
10 1 void testGraphToDot(){
11
1/1
✓ Branch 1 taken 1 times.
1 Graph<bool, long> graph;
12
13
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 long nodeA = graph.createNode(true, "a");
14
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 long nodeB = graph.createNode(true, "b");
15
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 long nodeC = graph.createNode(true, "c");
16
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 long nodeD = graph.createNode(true, "d");
17
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 long nodeE = graph.createNode(true, "e");
18
19
1/1
✓ Branch 1 taken 1 times.
1 graph.connectNode(nodeA, nodeB);
20
1/1
✓ Branch 1 taken 1 times.
1 graph.connectNode(nodeB, nodeC);
21
1/1
✓ Branch 1 taken 1 times.
1 graph.connectNode(nodeC, nodeD);
22
1/1
✓ Branch 1 taken 1 times.
1 graph.connectNode(nodeD, nodeB);
23
1/1
✓ Branch 1 taken 1 times.
1 graph.connectNode(nodeD, nodeE);
24
25
2/2
✓ Branch 2 taken 1 times.
✓ Branch 5 taken 1 times.
1 graph.savePng("testGraph.png");
26 1 }
27
28
29 1 int main(int argc, char** argv){
30 1 testGraphToDot();
31 1 return 0;
32 }
33
34
35