diff options
author | Philippe Theveny <philippe.theveny@laposte.net> | 2009-03-27 15:08:36 +0000 |
---|---|---|
committer | Philippe Theveny <philippe.theveny@laposte.net> | 2009-03-27 15:08:36 +0000 |
commit | 7b595c769e207863359e8847c3896128b9d11d51 (patch) | |
tree | 610780196abed39657fba5d64d2c5b7dc017e2cd /tests/tio_str.c | |
parent | 7b8e990f6a3fe38a76e224acb7cd3d1d98332ed2 (diff) | |
download | mpc-git-7b595c769e207863359e8847c3896128b9d11d51.tar.gz |
tests/tio_str.c: Fix bug.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/mpc/trunk@511 211d60ee-9f03-0410-a15a-8952a2c7a4e4
Diffstat (limited to 'tests/tio_str.c')
-rw-r--r-- | tests/tio_str.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tio_str.c b/tests/tio_str.c index c4f2eb5..d569d1f 100644 --- a/tests/tio_str.c +++ b/tests/tio_str.c @@ -134,7 +134,7 @@ check_io_str (mpc_ptr read_number, mpc_ptr expected) exit (1); }; - if (mpc_inp_str (read_number, fp, &sz, 10, MPC_RNDNN) != 0) + if (mpc_inp_str (read_number, fp, &sz, 10, MPC_RNDNN) == -1) { printf ("Error: mpc_inp_str cannot correctly re-read number " "in file %s\n", tmp_file); @@ -215,17 +215,19 @@ main (void) for (prec = 2; prec <= 1000; prec+=7) { mpc_set_prec (z, prec); - mpc_set_prec (x, prec); + mpc_set_si_si (x, 1, 1, MPC_RNDNN); check_io_str (z, x); + mpc_set_si_si (x, -1, 1, MPC_RNDNN); check_io_str (z, x); + mpfr_set_inf (MPC_RE(x), -1); mpfr_set_inf (MPC_IM(x), +1); check_io_str (z, x); - test_default_random (z, -1024, 1024, 128, 25); + test_default_random (x, -1024, 1024, 128, 25); check_io_str (z, x); } |