summaryrefslogtreecommitdiff
path: root/test/buffer-diff.c
diff options
context:
space:
mode:
authorCarl Worth <cworth@cworth.org>2005-05-10 20:25:38 +0000
committerCarl Worth <cworth@cworth.org>2005-05-10 20:25:38 +0000
commitb05c85eafb953fbe082b67875865ae4e4ca56ed2 (patch)
treee6997cd68fd5f9772e7a79342bbe01f568357f92 /test/buffer-diff.c
parent40796148b87eea991a9c624061a978821f108de6 (diff)
Removing mucking around with stderr and add a cairo_test_log function instead.
Switch all error messages from fprintf(stderr,...) to cairo_test_log(...).
Diffstat (limited to 'test/buffer-diff.c')
-rw-r--r--test/buffer-diff.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index b4b42e28a..e540d2f9b 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -28,6 +28,8 @@
#include <errno.h>
#include <string.h>
+#include "cairo-test.h"
+
#include "buffer-diff.h"
#include "read-png.h"
#include "write-png.h"
@@ -37,8 +39,8 @@ static void
xunlink (const char *pathname)
{
if (unlink (pathname) < 0 && errno != ENOENT) {
- fprintf (stderr, " Error: Cannot remove %s: %s\n",
- pathname, strerror (errno));
+ cairo_test_log (" Error: Cannot remove %s: %s\n",
+ pathname, strerror (errno));
exit (1);
}
}
@@ -117,12 +119,11 @@ image_diff (const char *filename_a,
height_a != height_b ||
stride_a != stride_b)
{
- fprintf (stderr,
- "Error: Image size mismatch: (%dx%d@%d) vs. (%dx%d@%d)\n"
- " for %s vs. %s\n",
- width_a, height_a, stride_a,
- width_b, height_b, stride_b,
- filename_a, filename_b);
+ cairo_test_log ("Error: Image size mismatch: (%dx%d@%d) vs. (%dx%d@%d)\n"
+ " for %s vs. %s\n",
+ width_a, height_a, stride_a,
+ width_b, height_b, stride_b,
+ filename_a, filename_b);
free (buf_a);
free (buf_b);
return -1;