Tests: ignore all hashes in files_identical

Also add 'h' prefix to all printed hashes, to reduce ambiguity. No
functional change.
This commit is contained in:
Geza Lore
2021-08-11 16:55:11 +01:00
parent bc3e24c8cd
commit 5adc856950
6 changed files with 24 additions and 16 deletions
+8 -1
View File
@@ -19,10 +19,17 @@
#include <functional>
#include <iomanip>
#include <iostream>
#include <sstream>
V3Hash::V3Hash(const std::string& val)
: m_value{static_cast<uint32_t>(std::hash<std::string>{}(val))} {}
std::ostream& operator<<(std::ostream& os, const V3Hash& rhs) {
return os << std::hex << std::setw(8) << std::setfill('0') << rhs.value();
return os << 'h' << std::hex << std::setw(8) << std::setfill('0') << rhs.value();
}
std::string V3Hash::toString() const {
std::ostringstream os;
os << *this;
return os.str();
}