dte test coverage


Directory: ./
Coverage: low: ≥ 0% medium: ≥ 50.0% high: ≥ 85.0%
Coverage Exec / Excl / Total
Lines: 100.0% 10 / 0 / 10
Functions: 100.0% 2 / 0 / 2
Branches: 50.0% 2 / 0 / 4

src/util/arith.c
Line Branch Exec Source
1 #include <errno.h>
2 #include "arith.h"
3
4 16064 size_t xmul_(size_t a, size_t b)
5 {
6 16064 size_t result;
7 16064 bool overflow = size_multiply_overflows(a, b, &result);
8
1/2
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 16064 times.
16064 FATAL_ERROR_ON(overflow, EOVERFLOW);
9 16064 return result;
10 }
11
12 259302 size_t xadd(size_t a, size_t b)
13 {
14 259302 size_t result;
15 259302 bool overflow = size_add_overflows(a, b, &result);
16
1/2
✗ Branch 3 → 4 not taken.
✓ Branch 3 → 5 taken 259302 times.
259302 FATAL_ERROR_ON(overflow, EOVERFLOW);
17 259302 return result;
18 }
19