diff options
Diffstat (limited to 'tests/tset_str.c')
-rw-r--r-- | tests/tset_str.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/tset_str.c b/tests/tset_str.c index da995f68d..ec0546a0a 100644 --- a/tests/tset_str.c +++ b/tests/tset_str.c @@ -163,27 +163,27 @@ main (int argc, char *argv[]) free (str); } - if (mpfr_set_str (x, "NaN", 10, GMP_RNDN) != 0 || !mpfr_nan_p(x)) + if (mpfr_set_str (x, "NaNgarbage", 10, GMP_RNDN) != 3 || !mpfr_nan_p(x)) { fprintf (stderr, "mpfr_set_str failed on NaN\n"); exit (1); } - if (mpfr_set_str (x, "Inf", 10, GMP_RNDN) != 0 || !mpfr_inf_p(x) || + if (mpfr_set_str (x, "Infgarbage", 10, GMP_RNDN) != 3 || !mpfr_inf_p(x) || MPFR_SIGN(x) < 0) { fprintf (stderr, "mpfr_set_str failed on Inf\n"); exit (1); } - if (mpfr_set_str (x, "-Inf", 10, GMP_RNDN) != 0 || !mpfr_inf_p(x) || + if (mpfr_set_str (x, "-Infgarbage", 10, GMP_RNDN) != 4 || !mpfr_inf_p(x) || MPFR_SIGN(x) > 0) { fprintf (stderr, "mpfr_set_str failed on -Inf\n"); exit (1); } - if (mpfr_set_str (x, "+Inf", 10, GMP_RNDN) != 0 || !mpfr_inf_p(x) || + if (mpfr_set_str (x, "+Infgarbage", 10, GMP_RNDN) != 4 || !mpfr_inf_p(x) || MPFR_SIGN(x) < 0) { fprintf (stderr, "mpfr_set_str failed on +Inf\n"); |