[cairo-commit] cairo/test cairo-test.c,1.46,1.47

Dave Beckett commit at pdx.freedesktop.org
Thu Jul 28 11:22:45 PDT 2005


Committed by: dajobe

Update of /cvs/cairo/cairo/test
In directory gabe:/tmp/cvs-serv9232

Modified Files:
	cairo-test.c 
Log Message:
2005-07-28  Dave Beckett  <Dave.Beckett at bristol.ac.uk>

	* test/cairo-test.c (cairo_test_create_surface_from_png): Use
	cairo_surface_status(image) instead of testing for NULL from
	cairo_image_surface_create_from_png to enable testing when srcdir
	!= builddir again.


Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -d -r1.46 -r1.47
--- cairo-test.c	21 Jul 2005 01:52:31 -0000	1.46
+++ cairo-test.c	28 Jul 2005 18:22:43 -0000	1.47
@@ -583,14 +583,17 @@
     char *srcdir = getenv ("srcdir");
 
     image = cairo_image_surface_create_from_png (filename);
-    if (image == NULL) {
+    if (cairo_surface_status(image)) { 
+        /* expect not found when running with srcdir != builddir 
+         * such as when 'make distcheck' is run
+         */
 	if (srcdir) {
 	    char *srcdir_filename;
 	    xasprintf (&srcdir_filename, "%s/%s", srcdir, filename);
 	    image = cairo_image_surface_create_from_png (srcdir_filename);
 	    free (srcdir_filename);
 	}
-	if (image == NULL)
+	if (cairo_surface_status(image))
 	    return NULL;
     }
 




More information about the cairo-commit mailing list