Summary:
[ RUN ] Hash.TWang_Unmix64
folly/test/HashTest.cpp:125:20: runtime error: shift exponent 32 is too large for 32-bit type 'unsigned int'
Reviewed By: philippv
Differential Revision:
D2886144
fb-gh-sync-id:
8d7963c087c9db34b08c07451d35e5568c750520
TEST(Hash, TWang_Unmix64) {
// We'll try (1 << i), (1 << i) + 1, (1 << i) - 1
for (int i = 1; i < 64; i++) {
- checkTWang((1U << i) - 1);
- checkTWang(1U << i);
- checkTWang((1U << i) + 1);
+ checkTWang((uint64_t(1) << i) - 1);
+ checkTWang(uint64_t(1) << i);
+ checkTWang((uint64_t(1) << i) + 1);
}
}