GCC Code Coverage Report


Directory: .
File: main.cpp
Date: 0000-00-00 00:00:00
Exec Total Coverage
Lines: 7 9 77.8%
Functions: 2 3 66.7%
Branches: 3 6 50.0%

Line Branch 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 0 taken 1 times.
✗ Branch 1 not taken.
1 if (param > 1) {
13 2 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
2/4
✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
3 }
25