Lines Matching full:hash_value
37 friend hash_code hash_value(const NonPOD &obj) {
67 EXPECT_EQ(hash_value(42), hash_value(x));
68 EXPECT_EQ(hash_value(42), hash_value(TE_Foo));
69 EXPECT_NE(hash_value(42), hash_value(y));
70 EXPECT_NE(hash_value(42), hash_value(TE_Bar));
71 EXPECT_NE(hash_value(42), hash_value(p));
72 EXPECT_EQ(hash_value(71), hash_value(i));
73 EXPECT_EQ(hash_value(71), hash_value(ci));
74 EXPECT_EQ(hash_value(71), hash_value(vi));
75 EXPECT_EQ(hash_value(71), hash_value(cvi));
76 EXPECT_EQ(hash_value(c), hash_value('x'));
77 EXPECT_EQ(hash_value('4'), hash_value('0' + 4));
78 EXPECT_EQ(hash_value(addr), hash_value(&y));
82 EXPECT_EQ(hash_combine(42, 43), hash_value(std::make_pair(42, 43)));
83 EXPECT_NE(hash_combine(43, 42), hash_value(std::make_pair(42, 43)));
84 EXPECT_NE(hash_combine(42, 43), hash_value(std::make_pair(42ull, 43ull)));
85 EXPECT_NE(hash_combine(42, 43), hash_value(std::make_pair(42, 43ull)));
86 EXPECT_NE(hash_combine(42, 43), hash_value(std::make_pair(42ull, 43)));
91 hash_value(std::make_pair(42, std::make_pair(43, 44))));
92 EXPECT_EQ(hash_value(std::make_pair(42, std::make_pair(43, 44))),
93 hash_value(std::make_pair(std::make_pair(42, 43), 44)));
98 hash_value(std::make_pair('0', std::make_pair(1ull, '2'))));
103 hash_value(std::make_pair(obj1, std::make_pair(obj2, obj3))));
108 EXPECT_EQ(hash_combine_range(s.c_str(), s.c_str() + s.size()), hash_value(s));
110 hash_value(s.substr(0, s.size() - 1)));
112 hash_value(s.substr(1, s.size() - 2)));
116 hash_value(ws));
118 hash_value(ws.substr(0, ws.size() - 1)));
120 hash_value(ws.substr(1, ws.size() - 2)));
129 hash_code hash_value(HashableDummy dummy) { return dummy.value; }