//===-- sanitizer_type_traits_test.cc -------------------------------------===// // // 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 // //===----------------------------------------------------------------------===// // // This file is a part of ThreadSanitizer/AddressSanitizer runtime. // //===----------------------------------------------------------------------===// #include "sanitizer_common/sanitizer_type_traits.h" #include "gtest/gtest.h" #include "sanitizer_common/sanitizer_internal_defs.h" using namespace __sanitizer; TEST(SanitizerCommon, IsSame) { ASSERT_TRUE((is_same::value)); ASSERT_TRUE((is_same::value)); ASSERT_TRUE((is_same::value)); ASSERT_TRUE((is_same::value)); ASSERT_FALSE((is_same::value)); ASSERT_FALSE((is_same::value)); ASSERT_FALSE((is_same::value)); } TEST(SanitizerCommon, Conditional) { ASSERT_TRUE((is_same::type>::value)); ASSERT_TRUE((is_same::type>::value)); }