[cairo-commit] cairo/test .cvsignore, 1.54, 1.55 cairo-test.c, 1.60, 1.61

Carl Worth commit at pdx.freedesktop.org
Sat Oct 8 11:58:22 PDT 2005


Committed by: cworth

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

Modified Files:
	.cvsignore cairo-test.c 
Log Message:

2005-10-08  Carl Worth  <cworth at cworth.org>

        * test/.cvsignore: Ignore output of PS tests.

        * test/cairo-test.c: (create_ps_surface): Fix the PS tests to work
        again, (track change in create_surface interface).


Index: .cvsignore
===================================================================
RCS file: /cvs/cairo/cairo/test/.cvsignore,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- .cvsignore	6 Oct 2005 18:32:54 -0000	1.54
+++ .cvsignore	8 Oct 2005 18:58:20 -0000	1.55
@@ -73,6 +73,8 @@
 *-image-out.png
 *-image-argb32-out.png
 *-image-rgb24-out.png
+*-ps-rgb24-out.png
+*-ps-rgb24-out.ps
 *-xcb-out.png
 *-xcb-argb32-out.png
 *-xcb-rgb24-out.png

Index: cairo-test.c
===================================================================
RCS file: /cvs/cairo/cairo/test/cairo-test.c,v
retrieving revision 1.60
retrieving revision 1.61
diff -u -d -r1.60 -r1.61
--- cairo-test.c	6 Oct 2005 18:32:54 -0000	1.60
+++ cairo-test.c	8 Oct 2005 18:58:20 -0000	1.61
@@ -30,6 +30,7 @@
 #include <stdio.h>
 #include <stdlib.h>
 #include <stdarg.h>
+#include <assert.h>
 #ifdef HAVE_UNISTD_H
 #include <unistd.h>
 #endif
@@ -484,19 +485,23 @@
 } ps_target_closure_t;
 
 static cairo_surface_t *
-create_ps_surface (cairo_test_t *test, void **closure)
+create_ps_surface (cairo_test_t *test, cairo_format_t format,
+		   void **closure)
 {
     int width = test->width;
     int height = test->height;
     ps_target_closure_t	*ptc;
     cairo_surface_t *surface;
 
+    /* This is the only format supported by the PS surface backend. */
+    assert (format == CAIRO_FORMAT_RGB24);
+
     *closure = ptc = xmalloc (sizeof (ps_target_closure_t));
 
     ptc->width = width;
     ptc->height = height;
     
-    xasprintf (&ptc->filename, "%s-%s%s", test->name, "ps", ".ps");
+    xasprintf (&ptc->filename, "%s-%s%s", test->name, "ps-rgb24-out", ".ps");
     surface = cairo_ps_surface_create (ptc->filename, width, height);
     if (!surface) {
 	free (ptc);



More information about the cairo-commit mailing list