llvm/libc/test/src/__support/CPP/type_traits_test.cpp

//===-- Unittests for type_traits -----------------------------------------===//
//
// 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
//
//===----------------------------------------------------------------------===//

#include "src/__support/CPP/type_traits.h"
#include "src/__support/macros/config.h"
#include "test/UnitTest/Test.h"

// TODO: Split this file if it becomes too big.

namespace LIBC_NAMESPACE_DECL {
namespace cpp {

class Class {};
Union;
struct Struct {};
enum Enum {};
enum class EnumClass {};

UnqualObjectTypes;

TYPED_TEST(LlvmLibcTypeTraitsTest, add_lvalue_reference, UnqualObjectTypes) {}

TEST(LlvmLibcTypeTraitsTest, add_lvalue_reference_void) {}

TYPED_TEST(LlvmLibcTypeTraitsTest, add_pointer, UnqualObjectTypes) {}

TEST(LlvmLibcTypeTraitsTest, add_pointer_void) {}

TYPED_TEST(LlvmLibcTypeTraitsTest, add_rvalue_reference, UnqualObjectTypes) {}

TEST(LlvmLibcTypeTraitsTest, add_rvalue_reference_void) {}

TEST(LlvmLibcTypeTraitsTest, aligned_storage) {}

TEST(LlvmLibcTypeTraitsTest, bool_constant) {}

TEST(LlvmLibcTypeTraitsTest, conditional_t) {}

TEST(LlvmLibcTypeTraitsTest, decay) {}

// TODO enable_if

TEST(LlvmLibcTypeTraitsTest, false_type) {}

TEST(LlvmLibcTypeTraitsTest, integral_constant) {}

namespace invoke_detail {

enum State {};

struct A {};

struct B : public A {};

void free_function() {}
int free_function_return_5() {}
int free_function_passtrough(int value) {}

struct Delegate {};

template <int tag> struct Tag {};

struct Functor {};

} // namespace invoke_detail

TEST(LlvmLibcTypeTraitsTest, invoke) {}

TEST(LlvmLibcTypeTraitsTest, invoke_result) {}

IntegralAndFloatingTypes;

TYPED_TEST(LlvmLibcTypeTraitsTest, is_arithmetic, IntegralAndFloatingTypes) {}

TEST(LlvmLibcTypeTraitsTest, is_arithmetic_non_integral) {}

TEST(LlvmLibcTypeTraitsTest, is_array) {}

TEST(LlvmLibcTypeTraitsTest, is_base_of) {}

TEST(LlvmLibcTypeTraitsTest, is_class) {}

TYPED_TEST(LlvmLibcTypeTraitsTest, is_const, UnqualObjectTypes) {}

// TODO is_convertible

TYPED_TEST(LlvmLibcTypeTraitsTest, is_destructible, UnqualObjectTypes) {}
TEST(LlvmLibcTypeTraitsTest, is_destructible_no_destructor) {}

TYPED_TEST(LlvmLibcTypeTraitsTest, is_enum, UnqualObjectTypes) {}
TEST(LlvmLibcTypeTraitsTest, is_enum_enum) {}

// TODO is_floating_point

// TODO is_function

// TODO is_integral

// TODO is_lvalue_reference

// TODO is_member_pointer

// TODO is_null_pointer

TEST(LlvmLibcTypeTraitsTest, is_object) {}

// TODO is_pointer

// TODO is_reference

// TODO is_rvalue_reference

// TODO is_same

// TODO is_scalar

// TODO is_signed

// TODO is_trivially_constructible

// TODO is_trivially_copyable

// TODO is_trivially_destructible

// TODO is_union

// TODO is_unsigned

// TODO is_void

// TODO make_signed

// TODO make_unsigned

// TODO remove_all_extents

// TODO remove_cv

// TODO remove_cvref

// TODO remove_extent

// TODO remove_reference

TEST(LlvmLibcTypeTraitsTest, true_type) {}

// TODO type_identity

// TODO void_t

} // namespace cpp
} // namespace LIBC_NAMESPACE_DECL