GCC Code Coverage Report


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

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