diff options
author | Anton Samokhvalov <pg83@yandex.ru> | 2022-02-10 16:45:15 +0300 |
---|---|---|
committer | Daniil Cherednik <dcherednik@yandex-team.ru> | 2022-02-10 16:45:15 +0300 |
commit | 72cb13b4aff9bc9cf22e49251bc8fd143f82538f (patch) | |
tree | da2c34829458c7d4e74bdfbdf85dff449e9e7fb8 /util/digest/fnv_ut.cpp | |
parent | 778e51ba091dc39e7b7fcab2b9cf4dbedfb6f2b5 (diff) | |
download | ydb-72cb13b4aff9bc9cf22e49251bc8fd143f82538f.tar.gz |
Restoring authorship annotation for Anton Samokhvalov <pg83@yandex.ru>. Commit 1 of 2.
Diffstat (limited to 'util/digest/fnv_ut.cpp')
-rw-r--r-- | util/digest/fnv_ut.cpp | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/util/digest/fnv_ut.cpp b/util/digest/fnv_ut.cpp index ce56642b3e..88c2096d77 100644 --- a/util/digest/fnv_ut.cpp +++ b/util/digest/fnv_ut.cpp @@ -1,23 +1,23 @@ -#include "fnv.h" - +#include "fnv.h" + #include <library/cpp/testing/unittest/registar.h> - -Y_UNIT_TEST_SUITE(TFnvTest) { - Y_UNIT_TEST(TestFnv32) { + +Y_UNIT_TEST_SUITE(TFnvTest) { + Y_UNIT_TEST(TestFnv32) { const auto h32 = ULL(2849763999); - UNIT_ASSERT_EQUAL(FnvHash<ui32>("1234567", 7), h32); - UNIT_ASSERT_EQUAL(FnvHash<ui32>(TStringBuf("1234567")), h32); - - UNIT_ASSERT_EQUAL(FnvHash<ui32>(nullptr, 0), FNV32INIT); - UNIT_ASSERT_EQUAL(FnvHash<ui32>(TStringBuf()), FNV32INIT); - } - - Y_UNIT_TEST(TestFnv64) { - const auto h64 = ULL(2449551094593701855); - UNIT_ASSERT_EQUAL(FnvHash<ui64>("1234567", 7), h64); - UNIT_ASSERT_EQUAL(FnvHash<ui64>(TStringBuf("1234567")), h64); + UNIT_ASSERT_EQUAL(FnvHash<ui32>("1234567", 7), h32); + UNIT_ASSERT_EQUAL(FnvHash<ui32>(TStringBuf("1234567")), h32); + + UNIT_ASSERT_EQUAL(FnvHash<ui32>(nullptr, 0), FNV32INIT); + UNIT_ASSERT_EQUAL(FnvHash<ui32>(TStringBuf()), FNV32INIT); + } + + Y_UNIT_TEST(TestFnv64) { + const auto h64 = ULL(2449551094593701855); + UNIT_ASSERT_EQUAL(FnvHash<ui64>("1234567", 7), h64); + UNIT_ASSERT_EQUAL(FnvHash<ui64>(TStringBuf("1234567")), h64); - UNIT_ASSERT_EQUAL(FnvHash<ui64>(nullptr, 0), FNV64INIT); - UNIT_ASSERT_EQUAL(FnvHash<ui64>(TStringBuf()), FNV64INIT); - } -}; + UNIT_ASSERT_EQUAL(FnvHash<ui64>(nullptr, 0), FNV64INIT); + UNIT_ASSERT_EQUAL(FnvHash<ui64>(TStringBuf()), FNV64INIT); + } +}; |