xxhashTest.cpp 678 B

12345678910111213141516171819
  1. //===- llvm/unittest/Support/xxhashTest.cpp -------------------------------===//
  2. //
  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
  6. //
  7. //===----------------------------------------------------------------------===//
  8. #include "llvm/Support/xxhash.h"
  9. #include "gtest/gtest.h"
  10. using namespace llvm;
  11. TEST(xxhashTest, Basic) {
  12. EXPECT_EQ(0x33bf00a859c4ba3fU, xxHash64("foo"));
  13. EXPECT_EQ(0x48a37c90ad27a659U, xxHash64("bar"));
  14. EXPECT_EQ(0x69196c1b3af0bff9U,
  15. xxHash64("0123456789abcdefghijklmnopqrstuvwxyz"));
  16. }