[cairo-commit] 2 commits - test/api-special-cases.c

Andrea Canciani ranma42 at kemper.freedesktop.org
Thu Jul 8 11:07:34 PDT 2010


 test/api-special-cases.c |   21 ++++++++++++++++++++-
 1 file changed, 20 insertions(+), 1 deletion(-)

New commits:
commit fb03eba44f1ae7dd76dd3db82bfb55b06b0932ae
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Thu Jul 8 20:06:08 2010 +0200

    test: Add quartz functions to api-special-cases test

diff --git a/test/api-special-cases.c b/test/api-special-cases.c
index d50f536..42e3bd8 100644
--- a/test/api-special-cases.c
+++ b/test/api-special-cases.c
@@ -77,6 +77,10 @@
 #if CAIRO_HAS_PS_SURFACE
 #include <cairo-ps.h>
 #endif
+#if CAIRO_HAS_QUARTZ_SURFACE
+#define Cursor QuartzCursor
+#include <cairo-quartz.h>
+#endif
 #if CAIRO_HAS_SVG_SURFACE
 #include <cairo-svg.h>
 #endif
@@ -84,6 +88,7 @@
 #include <cairo-xcb.h>
 #endif
 #if CAIRO_HAS_XLIB_SURFACE
+#define Cursor XCursor
 #include <cairo-xlib.h>
 #endif
 
@@ -516,6 +521,17 @@ test_cairo_ps_surface_dsc_begin_page_setup (cairo_surface_t *surface)
 
 #endif /* CAIRO_HAS_PS_SURFACE */
 
+#if CAIRO_HAS_QUARTZ_SURFACE
+
+static cairo_test_status_t
+test_cairo_quartz_surface_get_cg_context (cairo_surface_t *surface)
+{
+    CGContextRef context = cairo_quartz_surface_get_cg_context (surface);
+    return context == NULL || surface_has_type (surface, CAIRO_SURFACE_TYPE_QUARTZ) ? CAIRO_TEST_SUCCESS : CAIRO_TEST_ERROR;
+}
+
+#endif /* CAIRO_HAS_QUARTZ_SURFACE */
+
 #if CAIRO_HAS_SVG_SURFACE
 
 static cairo_test_status_t
@@ -669,6 +685,9 @@ struct {
     TEST (cairo_ps_surface_dsc_begin_setup, CAIRO_SURFACE_TYPE_PS, TRUE),
     TEST (cairo_ps_surface_dsc_begin_page_setup, CAIRO_SURFACE_TYPE_PS, TRUE),
 #endif
+#if CAIRO_HAS_QUARTZ_SURFACE
+    TEST (cairo_quartz_surface_get_cg_context, CAIRO_SURFACE_TYPE_QUARTZ, FALSE),
+#endif
 #if CAIRO_HAS_SVG_SURFACE
     TEST (cairo_svg_surface_restrict_to_version, CAIRO_SURFACE_TYPE_SVG, TRUE),
 #endif
commit 59aab0bdc24838252850034cee36ed756f3c3e2a
Author: Andrea Canciani <ranma42 at gmail.com>
Date:   Thu Jul 8 20:05:13 2010 +0200

    test: fix typo

diff --git a/test/api-special-cases.c b/test/api-special-cases.c
index 3a1d7e9..d50f536 100644
--- a/test/api-special-cases.c
+++ b/test/api-special-cases.c
@@ -38,7 +38,7 @@
  *    prepared surface and has the job of calling the function and checking
  *    the return value (if one exists) for correctness. The top of this file
  *    contains all these shim functions.
- * 2) Knowledge if the function behaves like a setter or like a setter. A 
+ * 2) Knowledge if the function behaves like a setter or like a getter. A 
  *    setter should set an error status on the surface, a getter does not
  *    modify the function.
  * 3) Knowledge if the function only works for a specific surface type and for


More information about the cairo-commit mailing list