Merge pull request #17 from bradc6/bugfix/HashingInconsistent

[BUG] Added unit test for hashing function
This commit is contained in:
Crashoz 2023-03-16 13:44:23 +01:00 committed by GitHub
commit 37741e409b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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