mirror of
https://github.com/crashoz/uuid_v4.git
synced 2024-11-21 01:10:52 +08:00
Added unit test for hashing function
This commit is contained in:
parent
8fffbb16be
commit
3f7242b077
@ -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