[FEAT MERGE] OB Support XMLType
Co-authored-by: simonjoylet <simonjoylet@gmail.com>
This commit is contained in:
5
deps/oblib/unittest/lib/hash/hash_benz.cpp
vendored
5
deps/oblib/unittest/lib/hash/hash_benz.cpp
vendored
@ -94,9 +94,10 @@ private:
|
||||
class hashfunc_t
|
||||
{
|
||||
public:
|
||||
uint64_t operator () (uint64_t key)
|
||||
int operator () (uint64_t key, uint64_t &hash_val)
|
||||
{
|
||||
return key;
|
||||
hash_val = key;
|
||||
return OB_SUCCESS;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
@ -28,6 +28,7 @@ public:
|
||||
: key_(k)
|
||||
{}
|
||||
uint64_t hash() const { return murmurhash(&key_, sizeof(key_), 0); }
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const Key &other) const { return key_ == other.key_; }
|
||||
TO_STRING_KV(K_(key));
|
||||
int64_t key_;
|
||||
@ -44,6 +45,7 @@ public:
|
||||
: key_(k)
|
||||
{}
|
||||
uint64_t hash() const { return key_ * HASH_MAGIC_NUM; }
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const MacroKey &other) const { return key_ == other.key_; }
|
||||
TO_STRING_KV(K_(key));
|
||||
int64_t key_;
|
||||
@ -59,6 +61,7 @@ public:
|
||||
: key_(k)
|
||||
{}
|
||||
uint64_t hash() const { return 1; }
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const BadKey &other) const { return key_ == other.key_; }
|
||||
TO_STRING_KV(K_(key));
|
||||
int64_t key_;
|
||||
@ -74,6 +77,7 @@ public:
|
||||
: key_(k)
|
||||
{}
|
||||
uint64_t hash() const { return key_ % 7; }
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const ModKey &other) const { return key_ == other.key_; }
|
||||
TO_STRING_KV(K_(key));
|
||||
int64_t key_;
|
||||
|
||||
@ -92,6 +92,7 @@ public:
|
||||
{
|
||||
return key;
|
||||
}
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const UnitTestKey &other) const
|
||||
{
|
||||
return key == other.key;
|
||||
@ -581,6 +582,7 @@ public:
|
||||
{
|
||||
return key;
|
||||
}
|
||||
int hash(uint64_t &hash_val) const { hash_val = hash(); return OB_SUCCESS; }
|
||||
bool operator==(const PerfTestKey &other) const
|
||||
{
|
||||
return key == other.key;
|
||||
|
||||
Reference in New Issue
Block a user