[cairo-commit] test/buffer-diff.c
Carl Worth
cworth at kemper.freedesktop.org
Thu Sep 7 13:09:28 PDT 2006
test/buffer-diff.c | 16 ++++++++++++----
1 files changed, 12 insertions(+), 4 deletions(-)
New commits:
diff-tree 3a92ab69c89d227bdfbb1bd5d609b83a59fc013f (from d598cd8d61863ff91f505241a773595aec7e8445)
Author: Carl Worth <cworth at cworth.org>
Date: Thu Sep 7 13:09:25 2006 -0700
test: Report details errors when image output files cannot be found.
diff --git a/test/buffer-diff.c b/test/buffer-diff.c
index 8009333..1a51ea9 100644
--- a/test/buffer-diff.c
+++ b/test/buffer-diff.c
@@ -221,18 +221,26 @@ image_diff_core (const char *filename_a,
buffer_diff_result_t *result,
cairo_bool_t flatten)
{
+ cairo_status_t status;
unsigned int width_a, height_a, stride_a;
unsigned int width_b, height_b, stride_b;
cairo_surface_t *surface_a, *surface_b, *surface_diff;
surface_a = cairo_image_surface_create_from_png (filename_a);
- if (cairo_surface_status (surface_a))
- return cairo_surface_status (surface_a);
+ status = cairo_surface_status (surface_a);
+ if (status) {
+ cairo_test_log ("Error: Failed to create surface from %s: %s\n",
+ filename_a, cairo_status_to_string (status));
+ return status;
+ }
surface_b = cairo_image_surface_create_from_png (filename_b);
- if (cairo_surface_status (surface_b)) {
+ status = cairo_surface_status (surface_b);
+ if (status) {
+ cairo_test_log ("Error: Failed to create surface from %s: %s\n",
+ filename_b, cairo_status_to_string (status));
cairo_surface_destroy (surface_a);
- return cairo_surface_status (surface_b);
+ return status;
}
width_a = cairo_image_surface_get_width (surface_a) - ax;
More information about the cairo-commit
mailing list