summaryrefslogtreecommitdiff
path: root/tests/tsprintf.c
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-10-19 16:21:41 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2010-10-19 16:21:41 +0000
commit518becc383f29d0ac0fbaf585dd8743e7c813ff0 (patch)
treee81ccea224eb728d1952fced2a83fbdb37d7482b /tests/tsprintf.c
parent85613ee2a940ea04e88acd6bedab651df4f2f976 (diff)
downloadmpfr-518becc383f29d0ac0fbaf585dd8743e7c813ff0.tar.gz
[tests/*.c] Support the case where mpfr_exp_t is not a long int
(but with such a future extension, one should probably provide a MPFR_PRIexp macro, similar to what <inttypes.h> does). git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@7226 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'tests/tsprintf.c')
-rw-r--r--tests/tsprintf.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/tests/tsprintf.c b/tests/tsprintf.c
index d44d780de..e060c2da9 100644
--- a/tests/tsprintf.c
+++ b/tests/tsprintf.c
@@ -1071,7 +1071,11 @@ check_emax_aux (mpfr_exp_t e)
if (strcmp (s1, s2) != 0)
{
- printf ("Error in check_emax_aux for emax = %ld\n", e);
+ printf ("Error in check_emax_aux for emax = ");
+ if (e > LONG_MAX)
+ printf ("(>LONG_MAX)\n");
+ else
+ printf ("%ld\n", (long) e);
printf ("Expected %s\n", s2);
printf ("Got %s\n", s1);
exit (1);
@@ -1086,7 +1090,11 @@ check_emax_aux (mpfr_exp_t e)
if (strcmp (s1, s2) != 0)
{
- printf ("Error in check_emax_aux for emax = %ld\n", e);
+ printf ("Error in check_emax_aux for emax = ");
+ if (e > LONG_MAX)
+ printf ("(>LONG_MAX)\n");
+ else
+ printf ("%ld\n", (long) e);
printf ("Expected %s\n", s2);
printf ("Got %s\n", s1);
exit (1);