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