summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrea Canciani <ranma42@gmail.com>2010-07-08 20:06:08 +0200
committerAndrea Canciani <ranma42@gmail.com>2010-07-08 20:06:08 +0200
commitfb03eba44f1ae7dd76dd3db82bfb55b06b0932ae (patch)
tree7d6e0e677be0664a9e9aa1b149769a6fc2351a1a
parent59aab0bdc24838252850034cee36ed756f3c3e2a (diff)
test: Add quartz functions to api-special-cases test
-rw-r--r--test/api-special-cases.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/test/api-special-cases.c b/test/api-special-cases.c
index d50f5361..42e3bd87 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