From e90073f7ddc6f461a935bc360c409b04f1fe9f74 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Wed, 3 Sep 2008 16:38:03 +0100 Subject: [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. --- test/get-clip.c | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'test/get-clip.c') 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 -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) -- cgit v1.2.3