mirror of
https://github.com/crashoz/uuid_v4.git
synced 2024-11-27 02:59:52 +08:00
Merge pull request #17 from bradc6/bugfix/HashingInconsistent
[BUG] Added unit test for hashing function
This commit is contained in:
commit
37741e409b
@ -86,4 +86,11 @@ namespace {
|
||||
ASSERT_TRUE(uuid < uuid5);
|
||||
ASSERT_FALSE(uuid > uuid5);
|
||||
}
|
||||
|
||||
TEST(UUIDTest, HashTest) {
|
||||
UUIDv4::UUID uuid = UUIDv4::UUID::fromStrFactory("00120034-0056-0078-0012-003400560078");
|
||||
UUIDv4::UUID uuid2 = UUIDv4::UUID(uuid);
|
||||
|
||||
ASSERT_TRUE(uuid.hash() == uuid2.hash());
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user