| 9 | |
| 10 | namespace toft { |
| 11 | TEST(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 |
nothing calls this directly
no test coverage detected