GCC Code Coverage Report


Directory: .
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec / Excl / Total
Lines: 75.0% 6 / 1 / 9
Functions: 66.7% 2 / 0 / 3
Branches: 50.0% 1 / 0 / 2
Conditions: 50.0% 1 / 0 / 2

main.cpp
Line Branch Condition Exec Source
1 #include <iostream>
2 #include <stdlib.h>
3
4 __attribute__((__noreturn__))
5 static void panic(void)
6 {
7 abort();
8 }
9
10 1 int foo(int param)
11 {
12
1/2
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 4 not taken.
1/2
✗ False not covered.
1 if (param > 1) {
13 1 return 3;
14 }
15
16 panic();
17 }
18
19
20 1 int main(int argc, char* argv[]) {
21 1 foo(2);
22
23 1 return 0;
24 }
25