summaryrefslogtreecommitdiff
path: root/tests/tswap.c
diff options
context:
space:
mode:
authorpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-01-09 16:00:54 +0000
committerpelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4>2004-01-09 16:00:54 +0000
commit21249c6b35c1ef09485172cb22598a1c78a2d151 (patch)
treec130d87f19bfd8807b624a985c6bf34a45499835 /tests/tswap.c
parent0f61bc59c3dedca12d28706db41b52d5da474edb (diff)
downloadmpfr-21249c6b35c1ef09485172cb22598a1c78a2d151.tar.gz
Update the tests to reduce the use of floats.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@2620 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tswap.c')
-rw-r--r--tests/tswap.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/tswap.c b/tests/tswap.c
index 5edda71e2..5b2fbae5d 100644
--- a/tests/tswap.c
+++ b/tests/tswap.c
@@ -1,6 +1,6 @@
/* Test file for mpfr_swap.
-Copyright 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+Copyright 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
This file is part of the MPFR Library.
@@ -34,10 +34,10 @@ main (void)
mpfr_init2 (u, 24);
mpfr_init2 (v, 53);
mpfr_set_ui (u, 16777215, GMP_RNDN); /* 2^24 - 1 */
- mpfr_set_str (v, "9007199254740991.0", 10, GMP_RNDN); /* 2^53 - 1 */
+ mpfr_set_str1 (v, "9007199254740991.0"); /* 2^53 - 1 */
mpfr_swap (u, v);
mpfr_swap (u, v);
- if (mpfr_cmp_ui (u, 16777215) || (mpfr_get_d1 (v) != 9007199254740991.0))
+ if (mpfr_cmp_ui (u, 16777215) || mpfr_cmp_str1 (v, "9007199254740991.0"))
{
printf ("Error in mpfr_swap\n");
exit (1);