]> granicus.if.org Git - postgis/commitdiff
#3041, add remaining tests
authorPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 18 Feb 2015 23:13:26 +0000 (23:13 +0000)
committerPaul Ramsey <pramsey@cleverelephant.ca>
Wed, 18 Feb 2015 23:13:26 +0000 (23:13 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@13239 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_in_wkb.c
liblwgeom/cunit/cu_in_wkt.c
liblwgeom/cunit/cu_out_wkb.c
liblwgeom/cunit/cu_out_wkt.c
liblwgeom/cunit/cu_surface.c
liblwgeom/cunit/cu_tester.c

index 9086dca1d591573ed59f2f2debd43c1ae7378929..fabd07a6c0874ac1efd7e8af239224e4a6050235 100644 (file)
@@ -213,22 +213,21 @@ static void test_wkb_in_malformed(void)
 /*
 ** Used by test harness to register the tests in this file.
 */
-
-CU_TestInfo wkb_in_tests[] =
+void wkb_in_suite_setup(void);
+void wkb_in_suite_setup(void)
 {
-       PG_TEST(test_wkb_in_point),
-       PG_TEST(test_wkb_in_linestring),
-       PG_TEST(test_wkb_in_polygon),
-       PG_TEST(test_wkb_in_multipoint),
-       PG_TEST(test_wkb_in_multilinestring),
-       PG_TEST(test_wkb_in_multipolygon),
-       PG_TEST(test_wkb_in_collection),
-       PG_TEST(test_wkb_in_circularstring),
-       PG_TEST(test_wkb_in_compoundcurve),
-       PG_TEST(test_wkb_in_curvpolygon),
-       PG_TEST(test_wkb_in_multicurve),
-       PG_TEST(test_wkb_in_multisurface),
-       PG_TEST(test_wkb_in_malformed),
-       CU_TEST_INFO_NULL
-};
-CU_SuiteInfo wkb_in_suite = {"WKB In Suite",  init_wkb_in_suite,  clean_wkb_in_suite, wkb_in_tests};
+       CU_pSuite suite = CU_add_suite("WKB In Suite", init_wkb_in_suite, clean_wkb_in_suite);
+       PG_ADD_TEST(suite, test_wkb_in_point);
+       PG_ADD_TEST(suite, test_wkb_in_linestring);
+       PG_ADD_TEST(suite, test_wkb_in_polygon);
+       PG_ADD_TEST(suite, test_wkb_in_multipoint);
+       PG_ADD_TEST(suite, test_wkb_in_multilinestring);
+       PG_ADD_TEST(suite, test_wkb_in_multipolygon);
+       PG_ADD_TEST(suite, test_wkb_in_collection);
+       PG_ADD_TEST(suite, test_wkb_in_circularstring);
+       PG_ADD_TEST(suite, test_wkb_in_compoundcurve);
+       PG_ADD_TEST(suite, test_wkb_in_curvpolygon);
+       PG_ADD_TEST(suite, test_wkb_in_multicurve);
+       PG_ADD_TEST(suite, test_wkb_in_multisurface);
+       PG_ADD_TEST(suite, test_wkb_in_malformed);
+}
index a8ce9680684e87f55313b58c35fc5369885d7852..64af831dcf2d6797b5943daca5a86baffb5506e7 100644 (file)
@@ -350,24 +350,23 @@ static void test_wkt_in_errlocation(void)
 /*
 ** Used by test harness to register the tests in this file.
 */
-
-CU_TestInfo wkt_in_tests[] =
+void wkt_in_suite_setup(void);
+void wkt_in_suite_setup(void)
 {
-       PG_TEST(test_wkt_in_point),
-       PG_TEST(test_wkt_in_linestring),
-       PG_TEST(test_wkt_in_polygon),
-       PG_TEST(test_wkt_in_multipoint),
-       PG_TEST(test_wkt_in_multilinestring),
-       PG_TEST(test_wkt_in_multipolygon),
-       PG_TEST(test_wkt_in_collection),
-       PG_TEST(test_wkt_in_circularstring),
-       PG_TEST(test_wkt_in_compoundcurve),
-       PG_TEST(test_wkt_in_curvpolygon),
-       PG_TEST(test_wkt_in_multicurve),
-       PG_TEST(test_wkt_in_multisurface),
-       PG_TEST(test_wkt_in_tin),
-       PG_TEST(test_wkt_in_polyhedralsurface),
-       PG_TEST(test_wkt_in_errlocation),
-       CU_TEST_INFO_NULL
-};
-CU_SuiteInfo wkt_in_suite = {"in_wkt",  init_wkt_in_suite,  clean_wkt_in_suite, wkt_in_tests};
+       CU_pSuite suite = CU_add_suite("WKT In Suite", init_wkt_in_suite, clean_wkt_in_suite);
+       PG_ADD_TEST(suite, test_wkt_in_point);
+       PG_ADD_TEST(suite, test_wkt_in_linestring);
+       PG_ADD_TEST(suite, test_wkt_in_polygon);
+       PG_ADD_TEST(suite, test_wkt_in_multipoint);
+       PG_ADD_TEST(suite, test_wkt_in_multilinestring);
+       PG_ADD_TEST(suite, test_wkt_in_multipolygon);
+       PG_ADD_TEST(suite, test_wkt_in_collection);
+       PG_ADD_TEST(suite, test_wkt_in_circularstring);
+       PG_ADD_TEST(suite, test_wkt_in_compoundcurve);
+       PG_ADD_TEST(suite, test_wkt_in_curvpolygon);
+       PG_ADD_TEST(suite, test_wkt_in_multicurve);
+       PG_ADD_TEST(suite, test_wkt_in_multisurface);
+       PG_ADD_TEST(suite, test_wkt_in_tin);
+       PG_ADD_TEST(suite, test_wkt_in_polyhedralsurface);
+       PG_ADD_TEST(suite, test_wkt_in_errlocation);
+}
index cabffac0cdec38c55ca036cdcab718cbb66878bb..d6c37a2039ca70190d3e4b437138686641626604 100644 (file)
@@ -175,22 +175,21 @@ static void test_wkb_out_polyhedralsurface(void)
 /*
 ** Used by test harness to register the tests in this file.
 */
-
-CU_TestInfo wkb_out_tests[] =
+void wkb_out_suite_setup(void);
+void wkb_out_suite_setup(void)
 {
-       PG_TEST(test_wkb_out_point),
-       PG_TEST(test_wkb_out_linestring),
-       PG_TEST(test_wkb_out_polygon),
-       PG_TEST(test_wkb_out_multipoint),
-       PG_TEST(test_wkb_out_multilinestring),
-       PG_TEST(test_wkb_out_multipolygon),
-       PG_TEST(test_wkb_out_collection),
-       PG_TEST(test_wkb_out_circularstring),
-       PG_TEST(test_wkb_out_compoundcurve),
-       PG_TEST(test_wkb_out_curvpolygon),
-       PG_TEST(test_wkb_out_multicurve),
-       PG_TEST(test_wkb_out_multisurface),
-       PG_TEST(test_wkb_out_polyhedralsurface),
-       CU_TEST_INFO_NULL
-};
-CU_SuiteInfo wkb_out_suite = {"WKB Out Suite",  init_wkb_out_suite,  clean_wkb_out_suite, wkb_out_tests};
+       CU_pSuite suite = CU_add_suite("WKB Out Suite", init_wkb_out_suite, clean_wkb_out_suite);
+       PG_ADD_TEST(suite, test_wkb_out_point);
+       PG_ADD_TEST(suite, test_wkb_out_linestring);
+       PG_ADD_TEST(suite, test_wkb_out_polygon);
+       PG_ADD_TEST(suite, test_wkb_out_multipoint);
+       PG_ADD_TEST(suite, test_wkb_out_multilinestring);
+       PG_ADD_TEST(suite, test_wkb_out_multipolygon);
+       PG_ADD_TEST(suite, test_wkb_out_collection);
+       PG_ADD_TEST(suite, test_wkb_out_circularstring);
+       PG_ADD_TEST(suite, test_wkb_out_compoundcurve);
+       PG_ADD_TEST(suite, test_wkb_out_curvpolygon);
+       PG_ADD_TEST(suite, test_wkb_out_multicurve);
+       PG_ADD_TEST(suite, test_wkb_out_multisurface);
+       PG_ADD_TEST(suite, test_wkb_out_polyhedralsurface);
+}
index 1af867a306a1d00390f723950f576f352cb528c7..8cfea62ef1c8b5baeb9cccc6355de30dd134f4aa 100644 (file)
@@ -208,21 +208,20 @@ static void test_wkt_out_multisurface(void)
 /*
 ** Used by test harness to register the tests in this file.
 */
-
-CU_TestInfo wkt_out_tests[] =
-{
-       PG_TEST(test_wkt_out_point),
-       PG_TEST(test_wkt_out_linestring),
-       PG_TEST(test_wkt_out_polygon),
-       PG_TEST(test_wkt_out_multipoint),
-       PG_TEST(test_wkt_out_multilinestring),
-       PG_TEST(test_wkt_out_multipolygon),
-       PG_TEST(test_wkt_out_collection),
-       PG_TEST(test_wkt_out_circularstring),
-       PG_TEST(test_wkt_out_compoundcurve),
-       PG_TEST(test_wkt_out_curvpolygon),
-       PG_TEST(test_wkt_out_multicurve),
-       PG_TEST(test_wkt_out_multisurface),
-       CU_TEST_INFO_NULL
-};
-CU_SuiteInfo wkt_out_suite = {"WKT Out Suite",  init_wkt_out_suite,  clean_wkt_out_suite, wkt_out_tests};
+void wkt_out_suite_setup(void);
+void wkt_out_suite_setup(void)
+{
+       CU_pSuite suite = CU_add_suite("WKT Out Suite", init_wkt_out_suite, clean_wkt_out_suite);
+       PG_ADD_TEST(suite, test_wkt_out_point);
+       PG_ADD_TEST(suite, test_wkt_out_linestring);
+       PG_ADD_TEST(suite, test_wkt_out_polygon);
+       PG_ADD_TEST(suite, test_wkt_out_multipoint);
+       PG_ADD_TEST(suite, test_wkt_out_multilinestring);
+       PG_ADD_TEST(suite, test_wkt_out_multipolygon);
+       PG_ADD_TEST(suite, test_wkt_out_collection);
+       PG_ADD_TEST(suite, test_wkt_out_circularstring);
+       PG_ADD_TEST(suite, test_wkt_out_compoundcurve);
+       PG_ADD_TEST(suite, test_wkt_out_curvpolygon);
+       PG_ADD_TEST(suite, test_wkt_out_multicurve);
+       PG_ADD_TEST(suite, test_wkt_out_multisurface);
+}
index c9badf7f143e0870798c6a11599a606d5d67e87a..e64e9c74d10ad761567cb84db2c63f8e8b23ba6a 100644 (file)
@@ -401,15 +401,12 @@ surface_dimension(void)
 /*
 ** Used by test harness to register the tests in this file.
 */
-/*
-** Used by test harness to register the tests in this file.
-*/
-CU_TestInfo surface_tests[] =
+void surface_suite_setup(void);
+void surface_suite_setup(void)
 {
-       PG_TEST(triangle_parse),
-       PG_TEST(tin_parse),
-       PG_TEST(polyhedralsurface_parse),
-       PG_TEST(surface_dimension),
-       CU_TEST_INFO_NULL
-};
-CU_SuiteInfo surface_suite = {"surface",  NULL,  NULL, surface_tests};
+       CU_pSuite suite = CU_add_suite("surface", NULL,  NULL);
+       PG_ADD_TEST(suite, triangle_parse);
+       PG_ADD_TEST(suite, tin_parse);
+       PG_ADD_TEST(suite, polyhedralsurface_parse);
+       PG_ADD_TEST(suite, surface_dimension);
+}
index e801f5af0361a236d4907ed5088c3b137673df41..f21bd53e506cdd0ae9e12c365bffcf83a5eef054 100644 (file)
@@ -53,6 +53,12 @@ extern void stringbuffer_suite_setup(void);
 extern void tree_suite_setup(void);
 extern void triangulate_suite_setup(void);
 extern void varint_suite_setup(void);
+extern void wkt_out_suite_setup(void);
+extern void wkb_out_suite_setup(void);
+extern void surface_suite_setup(void);
+extern void wkb_in_suite_setup(void);
+extern void wkt_in_suite_setup(void);
+
 
 /* AND ADD YOUR SUITE SETUP FUNCTION HERE (2 of 2) */
 PG_SuiteSetup setupfuncs[] =
@@ -91,6 +97,11 @@ PG_SuiteSetup setupfuncs[] =
        tree_suite_setup,
        triangulate_suite_setup,
        varint_suite_setup,
+       wkt_out_suite_setup,
+       wkb_out_suite_setup,
+       surface_suite_setup,
+       wkb_in_suite_setup,
+       wkt_in_suite_setup,
        NULL
 };