Rafael Espindola | eaeb6d9 | 2016-09-27 15:45:57 +0000 | [diff] [blame] | 1 | //===- llvm/unittest/Support/xxhashTest.cpp -------------------------------===// |
| 2 | // |
Chandler Carruth | 2946cd7 | 2019-01-19 08:50:56 +0000 | [diff] [blame] | 3 | // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. |
| 4 | // See https://llvm.org/LICENSE.txt for license information. |
| 5 | // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception |
Rafael Espindola | eaeb6d9 | 2016-09-27 15:45:57 +0000 | [diff] [blame] | 6 | // |
| 7 | //===----------------------------------------------------------------------===// |
| 8 | |
| 9 | #include "llvm/Support/xxhash.h" |
| 10 | #include "gtest/gtest.h" |
| 11 | |
| 12 | using namespace llvm; |
| 13 | |
| 14 | TEST(xxhashTest, Basic) { |
| 15 | EXPECT_EQ(0x33bf00a859c4ba3fU, xxHash64("foo")); |
| 16 | EXPECT_EQ(0x48a37c90ad27a659U, xxHash64("bar")); |
| 17 | EXPECT_EQ(0x69196c1b3af0bff9U, |
| 18 | xxHash64("0123456789abcdefghijklmnopqrstuvwxyz")); |
| 19 | } |