test: updated test units
authorNicola Fontana <ntd@entidi.it>
Mon, 11 Mar 2013 14:55:49 +0000 (11 15:55 +0100)
committerNicola Fontana <ntd@entidi.it>
Mon, 11 Mar 2013 14:55:49 +0000 (11 15:55 +0100)
src/adg/tests/test-trail.c
src/cpml/tests/test-pair.c
src/cpml/tests/test-primitive.c
src/cpml/tests/test-segment.c

index 869a8a1..aa07ecc 100644 (file)
@@ -21,7 +21,7 @@
 #include "test-internal.h"
 
 
-static CpmlPath *
+static cairo_path_t *
 _adg_path_callback(AdgTrail *trail, gpointer user_data)
 {
     static cairo_path_data_t data[] = {
@@ -32,7 +32,7 @@ _adg_path_callback(AdgTrail *trail, gpointer user_data)
         { .header = { CPML_LINE, 2 }},
         { .point = { 4, 5 }}
     };
-    static CpmlPath path = {
+    static cairo_path_t path = {
         CAIRO_STATUS_SUCCESS,
         data,
         G_N_ELEMENTS(data)
index e31ada8..be12f48 100644 (file)
@@ -46,9 +46,8 @@ _cpml_test_pair_basic(void)
     g_assert(equals);
 
     /* Just check the following calls will not crash */
-    cpml_pair_copy(NULL, &pair);
-    cpml_pair_copy(NULL, NULL);
     cpml_pair_copy(&pair, NULL);
+    cpml_pair_copy(&pair, &pair);
 
     cpml_pair_copy(&pair, &org);
     equals = cpml_pair_equal(&pair, &nord);
index dca5aee..de31036 100644 (file)
@@ -45,7 +45,7 @@ static cairo_path_data_t data[] = {
     { .header = { CPML_CLOSE, 1 }}
 };
 
-CpmlPath path = {
+cairo_path_t path = {
     CAIRO_STATUS_SUCCESS,
     data,
     G_N_ELEMENTS(data)
@@ -143,7 +143,7 @@ _cpml_test_set_point(void)
 {
     gsize size;
     cairo_path_data_t data_copy[G_N_ELEMENTS(data)];
-    CpmlPath path_copy = {
+    cairo_path_t path_copy = {
         CAIRO_STATUS_SUCCESS,
         data_copy,
         G_N_ELEMENTS(data)
index 24031e1..21751c5 100644 (file)
@@ -85,13 +85,13 @@ static cairo_path_data_t noop_data[] = {
     { .point = { 8, 9 }}
 };
 
-CpmlPath path = {
+cairo_path_t path = {
     CAIRO_STATUS_SUCCESS,
     data,
     G_N_ELEMENTS(data)
 };
 
-CpmlPath noop_path = {
+cairo_path_t noop_path = {
     CAIRO_STATUS_SUCCESS,
     noop_data,
     G_N_ELEMENTS(noop_data)
@@ -101,18 +101,12 @@ CpmlPath noop_path = {
 static void
 _cpml_test_basic(void)
 {
-    cairo_bool_t found, empty;
+    cairo_bool_t found;
     CpmlSegment segment, segment_copy;
 
     /* Checking APIs */
-    empty = cpml_path_is_empty(NULL);
-    g_assert(empty);
-    empty = cpml_path_is_empty(&noop_path);
-    g_assert(! empty);
     found = cpml_segment_from_cairo(&segment, &noop_path);
     g_assert(! found);
-    empty = cpml_path_is_empty(&path);
-    g_assert(! empty);
 
     /* CPML entry point */
     found = cpml_segment_from_cairo(&segment, &path);