]> granicus.if.org Git - postgis/commitdiff
Fix expected return codes fixed two commits above
authorSandro Santilli <strk@keybit.net>
Tue, 29 Jul 2014 13:56:52 +0000 (13:56 +0000)
committerSandro Santilli <strk@keybit.net>
Tue, 29 Jul 2014 13:56:52 +0000 (13:56 +0000)
Also sets touched suite names to match filename
(with "cu_" prefix stripped out)

git-svn-id: http://svn.osgeo.org/postgis/trunk@12839 b70326c6-7e19-0410-871a-916f4a2858ee

liblwgeom/cunit/cu_in_wkt.c
liblwgeom/cunit/cu_measures.c

index acfa1c5e1751b2414e5c504ef9562ce9a1473283..6517616f5de1351c67acbd3e07e9c5ba66ad9a38 100644 (file)
@@ -55,10 +55,11 @@ static char* cu_wkt_in(char *wkt, uint8_t variant)
        char *s = 0;
 
        rv = lwgeom_parse_wkt(&p, wkt, 0);
-       CU_ASSERT_EQUAL( rv, LW_SUCCESS );
        if( p.errcode ) {
+         CU_ASSERT_EQUAL( rv, LW_FAILURE );
                return strdup(p.message);
        }
+       CU_ASSERT_EQUAL( rv, LW_SUCCESS );
        s = lwgeom_to_wkt(p.geom, variant, 8, NULL);
        lwgeom_parser_result_free(&p);
        return s;
@@ -336,7 +337,7 @@ static void test_wkt_in_errlocation(void)
        wkt = "LINESTRING((0 0 0,1 1)";
        lwgeom_parser_result_init(&p);
        rv = lwgeom_parse_wkt(&p, wkt, LW_PARSER_CHECK_ALL);
-       CU_ASSERT_EQUAL( rv, LW_SUCCESS );
+       CU_ASSERT_EQUAL( rv, LW_FAILURE );
        CU_ASSERT(fabs(12 - p.errlocation) < 1.5);
 
 //     printf("errlocation %d\n", p.errlocation);
@@ -369,4 +370,4 @@ CU_TestInfo wkt_in_tests[] =
        PG_TEST(test_wkt_in_errlocation),
        CU_TEST_INFO_NULL
 };
-CU_SuiteInfo wkt_in_suite = {"WKT In Suite",  init_wkt_in_suite,  clean_wkt_in_suite, wkt_in_tests};
+CU_SuiteInfo wkt_in_suite = {"in_wkt",  init_wkt_in_suite,  clean_wkt_in_suite, wkt_in_tests};
index 98d19a23066303be460d1951f7ec7d42e7081ed7..14487e339768f1e2c4dc3dbc225e2dd0a2b50d9b 100644 (file)
@@ -805,7 +805,7 @@ test_lw_dist2d_ptarray_ptarrayarc(void)
        cu_error_msg_reset();
        rv = lw_dist2d_ptarray_ptarrayarc(lwline1->points, lwline2->points, &dl);
        //printf("%s\n", cu_error_msg);
-       CU_ASSERT_EQUAL( rv, LW_SUCCESS );
+       CU_ASSERT_EQUAL( rv, LW_FAILURE );
        CU_ASSERT_STRING_EQUAL("lw_dist2d_ptarray_ptarrayarc called with non-arc input", cu_error_msg);
 
        lwline_free(lwline2);
@@ -848,4 +848,4 @@ CU_TestInfo measures_tests[] =
        PG_TEST(test_lw_dist2d_ptarray_ptarrayarc),
        CU_TEST_INFO_NULL
 };
-CU_SuiteInfo measures_suite = {"PostGIS Measures Suite",  NULL,  NULL, measures_tests};
+CU_SuiteInfo measures_suite = {"measures", NULL,  NULL, measures_tests};