GCC Code Coverage Report


Directory: ./
File: function.hpp
Date: 2025-09-27 21:24:05+00:00
Coverage Exec Excl Total
Lines: 94.4% 17 0 18
Functions: 100.0% 4 0 4
Branches: 75.0% 6 0 8
Conditions: 75.0% 6 0 8

Line Branch Condition Exec Source
1
2 5 void FUNCTION_NAME(int a, int b) {
3
6/8
func_a(int, int):
✓ Branch 2 → 3 taken 3 times.
✓ Branch 2 → 5 taken 1 time.
✓ Branch 3 → 4 taken 2 times.
✓ Branch 3 → 5 taken 1 time.
func_b(int, int):
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 5 not taken.
✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 5 not taken.
6/8
func_a(int, int):
✓ Condition 0: Fully covered.
✓ Condition 1: Fully covered.
func_b(int, int):
✗ Condition 0: False not covered.
✗ Condition 1: False not covered.
5 if ((a>=0) && (b<=10)) {
4 3 std::cout << "Hello from if";
5 }
6 else {
7 2 std::cout << "Hello from else";
8 }
9 5 std::cout << " (" << TO_STR(FUNCTION_NAME) << ")." << std::endl;
10 5 }
11
12 namespace ns {
13 2 void FUNCTION_NAME(int a) {
14 2 std::cout << "Hello from ns::" << TO_STR(FUNCTION_NAME) << "." << std::endl;
15 2 }
16 }
17