MCPcopy Create free account
hub / github.com/chen3feng/toft / TEST

Function TEST

hash/hash_test.cpp:11–19  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9
10namespace toft {
11TEST(HashUnittest, Fingerprint) {
12 const std::string& url = "http://app.kid.qq.com/exam/5528/5528_103392.htm";
13 uint64_t hash_value = Fingerprint64(url);
14 EXPECT_EQ(hash_value, 17105673616436300159UL);
15 std::string str = Fingerprint64ToString(hash_value);
16 EXPECT_EQ(str, "7F09753F868F63ED");
17 uint64_t hash2 = StringToFingerprint64(str);
18 EXPECT_EQ(hash_value, hash2);
19}
20} // namespace toft

Callers

nothing calls this directly

Calls 3

Fingerprint64ToStringFunction · 0.85
StringToFingerprint64Function · 0.85
Fingerprint64Function · 0.70

Tested by

no test coverage detected