chromium/third_party/blink/renderer/platform/heap/test/heap_traits_test.cc

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

#include "third_party/blink/renderer/platform/heap/heap_traits.h"

#include <type_traits>
#include <utility>
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/wtf/vector.h"

// No gtest tests; only static_assert checks.

namespace blink {

namespace {

struct Empty {};

// Similar to an IDL union or dictionary, which have Trace() methods but are
// not garbage-collected types themselves.
struct StructWithTraceMethod {};

struct GarbageCollectedStruct
    : public GarbageCollected<GarbageCollectedStruct> {};

// AddMemberIfNeeded<T>
static_assert;
static_assert;

static_assert;

static_assert;

static_assert;

static_assert;

// VectorOf<T>
static_assert;
static_assert;
static_assert;

static_assert;
static_assert;

static_assert;
static_assert;
static_assert;

// VectorOfPairs<T, U>
static_assert;
static_assert;

static_assert;
static_assert;
static_assert;

static_assert;
static_assert;
static_assert;

}  // namespace

}  // namespace blink