summaryrefslogtreecommitdiff
path: root/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'lib/sanitizer_common/tests/sanitizer_type_traits_test.cc')
-rw-r--r--lib/sanitizer_common/tests/sanitizer_type_traits_test.cc12
1 files changed, 8 insertions, 4 deletions
diff --git a/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc b/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc
index 0dce02fac..ccefeb686 100644
--- a/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc
+++ b/lib/sanitizer_common/tests/sanitizer_type_traits_test.cc
@@ -1,9 +1,8 @@
//===-- sanitizer_type_traits_test.cc -------------------------------------===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// 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
//
//===----------------------------------------------------------------------===//
//
@@ -26,3 +25,8 @@ TEST(SanitizerCommon, IsSame) {
ASSERT_FALSE((is_same<uptr, sptr>::value));
ASSERT_FALSE((is_same<uptr, const uptr>::value));
}
+
+TEST(SanitizerCommon, Conditional) {
+ ASSERT_TRUE((is_same<int, conditional<true, int, double>::type>::value));
+ ASSERT_TRUE((is_same<double, conditional<false, int, double>::type>::value));
+}