]>
Commit | Line | Data |
---|---|---|
5aa4a1a1 | 1 | /* Configuration for math tests. Generic version. |
6d7e8eda | 2 | Copyright (C) 2013-2023 Free Software Foundation, Inc. |
5aa4a1a1 TS |
3 | This file is part of the GNU C Library. |
4 | ||
5 | The GNU C Library is free software; you can redistribute it and/or | |
6 | modify it under the terms of the GNU Lesser General Public | |
7 | License as published by the Free Software Foundation; either | |
8 | version 2.1 of the License, or (at your option) any later version. | |
9 | ||
10 | The GNU C Library is distributed in the hope that it will be useful, | |
11 | but WITHOUT ANY WARRANTY; without even the implied warranty of | |
12 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | |
13 | Lesser General Public License for more details. | |
14 | ||
15 | You should have received a copy of the GNU Lesser General Public | |
16 | License along with the GNU C Library; if not, see | |
5a82c748 | 17 | <https://www.gnu.org/licenses/>. */ |
5aa4a1a1 | 18 | |
8d375daf JM |
19 | #include <bits/floatn.h> |
20 | ||
21 | /* Expand the appropriate macro for whether to enable tests for a | |
22 | given type. */ | |
23 | #if __HAVE_DISTINCT_FLOAT128 | |
24 | # define MATH_TESTS_TG(PREFIX, ARGS, TYPE) \ | |
25 | (sizeof (TYPE) == sizeof (float) ? PREFIX ## float ARGS \ | |
26 | : sizeof (TYPE) == sizeof (double) ? PREFIX ## double ARGS \ | |
27 | : __builtin_types_compatible_p (TYPE, _Float128) ? PREFIX ## float128 ARGS \ | |
28 | : PREFIX ## long_double ARGS) | |
29 | # else | |
30 | # define MATH_TESTS_TG(PREFIX, ARGS, TYPE) \ | |
31 | (sizeof (TYPE) == sizeof (float) ? PREFIX ## float ARGS \ | |
32 | : sizeof (TYPE) == sizeof (double) ? PREFIX ## double ARGS \ | |
33 | : PREFIX ## long_double ARGS) | |
34 | #endif | |
35 | ||
5aa4a1a1 | 36 | /* Return nonzero value if to run tests involving sNaN values for X. */ |
8d375daf | 37 | #define SNAN_TESTS(x) MATH_TESTS_TG (SNAN_TESTS_, , x) |
57267616 | 38 | |
8d375daf JM |
39 | #define ROUNDING_TESTS(TYPE, MODE) \ |
40 | MATH_TESTS_TG (ROUNDING_TESTS_, (MODE), TYPE) | |
f1d73d30 | 41 | |
8d375daf | 42 | #define EXCEPTION_TESTS(TYPE) MATH_TESTS_TG (EXCEPTION_TESTS_, , TYPE) |
423a7160 | 43 | |
60bcac09 | 44 | #include <math-tests-exceptions.h> |
16a25138 | 45 | #include <math-tests-rounding.h> |
2ce7ba7d | 46 | #include <math-tests-snan.h> |
c0e7e2c1 | 47 | #include <math-tests-snan-cast.h> |
46f8cf57 | 48 | #include <math-tests-snan-payload.h> |
895ef79e | 49 | #include <math-tests-trap.h> |
c3ab2110 | 50 | #include <math-tests-trap-force.h> |