summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 08:04:05 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-19 08:04:05 +0000
commit8180194e3b236a00b557d8856eab01edb888a61c (patch)
treed480e7dd79f615423a7561f7e71d179806596601
parente12bca0a70f223e153f9326472b63ac4a877a277 (diff)
downloadmpfr-8180194e3b236a00b557d8856eab01edb888a61c.tar.gz
[tests/tests.c] Change for MPFR_TESTS_DIVBYZERO: in case of FE_DIVBYZERO
or FE_INVALID, fail unconditionally, not just when MPFR_ERRDIVZERO is defined, otherwise one cannot see the output about the floating-point exceptions with "make check" (the test of MPFR_ERRDIVZERO here should have been removed after switching to Automake 1.13, which discards the output when the test program succeeds). Note: defining MPFR_TESTS_DIVBYZERO without MPFR_ERRDIVZERO is just for debugging. git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11493 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tests.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/tests/tests.c b/tests/tests.c
index 784a6e2df..6639dc95a 100644
--- a/tests/tests.c
+++ b/tests/tests.c
@@ -311,22 +311,20 @@ tests_end_mpfr (void)
printf ("Some floating-point exception(s) occurred:");
if (fetestexcept (FE_DIVBYZERO))
{
+ /* With MPFR_ERRDIVZERO, this should never occur because
+ the purpose of defining MPFR_ERRDIVZERO is to avoid all
+ the FP divisions by 0. */
printf (" DIVBYZERO");
-#ifdef MPFR_ERRDIVZERO
- /* This should never occur because the purpose of defining
- MPFR_ERRDIVZERO is to avoid all the FP divisions by 0. */
err = 1;
-#endif
}
if (fetestexcept (FE_INVALID))
{
- printf (" INVALID");
-#ifdef MPFR_ERRDIVZERO
- /* This should never occur because the purpose of defining
- MPFR_ERRDIVZERO is to avoid all the FP divisions by 0.
+ /* With MPFR_ERRDIVZERO, this should never occur because
+ the purpose of defining MPFR_ERRDIVZERO is to avoid all
+ the FP divisions by 0.
Note: FE_INVALID comes from 0.0 / 0.0, in particular. */
+ printf (" INVALID");
err = 1;
-#endif
}
printf ("\n");
#ifdef MPFR_TESTS_EXCEPTIONS