Directory: | . |
---|---|
File: | main.cpp |
Date: | 2020-09-29 20:04:38 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 6 | 7 | 85.7% |
Branches: | 3 | 6 | 50.0% |
Line | Branch | Exec | Source |
---|---|---|---|
1 | #include <iostream> | ||
2 | |||
3 | |||
4 | 1 | int foo(int param) { | |
5 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | if (param) { |
6 | ✗ | return 1; //std::cout << "param not null." << std::endl; | |
7 | } else { | ||
8 | return 0; //std::cout << "param is null." << std::endl; GCOVR_EXCL_LINE | ||
9 | } | ||
10 | // LCOV_EXCL_START | ||
11 | if (param) { | ||
12 | return 1; //std::cout << "param not null." << std::endl; | ||
13 | } else { | ||
14 | return 0; //std::cout << "param is null." << std::endl; | ||
15 | } | ||
16 | // LCOV_EXCL_STOP | ||
17 | } | ||
18 | |||
19 | |||
20 | 1 | int main(int argc, char* argv[]) { | |
21 | 1 | foo(0); | |
22 | |||
23 | 1 | return 0; | |
24 |
2/4✓ Branch 0 taken 1 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 1 times.
✗ Branch 3 not taken.
|
3 | } |
25 |