summaryrefslogtreecommitdiff
path: root/tests/tgeneric.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-01-31 11:02:21 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2021-01-31 11:02:21 +0000
commit070587279951e953938c529abbe09d90f991d130 (patch)
treeb5d88add6712682398b79442feb7b0a44c86b8c5 /tests/tgeneric.c
parent52017aa9dda8bf7c3a1b81d9ebe465796d03891b (diff)
downloadmpfr-070587279951e953938c529abbe09d90f991d130.tar.gz
[tests/*.c] When not in a test, use set_emin and set_emax rather than
mpfr_set_emin and mpfr_set_emax, in order to check failures. Done with: perl -pi -e 's/^ *\Kmpfr_(set_e(min|max) *\()/\1/' *.c git-svn-id: https://scm.gforge.inria.fr/anonscm/svn/mpfr/trunk@14284 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tgeneric.c')
-rw-r--r--tests/tgeneric.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/tgeneric.c b/tests/tgeneric.c
index ce0c23e01..8faa6d539 100644
--- a/tests/tgeneric.c
+++ b/tests/tgeneric.c
@@ -439,7 +439,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
/* Exponent e of the result > exponents of the inputs;
let's set emax to e - 1, so that one should get an
overflow. */
- mpfr_set_emax (e - 1);
+ set_emax (e - 1);
#ifdef MPFR_DEBUG_TGENERIC
printf ("tgeneric: overflow test (emax = %"
MPFR_EXP_FSPEC "d)\n",
@@ -462,7 +462,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
inexact = TEST_FUNCTION (w, x, rnd);
#endif
flags = __gmpfr_flags;
- mpfr_set_emax (oemax);
+ set_emax (oemax);
ex_flags = MPFR_FLAGS_OVERFLOW | MPFR_FLAGS_INEXACT;
/* For RNDF, this test makes no sense, since RNDF
might return either the maximal floating-point
@@ -502,7 +502,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
/* Exponent e of the result < exponents of the inputs;
let's set emin to e + 1, so that one should get an
underflow. */
- mpfr_set_emin (e + 1);
+ set_emin (e + 1);
#ifdef MPFR_DEBUG_TGENERIC
printf ("tgeneric: underflow test (emin = %"
MPFR_EXP_FSPEC "d)\n",
@@ -525,7 +525,7 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
inexact = TEST_FUNCTION (w, x, rnd);
#endif
flags = __gmpfr_flags;
- mpfr_set_emin (oemin);
+ set_emin (oemin);
ex_flags = MPFR_FLAGS_UNDERFLOW | MPFR_FLAGS_INEXACT;
/* For RNDF, this test makes no sense, since RNDF
might return either the maximal floating-point
@@ -572,8 +572,8 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
some special cases) should be sufficient. */
if (ctrt <= 10 || prec == p1)
{
- mpfr_set_emin (emin);
- mpfr_set_emax (emax);
+ set_emin (emin);
+ set_emax (emax);
#ifdef MPFR_DEBUG_TGENERIC
/* Useful information in case of assertion failure. */
printf ("tgeneric: reduced exponent range [%"
@@ -597,8 +597,8 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
inexact = TEST_FUNCTION (w, x, rnd);
#endif
flags = __gmpfr_flags;
- mpfr_set_emin (oemin);
- mpfr_set_emax (oemax);
+ set_emin (oemin);
+ set_emax (oemax);
/* That test makes no sense for RNDF. */
if (rnd != MPFR_RNDF && ! (SAME_VAL (w, y) &&
SAME_SIGN (inexact, compare) &&
@@ -787,8 +787,8 @@ test_generic (mpfr_prec_t p0, mpfr_prec_t p1, unsigned int nmax)
next_n:
/* In case the exponent range has been changed by
tests_default_random() or for special values... */
- mpfr_set_emin (old_emin);
- mpfr_set_emax (old_emax);
+ set_emin (old_emin);
+ set_emax (old_emax);
}
}