diff options
| author | Stefan Boberg <[email protected]> | 2024-12-13 12:14:38 +0100 |
|---|---|---|
| committer | Stefan Boberg <[email protected]> | 2024-12-13 12:14:38 +0100 |
| commit | bf8d3ac3bcf7b698a3b4e0ece41560719967ffbf (patch) | |
| tree | 61fa5963fb6c6e66b3075a88ae4f257cf532e5ef /src/zencore | |
| parent | fixed XXH3_128Stream so it initializes the state properly (diff) | |
| download | zen-bf8d3ac3bcf7b698a3b4e0ece41560719967ffbf.tar.xz zen-bf8d3ac3bcf7b698a3b4e0ece41560719967ffbf.zip | |
added test verification of XXH3_128Stream vs XXH3_128::HashMemory
Diffstat (limited to 'src/zencore')
| -rw-r--r-- | src/zencore/xxhash.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
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())); } } |