[cairo-commit] cairo/test path-data.c,1.4,1.5

Carl Worth commit at pdx.freedesktop.org
Wed Jul 6 14:52:03 PDT 2005


Committed by: cworth

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

Modified Files:
	path-data.c 
Log Message:

        * src/cairo.h:
        * src/cairo.c: (cairo_status_to_string): Remove
        CAIRO_STATUS_NO_TARGET_SURFAC and add CAIRO_STATUS_INVALID_STATUS.

        * src/cairo-gstate.c:
        (_cairo_gstate_clip_and_composite_trapezoids),
        (_cairo_gstate_copy_page), (_cairo_gstate_show_page): Don't check
        for gstate->target == NULL anymore as the API now guarantees it
        never occurs.

        * src/cairo.c: (cairo_append_path): Check that path->status is a
        valid status value and cause an INVALID_STATUS error otherwise.

        * test/path-data.c: (main): Test the new
        CAIRO_STATUS_INVALID_STATUS error case in cairo_append_path.


Index: path-data.c
===================================================================
RCS file: /cvs/cairo/cairo/test/path-data.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -d -r1.4 -r1.5
--- path-data.c	6 May 2005 20:23:41 -0000	1.4
+++ path-data.c	6 Jul 2005 21:52:01 -0000	1.5
@@ -152,8 +152,23 @@
     cairo_destroy (cr);
 
     cr = cairo_create (surface);
+    path.status = -1;
+    cairo_append_path (cr, &path);
+    if (cairo_status (cr) != CAIRO_STATUS_INVALID_STATUS)
+	return 1;
+    cairo_destroy (cr);
+
+    cr = cairo_create (surface);
+    path.status = CAIRO_STATUS_NO_MEMORY;
+    cairo_append_path (cr, &path);
+    if (cairo_status (cr) != CAIRO_STATUS_NO_MEMORY)
+	return 1;
+    cairo_destroy (cr);
+
+    cr = cairo_create (surface);
     path.data = NULL;
     path.num_data = 0;
+    path.status = CAIRO_STATUS_SUCCESS;
     cairo_append_path (cr, &path);
     if (cairo_status (cr) != CAIRO_STATUS_NULL_POINTER)
 	return 1;




More information about the cairo-commit mailing list