GCC Code Coverage Report


Directory: .
Date: 2025-09-27 21:24:05+00:00
Coverage: low: ≥ 0% medium: ≥ 75.0% high: ≥ 90.0%
Coverage Exec Excl Total
Lines: 85.7% 6 0 7
Functions: 100.0% 1 0 1
Branches: 40.0% 2 0 5
Conditions: 50.0% 3 0 6

Overall list of functions

File Lines Functions Branches Conditions
main.c 85.7 85.7% 6 / 0 / 7 100.0% 1 / 0 / 1 40.0% 2 / 0 / 5 50.0% 3 / 0 / 6

Directory: .
File: main.c
Date: 2025-09-27 21:24:05+00:00
Coverage Exec Excl Total
Lines: 85.7% 6 0 7
Functions: 100.0% 1 0 1
Branches: 40.0% 2 0 5
Conditions: 50.0% 3 0 6
Line Branch Condition Exec Source
1
2 #include <iostream>
3 #ifdef TWO_CONDITIONS
4 #define CONDITION (argc > 0) && (argc <=1)
5 #else
6 #define CONDITION (argc > 0)
7 #endif
8 #define TO_STR(x) #x
9
10 4 int main(int argc, char* argv[]) {
11 4 std::cout << TO_STR(CONDITION) << ": ";
12
2/5
✓ Branch 4 → 5 taken 4 times.
✗ Branch 4 → 6 not taken.
✗ Branch 4 → 7 not taken.
✓ Branch 5 → 6 taken 2 times.
✗ Branch 5 → 7 not taken.
3/6
✗ Condition 0: False not covered.
✗ Condition 0.0: False not covered.
✗ Condition 0.1: False not covered.
4 if (CONDITION) {
13 4 std::cout << "True";
14 }
15 else {
16 std::cout << "False";
17 }
18 4 std::cout << std::endl;
19
20 4 return 0;
21 }
22