1 //===----------------------------------------------------------------------===//
3 // The LLVM Compiler Infrastructure
5 // This file is dual licensed under the MIT and the University of Illinois Open
6 // Source Licenses. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // test numeric_limits
16 template <class T, bool expected>
20 static_assert(std::numeric_limits<T>::tinyness_before == expected, "tinyness_before test 1");
21 static_assert(std::numeric_limits<const T>::tinyness_before == expected, "tinyness_before test 2");
22 static_assert(std::numeric_limits<volatile T>::tinyness_before == expected, "tinyness_before test 3");
23 static_assert(std::numeric_limits<const volatile T>::tinyness_before == expected, "tinyness_before test 4");
30 test<signed char, false>();
31 test<unsigned char, false>();
32 test<wchar_t, false>();
33 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
34 test<char16_t, false>();
35 test<char32_t, false>();
36 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
38 test<unsigned short, false>();
40 test<unsigned int, false>();
42 test<unsigned long, false>();
43 test<long long, false>();
44 test<unsigned long long, false>();
46 test<double, false>();
47 test<long double, false>();