GCC Code Coverage Report


libs/base/src/base/
File: hash.string.cc
Date: 2025-03-19 20:55:25
Lines:
6/6
100.0%
Functions:
4/4
100.0%
Branches:
4/8
50.0%

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 0 (2 → 3) taken 1 times.
✗ Branch 1 (2 → 10) not taken.
✓ Branch 2 (3 → 4) taken 1 times.
✗ Branch 3 (3 → 8) not taken.
1 ADD_CATCH_FORMATTER_IMPL(Hsh)
27
2/4
✓ Branch 0 (2 → 3) taken 1 times.
✗ Branch 1 (2 → 10) not taken.
✓ Branch 2 (3 → 4) taken 1 times.
✗ Branch 3 (3 → 8) not taken.
1 ADD_CATCH_FORMATTER_IMPL(HshO)
28 }
29