Added unit test for hashing function

This commit is contained in:
Bradley Clemetson 2022-08-19 03:57:26 -07:00
parent 8fffbb16be
commit 3f7242b077
No known key found for this signature in database
GPG Key ID: 374B0EAFF7F488D0

View File

@ -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());
}
}