summaryrefslogtreecommitdiff
path: root/test/in-fill-empty-trapezoid.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/in-fill-empty-trapezoid.c')
-rw-r--r--test/in-fill-empty-trapezoid.c24
1 files changed, 11 insertions, 13 deletions
diff --git a/test/in-fill-empty-trapezoid.c b/test/in-fill-empty-trapezoid.c
index 9d846a3f..15ef01d3 100644
--- a/test/in-fill-empty-trapezoid.c
+++ b/test/in-fill-empty-trapezoid.c
@@ -35,10 +35,9 @@
#include "cairo-test.h"
-int
-main (void)
+static cairo_test_status_t
+preamble (cairo_test_context_t *ctx)
{
- cairo_test_context_t ctx;
int x,y;
int width = 10;
int height = 10;
@@ -46,14 +45,8 @@ main (void)
cairo_t *cr;
int false_positive_count = 0;
cairo_status_t status;
- char const * description =
- "Test that the tessellator isn't producing obviously empty trapezoids";
cairo_test_status_t ret;
- cairo_test_init (&ctx, "in-fill-empty-trapezoid");
- cairo_test_log (&ctx, "%s\n", description);
- printf ("%s\n", description);
-
surf = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
cr = cairo_create (surf);
cairo_surface_destroy (surf);
@@ -88,19 +81,24 @@ main (void)
/* Check that everything went well. */
ret = CAIRO_TEST_SUCCESS;
if (CAIRO_STATUS_SUCCESS != status) {
- cairo_test_log (&ctx, "Failed to create a test surface and path: %s\n",
+ cairo_test_log (ctx, "Failed to create a test surface and path: %s\n",
cairo_status_to_string (status));
ret = CAIRO_TEST_FAILURE;
}
if (0 != false_positive_count) {
- cairo_test_log (&ctx, "Point sampling found %d false positives "
+ cairo_test_log (ctx, "Point sampling found %d false positives "
"from cairo_in_fill()\n",
false_positive_count);
ret = CAIRO_TEST_FAILURE;
}
- cairo_test_fini (&ctx);
-
return ret;
}
+
+CAIRO_TEST (in_fill_empty_trapezoid,
+ "Test that the tessellator isn't producing obviously empty trapezoids",
+ "in, trap", /* keywords */
+ NULL, /* requirements */
+ 0, 0,
+ preamble, NULL)