Overall list of functions
| File | Lines | Functions | Branches | Conditions | Decisions | ||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| main.cpp |
|
96.9% | 31 / 0 / 32 | 100.0% | 4 / 0 / 4 | 80.0% | 16 / 0 / 20 | 80.0% | 16 / 0 / 20 | 50.0% | 3 / - / 6 |
| Directory: | . |
|---|---|
| File: | main.cpp |
| Date: | 2025-09-27 21:24:05+00:00 |
| Coverage | Exec | Excl | Total | |
|---|---|---|---|---|
| Lines: | 96.9% | 31 | 0 | 32 |
| Functions: | 100.0% | 4 | 0 | 4 |
| Branches: | 80.0% | 16 | 0 | 20 |
| Conditions: | 80.0% | 16 | 0 | 20 |
| Decisions: | 50.0% | 3 | - | 6 |
| Line | Branch | Condition | Decision | Exec | Source |
|---|---|---|---|---|---|
| 1 | |||||
| 2 | #include <iostream> | ||||
| 3 | |||||
| 4 | template<typename T> | ||||
| 5 | 10 | void foo(T s) | |||
| 6 | { | ||||
| 7 | static int i = 0; | ||||
| 8 | |||||
| 9 |
1/2✓ Branch 2 → 3 taken 10 times.
✗ Branch 2 → 7 not taken.
|
1/2✗ False not covered.
|
10 | if (i >= 0) { | |
| 10 | 10 | std::cout << i << " is greater or equal 0: " << s << std::endl; | |||
| 11 | } | ||||
| 12 |
6/6✓ Branch 7 → 8 taken 8 times.
✓ Branch 7 → 14 taken 2 times.
✓ Branch 8 → 9 taken 6 times.
✓ Branch 8 → 10 taken 2 times.
✓ Branch 9 → 10 taken 1 time.
✓ Branch 9 → 14 taken 5 times.
|
6/6✓ Condition 0: Fully covered.
✓ Condition 1.0: Fully covered.
✓ Condition 1.1: Fully covered.
|
10 | if (i > 0) if ( i < 2 || i > 4 ) std::cout << i << " is between 0 and 2 or greater 4: " << s << std::endl; | |
| 13 |
2/2✓ Branch 14 → 15 taken 1 time.
✓ Branch 14 → 19 taken 9 times.
|
2/2✓ Fully covered.
|
10 | if (i >= 5) { | |
| 14 | 1 | std::cout << i << " is greater 5: " << s << std::endl; | |||
| 15 | } | ||||
| 16 | |||||
| 17 | 10 | ++i; | |||
| 18 | 10 | } | |||
| 19 | |||||
| 20 | 4 | void bar() | |||
| 21 | { | ||||
| 22 | static int i = 0; | ||||
| 23 | |||||
| 24 |
1/2✓ Branch 2 → 3 taken 4 times.
✗ Branch 2 → 6 not taken.
|
1/2✗ False not covered.
|
1/2✓ Decision 'true' taken 4 times.
✗ Decision 'false' not taken.
|
4 | if (i >= 0) { |
| 25 | 4 | std::cout << i << " is greater or equal 0" << std::endl; | |||
| 26 | } | ||||
| 27 |
5/6✓ Branch 6 → 7 taken 3 times.
✓ Branch 6 → 12 taken 1 time.
✓ Branch 7 → 8 taken 2 times.
✓ Branch 7 → 9 taken 1 time.
✗ Branch 8 → 9 not taken.
✓ Branch 8 → 12 taken 2 times.
|
5/6✓ Condition 0: Fully covered.
✓ Condition 1.0: Fully covered.
✗ Condition 1.1: True not covered.
|
1/2✓ Decision 'true' taken 4 times.
✗ Decision 'false' not taken.
|
4 | if (i > 0) if ( i < 2 || i > 4 ) std::cout << i << " is between 0 and 2 or greater 4" << std::endl; |
| 28 |
1/2✗ Branch 12 → 13 not taken.
✓ Branch 12 → 16 taken 4 times.
|
1/2✗ True not covered.
|
1/2✗ Decision 'true' not taken.
✓ Decision 'false' taken 4 times.
|
4 | if (i >= 5) { |
| 29 | ✗ | std::cout << i << " is greater 5"<< std::endl; | |||
| 30 | } | ||||
| 31 | |||||
| 32 | 4 | ++i; | |||
| 33 | 4 | } | |||
| 34 | |||||
| 35 | 1 | int main() { | |||
| 36 | 1 | foo<>(0); | |||
| 37 | 1 | foo<>(0); | |||
| 38 | 1 | foo<>(0); | |||
| 39 | 1 | foo<>(0); | |||
| 40 | 1 | foo<>(0); | |||
| 41 | 1 | foo<>(0); | |||
| 42 | |||||
| 43 | 1 | foo<>(0.0); | |||
| 44 | 1 | foo<>(0.0); | |||
| 45 | 1 | foo<>(0.0); | |||
| 46 | 1 | foo<>(0.0); | |||
| 47 | |||||
| 48 | 1 | bar(); | |||
| 49 | 1 | bar(); | |||
| 50 | 1 | bar(); | |||
| 51 | 1 | bar(); | |||
| 52 | |||||
| 53 | 1 | return 0; | |||
| 54 | } | ||||
| 55 |