From f1d73d30dfe6b5ebec071542835f1b6c2b2f8fcf Mon Sep 17 00:00:00 2001 From: Joseph Myers Date: Tue, 11 Jun 2013 15:44:31 +0000 Subject: Add exception information to math-tests.h and use it in libm-test.inc. --- sysdeps/generic/math-tests.h | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'sysdeps') diff --git a/sysdeps/generic/math-tests.h b/sysdeps/generic/math-tests.h index b1e9fd72a7..89b2260d0f 100644 --- a/sysdeps/generic/math-tests.h +++ b/sysdeps/generic/math-tests.h @@ -58,3 +58,21 @@ (sizeof (TYPE) == sizeof (float) ? ROUNDING_TESTS_float (MODE) \ : sizeof (TYPE) == sizeof (double) ? ROUNDING_TESTS_double (MODE) \ : ROUNDING_TESTS_long_double (MODE)) + +/* Indicate whether to run tests of floating-point exceptions for a + given floating-point type, given that the exception macros are + defined. All are run unless overridden. */ +#ifndef EXCEPTION_TESTS_float +# define EXCEPTION_TESTS_float 1 +#endif +#ifndef EXCEPTION_TESTS_double +# define EXCEPTION_TESTS_double 1 +#endif +#ifndef EXCEPTION_TESTS_long_double +# define EXCEPTION_TESTS_long_double 1 +#endif + +#define EXCEPTION_TESTS(TYPE) \ + (sizeof (TYPE) == sizeof (float) ? EXCEPTION_TESTS_float \ + : sizeof (TYPE) == sizeof (double) ? EXCEPTION_TESTS_double \ + : EXCEPTION_TESTS_long_double) -- cgit 1.4.1