aboutsummaryrefslogtreecommitdiffstats
path: root/library/cpp/yt/misc/unittests/hash_ut.cpp
blob: 0c336be5dc30627b5c36d827f070e1b31291c5a7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include <library/cpp/testing/gtest/gtest.h>

#include <library/cpp/yt/misc/hash.h>

namespace NYT {
namespace {

////////////////////////////////////////////////////////////////////////////////

TEST(THashTest, NaNSafeHash)
{
    EXPECT_EQ(NaNSafeHash(123), THash<int>()(123));
    EXPECT_EQ(NaNSafeHash(std::nan("1")), NaNSafeHash(std::nan("2")));
}

////////////////////////////////////////////////////////////////////////////////

} // namespace
} // namespace NYT