GCC Code Coverage Report


Directory: .
File: main.cpp
Date: 2025-09-27 21:24:05+00:00
Coverage Exec Excl Total
Lines: 63.6% 7 0 11
Functions: 66.7% 2 0 3
Branches: 50.0% 2 0 4

Line Branch Exec Source
1 #include <iostream>
2
3 int not_called(void) {
4 return 1;
5 }
6
7 1 int foo(int param) {
8
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (param) {
9 return 1; //std::cout << "param not null." << std::endl;
10 } else {
11 1 return 0; //std::cout << "param is null." << std::endl;
12 }
13 }
14
15
16 1 int main(int argc, char* argv[]) {
17 foo(
18 0
19 )
20 1 ;
21
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 time.
1 if (argc > 1) {
22 foo(
23 1
24 )
25 ;
26 }
27
28 1 return 0;
29 }
30