summaryrefslogtreecommitdiff
path: root/test/font-options.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/font-options.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/font-options.c')
-rw-r--r--test/font-options.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/test/font-options.c b/test/font-options.c
index fd61a73e..873a5c39 100644
--- a/test/font-options.c
+++ b/test/font-options.c
@@ -25,13 +25,11 @@
#include "cairo-test.h"
-#include <cairo.h>
#include <assert.h>
-int
-main (void)
+static cairo_test_status_t
+preamble (cairo_test_context_t *ctx)
{
- cairo_test_context_t ctx;
cairo_font_options_t *default_options;
cairo_font_options_t *nil_options;
cairo_surface_t *surface;
@@ -39,8 +37,6 @@ main (void)
cairo_t *cr;
cairo_scaled_font_t *scaled_font;
- cairo_test_init (&ctx, "font-options");
-
/* first check NULL handling of cairo_font_options_t */
default_options = cairo_font_options_create ();
assert (cairo_font_options_status (default_options) == CAIRO_STATUS_SUCCESS);
@@ -103,7 +99,12 @@ main (void)
cairo_destroy (cr);
- cairo_test_fini (&ctx);
-
return CAIRO_TEST_SUCCESS;
}
+
+CAIRO_TEST (font_options,
+ "Check setters and getters on cairo_font_options_t.",
+ "font, api", /* keywords */
+ NULL, /* requirements */
+ 0, 0,
+ preamble, NULL)