chromium/third_party/blink/renderer/platform/wtf/type_traits_test.cc

/*
 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved.
 * Copyright (C) 2009, 2010 Google Inc. All rights reserved.
 *
 * This library is free software; you can redistribute it and/or
 * modify it under the terms of the GNU Library General Public
 * License as published by the Free Software Foundation; either
 * version 2 of the License, or (at your option) any later version.
 *
 * This library is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 * Library General Public License for more details.
 *
 * You should have received a copy of the GNU Library General Public License
 * along with this library; see the file COPYING.LIB.  If not, write to
 * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 * Boston, MA 02110-1301, USA.
 *
 */

#include "third_party/blink/renderer/platform/wtf/type_traits.h"

#include "build/build_config.h"

#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"

// No gtest tests; only static_assert checks.

namespace WTF {

namespace {

struct VirtualClass {};
static_assert;

struct DestructorClass {};
static_assert;
static_assert;
static_assert;

struct MixedPrivate {};
static_assert;
static_assert;
static_assert;
struct JustPrivate {};
static_assert;
static_assert;
static_assert;
struct JustPublic {};
static_assert;
static_assert;
static_assert;
struct NestedInherited : public JustPublic, JustPrivate {};
static_assert;
static_assert;
static_assert;
struct NestedOwned {};

static_assert;
static_assert;
static_assert;

class NonCopyableClass {};

static_assert;
static_assert;
static_assert;

template <typename T>
class TestBaseClass {};

class TestDerivedClass : public TestBaseClass<int> {};

static_assert;
static_assert;
static_assert;

IntArray;
IntArraySized;

#if !defined(COMPILER_MSVC) || defined(__clang__)

class AssignmentDeleted final {};

static_assert;
static_assert;

class AssignmentPrivate final {};

static_assert;
static_assert;

class CopyAssignmentDeleted final {};

static_assert;
static_assert;

class CopyAssignmentPrivate final {};

static_assert;
static_assert;

class CopyAssignmentUndeclared final {};

static_assert;
static_assert;

class Assignable final {};

static_assert;
static_assert;

class AssignableImplicit final {};

static_assert;
static_assert;

#endif  // !defined(COMPILER_MSVC) || defined(__clang__)

class DefaultConstructorDeleted final {};

class DestructorDeleted final {};

static_assert;

static_assert;

#define EnsurePtrConvertibleArgDecl(From, To)

template <typename T>
class Wrapper {};

class ForwardDeclarationOnlyClass;

static_assert;

static_assert;

static_assert;

static_assert;

static_assert;

static_assert;

static_assert;

static_assert;

}  // anonymous namespace

}  // namespace WTF