summaryrefslogtreecommitdiff
path: root/tests/tset_str.c
diff options
context:
space:
mode:
authorzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-25 09:02:31 +0000
committerzimmerma <zimmerma@280ebfd0-de03-0410-8827-d642c229c3f4>2002-04-25 09:02:31 +0000
commit6b8f21081855bac10286fb590f4ea09f10f18594 (patch)
tree59a0ee09ad7ed3c22fa1739959e2e19f7b92c54c /tests/tset_str.c
parent4562deea2e4ddfee822e3af1455549a35032fce2 (diff)
downloadmpfr-6b8f21081855bac10286fb590f4ea09f10f18594.tar.gz
modified tests for special values
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@1916 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tset_str.c')
-rw-r--r--tests/tset_str.c8
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");