summaryrefslogtreecommitdiff
path: root/test/get-clip.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-09-03 16:38:03 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-31 12:30:11 +0000
commite90073f7ddc6f461a935bc360c409b04f1fe9f74 (patch)
treeefda94d1ecd13143cdad23f14552661165e7601e /test/get-clip.c
parent8457972d40088cda165f31fdd7bd9b4c19c6e095 (diff)
[test] Build test suite into single binary.
Avoid calling libtool to link every single test case, by building just one binary from all the sources. This binary is then given the task of choosing tests to run (based on user selection and individual test requirement), forking each test into its own process and accumulating the results.
Diffstat (limited to 'test/get-clip.c')
-rw-r--r--test/get-clip.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/test/get-clip.c b/test/get-clip.c
index 5e0ff174..e246671a 100644
--- a/test/get-clip.c
+++ b/test/get-clip.c
@@ -26,15 +26,6 @@
#include "cairo-test.h"
#include <stddef.h>
-static cairo_test_draw_function_t draw;
-
-static const cairo_test_t test = {
- "get-clip",
- "Test cairo_copy_clip_rectangle_list and cairo_clip_extents",
- 0, 0,
- draw
-};
-
static cairo_bool_t
check_count (const cairo_test_context_t *ctx,
const char *message, cairo_bool_t uses_clip_rects,
@@ -138,6 +129,7 @@ draw (cairo_t *cr, int width, int height)
case CAIRO_SURFACE_TYPE_WIN32:
case CAIRO_SURFACE_TYPE_BEOS:
case CAIRO_SURFACE_TYPE_DIRECTFB:
+ case CAIRO_SURFACE_TYPE_SDL:
uses_clip_rects = TRUE;
break;
case CAIRO_SURFACE_TYPE_QUARTZ:
@@ -283,8 +275,9 @@ FAIL:
return cairo_test_status_from_status (ctx, status);
}
-int
-main (void)
-{
- return cairo_test (&test);
-}
+CAIRO_TEST (get_clip,
+ "Test cairo_copy_clip_rectangle_list and cairo_clip_extents",
+ "clip, extents", /* keywords */
+ NULL, /* requirements */
+ 0, 0,
+ NULL, draw)