diff options
author | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-25 17:53:50 +0000 |
---|---|---|
committer | thevenyp <thevenyp@280ebfd0-de03-0410-8827-d642c229c3f4> | 2009-03-25 17:53:50 +0000 |
commit | a798c983b7e111580492009ef53f954aeb186656 (patch) | |
tree | 3365c94fc3ba6c3f88d95f18fd0d8ad3343fbb7a /tests/tget_str.c | |
parent | 8e504f3f9c7aef11a254279c6a5d61e27c28594a (diff) | |
download | mpfr-a798c983b7e111580492009ef53f954aeb186656.tar.gz |
Change base upper limit in string conversion up to 62.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@6141 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tget_str.c')
-rw-r--r-- | tests/tget_str.c | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/tests/tget_str.c b/tests/tget_str.c index 69c594eba..9c4021cde 100644 --- a/tests/tget_str.c +++ b/tests/tget_str.c @@ -75,6 +75,8 @@ check_small (void) mpfr_free_str (s); s = mpfr_get_str (NULL, &e, 36, 0, x, MPFR_RNDN); mpfr_free_str (s); + s = mpfr_get_str (NULL, &e, 62, 0, x, MPFR_RNDN); + mpfr_free_str (s); mpfr_set_prec (x, 64); mpfr_set_si (x, -1, MPFR_RNDN); @@ -1082,8 +1084,16 @@ check_special (int b, mp_prec_t p) size_t m; /* check for invalid base */ - MPFR_ASSERTN(mpfr_get_str (s, &e, 1, 10, x, MPFR_RNDN) == NULL); - MPFR_ASSERTN(mpfr_get_str (s, &e, 37, 10, x, MPFR_RNDN) == NULL); + if (mpfr_get_str (s, &e, 1, 10, x, MPFR_RNDN) != NULL) + { + printf ("Error: mpfr_get_str should not accept base = 1\n"); + exit (1); + } + if (mpfr_get_str (s, &e, 63, 10, x, MPFR_RNDN) != NULL) + { + printf ("Error: mpfr_get_str should not accept base = 63\n"); + exit (1); + } s2[0] = '1'; for (i=1; i<MAX_DIGITS+2; i++) |