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: 50.0% 2 0 4

Overall list of functions

File Lines Functions Branches
main.c 85.7 85.7% 6 / 0 / 7 100.0% 1 / 0 / 1 50.0% 2 / 0 / 4

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: 50.0% 2 0 4
Line Branch 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/4
✓ Branch 0 taken 4 times.
✗ Branch 1 not taken.
✓ Branch 2 taken 2 times.
✗ Branch 3 not taken.
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