summaryrefslogtreecommitdiff
path: root/tests/tget_flt.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 13:45:10 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 13:45:10 +0000
commitcd6d443a66f0ac8a9e7b46a4ce5adfdcc0c399c8 (patch)
tree046a6e58bde0755b86f1a66ee3d8cd995390108c /tests/tget_flt.c
parentf19ddeb2b18e1483ae3f9e5570e3ed9380d339be (diff)
downloadmpfr-cd6d443a66f0ac8a9e7b46a4ce5adfdcc0c399c8.tar.gz
[tests] Got rid of MPFR_TESTS_EXCEPTIONS (added in r11489 and above),
which is redundant with MPFR_TESTS_DIVBYZERO and MPFR_ERRDIVZERO. The code related to these exception is now like r11488 (see the output of "svn diff -r11488"), but keeping the following changes: * Missing !defined(MPFR_ERRDIVZERO) tests added in r11498,11499. * In tests.c: - code related to traps (macro MPFR_RAISE_EXCEPTIONS, which will be renamed); - more detailed output about which FP exceptions occurred; - removal of "#ifdef MPFR_ERRDIVZERO" (as in r11493), as this is better with Automake 1.13+ (required by MPFR since r9375). Note: EXCEPTIONS_FLAG renamed to FPE_FLAGS, since EXCEPTIONS_FLAG is reserved by ISO C when <errno.h> is included. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11504 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_flt.c')
-rw-r--r--tests/tget_flt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tget_flt.c b/tests/tget_flt.c
index 2e08d9aca..778cc6800 100644
--- a/tests/tget_flt.c
+++ b/tests/tget_flt.c
@@ -36,7 +36,7 @@ main (void)
tests_start_mpfr ();
-#if !defined(MPFR_ERRDIVZERO) && !defined(MPFR_TESTS_EXCEPTIONS)
+#if !defined(MPFR_ERRDIVZERO)
/* The definition of DBL_POS_INF involves a division by 0. This makes
"clang -O2 -fsanitize=undefined -fno-sanitize-recover" fail. */
infp = (float) DBL_POS_INF;
@@ -51,7 +51,7 @@ main (void)
mpfr_init2 (x, 24);
mpfr_init2 (y, 24);
-#if !defined(MPFR_ERRDIVZERO) && !defined(MPFR_TESTS_EXCEPTIONS)
+#if !defined(MPFR_ERRDIVZERO)
mpfr_set_nan (x);
f = mpfr_get_flt (x, MPFR_RNDN);
if (! DOUBLE_ISNAN (f))
@@ -320,7 +320,7 @@ main (void)
printf ("expected %.8e, got %.8e\n", g, f);
exit (1);
}
-#if !defined(MPFR_ERRDIVZERO) && !defined(MPFR_TESTS_EXCEPTIONS)
+#if !defined(MPFR_ERRDIVZERO)
f = mpfr_get_flt (x, MPFR_RNDN); /* 2^128 rounds to itself with extended
exponent range, we should get +Inf */
g = infp;
@@ -365,7 +365,7 @@ main (void)
printf ("expected %.8e, got %.8e\n", g, f);
exit (1);
}
-#if !defined(MPFR_ERRDIVZERO) && !defined(MPFR_TESTS_EXCEPTIONS)
+#if !defined(MPFR_ERRDIVZERO)
f = mpfr_get_flt (x, MPFR_RNDN); /* first round to 2^128 (even rule),
thus we should get +Inf */
g = infp;