1 // Copyright (C) 2018 Internet Systems Consortium, Inc. ("ISC")
2 //
3 // This Source Code Form is subject to the terms of the Mozilla Public
4 // License, v. 2.0. If a copy of the MPL was not distributed with this
5 // file, You can obtain one at http://mozilla.org/MPL/2.0/.
6 
7 #include <config.h>
8 
9 #include <util/hash.h>
10 
11 #include <gtest/gtest.h>
12 
13 #include <cstring>
14 #include <vector>
15 
16 using namespace isc::util;
17 using namespace std;
18 
19 namespace {
20 
TEST(HashTest,empty)21 TEST(HashTest, empty) {
22     EXPECT_EQ(14695981039346656037ull, Hash64::hash(0, 0));
23 }
24 
TEST(HashTest,foobar)25 TEST(HashTest, foobar) {
26     EXPECT_EQ(9625390261332436968ull, Hash64::hash(string("foobar")));
27 }
28 
TEST(HashTest,chongo)29 TEST(HashTest, chongo) {
30     EXPECT_EQ(5080352029159061781ull,
31               Hash64::hash(string("chongo was here!\n")));
32 }
33 
34 }
35