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
17 #include "test_macros.h"
19 template <class T, int expected>
23 static_assert(std::numeric_limits<T>::min_exponent10 == expected, "min_exponent10 test 1");
24 static_assert(std::numeric_limits<const T>::min_exponent10 == expected, "min_exponent10 test 2");
25 static_assert(std::numeric_limits<volatile T>::min_exponent10 == expected, "min_exponent10 test 3");
26 static_assert(std::numeric_limits<const volatile T>::min_exponent10 == expected, "min_exponent10 test 4");
33 test<signed char, 0>();
34 test<unsigned char, 0>();
36 #if TEST_STD_VER > 17 && defined(__cpp_char8_t)
39 #ifndef _LIBCPP_HAS_NO_UNICODE_CHARS
42 #endif // _LIBCPP_HAS_NO_UNICODE_CHARS
44 test<unsigned short, 0>();
46 test<unsigned int, 0>();
48 test<unsigned long, 0>();
50 test<unsigned long long, 0>();
51 #ifndef _LIBCPP_HAS_NO_INT128
52 test<__int128_t, 0>();
53 test<__uint128_t, 0>();
55 test<float, FLT_MIN_10_EXP>();
56 test<double, DBL_MIN_10_EXP>();
57 test<long double, LDBL_MIN_10_EXP>();