GCC Code Coverage Report


Directory: ./
File: code.cpp
Date: 2025-09-27 21:24:05+00:00
Coverage Exec Excl Total
Lines: 75.0% 6 0 8
Functions: 100.0% 2 0 2
Branches: 50.0% 2 0 4
Conditions: 50.0% 2 0 4

Line Branch Condition Exec Source
1 #include "code.hpp"
2
3 1 int foo1(int param) {
4
1/2
✗ Branch 2 → 3 not taken.
✓ Branch 2 → 4 taken 1 time.
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 2 → 3 taken 1 time.
✗ Branch 2 → 4 not taken.
1/2
✗ False not covered.
1 if (param) {
14 1 return 1;
15 } else {
16 return 0;
17 }
18 }
19