GCC Code Coverage Report


Directory: src/
File: mylib.cpp
Date: 2025-08-02 00:25:52
Exec Total Coverage
Lines: 7 8 87.5%
Functions: 2 2 100.0%
Branches: 3 4 75.0%

Line Branch Exec Source
1 #include "mylib.h"
2 #include "config.h"
3
4 1 const char *get_version(void)
5 {
6 1 return MYLIB_VERSION;
7 }
8
9 2 int myadd(int x, int y)
10 {
11
2/2
✓ Branch 0 taken 1 times.
✓ Branch 1 taken 1 times.
2 if (x == 0)
12 {
13 1 return y;
14 }
15
1/2
✗ Branch 0 not taken.
✓ Branch 1 taken 1 times.
1 if (y == 0)
16 {
17 return x;
18 }
19 1 return x + y;
20 }
21