[PowerPC][NFC] Cleanup PPCCTRLoopsVerify pass
[llvm-project.git] / libcxx / test / std / language.support / support.limits / c.limits / cfloat.pass.cpp
blob1406908b52464b0bcc457db73e46755fb8e78301
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 // Before Clang 9.0, <float.h> does not define FLT_HAS_SUBNORM & friends in C++.
10 // XFAIL: clang-4, clang-5, clang-6, clang-7, clang-8
12 // test cfloat
14 #include <cfloat>
16 #include "test_macros.h"
18 #ifndef FLT_ROUNDS
19 #error FLT_ROUNDS not defined
20 #endif
22 #ifndef FLT_EVAL_METHOD
23 #error FLT_EVAL_METHOD not defined
24 #endif
26 #ifndef FLT_RADIX
27 #error FLT_RADIX not defined
28 #endif
30 #if TEST_STD_VER > 14
31 #ifndef FLT_HAS_SUBNORM
32 #error FLT_HAS_SUBNORM not defined
33 #endif
35 #ifndef DBL_HAS_SUBNORM
36 #error DBL_HAS_SUBNORM not defined
37 #endif
39 #ifndef LDBL_HAS_SUBNORM
40 #error LDBL_HAS_SUBNORM not defined
41 #endif
42 #endif
44 #ifndef FLT_MANT_DIG
45 #error FLT_MANT_DIG not defined
46 #endif
48 #ifndef DBL_MANT_DIG
49 #error DBL_MANT_DIG not defined
50 #endif
52 #ifndef LDBL_MANT_DIG
53 #error LDBL_MANT_DIG not defined
54 #endif
56 #ifndef DECIMAL_DIG
57 #error DECIMAL_DIG not defined
58 #endif
60 #if TEST_STD_VER > 14
61 #ifndef FLT_DECIMAL_DIG
62 #error FLT_DECIMAL_DIG not defined
63 #endif
65 #ifndef DBL_DECIMAL_DIG
66 #error DBL_DECIMAL_DIG not defined
67 #endif
69 #ifndef LDBL_DECIMAL_DIG
70 #error LDBL_DECIMAL_DIG not defined
71 #endif
72 #endif
74 #ifndef FLT_DIG
75 #error FLT_DIG not defined
76 #endif
78 #ifndef DBL_DIG
79 #error DBL_DIG not defined
80 #endif
82 #ifndef LDBL_DIG
83 #error LDBL_DIG not defined
84 #endif
86 #ifndef FLT_MIN_EXP
87 #error FLT_MIN_EXP not defined
88 #endif
90 #ifndef DBL_MIN_EXP
91 #error DBL_MIN_EXP not defined
92 #endif
94 #ifndef LDBL_MIN_EXP
95 #error LDBL_MIN_EXP not defined
96 #endif
98 #ifndef FLT_MIN_10_EXP
99 #error FLT_MIN_10_EXP not defined
100 #endif
102 #ifndef DBL_MIN_10_EXP
103 #error DBL_MIN_10_EXP not defined
104 #endif
106 #ifndef LDBL_MIN_10_EXP
107 #error LDBL_MIN_10_EXP not defined
108 #endif
110 #ifndef FLT_MAX_EXP
111 #error FLT_MAX_EXP not defined
112 #endif
114 #ifndef DBL_MAX_EXP
115 #error DBL_MAX_EXP not defined
116 #endif
118 #ifndef LDBL_MAX_EXP
119 #error LDBL_MAX_EXP not defined
120 #endif
122 #ifndef FLT_MAX_10_EXP
123 #error FLT_MAX_10_EXP not defined
124 #endif
126 #ifndef DBL_MAX_10_EXP
127 #error DBL_MAX_10_EXP not defined
128 #endif
130 #ifndef LDBL_MAX_10_EXP
131 #error LDBL_MAX_10_EXP not defined
132 #endif
134 #ifndef FLT_MAX
135 #error FLT_MAX not defined
136 #endif
138 #ifndef DBL_MAX
139 #error DBL_MAX not defined
140 #endif
142 #ifndef LDBL_MAX
143 #error LDBL_MAX not defined
144 #endif
146 #ifndef FLT_EPSILON
147 #error FLT_EPSILON not defined
148 #endif
150 #ifndef DBL_EPSILON
151 #error DBL_EPSILON not defined
152 #endif
154 #ifndef LDBL_EPSILON
155 #error LDBL_EPSILON not defined
156 #endif
158 #ifndef FLT_MIN
159 #error FLT_MIN not defined
160 #endif
162 #ifndef DBL_MIN
163 #error DBL_MIN not defined
164 #endif
166 #ifndef LDBL_MIN
167 #error LDBL_MIN not defined
168 #endif
170 #if TEST_STD_VER > 14
171 #ifndef FLT_TRUE_MIN
172 #error FLT_TRUE_MIN not defined
173 #endif
175 #ifndef DBL_TRUE_MIN
176 #error DBL_TRUE_MIN not defined
177 #endif
179 #ifndef LDBL_TRUE_MIN
180 #error LDBL_TRUE_MIN not defined
181 #endif
182 #endif
184 int main(int, char**)
187 return 0;