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 //===----------------------------------------------------------------------===//
41 void test(const _Tp &) {}
43 #define TEST_NUMERIC_LIMITS(type) \
44 test(std::numeric_limits<type>::is_specialized); \
45 test(std::numeric_limits<type>::digits); \
46 test(std::numeric_limits<type>::digits10); \
47 test(std::numeric_limits<type>::max_digits10); \
48 test(std::numeric_limits<type>::is_signed); \
49 test(std::numeric_limits<type>::is_integer); \
50 test(std::numeric_limits<type>::is_exact); \
51 test(std::numeric_limits<type>::radix); \
52 test(std::numeric_limits<type>::min_exponent); \
53 test(std::numeric_limits<type>::min_exponent10); \
54 test(std::numeric_limits<type>::max_exponent); \
55 test(std::numeric_limits<type>::max_exponent10); \
56 test(std::numeric_limits<type>::has_infinity); \
57 test(std::numeric_limits<type>::has_quiet_NaN); \
58 test(std::numeric_limits<type>::has_signaling_NaN); \
59 test(std::numeric_limits<type>::has_denorm); \
60 test(std::numeric_limits<type>::has_denorm_loss); \
61 test(std::numeric_limits<type>::is_iec559); \
62 test(std::numeric_limits<type>::is_bounded); \
63 test(std::numeric_limits<type>::is_modulo); \
64 test(std::numeric_limits<type>::traps); \
65 test(std::numeric_limits<type>::tinyness_before); \
66 test(std::numeric_limits<type>::round_style);
73 TEST_NUMERIC_LIMITS(bool)
74 TEST_NUMERIC_LIMITS(const bool)
75 TEST_NUMERIC_LIMITS(volatile bool)
76 TEST_NUMERIC_LIMITS(const volatile bool)
79 TEST_NUMERIC_LIMITS(char)
80 TEST_NUMERIC_LIMITS(const char)
81 TEST_NUMERIC_LIMITS(volatile char)
82 TEST_NUMERIC_LIMITS(const volatile char)
85 TEST_NUMERIC_LIMITS(signed char)
86 TEST_NUMERIC_LIMITS(const signed char)
87 TEST_NUMERIC_LIMITS(volatile signed char)
88 TEST_NUMERIC_LIMITS(const volatile signed char)
91 TEST_NUMERIC_LIMITS(unsigned char)
92 TEST_NUMERIC_LIMITS(const unsigned char)
93 TEST_NUMERIC_LIMITS(volatile unsigned char)
94 TEST_NUMERIC_LIMITS(const volatile unsigned char)
97 TEST_NUMERIC_LIMITS(wchar_t)
98 TEST_NUMERIC_LIMITS(const wchar_t)
99 TEST_NUMERIC_LIMITS(volatile wchar_t)
100 TEST_NUMERIC_LIMITS(const volatile wchar_t)
103 TEST_NUMERIC_LIMITS(char16_t)
104 TEST_NUMERIC_LIMITS(const char16_t)
105 TEST_NUMERIC_LIMITS(volatile char16_t)
106 TEST_NUMERIC_LIMITS(const volatile char16_t)
109 TEST_NUMERIC_LIMITS(char32_t)
110 TEST_NUMERIC_LIMITS(const char32_t)
111 TEST_NUMERIC_LIMITS(volatile char32_t)
112 TEST_NUMERIC_LIMITS(const volatile char32_t)
115 TEST_NUMERIC_LIMITS(short)
116 TEST_NUMERIC_LIMITS(const short)
117 TEST_NUMERIC_LIMITS(volatile short)
118 TEST_NUMERIC_LIMITS(const volatile short)
121 TEST_NUMERIC_LIMITS(int)
122 TEST_NUMERIC_LIMITS(const int)
123 TEST_NUMERIC_LIMITS(volatile int)
124 TEST_NUMERIC_LIMITS(const volatile int)
127 TEST_NUMERIC_LIMITS(long)
128 TEST_NUMERIC_LIMITS(const long)
129 TEST_NUMERIC_LIMITS(volatile long)
130 TEST_NUMERIC_LIMITS(const volatile long)
133 TEST_NUMERIC_LIMITS(long long)
134 TEST_NUMERIC_LIMITS(const long long)
135 TEST_NUMERIC_LIMITS(volatile long long)
136 TEST_NUMERIC_LIMITS(const volatile long long)
139 TEST_NUMERIC_LIMITS(unsigned short)
140 TEST_NUMERIC_LIMITS(const unsigned short)
141 TEST_NUMERIC_LIMITS(volatile unsigned short)
142 TEST_NUMERIC_LIMITS(const volatile unsigned short)
145 TEST_NUMERIC_LIMITS(unsigned int)
146 TEST_NUMERIC_LIMITS(const unsigned int)
147 TEST_NUMERIC_LIMITS(volatile unsigned int)
148 TEST_NUMERIC_LIMITS(const volatile unsigned int)
151 TEST_NUMERIC_LIMITS(unsigned long)
152 TEST_NUMERIC_LIMITS(const unsigned long)
153 TEST_NUMERIC_LIMITS(volatile unsigned long)
154 TEST_NUMERIC_LIMITS(const volatile unsigned long)
156 // unsigned long long
157 TEST_NUMERIC_LIMITS(unsigned long long)
158 TEST_NUMERIC_LIMITS(const unsigned long long)
159 TEST_NUMERIC_LIMITS(volatile unsigned long long)
160 TEST_NUMERIC_LIMITS(const volatile unsigned long long)
163 TEST_NUMERIC_LIMITS(float)
164 TEST_NUMERIC_LIMITS(const float)
165 TEST_NUMERIC_LIMITS(volatile float)
166 TEST_NUMERIC_LIMITS(const volatile float)
169 TEST_NUMERIC_LIMITS(double)
170 TEST_NUMERIC_LIMITS(const double)
171 TEST_NUMERIC_LIMITS(volatile double)
172 TEST_NUMERIC_LIMITS(const volatile double)
175 TEST_NUMERIC_LIMITS(long double)
176 TEST_NUMERIC_LIMITS(const long double)
177 TEST_NUMERIC_LIMITS(volatile long double)
178 TEST_NUMERIC_LIMITS(const volatile long double)
181 TEST_NUMERIC_LIMITS(other)
182 TEST_NUMERIC_LIMITS(const other)
183 TEST_NUMERIC_LIMITS(volatile other)
184 TEST_NUMERIC_LIMITS(const volatile other)