summaryrefslogtreecommitdiff
path: root/tests/tinternals.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/tinternals.c')
-rw-r--r--tests/tinternals.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/tests/tinternals.c b/tests/tinternals.c
index b040b2b16..821f2765b 100644
--- a/tests/tinternals.c
+++ b/tests/tinternals.c
@@ -62,9 +62,9 @@ test_round_near_x (void)
mpfr_neg (x, x, GMP_RNDN), p++, neg++)
for (err = 2; err <= 6; err++)
for (dir = 0; dir <= 1; dir++)
- for (r = 0; r < GMP_RND_MAX; r++)
+ RND_LOOP(r)
{
- inex = mpfr_round_near_x (y, x, err, dir, r);
+ inex = mpfr_round_near_x (y, x, err, dir, (mp_rnd_t) r);
if (inex == 0 && err < 6)
{
@@ -73,7 +73,8 @@ test_round_near_x (void)
continue;
}
- inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub) (z, x, eps, r);
+ inex2 = ((dir ^ neg) ? mpfr_add : mpfr_sub)
+ (z, x, eps, (mp_rnd_t) r);
if (inex * inex2 <= 0)
printf ("Bad return value (%d instead of %d) for:\n",
inex, inex2);
@@ -94,7 +95,7 @@ test_round_near_x (void)
printf ("x = %c%c%c%c.%c%c, ", neg ? '-' : '+',
p[0], p[1], p[2], p[3], p[4]);
printf ("err = %d, dir = %d, r = %s --> inex = %2d",
- err, dir, mpfr_print_rnd_mode (r), inex);
+ err, dir, mpfr_print_rnd_mode ((mp_rnd_t) r), inex);
if (inex != 0)
{
printf (", y = ");