OTest2
A C++ testing framework
|
Go to the documentation of this file.
27 hash(0xcbf29ce484222325ULL) {
42 const std::uint8_t* data_,
44 std::uint8_t
const*
const end_(data_ + size_);
45 for(; data_ != end_; ++data_) {
46 hash *= 0x100000001b3ULL;
47 hash ^=
static_cast<std::uint64_t
>(*data_);
52 std::uint8_t term_(0);
58 addData(
reinterpret_cast<const std::uint8_t*
>(&code_),
sizeof(code_));
62 const char* string_) {
64 reinterpret_cast<const std::uint8_t*
>(string_),
65 std::strlen(string_));
73 const char* type_name_,
74 const std::uint8_t* data_,
82 const char* type_name_,
83 const std::string& value_) {
86 reinterpret_cast<const std::uint8_t*
>(value_.c_str()),
92 const char* type_name_,
93 const std::string& value_) {
void addString(const char *string_)
Append a string literal.
void addTerminator()
Append a terminataor character into the hash.
TestMarkHashCode getHashCode() const noexcept
Get currently computed hash code.
std::uint64_t TestMarkHashCode
static TestMarkHashCode hashBasicType(const char *type_name_, Type_ value_)
A simple generator of a testmark hash.
void addData(const std::uint8_t *data_, std::size_t size_)
Append piece of data.
void addBasicType(const char *type_name_, const std::uint8_t *data_, std::size_t size_)
Add hash for a value of a basic type.
void addHashCode(TestMarkHashCode code_)
Append a hash code of another testmark.