GCC Code Coverage Report


./
Coverage:
low: ≥ 0%
medium: ≥ 75.0%
high: ≥ 90.0%
Lines:
6 of 6, 0 excluded
100.0%
Functions:
4 of 4, 0 excluded
100.0%
Branches:
4 of 8, 0 excluded
50.0%

libs/base/src/base/hash.string.cc
Line Branch Exec Source
1 #include "base/hash.string.h"
2
3 namespace eu
4 {
5
6 2 std::string string_from(const Hsh hash)
7 {
8
9 #if USE_HASH_TEXT == 1
10 4 return fmt::format("{0}", hash.text);
11 #else
12 return fmt::format("0x{0:x}", hash.hash);
13 #endif
14 }
15
16 2 std::string string_from(const HshO& hash)
17 {
18
19 #if USE_HASH_TEXT == 1
20 4 return fmt::format("{0}", hash.text);
21 #else
22 return fmt::format("0x{0:x}", hash.hash);
23 #endif
24 }
25
26
2/4
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 8 not taken.
1 ADD_CATCH_FORMATTER_IMPL(Hsh)
27
2/4
✓ Branch 2 → 3 taken 1 time.
✗ Branch 2 → 10 not taken.
✓ Branch 3 → 4 taken 1 time.
✗ Branch 3 → 8 not taken.
1 ADD_CATCH_FORMATTER_IMPL(HshO)
28 }
29