GCC Code Coverage Report


Directory: .
File: main.c
Date: 0000-00-00 00:00:00
Exec Total Coverage
Lines: 6 7 85.7%
Functions: 2 2 100.0%
Branches: 1 4 25.0%
Conditions: 1 2 50.0%

Line Branch Condition Exec Source
1 #include <stdio.h>
2
3 2 int foo(int param, int param2) {
4
1/4
✗ Branch 0 (2→3) not taken.
✓ Branch 1 (2→5) taken 2 times.
✗ Branch 2 (3→4) not taken.
✗ Branch 3 (3→5) not taken.
1/2
✗ True not covered.
2 if (param != 0) {
5 return 1;
6 } else {
7 2 return 0;
8 }
9 }
10
11 2 int main(int argc, char* argv[]) {
12 2 foo(0, 1);
13
14 2 return 0;
15 }
16