| 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 | 1 | ADD_CATCH_FORMATTER_IMPL(Hsh) | |
| 27 | 1 | ADD_CATCH_FORMATTER_IMPL(HshO) | |
| 28 | } | ||
| 29 |