GCC Code Coverage Report


Directory: ./
File: code.cpp
Date: 0000-00-00 00:00:00
Exec Total Coverage
Lines: 6 8 75.0%
Functions: 2 2 100.0%
Branches: 2 4 50.0%
Conditions: 2 4 50.0%

Line Branch Condition Exec Source
1 #include "code.hpp"
2
3 1 int foo1(int param) {
4
1/2
✗ Branch 0 (2→3) not taken.
✓ Branch 1 (2→4) taken 1 times.
1/2
✗ True not covered.
1 if (param) {
5 return 1;
6 } else {
7 1 return 0;
8 }
9 }
10
11
12 1 int foo2(int param) {
13
1/2
✓ Branch 0 (2→3) taken 1 times.
✗ Branch 1 (2→4) not taken.
1/2
✗ False not covered.
1 if (param) {
14 1 return 1;
15 } else {
16 return 0;
17 }
18 }
19