diff options
author | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-23 12:31:43 +0000 |
---|---|---|
committer | pelissip <pelissip@280ebfd0-de03-0410-8827-d642c229c3f4> | 2005-05-23 12:31:43 +0000 |
commit | c7ee418b4cf956b9cea10c7b016d5f5de7f714ce (patch) | |
tree | 4c112425171d4e31d0890f638acbefa5916684bd /tests/tstrtofr.c | |
parent | 85be8bc179a3cfc16a5a461485002216235c32c9 (diff) | |
download | mpfr-c7ee418b4cf956b9cea10c7b016d5f5de7f714ce.tar.gz |
Improve coverage test.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@3595 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tstrtofr.c')
-rw-r--r-- | tests/tstrtofr.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/tstrtofr.c b/tests/tstrtofr.c index f88542ed6..35a46f7d4 100644 --- a/tests/tstrtofr.c +++ b/tests/tstrtofr.c @@ -788,6 +788,13 @@ check_overflow (void) mpfr_dump (x); exit (1); } + mpfr_strtofr (x, "0123456789ABCDEF@540000000", &s, 16, GMP_RNDN); + if (s[0] != 0 || !MPFR_IS_INF (x) || !MPFR_IS_POS (x)) + { + printf ("Check overflow failed (7) with:\n s=%s\n x=", s); + mpfr_dump (x); + exit (1); + } /* Check underflow */ mpfr_strtofr (x, "123456789E-2147483646", &s, 0, GMP_RNDN); @@ -812,6 +819,13 @@ check_overflow (void) mpfr_dump (x); exit (1); } + mpfr_strtofr (x, "0123456789ABCDEF@-540000000", &s, 16, GMP_RNDN); + if (s[0] != 0 || !MPFR_IS_ZERO (x) || !MPFR_IS_POS (x)) + { + printf ("Check overflow failed (7) with:\n s=%s\n x=", s); + mpfr_dump (x); + exit (1); + } mpfr_clear (x); } |