GCC Code Coverage Report


Directory: .
File: main.cpp
Date: 0000-00-00 00:00:00
Exec Total Coverage
Lines: 8 13 61.5%
Functions: 2 3 66.7%
Branches: 2 4 50.0%

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 times.
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 1 }
14
15
16 1 int main(int argc, char* argv[]) {
17 1 foo(
18 0
19 )
20 ;
21
1/2
✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
1 if (argc > 1) {
22 foo(
23 1
24 )
25 ;
26 }
27
28 1 return 0;
29 }
30