From e49db8ed3ea5727e00e2734a8877af860371be69 Mon Sep 17 00:00:00 2001 From: Carl Worth Date: Wed, 16 Jan 2008 08:11:51 -0800 Subject: [PATCH] Fix create-for-stream test to log its failure properly Without this, a failure of this test won't be nicely reported in the post-make-check summary. (Also fix a silly little typo in the svg-clip test.) --- test/Makefile.am | 1 - test/create-for-stream.c | 13 +++++++++++-- test/svg-clip.c | 2 +- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/test/Makefile.am b/test/Makefile.am index b3c933aae..b4bba9d62 100644 --- a/test/Makefile.am +++ b/test/Makefile.am @@ -520,7 +520,6 @@ surface-pattern-scale-up$(EXEEXT) # Any test that doesn't generate a log file goes here NOLOG_TESTS = \ -create-for-stream \ user-data \ svg-surface \ svg-clip \ diff --git a/test/create-for-stream.c b/test/create-for-stream.c index d6cb23b1c..379412fc5 100644 --- a/test/create-for-stream.c +++ b/test/create-for-stream.c @@ -225,19 +225,22 @@ test_surface (const char *backend, return CAIRO_TEST_SUCCESS; } - int main (void) { cairo_test_status_t status = CAIRO_TEST_SUCCESS; cairo_test_status_t test_status; + const char test_name[] = "create-for-stream"; - cairo_test_init ("create-for-stream"); + cairo_test_init (test_name); #if CAIRO_HAS_PS_SURFACE test_status = test_surface ("ps", "create-for-stream.ps", cairo_ps_surface_create, cairo_ps_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "ps", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -246,6 +249,9 @@ main (void) test_status = test_surface ("pdf", "create-for-stream.pdf", cairo_pdf_surface_create, cairo_pdf_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "pdf", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif @@ -254,6 +260,9 @@ main (void) test_status = test_surface ("svg", "create-for-stream.svg", cairo_svg_surface_create, cairo_svg_surface_create_for_stream); + cairo_test_log ("TEST: %s TARGET: %s RESULT: %s\n", + test_name, "svg", + test_status ? "FAIL" : "PASS"); if (status == CAIRO_TEST_SUCCESS) status = test_status; #endif diff --git a/test/svg-clip.c b/test/svg-clip.c index 338f28f1e..77ae9e984 100644 --- a/test/svg-clip.c +++ b/test/svg-clip.c @@ -127,7 +127,7 @@ main (void) cairo_destroy (cr); cairo_surface_destroy (surface); - printf ("svg-surface: Please check %s to make sure it looks happy.\n", + printf ("svg-clip: Please check %s to make sure it looks happy.\n", filename); cairo_test_fini ();