llvm/llvm/unittests/ADT/HashingTest.cpp

//===- llvm/unittest/ADT/HashingTest.cpp ----------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
//
// Hashing.h unit tests.
//
//===----------------------------------------------------------------------===//

#include "llvm/ADT/Hashing.h"
#include "llvm/Support/DataTypes.h"
#include "llvm/Support/HashBuilder.h"
#include "gtest/gtest.h"
#include <deque>
#include <list>
#include <map>
#include <optional>
#include <vector>

namespace llvm {

// Helper for test code to print hash codes.
void PrintTo(const hash_code &code, std::ostream *os) {}

// Fake an object that is recognized as hashable data to test super large
// objects.
struct LargeTestInteger {};

struct NonPOD {};

namespace hashing {
namespace detail {
template <> struct is_hashable_data<LargeTestInteger> : std::true_type {};
} // namespace detail
} // namespace hashing

} // namespace llvm

usingnamespacellvm;

namespace {

enum TestEnumeration {};

TEST(HashingTest, HashValueBasicTest) {}

TEST(HashingTest, HashValueStdPair) {}

TEST(HashingTest, HashValueStdTuple) {}

TEST(HashingTest, HashValueStdString) {}

TEST(HashingTest, HashValueStdOptional) {}

template <typename T, size_t N> T *begin(T (&arr)[N]) {}
template <typename T, size_t N> T *end(T (&arr)[N]) {}

// Provide a dummy, hashable type designed for easy verification: its hash is
// the same as its value.
struct HashableDummy {};
hash_code hash_value(HashableDummy dummy) {}

TEST(HashingTest, HashCombineRangeBasicTest) {}

TEST(HashingTest, HashCombineRangeLengthDiff) {}

TEST(HashingTest, HashCombineBasicTest) {}

TEST(HashingTest, HashCombineArgs18) {}

struct StructWithHashBuilderSupport {};

TEST(HashingTest, HashWithHashBuilder) {}

struct StructWithHashBuilderAndHashValueSupport {};

TEST(HashingTest, HashBuilderAndHashValue) {}

} // namespace