GCC Code Coverage Report


./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
6 / 7
85.7%
Branches:
3 / 4
75.0%
Functions:
1 / 1
100.0%

foo.c
Line Branch Exec Source
1 #include <stdio.h>
2
3 2 void foo(int num) {
4
2/2
✓ Branch 0 taken 1 time.
✓ Branch 1 taken 1 time.
2 if (num == 1) {
5 1 printf("when num is equal to 1...\n");
6
1/2
✓ Branch 0 taken 1 time.
✗ Branch 1 not taken.
1 } else if (num == 2) {
7 1 printf("when num is equal to 2...\n");
8 } else {
9 ✗ printf("when num is equal to %d...\n", num);
10 }
11 2 }
12