Directory: | . |
---|---|
File: | main.cpp |
Date: | 2020-09-29 20:07:45 |
Exec | Total | Coverage | |
---|---|---|---|
Lines: | 8 | 10 | 80.0% |
Branches: | 4 | 8 | 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 | 1 | return 0; //std::cout << "param is null." << std::endl; | |
9 | } | ||
10 | } | ||
11 | |||
12 | |||
13 | 1 | int main(int argc, char* argv[]) { | |
14 | foo( | ||
15 | 0 | ||
16 | ) | ||
17 | 1 | ; | |
18 |
1/2✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
|
1 | if (argc > 1) { |
19 | foo( | ||
20 | 1 | ||
21 | ) | ||
22 | ✗ | ; | |
23 | } | ||
24 | |||
25 | 1 | return 0; | |
26 |
2/4✓ Branch 1 taken 1 times.
✗ Branch 2 not taken.
✓ Branch 3 taken 1 times.
✗ Branch 4 not taken.
|
3 | } |
27 |