From dc80d65a1d396830fc900cfe838bfb5c931f7b59 Mon Sep 17 00:00:00 2001 From: thevenyp Date: Fri, 14 Dec 2007 08:17:43 +0000 Subject: output errors to stdout git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@5078 280ebfd0-de03-0410-8827-d642c229c3f4 --- tests/tfmod.c | 28 ++++++++++++++-------------- tests/tprintf.c | 8 ++++---- tests/tsinh_cosh.c | 22 +++++++++++----------- 3 files changed, 29 insertions(+), 29 deletions(-) (limited to 'tests') diff --git a/tests/tfmod.c b/tests/tfmod.c index 31d973124..82bf6e6d9 100644 --- a/tests/tfmod.c +++ b/tests/tfmod.c @@ -67,16 +67,16 @@ slow_fmod (mpfr_ptr r, mpfr_srcptr x, mpfr_srcptr y, mp_rnd_t rnd) static void test_failed (mpfr_t erem, mpfr_t grem, mpfr_t x, mpfr_t y, mp_rnd_t rnd) { - fprintf (stderr, "error : mpfr_fmod (r, x, y, rnd)\n x = "); - mpfr_out_str (stderr, 10, 0, x, GMP_RNDD); - fprintf (stderr, "\n y = "); - mpfr_out_str (stderr, 10, 0, y, GMP_RNDD); - fprintf (stderr, "\nrnd = %s\n", mpfr_print_rnd_mode (rnd)); - fprintf (stderr, "\n expected r = "); - mpfr_out_str (stderr, 10, 0, erem, GMP_RNDD); - fprintf (stderr, "\n got r = "); - mpfr_out_str (stderr, 10, 0, grem, GMP_RNDD); - fprintf (stderr, "\n"); + fprintf (stdout, "error : mpfr_fmod (r, x, y, rnd)\n x = "); + mpfr_out_str (stdout, 10, 0, x, GMP_RNDD); + fprintf (stdout, "\n y = "); + mpfr_out_str (stdout, 10, 0, y, GMP_RNDD); + fprintf (stdout, "\nrnd = %s\n", mpfr_print_rnd_mode (rnd)); + fprintf (stdout, "\n expected r = "); + mpfr_out_str (stdout, 10, 0, erem, GMP_RNDD); + fprintf (stdout, "\n got r = "); + mpfr_out_str (stdout, 10, 0, grem, GMP_RNDD); + fprintf (stdout, "\n"); mpfr_clears (erem, grem, x, y, (void *) 0); exit (1); @@ -112,7 +112,7 @@ special (void) test_failed (r, x, x, y, GMP_RNDN); if (inexact) { - fprintf (stderr, "error : mpfr_fmod (NaN, NaN) should be exact\n"); + fprintf (stdout, "error : mpfr_fmod (NaN, NaN) should be exact\n"); goto error; } @@ -123,7 +123,7 @@ special (void) test_failed (r, x, x, y, GMP_RNDN); if (inexact) { - fprintf (stderr, "error : mpfr_fmod (NaN, +0) should be exact\n"); + fprintf (stdout, "error : mpfr_fmod (NaN, +0) should be exact\n"); goto error; } @@ -134,7 +134,7 @@ special (void) test_failed (r, x, x, y, GMP_RNDN); if (inexact) { - fprintf (stderr, "error : mpfr_fmod (3.1415, NaN) should be exact\n"); + fprintf (stdout, "error : mpfr_fmod (3.1415, NaN) should be exact\n"); goto error; } @@ -145,7 +145,7 @@ special (void) test_failed (r, x, x, y, GMP_RNDN); if (inexact) { - fprintf (stderr, "error : mpfr_fmod (3.1415, +Inf) should be exact\n"); + fprintf (stdout, "error : mpfr_fmod (3.1415, +Inf) should be exact\n"); goto error; } diff --git a/tests/tprintf.c b/tests/tprintf.c index beb4467a4..865531909 100644 --- a/tests/tprintf.c +++ b/tests/tprintf.c @@ -51,8 +51,8 @@ check_sprintf (const char *expected, const char *fmt, mpfr_srcptr x) mpfr_sprintf (buffer, fmt, x); if (strcmp (buffer, expected) != 0) { - fprintf (stderr, "Error in mpfr_sprintf (s, \"%s\", x);\n", fmt); - fprintf (stderr, "expected: \"%s\"\ngot: \"%s\"\n", expected, + fprintf (stdout, "Error in mpfr_sprintf (s, \"%s\", x);\n", fmt); + fprintf (stdout, "expected: \"%s\"\ngot: \"%s\"\n", expected, buffer); exit (1); } @@ -69,8 +69,8 @@ check_vsprintf (const char *expected, const char *fmt, ...) mpfr_vsprintf (buffer, fmt, ap); if (strcmp (buffer, expected) != 0) { - fprintf (stderr, "Error in mpfr_vsprintf (s, \"%s\", ...);\n", fmt); - fprintf (stderr, "expected: \"%s\"\ngot: \"%s\"\n", expected, + fprintf (stdout, "Error in mpfr_vsprintf (s, \"%s\", ...);\n", fmt); + fprintf (stdout, "expected: \"%s\"\ngot: \"%s\"\n", expected, buffer); va_end (ap); diff --git a/tests/tsinh_cosh.c b/tests/tsinh_cosh.c index 0cfb8a72e..0bab30da3 100644 --- a/tests/tsinh_cosh.c +++ b/tests/tsinh_cosh.c @@ -28,17 +28,17 @@ MA 02110-1301, USA. */ static void failed (mpfr_t x, mpfr_t esh, mpfr_t gsh, mpfr_t ech, mpfr_t gch) { - fprintf (stderr, "error : mpfr_sinh_cosh (x) x = "); - mpfr_out_str (stderr, 10, 0, x, GMP_RNDD); - fprintf (stderr, "\nsinh(x) expected "); - mpfr_out_str (stderr, 10, 0, esh, GMP_RNDD); - fprintf (stderr, "\n got "); - mpfr_out_str (stderr, 10, 0, gsh, GMP_RNDD); - fprintf (stderr, "\ncosh(x) expected "); - mpfr_out_str (stderr, 10, 0, ech, GMP_RNDD); - fprintf (stderr, "\n got "); - mpfr_out_str (stderr, 10, 0, gch, GMP_RNDD); - fprintf (stderr, "\n"); + fprintf (stdout, "error : mpfr_sinh_cosh (x) x = "); + mpfr_out_str (stdout, 10, 0, x, GMP_RNDD); + fprintf (stdout, "\nsinh(x) expected "); + mpfr_out_str (stdout, 10, 0, esh, GMP_RNDD); + fprintf (stdout, "\n got "); + mpfr_out_str (stdout, 10, 0, gsh, GMP_RNDD); + fprintf (stdout, "\ncosh(x) expected "); + mpfr_out_str (stdout, 10, 0, ech, GMP_RNDD); + fprintf (stdout, "\n got "); + mpfr_out_str (stdout, 10, 0, gch, GMP_RNDD); + fprintf (stdout, "\n"); mpfr_clears (x, esh, gsh, ech, gch, (void *) 0); exit (1); -- cgit v1.2.1