chromium/third_party/blink/renderer/platform/wtf/wtf_test_helper.h

// Copyright 2017 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_WTF_TEST_HELPER_H_
#define THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_WTF_TEST_HELPER_H_

#include <type_traits>

#include "base/memory/scoped_refptr.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
#include "third_party/blink/renderer/platform/wtf/hash_functions.h"
#include "third_party/blink/renderer/platform/wtf/hash_set.h"
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"

namespace WTF {

class DestructCounter {};

class MoveOnly {};

class MoveOnlyHashValue {};

struct MoveOnlyHashTraits : public GenericHashTraits<MoveOnlyHashValue> {};

template <>
struct HashTraits<MoveOnlyHashValue> : MoveOnlyHashTraits {};

class CountCopy final {};

struct CountCopyHashTraits : public GenericHashTraits<CountCopy> {};

template <>
struct HashTraits<CountCopy> : CountCopyHashTraits {};

template <typename T>
class ValueInstanceCount final {};

template <typename T>
struct ValueInstanceCountHashTraits
    : public GenericHashTraits<ValueInstanceCount<T>> {};

HashTraits<ValueInstanceCount<T>>;

class DummyRefCounted : public RefCounted<DummyRefCounted> {};

struct Dummy {};

// WrappedInt class will fail if it was memmoved or memcpyed.
extern HashSet<void*> g_constructed_wrapped_ints;
class WrappedInt {};

class LivenessCounter {};

}  // namespace WTF

#endif  // THIRD_PARTY_BLINK_RENDERER_PLATFORM_WTF_WTF_TEST_HELPER_H_