xref: /llvm-project/libcxx/test/std/language.support/support.limits/c.limits/cfloat.pass.cpp (revision 5425106e493e26f7e0a87077c8eca657a9aff293)
15a83710eSEric Fiselier //===----------------------------------------------------------------------===//
25a83710eSEric Fiselier //
357b08b09SChandler Carruth // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
457b08b09SChandler Carruth // See https://llvm.org/LICENSE.txt for license information.
557b08b09SChandler Carruth // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
65a83710eSEric Fiselier //
75a83710eSEric Fiselier //===----------------------------------------------------------------------===//
85a83710eSEric Fiselier 
9*02d11757SLouis Dionne // test <cfloat>
105a83710eSEric Fiselier 
115a83710eSEric Fiselier #include <cfloat>
125a83710eSEric Fiselier 
135bd88cf7SLouis Dionne #include "test_macros.h"
145bd88cf7SLouis Dionne 
155a83710eSEric Fiselier #ifndef FLT_ROUNDS
165a83710eSEric Fiselier #error FLT_ROUNDS not defined
175a83710eSEric Fiselier #endif
185a83710eSEric Fiselier 
195a83710eSEric Fiselier #ifndef FLT_EVAL_METHOD
205a83710eSEric Fiselier #error FLT_EVAL_METHOD not defined
215a83710eSEric Fiselier #endif
225a83710eSEric Fiselier 
235a83710eSEric Fiselier #ifndef FLT_RADIX
245a83710eSEric Fiselier #error FLT_RADIX not defined
255a83710eSEric Fiselier #endif
265a83710eSEric Fiselier 
27a5faf3c8SLouis Dionne #if TEST_STD_VER > 14
285802ab26SMarshall Clow #ifndef FLT_HAS_SUBNORM
295802ab26SMarshall Clow #error FLT_HAS_SUBNORM not defined
305802ab26SMarshall Clow #endif
315802ab26SMarshall Clow 
325802ab26SMarshall Clow #ifndef DBL_HAS_SUBNORM
335802ab26SMarshall Clow #error DBL_HAS_SUBNORM not defined
345802ab26SMarshall Clow #endif
355802ab26SMarshall Clow 
365802ab26SMarshall Clow #ifndef LDBL_HAS_SUBNORM
375802ab26SMarshall Clow #error LDBL_HAS_SUBNORM not defined
385802ab26SMarshall Clow #endif
395802ab26SMarshall Clow #endif
405802ab26SMarshall Clow 
415a83710eSEric Fiselier #ifndef FLT_MANT_DIG
425a83710eSEric Fiselier #error FLT_MANT_DIG not defined
435a83710eSEric Fiselier #endif
445a83710eSEric Fiselier 
455a83710eSEric Fiselier #ifndef DBL_MANT_DIG
465a83710eSEric Fiselier #error DBL_MANT_DIG not defined
475a83710eSEric Fiselier #endif
485a83710eSEric Fiselier 
495a83710eSEric Fiselier #ifndef LDBL_MANT_DIG
505a83710eSEric Fiselier #error LDBL_MANT_DIG not defined
515a83710eSEric Fiselier #endif
525a83710eSEric Fiselier 
535a83710eSEric Fiselier #ifndef DECIMAL_DIG
545a83710eSEric Fiselier #error DECIMAL_DIG not defined
555a83710eSEric Fiselier #endif
565a83710eSEric Fiselier 
57a5faf3c8SLouis Dionne #if TEST_STD_VER > 14
585802ab26SMarshall Clow #ifndef FLT_DECIMAL_DIG
595802ab26SMarshall Clow #error FLT_DECIMAL_DIG not defined
605802ab26SMarshall Clow #endif
615802ab26SMarshall Clow 
625802ab26SMarshall Clow #ifndef DBL_DECIMAL_DIG
635802ab26SMarshall Clow #error DBL_DECIMAL_DIG not defined
645802ab26SMarshall Clow #endif
655802ab26SMarshall Clow 
665802ab26SMarshall Clow #ifndef LDBL_DECIMAL_DIG
675802ab26SMarshall Clow #error LDBL_DECIMAL_DIG not defined
685802ab26SMarshall Clow #endif
695802ab26SMarshall Clow #endif
705802ab26SMarshall Clow 
715a83710eSEric Fiselier #ifndef FLT_DIG
725a83710eSEric Fiselier #error FLT_DIG not defined
735a83710eSEric Fiselier #endif
745a83710eSEric Fiselier 
755a83710eSEric Fiselier #ifndef DBL_DIG
765a83710eSEric Fiselier #error DBL_DIG not defined
775a83710eSEric Fiselier #endif
785a83710eSEric Fiselier 
795a83710eSEric Fiselier #ifndef LDBL_DIG
805a83710eSEric Fiselier #error LDBL_DIG not defined
815a83710eSEric Fiselier #endif
825a83710eSEric Fiselier 
835a83710eSEric Fiselier #ifndef FLT_MIN_EXP
845a83710eSEric Fiselier #error FLT_MIN_EXP not defined
855a83710eSEric Fiselier #endif
865a83710eSEric Fiselier 
875a83710eSEric Fiselier #ifndef DBL_MIN_EXP
885a83710eSEric Fiselier #error DBL_MIN_EXP not defined
895a83710eSEric Fiselier #endif
905a83710eSEric Fiselier 
915a83710eSEric Fiselier #ifndef LDBL_MIN_EXP
925a83710eSEric Fiselier #error LDBL_MIN_EXP not defined
935a83710eSEric Fiselier #endif
945a83710eSEric Fiselier 
955a83710eSEric Fiselier #ifndef FLT_MIN_10_EXP
965a83710eSEric Fiselier #error FLT_MIN_10_EXP not defined
975a83710eSEric Fiselier #endif
985a83710eSEric Fiselier 
995a83710eSEric Fiselier #ifndef DBL_MIN_10_EXP
1005a83710eSEric Fiselier #error DBL_MIN_10_EXP not defined
1015a83710eSEric Fiselier #endif
1025a83710eSEric Fiselier 
1035a83710eSEric Fiselier #ifndef LDBL_MIN_10_EXP
1045a83710eSEric Fiselier #error LDBL_MIN_10_EXP not defined
1055a83710eSEric Fiselier #endif
1065a83710eSEric Fiselier 
1075a83710eSEric Fiselier #ifndef FLT_MAX_EXP
1085a83710eSEric Fiselier #error FLT_MAX_EXP not defined
1095a83710eSEric Fiselier #endif
1105a83710eSEric Fiselier 
1115a83710eSEric Fiselier #ifndef DBL_MAX_EXP
1125a83710eSEric Fiselier #error DBL_MAX_EXP not defined
1135a83710eSEric Fiselier #endif
1145a83710eSEric Fiselier 
1155a83710eSEric Fiselier #ifndef LDBL_MAX_EXP
1165a83710eSEric Fiselier #error LDBL_MAX_EXP not defined
1175a83710eSEric Fiselier #endif
1185a83710eSEric Fiselier 
1195a83710eSEric Fiselier #ifndef FLT_MAX_10_EXP
1205a83710eSEric Fiselier #error FLT_MAX_10_EXP not defined
1215a83710eSEric Fiselier #endif
1225a83710eSEric Fiselier 
1235a83710eSEric Fiselier #ifndef DBL_MAX_10_EXP
1245a83710eSEric Fiselier #error DBL_MAX_10_EXP not defined
1255a83710eSEric Fiselier #endif
1265a83710eSEric Fiselier 
1275a83710eSEric Fiselier #ifndef LDBL_MAX_10_EXP
1285a83710eSEric Fiselier #error LDBL_MAX_10_EXP not defined
1295a83710eSEric Fiselier #endif
1305a83710eSEric Fiselier 
1315a83710eSEric Fiselier #ifndef FLT_MAX
1325a83710eSEric Fiselier #error FLT_MAX not defined
1335a83710eSEric Fiselier #endif
1345a83710eSEric Fiselier 
1355a83710eSEric Fiselier #ifndef DBL_MAX
1365a83710eSEric Fiselier #error DBL_MAX not defined
1375a83710eSEric Fiselier #endif
1385a83710eSEric Fiselier 
1395a83710eSEric Fiselier #ifndef LDBL_MAX
1405a83710eSEric Fiselier #error LDBL_MAX not defined
1415a83710eSEric Fiselier #endif
1425a83710eSEric Fiselier 
1435a83710eSEric Fiselier #ifndef FLT_EPSILON
1445a83710eSEric Fiselier #error FLT_EPSILON not defined
1455a83710eSEric Fiselier #endif
1465a83710eSEric Fiselier 
1475a83710eSEric Fiselier #ifndef DBL_EPSILON
1485a83710eSEric Fiselier #error DBL_EPSILON not defined
1495a83710eSEric Fiselier #endif
1505a83710eSEric Fiselier 
1515a83710eSEric Fiselier #ifndef LDBL_EPSILON
1525a83710eSEric Fiselier #error LDBL_EPSILON not defined
1535a83710eSEric Fiselier #endif
1545a83710eSEric Fiselier 
1555a83710eSEric Fiselier #ifndef FLT_MIN
1565a83710eSEric Fiselier #error FLT_MIN not defined
1575a83710eSEric Fiselier #endif
1585a83710eSEric Fiselier 
1595a83710eSEric Fiselier #ifndef DBL_MIN
1605a83710eSEric Fiselier #error DBL_MIN not defined
1615a83710eSEric Fiselier #endif
1625a83710eSEric Fiselier 
1635a83710eSEric Fiselier #ifndef LDBL_MIN
1645a83710eSEric Fiselier #error LDBL_MIN not defined
1655a83710eSEric Fiselier #endif
1665a83710eSEric Fiselier 
167a5faf3c8SLouis Dionne #if TEST_STD_VER > 14
1685802ab26SMarshall Clow #ifndef FLT_TRUE_MIN
1695802ab26SMarshall Clow #error FLT_TRUE_MIN not defined
1705802ab26SMarshall Clow #endif
1715802ab26SMarshall Clow 
1725802ab26SMarshall Clow #ifndef DBL_TRUE_MIN
1735802ab26SMarshall Clow #error DBL_TRUE_MIN not defined
1745802ab26SMarshall Clow #endif
1755802ab26SMarshall Clow 
1765802ab26SMarshall Clow #ifndef LDBL_TRUE_MIN
1775802ab26SMarshall Clow #error LDBL_TRUE_MIN not defined
1785802ab26SMarshall Clow #endif
1795802ab26SMarshall Clow #endif
1805802ab26SMarshall Clow 
main(int,char **)1812df59c50SJF Bastien int main(int, char**)
1825a83710eSEric Fiselier {
1832df59c50SJF Bastien 
1842df59c50SJF Bastien   return 0;
1855a83710eSEric Fiselier }
186