summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorvlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-24 07:49:39 +0000
committervlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4>2017-05-24 07:49:39 +0000
commitf84cf91e0706c46730716f592ac68fc842aa6ba1 (patch)
treefbf8474406e4847ced69e5e821f57c0b8d03dbfc
parentba423bb9e48fda4cab53d453d54ba3817dd937ae (diff)
downloadmpfr-f84cf91e0706c46730716f592ac68fc842aa6ba1.tar.gz
[tests/tprintf.c] More detailed error message.
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@11526 280ebfd0-de03-0410-8827-d642c229c3f4
-rw-r--r--tests/tprintf.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/tests/tprintf.c b/tests/tprintf.c
index deddc84d9..59fae5367 100644
--- a/tests/tprintf.c
+++ b/tests/tprintf.c
@@ -96,21 +96,23 @@ static void
check_vprintf_failure (const char *fmt, ...)
{
va_list ap;
- int r;
+ int r, e;
va_start (ap, fmt);
errno = 0;
r = mpfr_vprintf (fmt, ap);
+ e = errno;
va_end (ap);
if (r != -1
#ifdef EOVERFLOW
- || errno != EOVERFLOW
+ || e != EOVERFLOW
#endif
)
{
putchar ('\n');
- fprintf (stderr, "Error 3 in mpfr_vprintf(\"%s\", ...)\n", fmt);
+ fprintf (stderr, "Error 3 in mpfr_vprintf(\"%s\", ...)\n"
+ "Got r = %d, errno = %d\n", fmt, r, e);
exit (1);
}
putchar ('\n');