mirror of
https://github.com/verilator/verilator.git
synced 2026-10-06 10:03:44 +02:00
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:
+8
-1
@@ -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();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user