From bf8d3ac3bcf7b698a3b4e0ece41560719967ffbf Mon Sep 17 00:00:00 2001 From: Stefan Boberg Date: Fri, 13 Dec 2024 12:14:38 +0100 Subject: added test verification of XXH3_128Stream vs XXH3_128::HashMemory --- src/zencore/xxhash.cpp | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/zencore/xxhash.cpp') diff --git a/src/zencore/xxhash.cpp b/src/zencore/xxhash.cpp index 80d7bc8fd..6d1050531 100644 --- a/src/zencore/xxhash.cpp +++ b/src/zencore/xxhash.cpp @@ -83,6 +83,7 @@ TEST_CASE("XXH3_128") x.Append(ShortString.data(), ShortString.size()); const XXH3_128 Hash = x.GetHash(); CHECK(Hash == XXH3_128::FromHexString("9a4dea864648af82823c8c03e6dd2202"sv)); + CHECK(Hash == XXH3_128::HashMemory(ShortString.data(), ShortString.size())); } SUBCASE("long") @@ -91,6 +92,7 @@ TEST_CASE("XXH3_128") x.Append(LongString.data(), LongString.size()); const XXH3_128 Hash = x.GetHash(); CHECK(Hash == XXH3_128::FromHexString("fbd5e72f7a5894590d1ef49dfcc58b7d"sv)); + CHECK(Hash == XXH3_128::HashMemory(LongString.data(), LongString.size())); } } -- cgit v1.2.3