[SCM] PostGIS branch master updated. 3.4.0rc1-1110-g7db0f94d5
git at osgeo.org
git at osgeo.org
Thu May 16 06:35:59 PDT 2024
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".
The branch, master has been updated
via 7db0f94d54f4203137ae933e6f414c34099eb89b (commit)
from a14fb0181ced7c447e08edae66e97d5f0afa3864 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 7db0f94d54f4203137ae933e6f414c34099eb89b
Author: Sandro Santilli <strk at kbt.io>
Date: Thu May 16 15:35:31 2024 +0200
Convert more CU_ASSERT_STRING_EQUAL to ASSERT_STRING_EQUAL
Also tweaked just swapped obtained/expected
diff --git a/liblwgeom/cunit/cu_chaikin.c b/liblwgeom/cunit/cu_chaikin.c
index 60b398b3e..4dd95264b 100644
--- a/liblwgeom/cunit/cu_chaikin.c
+++ b/liblwgeom/cunit/cu_chaikin.c
@@ -27,7 +27,7 @@ static void do_test_chaikin(char *geom_txt,char *expected, int n_iterations, int
out_txt = lwgeom_to_wkt(geom_out, WKT_EXTENDED, 3, NULL);
if(strcmp(expected, out_txt))
printf("%s is not equal to %s\n", expected, out_txt);
- CU_ASSERT_STRING_EQUAL(expected, out_txt)
+ ASSERT_STRING_EQUAL(expected, out_txt);
lwfree(out_txt);
lwgeom_free(geom_in);
lwgeom_free(geom_out);
diff --git a/liblwgeom/cunit/cu_clean.c b/liblwgeom/cunit/cu_clean.c
index 315526559..00921d055 100644
--- a/liblwgeom/cunit/cu_clean.c
+++ b/liblwgeom/cunit/cu_clean.c
@@ -98,7 +98,7 @@ static void test_lwgeom_make_valid(void)
TODO: This doesn't work on windows returns in different order.
strk figure out why. For now will replace with normalized version
*/
-/* CU_ASSERT_STRING_EQUAL(ewkt,
+/* ASSERT_STRING_EQUAL(ewkt,
"GEOMETRYCOLLECTION(POINT(0 0),MULTIPOLYGON(((5 5,0 0,0 10,5 5)),((5 5,10 10,10 0,5 5))),LINESTRING(10 0,10 10))");*/
gexp = lwgeom_from_wkt(
"GEOMETRYCOLLECTION(MULTIPOLYGON(((5 5,10 10,10 0,5 5)),((0 0,0 10,5 5,0 0))),LINESTRING(10 0,10 10),POINT(0 0))",
@@ -122,7 +122,7 @@ static void test_lwgeom_make_valid(void)
ewkt = lwgeom_to_ewkt(gout);
/* printf("c = %s\n", ewkt); */
- CU_ASSERT_STRING_EQUAL(ewkt,
+ ASSERT_STRING_EQUAL(ewkt,
"MULTIPOINT(0 0,1 1,2 2)");
lwfree(ewkt);
@@ -141,7 +141,7 @@ static void test_lwgeom_make_valid(void)
ewkt = lwgeom_to_ewkt(gout);
/* printf("c = %s\n", ewkt); */
- CU_ASSERT_STRING_EQUAL(ewkt,
+ ASSERT_STRING_EQUAL(ewkt,
"POLYGON((10 22,10 32,20 32,20 22,10 22))");
lwfree(ewkt);
diff --git a/liblwgeom/cunit/cu_clip_by_rect.c b/liblwgeom/cunit/cu_clip_by_rect.c
index c4cf8b109..4ea34451a 100644
--- a/liblwgeom/cunit/cu_clip_by_rect.c
+++ b/liblwgeom/cunit/cu_clip_by_rect.c
@@ -30,7 +30,7 @@ static void test_lwgeom_clip_by_rect(void)
out = lwgeom_clip_by_rect(in, 5, 0, 10, 10);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL("LINESTRING(5 5,10 0)", tmp)
+ ASSERT_STRING_EQUAL(tmp, "LINESTRING(5 5,10 0)");
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
wkt = "LINESTRING EMPTY";
@@ -38,7 +38,7 @@ static void test_lwgeom_clip_by_rect(void)
out = lwgeom_clip_by_rect(in, 5, 0, 10, 10);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL(wkt, tmp)
+ ASSERT_STRING_EQUAL(tmp, wkt);
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
wkt = "MULTIPOINT EMPTY";
@@ -46,7 +46,7 @@ static void test_lwgeom_clip_by_rect(void)
out = lwgeom_clip_by_rect(in, 5, 0, 10, 10);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL(wkt, tmp)
+ ASSERT_STRING_EQUAL(tmp, wkt);
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
wkt = "MULTIPOINT(0 0, 6 6, 7 5)";
@@ -54,7 +54,7 @@ static void test_lwgeom_clip_by_rect(void)
out = lwgeom_clip_by_rect(in, 5, 0, 10, 10);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL("MULTIPOINT(6 6,7 5)", tmp)
+ ASSERT_STRING_EQUAL(tmp, "MULTIPOINT(6 6,7 5)");
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
/* Disjoint polygon */
diff --git a/liblwgeom/cunit/cu_filterm.c b/liblwgeom/cunit/cu_filterm.c
index d516550a4..d675d9b4e 100644
--- a/liblwgeom/cunit/cu_filterm.c
+++ b/liblwgeom/cunit/cu_filterm.c
@@ -27,7 +27,7 @@ static void do_test_filterm(char *geom_txt,char *expected, double min, double ma
out_txt = lwgeom_to_wkt(geom_out, WKT_EXTENDED, 3, NULL);
if(strcmp(expected, out_txt))
printf("%s is not equal to %s\n", expected, out_txt);
- CU_ASSERT_STRING_EQUAL(expected, out_txt)
+ ASSERT_STRING_EQUAL(expected, out_txt);
lwfree(out_txt);
lwgeom_free(geom_in);
lwgeom_free(geom_out);
diff --git a/liblwgeom/cunit/cu_force_dims.c b/liblwgeom/cunit/cu_force_dims.c
index 68a6862d3..274541428 100644
--- a/liblwgeom/cunit/cu_force_dims.c
+++ b/liblwgeom/cunit/cu_force_dims.c
@@ -29,7 +29,7 @@ test_force_2d(void)
geom = lwgeom_from_wkt("CIRCULARSTRINGM(-5 0 4,0 5 3,5 0 2,10 -5 1,15 0 0)", LW_PARSER_CHECK_NONE);
geom2d = lwgeom_force_2d(geom);
wkt_out = lwgeom_to_ewkt(geom2d);
- CU_ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0)", wkt_out);
+ ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0)", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom2d);
lwfree(wkt_out);
@@ -39,7 +39,7 @@ test_force_2d(void)
LW_PARSER_CHECK_NONE);
geom2d = lwgeom_force_2d(geom);
wkt_out = lwgeom_to_ewkt(geom2d);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
"GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 1,2 2),POLYGON((0 0,0 1,1 1,1 0,0 0)),CURVEPOLYGON(CIRCULARSTRING(0 0,1 1,2 2,1 1,0 0)))",
wkt_out);
lwgeom_free(geom);
@@ -57,7 +57,7 @@ test_force_3dm(void)
geom = lwgeom_from_wkt("CIRCULARSTRING(-5 0 4,0 5 3,5 0 2,10 -5 1,15 0 0)", LW_PARSER_CHECK_NONE);
geom3dm = lwgeom_force_3dm(geom, 1);
wkt_out = lwgeom_to_ewkt(geom3dm);
- CU_ASSERT_STRING_EQUAL("CIRCULARSTRINGM(-5 0 1,0 5 1,5 0 1,10 -5 1,15 0 1)", wkt_out);
+ ASSERT_STRING_EQUAL("CIRCULARSTRINGM(-5 0 1,0 5 1,5 0 1,10 -5 1,15 0 1)", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom3dm);
lwfree(wkt_out);
@@ -73,7 +73,7 @@ test_force_3dz(void)
geom = lwgeom_from_wkt("CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0)", LW_PARSER_CHECK_NONE);
geom3dz = lwgeom_force_3dz(geom, -99);
wkt_out = lwgeom_to_ewkt(geom3dz);
- CU_ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0 -99,0 5 -99,5 0 -99,10 -5 -99,15 0 -99)", wkt_out);
+ ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0 -99,0 5 -99,5 0 -99,10 -5 -99,15 0 -99)", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom3dz);
lwfree(wkt_out);
@@ -81,7 +81,7 @@ test_force_3dz(void)
geom = lwgeom_from_wkt("CIRCULARSTRING(-5 0,0 5,5 0,10 -5,15 0)", LW_PARSER_CHECK_NONE);
geom3dz = lwgeom_force_3dz(geom, 0.0);
wkt_out = lwgeom_to_ewkt(geom3dz);
- CU_ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0 0,0 5 0,5 0 0,10 -5 0,15 0 0)", wkt_out);
+ ASSERT_STRING_EQUAL("CIRCULARSTRING(-5 0 0,0 5 0,5 0 0,10 -5 0,15 0 0)", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom3dz);
lwfree(wkt_out);
@@ -97,7 +97,7 @@ test_force_4d(void)
geom = lwgeom_from_wkt("POINT(1 2)", LW_PARSER_CHECK_NONE);
geom4d = lwgeom_force_4d(geom, 3, 4);
wkt_out = lwgeom_to_ewkt(geom4d);
- CU_ASSERT_STRING_EQUAL("POINT(1 2 3 4)", wkt_out);
+ ASSERT_STRING_EQUAL("POINT(1 2 3 4)", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom4d);
lwfree(wkt_out);
diff --git a/liblwgeom/cunit/cu_force_sfs.c b/liblwgeom/cunit/cu_force_sfs.c
index 73026e994..a9d355ab1 100644
--- a/liblwgeom/cunit/cu_force_sfs.c
+++ b/liblwgeom/cunit/cu_force_sfs.c
@@ -28,7 +28,7 @@ static void do_geom_test(char * in, char * out)
if (strcmp(tmp, out))
fprintf(stderr, "\nIn: %s\nOut: %s\nExp: %s\n",
in, tmp, out);
- CU_ASSERT_STRING_EQUAL(tmp, out);
+ ASSERT_STRING_EQUAL(tmp, out);
lwfree(tmp);
lwgeom_free(h);
}
diff --git a/liblwgeom/cunit/cu_gserialized1.c b/liblwgeom/cunit/cu_gserialized1.c
index 66cc0a55e..47fb42e02 100644
--- a/liblwgeom/cunit/cu_gserialized1.c
+++ b/liblwgeom/cunit/cu_gserialized1.c
@@ -280,7 +280,7 @@ static void test_lwgeom_from_gserialized(void)
out_ewkt = lwgeom_to_ewkt(geom2);
/* printf("\n in = %s\nout = %s\n", in_ewkt, out_ewkt); */
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
/* either both or none of the bboxes are null */
CU_ASSERT( (geom->bbox != NULL) || (geom2->bbox == NULL) );
@@ -522,7 +522,7 @@ static void do_lwgeom_swap_ordinates(char *in, char *out)
if (strcmp(t, out))
fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, t, out);
- CU_ASSERT_STRING_EQUAL(t, out)
+ ASSERT_STRING_EQUAL(t, out);
lwgeom_free(g);
lwfree(t);
@@ -731,7 +731,7 @@ static void test_lwgeom_clone(void)
out_ewkt = lwgeom_to_ewkt(cloned);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(cloned);
lwgeom_free(geom);
@@ -757,7 +757,7 @@ static void test_lwgeom_force_clockwise(void)
out_ewkt = lwgeom_to_ewkt(geom);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
@@ -769,7 +769,7 @@ static void test_lwgeom_force_clockwise(void)
out_ewkt = lwgeom_to_ewkt(geom);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
@@ -781,7 +781,7 @@ static void test_lwgeom_force_clockwise(void)
out_ewkt = lwgeom_to_ewkt(geom);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
@@ -793,7 +793,7 @@ static void test_lwgeom_force_clockwise(void)
out_ewkt = lwgeom_to_ewkt(geom);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
@@ -962,7 +962,7 @@ static void test_lwgeom_as_curve(void)
out_ewkt = lwgeom_to_ewkt(geom2);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
lwgeom_free(geom2);
@@ -973,7 +973,7 @@ static void test_lwgeom_as_curve(void)
out_ewkt = lwgeom_to_ewkt(geom2);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
lwgeom_free(geom2);
@@ -984,7 +984,7 @@ static void test_lwgeom_as_curve(void)
out_ewkt = lwgeom_to_ewkt(geom2);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
lwgeom_free(geom2);
@@ -995,7 +995,7 @@ static void test_lwgeom_as_curve(void)
out_ewkt = lwgeom_to_ewkt(geom2);
if (strcmp(in_ewkt, out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", in_ewkt, out_ewkt);
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom);
lwgeom_free(geom2);
diff --git a/liblwgeom/cunit/cu_gserialized2.c b/liblwgeom/cunit/cu_gserialized2.c
index 1f86dd080..6df3aa1f8 100644
--- a/liblwgeom/cunit/cu_gserialized2.c
+++ b/liblwgeom/cunit/cu_gserialized2.c
@@ -228,7 +228,7 @@ static void test_lwgeom_from_gserialized2(void)
out_ewkt = lwgeom_to_ewkt(geom2);
/* printf("\n in = %s\nout = %s\n", in_ewkt, out_ewkt); */
- CU_ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
+ ASSERT_STRING_EQUAL(in_ewkt, out_ewkt);
g2 = gserialized2_from_lwgeom(geom2, &size2);
CU_ASSERT_EQUAL(g1->gflags, g2->gflags);
diff --git a/liblwgeom/cunit/cu_homogenize.c b/liblwgeom/cunit/cu_homogenize.c
index 2fbda97e4..556f3dc4d 100644
--- a/liblwgeom/cunit/cu_homogenize.c
+++ b/liblwgeom/cunit/cu_homogenize.c
@@ -28,7 +28,7 @@ static void do_geom_test(char * in, char * out)
if (strcmp(tmp, out))
fprintf(stderr, "\nIn: %s\nOut: %s\nExp: %s\n",
in, tmp, out);
- CU_ASSERT_STRING_EQUAL(tmp, out);
+ ASSERT_STRING_EQUAL(tmp, out);
lwfree(tmp);
lwgeom_free(g);
/* See http://trac.osgeo.org/postgis/ticket/1104 */
diff --git a/liblwgeom/cunit/cu_in_encoded_polyline.c b/liblwgeom/cunit/cu_in_encoded_polyline.c
index 597493c81..f76b726f9 100644
--- a/liblwgeom/cunit/cu_in_encoded_polyline.c
+++ b/liblwgeom/cunit/cu_in_encoded_polyline.c
@@ -31,7 +31,7 @@ static void do_encoded_polyline_test(char * in, int precision, char * out)
if (strcmp(h, out))
fprintf(stderr, "\nIn: %s\nOut: %s\nTheo: %s\n", in, h, out);
- CU_ASSERT_STRING_EQUAL(h, out);
+ ASSERT_STRING_EQUAL(h, out);
lwgeom_free(g);
if ( h ) lwfree(h);
diff --git a/liblwgeom/cunit/cu_in_geojson.c b/liblwgeom/cunit/cu_in_geojson.c
index 439cf9bf4..b333aa4c2 100644
--- a/liblwgeom/cunit/cu_in_geojson.c
+++ b/liblwgeom/cunit/cu_in_geojson.c
@@ -38,11 +38,11 @@ static void do_geojson_test(const char * exp, char * in, char * exp_srs)
if (strcmp(h, exp))
{
fprintf(stderr, "\nIn: %s\nExp: %s\nObt: %s\n", in, exp, h);
- CU_ASSERT_STRING_EQUAL(h, exp);
+ ASSERT_STRING_EQUAL(h, exp);
}
else
{
- CU_ASSERT_STRING_EQUAL(h, exp);
+ ASSERT_STRING_EQUAL(h, exp);
}
if ( exp_srs )
@@ -55,7 +55,7 @@ static void do_geojson_test(const char * exp, char * in, char * exp_srs)
else if (strcmp(srs, exp_srs))
{
fprintf(stderr, "\nIn: %s\nExp: %s\nObt: %s\n", in, exp_srs, srs);
- CU_ASSERT_STRING_EQUAL(srs, exp_srs);
+ ASSERT_STRING_EQUAL(srs, exp_srs);
}
}
else if ( srs )
diff --git a/liblwgeom/cunit/cu_in_twkb.c b/liblwgeom/cunit/cu_in_twkb.c
index 6dcc39a96..5e0f0cfd0 100644
--- a/liblwgeom/cunit/cu_in_twkb.c
+++ b/liblwgeom/cunit/cu_in_twkb.c
@@ -98,101 +98,101 @@ static void test_twkb_in_point(void)
{
cu_twkb_in("POINT(0 0 0 0)");
// printf("old: %s\nnew: %s\n",hex_a, hex_b);
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("POINT(1 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("POINT EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_twkb_in_linestring(void)
{
cu_twkb_in("LINESTRING(0 0,1 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("LINESTRING(0 0 1,1 1 2,2 2 3)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("LINESTRING EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_twkb_in_polygon(void)
{
cu_twkb_in("POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("POLYGON EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_twkb_in_multipoint(void)
{
cu_twkb_in("MULTIPOINT Z EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTIPOINT(1 2, EMPTY, 5 6)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
// printf(" 1st: %s\n 2nd: %s\n", hex_a, hex_b);
cu_twkb_in("MULTIPOINT(0 0 0,0 1 0,1 1 0,1 0 0,0 0 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTIPOINT(1 2 3, 1 2 3, 4 5 6, -3 -4 -5, -10 -5 -1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_twkb_in_multilinestring(void)
{
cu_twkb_in("MULTILINESTRING((0 0,0 1),(1 1, 10 10))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTILINESTRING((0 0,0 1),EMPTY,(1 1, 10 10))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTILINESTRING((0 0 200000,0 1 10),(1 100000000 23, 10 10 45))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
// printf(" 1st: %s\n 2nd: %s\n", hex_a, hex_b);
cu_twkb_in("MULTILINESTRING EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_twkb_in_multipolygon(void)
{
cu_twkb_in("MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
//printf("old: %s\nnew: %s\n",hex_a, hex_b);
cu_twkb_in("MULTIPOLYGON EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
//printf("old: %s\nnew: %s\n",hex_a, hex_b);
}
static void test_twkb_in_collection(void)
{
cu_twkb_in("GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))),POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1),LINESTRING(0 0 0, 1 1 1))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("GEOMETRYCOLLECTION EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("GEOMETRYCOLLECTION(POINT(1 2 3), LINESTRING EMPTY, POINT(4 5 6))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("GEOMETRYCOLLECTION(POINT(1 2 3), POINT EMPTY, POINT(4 5 6))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
/*
@@ -205,17 +205,17 @@ static void test_twkb_in_precision(void)
for ( precision = 1; precision <= 6; precision++ )
{
cu_twkb_in("MULTILINESTRING((0 0,0 1),EMPTY,(1 1, 10 10))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_twkb_in("MULTILINESTRING((0 0 200000,0 1 10),(1 100000000 23, 10 10 45))");
// printf("old: %s\nnew: %s\n",hex_a, hex_b);
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
/* Go back to default precision */
diff --git a/liblwgeom/cunit/cu_in_wkb.c b/liblwgeom/cunit/cu_in_wkb.c
index 56cb1f015..e63eba7d7 100644
--- a/liblwgeom/cunit/cu_in_wkb.c
+++ b/liblwgeom/cunit/cu_in_wkb.c
@@ -105,59 +105,59 @@ static void test_wkb_in_point(void)
{
cu_wkb_in("POINT(0 0 0 0)");
// printf("old: %s\nnew: %s\n",hex_a, hex_b);
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=4;POINTM(1 1 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("POINT EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=4326;POINT EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("POINT Z EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("POINT M EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("POINT ZM EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_linestring(void)
{
cu_wkb_in("LINESTRING(0 0,1 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("LINESTRING(0 0 1,1 1 2,2 2 3)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_polygon(void)
{
cu_wkb_in("SRID=4;POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=14;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=4;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("POLYGON EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_multipoint(void)
{
cu_wkb_in("SRID=4;MULTIPOINT(0 0 0,0 1 0,1 1 0,1 0 0,0 0 1)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("MULTIPOINT(0 0 0, 0.26794919243112270647255365849413 1 3)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_multilinestring(void) {}
@@ -165,45 +165,45 @@ static void test_wkb_in_multilinestring(void) {}
static void test_wkb_in_multipolygon(void)
{
cu_wkb_in("SRID=14;MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
//printf("old: %s\nnew: %s\n",hex_a, hex_b);
}
static void test_wkb_in_collection(void)
{
cu_wkb_in("SRID=14;GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("GEOMETRYCOLLECTION EMPTY");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=14;GEOMETRYCOLLECTION(MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))),POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1),LINESTRING(0 0 0, 1 1 1))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_circularstring(void)
{
cu_wkb_in("CIRCULARSTRING(0 -2,-2 0,0 2,2 0,0 -2)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
cu_wkb_in("SRID=43;CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_compoundcurve(void)
{
cu_wkb_in("COMPOUNDCURVE(CIRCULARSTRING(0 0 0, 0.26794919243112270647255365849413 1 3, 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1),(0.5857864376269049511983112757903 1.4142135623730950488016887242097 1,2 0 0,0 0 0))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_curvpolygon(void)
{
cu_wkb_in("CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))");
- CU_ASSERT_STRING_EQUAL(hex_a, hex_b);
+ ASSERT_STRING_EQUAL(hex_a, hex_b);
}
static void test_wkb_in_multicurve(void) {}
diff --git a/liblwgeom/cunit/cu_in_wkt.c b/liblwgeom/cunit/cu_in_wkt.c
index dc25093e1..646cd9266 100644
--- a/liblwgeom/cunit/cu_in_wkt.c
+++ b/liblwgeom/cunit/cu_in_wkt.c
@@ -79,7 +79,7 @@ static void test_wkt_in_point(void)
{
s = "POINT(1 2) foobar";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", r);
+ ASSERT_STRING_EQUAL("parse error - invalid geometry", r);
lwfree(r);
s = "POINT(1e700 0)";
@@ -89,23 +89,23 @@ static void test_wkt_in_point(void)
s = "POINT(0 0)";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "POINT EMPTY";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "POINT M EMPTY";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "point(nan 10)";
r = cu_wkt_in(s, WKT_ISO);
cu_strtolower(r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
// printf("\nIN: %s\nOUT: %s\n",s,r);
@@ -115,42 +115,42 @@ static void test_wkt_in_linestring(void)
{
s = "LINESTRING EMPTY";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING(0 0,1 1)";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING(0 0 0,1 1 1)";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING M (0 0 0,1 1 1)";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING ZM (0 0 0 1,1 1 1 1,2 2 2 2,0.141231 4 5 4)";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRINGM(0 0 0,1 1 1)";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING ZM EMPTY";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "LINESTRING Z (0 0 0 1, 0 1 0 1)";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
+ ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
@@ -160,17 +160,17 @@ static void test_wkt_in_polygon(void)
{
s = "POLYGON((0 0,0 1,1 1,0 0))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "POLYGON Z ((0 0,0 10,10 10,10 0,0 0),(1 1 1,1 2 1,2 2 1,2 1 1,1 1 1))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
+ ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
lwfree(r);
s = "POLYGON Z ((0 0,0 10,10 10,10 0,0 0),(1 1,1 2,2 2,2 1,1 1))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
+ ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -183,19 +183,19 @@ static void test_wkt_in_multipoint(void)
*/
// s = "MULTIPOINT(-1 -2 -3,5.4 6.6 7.77,-5.4 -6.6 -7.77,1000000 1e-06 -1000000,-1.3e-06 -1.4e-05 0)";
// r = cu_wkt_in(s, WKT_EXTENDED);
- // CU_ASSERT_STRING_EQUAL(r,s);
+ // ASSERT_STRING_EQUAL(r,s);
// printf("\nIN: %s\nOUT: %s\n",s,r);
// lwfree(r);
s = "MULTIPOINT(0 0)";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "MULTIPOINT(0 0,1 1)";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -204,7 +204,7 @@ static void test_wkt_in_multilinestring(void)
{
s = "MULTILINESTRING((0 0,1 1),(1 1,2 2),(3 3,3 3,3 3,2 2,2 1))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
@@ -214,19 +214,19 @@ static void test_wkt_in_multipolygon(void)
{
s = "MULTIPOLYGON(((0 0,0 1,1 1,0 0)))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "MULTIPOLYGON(((0 0,0 10,10 10,0 0),(1 1,1 2,2 2,1 1)),((-10 -10,-10 -5,-5 -5,-10 -10)))";
r = cu_wkt_in(s, WKT_SFSQL);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "SRID=4;MULTIPOLYGON(((0 0,0 1,1 1,0 0)))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
@@ -237,32 +237,32 @@ static void test_wkt_in_collection(void)
s = "SRID=5;GEOMETRYCOLLECTION(POINT(0 0),LINESTRING(1 0,0 0),CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))";
r = cu_wkt_in(s, WKT_EXTENDED);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "GEOMETRYCOLLECTION(POINT(0 0),POINT EMPTY,LINESTRING(1 0,0 0),POLYGON EMPTY,CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2))";
r = cu_wkt_in(s, WKT_SFSQL);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "GEOMETRYCOLLECTION Z (POINT Z (0 0 0))";
r = cu_wkt_in(s, WKT_ISO);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
s = "GEOMETRYCOLLECTION M (MULTILINESTRING M ((0 0 5,2 0 5),(1 1 5,2 2 5)))";
r = cu_wkt_in(s, WKT_ISO);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
/* See http://trac.osgeo.org/postgis/ticket/1455#comment:3 */
s = "GEOMETRYCOLLECTION Z (MULTILINESTRING Z ((0 0 5,2 0 5),(1 1 5,2 2 5)))";
r = cu_wkt_in(s, WKT_ISO);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
}
@@ -271,7 +271,7 @@ static void test_wkt_in_circularstring(void)
s = "CIRCULARSTRING(0 0,0 1,1 1,0 1,2 2)";
r = cu_wkt_in(s, WKT_SFSQL);
//printf("\nIN: %s\nOUT: %s\n",s,r);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
lwfree(r);
}
@@ -279,13 +279,13 @@ static void test_wkt_in_compoundcurve(void)
{
s = "SRID=4326;COMPOUNDCURVEM(CIRCULARSTRINGM(0 0 2,1 1 2,1 0 2),(1 0 2,0 1 2))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "COMPOUNDCURVE Z (CIRCULARSTRING Z (0 0 0,0 1 0,1 1 0,0 0 0,2 2 0),(2 2 0,0 0 1,1 1 1,2 2 1))";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -294,7 +294,7 @@ static void test_wkt_in_curvpolygon(void)
{
s = "CURVEPOLYGON(COMPOUNDCURVE(CIRCULARSTRING(0 0,0 1,1 1,2 2,0 0),(0 0,1 1,2 2)),CIRCULARSTRING(0 0,0 1,1 1,0 0,2 2),(0 0,1 1,2 1))";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -303,7 +303,7 @@ static void test_wkt_in_multicurve(void)
{
s = "SRID=4326;MULTICURVE(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -312,7 +312,7 @@ static void test_wkt_in_multisurface(void)
{
s = "SRID=4326;MULTICURVE(COMPOUNDCURVE(CIRCULARSTRING(0 0,1 1,1 0),(1 0,0 1)))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -321,7 +321,7 @@ static void test_wkt_in_tin(void)
{
s = "TIN(((0 1 2,3 4 5,6 7 8,0 1 2)),((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2)))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,"triangle must have exactly 4 points");
+ ASSERT_STRING_EQUAL(r,"triangle must have exactly 4 points");
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
}
@@ -330,19 +330,19 @@ static void test_wkt_in_polyhedralsurface(void)
{
s = "POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))";
r = cu_wkt_in(s, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "POLYHEDRALSURFACE Z (((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,s);
+ ASSERT_STRING_EQUAL(r,s);
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
s = "POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7,0 1 2)))";
r = cu_wkt_in(s, WKT_ISO);
- CU_ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
+ ASSERT_STRING_EQUAL(r,"can not mix dimensionality in a geometry");
//printf("\nIN: %s\nOUT: %s\n",s,r);
lwfree(r);
@@ -411,13 +411,13 @@ static void test_wkt_leak(void)
/* OSS-FUZZ: https://trac.osgeo.org/postgis/ticket/4537 */
char *wkt = "TINEMPTY,";
char *err = cu_wkt_in(wkt, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
+ ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
lwfree(err);
/* OSS-FUZZ: https://trac.osgeo.org/postgis/ticket/4545 */
wkt = "GEOMeTRYCOLLECTION(POLYHEDRALSURFACEEMPTY ";
err = cu_wkt_in(wkt, WKT_EXTENDED);
- CU_ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
+ ASSERT_STRING_EQUAL(err, "parse error - invalid geometry");
lwfree(err);
}
diff --git a/liblwgeom/cunit/cu_misc.c b/liblwgeom/cunit/cu_misc.c
index 3e49d5f8f..37b83de23 100644
--- a/liblwgeom/cunit/cu_misc.c
+++ b/liblwgeom/cunit/cu_misc.c
@@ -29,7 +29,7 @@ static void test_misc_simplify(void)
geom = lwgeom_from_wkt("LINESTRING(0 0,0 10,0 51,50 20,30 20,7 32)", LW_PARSER_CHECK_NONE);
geom2d = lwgeom_simplify(geom, 2, LW_FALSE);
wkt_out = lwgeom_to_ewkt(geom2d);
- CU_ASSERT_STRING_EQUAL("LINESTRING(0 0,0 51,50 20,30 20,7 32)",wkt_out);
+ ASSERT_STRING_EQUAL("LINESTRING(0 0,0 51,50 20,30 20,7 32)",wkt_out);
lwgeom_free(geom);
lwgeom_free(geom2d);
lwfree(wkt_out);
@@ -37,7 +37,7 @@ static void test_misc_simplify(void)
geom = lwgeom_from_wkt("MULTILINESTRING((0 0,0 10,0 51,50 20,30 20,7 32))", LW_PARSER_CHECK_NONE);
geom2d = lwgeom_simplify(geom, 2, LW_FALSE);
wkt_out = lwgeom_to_ewkt(geom2d);
- CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,0 51,50 20,30 20,7 32))",wkt_out);
+ ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,0 51,50 20,30 20,7 32))",wkt_out);
lwgeom_free(geom);
lwgeom_free(geom2d);
lwfree(wkt_out);
@@ -45,7 +45,7 @@ static void test_misc_simplify(void)
geom = lwgeom_from_wkt("POLYGON((0 0,1 1,1 3,0 4,-2 3,-1 1,0 0))", LW_PARSER_CHECK_NONE);
geom2d = lwgeom_simplify(geom, 1, LW_FALSE);
wkt_out = lwgeom_to_ewkt(geom2d);
- CU_ASSERT_STRING_EQUAL("POLYGON((0 0,0 4,-2 3,0 0))", wkt_out);
+ ASSERT_STRING_EQUAL("POLYGON((0 0,0 4,-2 3,0 0))", wkt_out);
lwgeom_free(geom);
lwgeom_free(geom2d);
lwfree(wkt_out);
@@ -129,7 +129,7 @@ static void test_misc_wkb(void)
static char *wkb = "010A0000000200000001080000000700000000000000000000C00000000000000000000000000000F0BF000000000000F0BF00000000000000000000000000000000000000000000F03F000000000000F0BF000000000000004000000000000000000000000000000000000000000000004000000000000000C00000000000000000010200000005000000000000000000F0BF00000000000000000000000000000000000000000000E03F000000000000F03F00000000000000000000000000000000000000000000F03F000000000000F0BF0000000000000000";
LWGEOM *geom = lwgeom_from_hexwkb(wkb, LW_PARSER_CHECK_ALL);
char *str = lwgeom_to_wkt(geom, WKB_ISO, 8, 0);
- CU_ASSERT_STRING_EQUAL(str, "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))");
+ ASSERT_STRING_EQUAL(str, "CURVEPOLYGON(CIRCULARSTRING(-2 0,-1 -1,0 0,1 -1,2 0,0 2,-2 0),(-1 0,0 0.5,1 0,0 1,-1 0))");
lwfree(str);
lwgeom_free(geom);
@@ -149,7 +149,7 @@ static void test_grid(void)
geomgrid = lwgeom_grid(geom, &grid);
str = lwgeom_to_ewkt(geomgrid);
- CU_ASSERT_STRING_EQUAL(str, "MULTIPOLYGON EMPTY");
+ ASSERT_STRING_EQUAL(str, "MULTIPOLYGON EMPTY");
lwfree(str);
lwgeom_free(geom);
lwgeom_free(geomgrid);
@@ -284,9 +284,9 @@ static void test_optionlist(void)
value = option_list_search(olist, "key1");
// printf("value: %s\n", value);
- CU_ASSERT_STRING_EQUAL("value1", value);
+ ASSERT_STRING_EQUAL("value1", value);
value = option_list_search(olist, "key2");
- CU_ASSERT_STRING_EQUAL("value2", value);
+ ASSERT_STRING_EQUAL("value2", value);
value = option_list_search(olist, "key3");
CU_ASSERT_EQUAL(NULL, value);
@@ -310,8 +310,8 @@ static void test_optionlist(void)
option_list_gdal_parse(input, olist);
sz = option_list_length(olist);
CU_ASSERT_EQUAL(2, sz);
- CU_ASSERT_STRING_EQUAL("key1=value1", olist[0]);
- CU_ASSERT_STRING_EQUAL("key2='value2 value3'", olist[1]);
+ ASSERT_STRING_EQUAL("key1=value1", olist[0]);
+ ASSERT_STRING_EQUAL("key2='value2 value3'", olist[1]);
}
@@ -325,11 +325,11 @@ static void test_stringlist(void)
stringlist_add_string_nosort(&s, "second string");
stringlist_add_string_nosort(&s, "third string");
CU_ASSERT_EQUAL(stringlist_length(&s), 3);
- CU_ASSERT_STRING_EQUAL(stringlist_get(&s, 0), "first string");
+ ASSERT_STRING_EQUAL(stringlist_get(&s, 0), "first string");
stringlist_add_string_nosort(&s, "an initial string");
stringlist_sort(&s);
- CU_ASSERT_STRING_EQUAL(stringlist_get(&s, 0), "an initial string");
- CU_ASSERT_STRING_EQUAL(stringlist_find(&s, "third string"), "third string");
+ ASSERT_STRING_EQUAL(stringlist_get(&s, 0), "an initial string");
+ ASSERT_STRING_EQUAL(stringlist_find(&s, "third string"), "third string");
CU_ASSERT_EQUAL(stringlist_find(&s, "nothing_matches"), NULL);
stringlist_add_string_nosort(&s, "fourth string");
stringlist_add_string_nosort(&s, "fifth string");
@@ -337,7 +337,7 @@ static void test_stringlist(void)
stringlist_add_string_nosort(&s, "seventh string");
stringlist_add_string_nosort(&s, "eighth string");
stringlist_sort(&s);
- CU_ASSERT_STRING_EQUAL(stringlist_find(&s, "fifth string"), "fifth string");
+ ASSERT_STRING_EQUAL(stringlist_find(&s, "fifth string"), "fifth string");
stringlist_release(&s);
}
diff --git a/liblwgeom/cunit/cu_node.c b/liblwgeom/cunit/cu_node.c
index 9308341ba..19dc21064 100644
--- a/liblwgeom/cunit/cu_node.c
+++ b/liblwgeom/cunit/cu_node.c
@@ -39,7 +39,7 @@ static void test_lwgeom_node(void)
out = lwgeom_node(in);
CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
- CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 2.5,-10 5),(0 0,0 2.5),(0 2.5,0 5),(10 0,0 2.5))", tmp)
+ ASSERT_STRING_EQUAL(tmp, "MULTILINESTRING((0 2.5,-10 5),(0 0,0 2.5),(0 2.5,0 5),(10 0,0 2.5))");
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(10 0, 12 0, 22 0))";
@@ -48,7 +48,7 @@ static void test_lwgeom_node(void)
CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL("MULTILINESTRING((0 0,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0))", tmp);
+ ASSERT_STRING_EQUAL(tmp, "MULTILINESTRING((0 0,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0))");
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
wkt = "MULTILINESTRING((0 0,5 5,10 0, 11 0, 20 0),(22 0, 12 0, 10 0),(0 5, 5 0))";
@@ -57,9 +57,9 @@ static void test_lwgeom_node(void)
CU_ASSERT_FATAL(out != NULL);
tmp = lwgeom_to_ewkt(out);
/* printf("%s\n", tmp); */
- CU_ASSERT_STRING_EQUAL(
-"MULTILINESTRING((0 0,2.5 2.5),(0 5,2.5 2.5),(2.5 2.5,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0),(2.5 2.5,5 0))",
- tmp);
+ ASSERT_STRING_EQUAL(tmp,
+ "MULTILINESTRING((0 0,2.5 2.5),(0 5,2.5 2.5),(2.5 2.5,5 5,10 0),(10 0,11 0,12 0,20 0),(20 0,22 0),(2.5 2.5,5 0))"
+ );
lwfree(tmp); lwgeom_free(out); lwgeom_free(in);
/* See https://trac.osgeo.org/postgis/ticket/5685 */
diff --git a/liblwgeom/cunit/cu_out_twkb.c b/liblwgeom/cunit/cu_out_twkb.c
index 5c2602e53..31858e2b4 100644
--- a/liblwgeom/cunit/cu_out_twkb.c
+++ b/liblwgeom/cunit/cu_out_twkb.c
@@ -89,85 +89,85 @@ static void test_twkb_out_point(void)
{
cu_twkb("POINT EMPTY", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"0110");
+ ASSERT_STRING_EQUAL(s,"0110");
cu_twkb("POINT(0 0)", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"01000000");
+ ASSERT_STRING_EQUAL(s,"01000000");
cu_twkb("POINT(0 0 0 0)", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"01080300000000");
+ ASSERT_STRING_EQUAL(s,"01080300000000");
/* Point with bounding box */
cu_twkb("POINT(0 0)", 0, 0, 0, TWKB_BBOX);
- CU_ASSERT_STRING_EQUAL(s,"0101000000000000");
+ ASSERT_STRING_EQUAL(s,"0101000000000000");
// printf("TWKB: %s\n",s);
/* Adding a size paramters to X/Y */
cu_twkb("POINT(0 0)", 0, 0, 0, TWKB_SIZE);
- CU_ASSERT_STRING_EQUAL(s,"0102020000");
+ ASSERT_STRING_EQUAL(s,"0102020000");
/* Adding a size paramters to X/Y/M */
cu_twkb("POINTM(0 0 0)", 0, 0, 0, TWKB_SIZE);
- CU_ASSERT_STRING_EQUAL(s,"010A0203000000");
+ ASSERT_STRING_EQUAL(s,"010A0203000000");
/* Adding a size paramters to X/Y/Z/M */
cu_twkb("POINT(0 0 0 0)", 0, 0, 0, TWKB_SIZE);
- CU_ASSERT_STRING_EQUAL(s,"010A030400000000");
+ ASSERT_STRING_EQUAL(s,"010A030400000000");
/* Since the third dimension is Z it shall get a precision of 1 decimal (third argument) */
cu_twkb("POINTZ(1 1 1)", 0,1,2, 0);
- CU_ASSERT_STRING_EQUAL(s,"010845020214");
+ ASSERT_STRING_EQUAL(s,"010845020214");
/* Since the third dimension is M it shall get a precision of 2 decimals (fourth argument) */
cu_twkb("POINTM(1 1 1)", 0,1,2, 0);
// printf("\n%s\n", s);
- CU_ASSERT_STRING_EQUAL(s,"0108460202C801");
+ ASSERT_STRING_EQUAL(s,"0108460202C801");
}
static void test_twkb_out_linestring(void)
{
cu_twkb("LINESTRING(0 0,1 1)", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"02000200000202");
+ ASSERT_STRING_EQUAL(s,"02000200000202");
// printf("TWKB: %s\n",s);
cu_twkb("LINESTRING(0 0 1,1 1 2,2 2 3)", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"02080103000002020202020202");
+ ASSERT_STRING_EQUAL(s,"02080103000002020202020202");
// printf("TWKB: %s\n",s);
/* Line with bounding box */
cu_twkb("LINESTRING(0 0,1 1,2 2)", 0, 0, 0, TWKB_BBOX);
- CU_ASSERT_STRING_EQUAL(s,"02010004000403000002020202");
+ ASSERT_STRING_EQUAL(s,"02010004000403000002020202");
// printf("TWKB: %s\n",s);
cu_twkb("LINESTRING EMPTY", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"0210");
+ ASSERT_STRING_EQUAL(s,"0210");
// printf("TWKB: %s\n",s);
}
static void test_twkb_out_polygon(void)
{
cu_twkb("SRID=4;POLYGON((0 0 0, 0 1 0,1 1 0,1 0 0, 0 0 0))", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"0308010105000000000200020000000100010000");
+ ASSERT_STRING_EQUAL(s,"0308010105000000000200020000000100010000");
// printf("TWKB: %s\n",s);
cu_twkb("SRID=14;POLYGON((0 0 0 1, 0 1 0 2,1 1 0 3,1 0 0 4, 0 0 0 5))", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"03080301050000000200020002020000020001000201000002");
+ ASSERT_STRING_EQUAL(s,"03080301050000000200020002020000020001000201000002");
// printf("TWKB: %s\n",s);
cu_twkb("POLYGON EMPTY", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"0310");
+ ASSERT_STRING_EQUAL(s,"0310");
// printf("TWKB: %s\n",s);
}
static void test_twkb_out_multipoint(void)
{
cu_twkb("MULTIPOINT(0 0 0, 0 1 0,1 1 0,1 0 0, 0 0 0)", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"04080105000000000200020000000100010000");
+ ASSERT_STRING_EQUAL(s,"04080105000000000200020000000100010000");
cu_twkb("MULTIPOINT(0 0 0, 0.26794919243112270647255365849413 1 3)",7 ,7 , 0, 0);
//printf("WKB: %s",s);
- CU_ASSERT_STRING_EQUAL(s,"E4081D02000000888BC70280DAC409808ECE1C");
+ ASSERT_STRING_EQUAL(s,"E4081D02000000888BC70280DAC409808ECE1C");
// printf("TWKB: %s\n",s);
}
@@ -176,21 +176,21 @@ static void test_twkb_out_multilinestring(void) {}
static void test_twkb_out_multipolygon(void)
{
cu_twkb("MULTIPOLYGON(((0 0 0, 0 1 0,1 1 0,1 0 0, 0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0, 0 1 0,1 1 0,1 0 0, 0 0 0)))", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"060801020105000000000200020000000100010000020501010000060006000000050005000005020200000200020000000100010000");
+ ASSERT_STRING_EQUAL(s,"060801020105000000000200020000000100010000020501010000060006000000050005000005020200000200020000000100010000");
}
static void test_twkb_out_collection(void)
{
cu_twkb("GEOMETRYCOLLECTION(LINESTRING(1 1, 2 2), LINESTRING(3 3, 4 4), LINESTRING(5 5, 6 6))", 0, 0, 0, 0);
// printf("TWKB: %s\n",s);
- CU_ASSERT_STRING_EQUAL(s,"07000302000202020202020002060602020200020A0A0202");
+ ASSERT_STRING_EQUAL(s,"07000302000202020202020002060602020200020A0A0202");
cu_twkb("GEOMETRYCOLLECTION(POLYGON((0 0 0, 0 1 0,1 1 0,1 0 0, 0 0 0)),POINT(1 1 1))", 0, 0, 0, 0);
// printf("TWKB: %s\n",s);
- CU_ASSERT_STRING_EQUAL(s,"070801020308010105000000000200020000000100010000010801020202");
+ ASSERT_STRING_EQUAL(s,"070801020308010105000000000200020000000100010000010801020202");
cu_twkb("GEOMETRYCOLLECTION EMPTY", 0, 0, 0, 0);
- CU_ASSERT_STRING_EQUAL(s,"0710");
+ ASSERT_STRING_EQUAL(s,"0710");
}
static void test_twkb_out_idlist(void)
@@ -202,8 +202,8 @@ static void test_twkb_out_idlist(void)
cu_twkb_idlist("MULTIPOINT(1 1, 0 0)",idlist, 0, 0, 0, 0);
// printf("TWKB: %s\n",s);
// printf("WKT: %s\n",w);
- CU_ASSERT_STRING_EQUAL(s,"040402040802020101");
- CU_ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
+ ASSERT_STRING_EQUAL(s,"040402040802020101");
+ ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
/*
04 06 multipoint, size/idlist
@@ -218,8 +218,8 @@ static void test_twkb_out_idlist(void)
cu_twkb_idlist("MULTIPOINT(1 1, 0 0)",idlist, 0, 0, 0, TWKB_SIZE);
// printf("TWKB: %s\n",s);
// printf("WKT: %s\n",w);
- CU_ASSERT_STRING_EQUAL(s,"04060702040802020101");
- CU_ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
+ ASSERT_STRING_EQUAL(s,"04060702040802020101");
+ ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
/*
04 07 multipoint, bbox/size/idlist
@@ -235,8 +235,8 @@ static void test_twkb_out_idlist(void)
cu_twkb_idlist("MULTIPOINT(1 1, 0 0)",idlist, 0, 0, 0, TWKB_SIZE | TWKB_BBOX);
// printf("TWKB: %s\n",s);
// printf("WKT: %s\n",w);
- CU_ASSERT_STRING_EQUAL(s,"04070B0002000202040802020101");
- CU_ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
+ ASSERT_STRING_EQUAL(s,"04070B0002000202040802020101");
+ ASSERT_STRING_EQUAL(w,"MULTIPOINT(1 1,0 0)");
/*
0704 geometrycollection, idlist
@@ -249,8 +249,8 @@ static void test_twkb_out_idlist(void)
idlist[1] = 4;
cu_twkb_idlist("GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))",idlist, 0, 0, 0, 0);
// printf("TWKB: %s\n",s);
- CU_ASSERT_STRING_EQUAL(s,"07040204080100020201000000");
- CU_ASSERT_STRING_EQUAL(w,"GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))");
+ ASSERT_STRING_EQUAL(s,"07040204080100020201000000");
+ ASSERT_STRING_EQUAL(w,"GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))");
/*
0706 geometrycollection, size/idlist
@@ -264,8 +264,8 @@ static void test_twkb_out_idlist(void)
idlist[1] = 4;
cu_twkb_idlist("GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))",idlist, 0, 0, 0, TWKB_SIZE);
// printf("TWKB: %s\n",s);
- CU_ASSERT_STRING_EQUAL(s,"07060D02040801020202020102020000");
- CU_ASSERT_STRING_EQUAL(w,"GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))");
+ ASSERT_STRING_EQUAL(s,"07060D02040801020202020102020000");
+ ASSERT_STRING_EQUAL(w,"GEOMETRYCOLLECTION(POINT(1 1),POINT(0 0))");
}
diff --git a/liblwgeom/cunit/cu_out_wkb.c b/liblwgeom/cunit/cu_out_wkb.c
index 236c53aff..1232fde61 100644
--- a/liblwgeom/cunit/cu_out_wkb.c
+++ b/liblwgeom/cunit/cu_out_wkb.c
@@ -78,10 +78,10 @@ static void cu_wkb_empty_point_check(char *hex)
static void test_wkb_out_point(void)
{
cu_wkb("POINT(0 0 0 0)");
- CU_ASSERT_STRING_EQUAL(s,"00C00000010000000000000000000000000000000000000000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00C00000010000000000000000000000000000000000000000000000000000000000000000");
cu_wkb("SRID=4;POINTM(1 1 1)");
- CU_ASSERT_STRING_EQUAL(s,"0060000001000000043FF00000000000003FF00000000000003FF0000000000000");
+ ASSERT_STRING_EQUAL(s,"0060000001000000043FF00000000000003FF00000000000003FF0000000000000");
cu_wkb("POINT EMPTY");
cu_wkb_empty_point_check(s);
@@ -102,47 +102,47 @@ static void test_wkb_out_point(void)
static void test_wkb_out_linestring(void)
{
cu_wkb("LINESTRING(0 0,1 1)");
- CU_ASSERT_STRING_EQUAL(s,"000000000200000002000000000000000000000000000000003FF00000000000003FF0000000000000");
+ ASSERT_STRING_EQUAL(s,"000000000200000002000000000000000000000000000000003FF00000000000003FF0000000000000");
cu_wkb("LINESTRING(0 0 1,1 1 2,2 2 3)");
- CU_ASSERT_STRING_EQUAL(s,"008000000200000003000000000000000000000000000000003FF00000000000003FF00000000000003FF00000000000004000000000000000400000000000000040000000000000004008000000000000");
+ ASSERT_STRING_EQUAL(s,"008000000200000003000000000000000000000000000000003FF00000000000003FF00000000000003FF00000000000004000000000000000400000000000000040000000000000004008000000000000");
cu_wkb("LINESTRING EMPTY");
- CU_ASSERT_STRING_EQUAL(s,"000000000200000000");
+ ASSERT_STRING_EQUAL(s,"000000000200000000");
}
static void test_wkb_out_polygon(void)
{
cu_wkb("SRID=4;POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0))");
- CU_ASSERT_STRING_EQUAL(s,"00A000000300000004000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00A000000300000004000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
cu_wkb("SRID=14;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(s,"00E00000030000000E00000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
+ ASSERT_STRING_EQUAL(s,"00E00000030000000E00000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
cu_wkb("SRID=4;POLYGON((0 0 0 1,0 1 0 2,1 1 0 3,1 0 0 4,0 0 0 5))");
- CU_ASSERT_STRING_EQUAL(s,"00E00000030000000400000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
+ ASSERT_STRING_EQUAL(s,"00E00000030000000400000001000000050000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF0000000000000000000000000000040000000000000003FF00000000000003FF0000000000000000000000000000040080000000000003FF00000000000000000000000000000000000000000000040100000000000000000000000000000000000000000000000000000000000004014000000000000");
cu_wkb("POLYGON EMPTY");
- CU_ASSERT_STRING_EQUAL(s,"000000000300000000");
+ ASSERT_STRING_EQUAL(s,"000000000300000000");
/*
* POLYGON with EMPTY shell
* See http://http://trac.osgeo.org/postgis/ticket/937
*/
cu_wkb_from_hexwkb("01030000000100000000000000");
- CU_ASSERT_STRING_EQUAL(s,"000000000300000000");
+ ASSERT_STRING_EQUAL(s,"000000000300000000");
}
static void test_wkb_out_multipoint(void)
{
cu_wkb("SRID=4;MULTIPOINT(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)");
- CU_ASSERT_STRING_EQUAL(s,"00A000000400000004000000050080000001000000000000000000000000000000000000000000000000008000000100000000000000003FF0000000000000000000000000000000800000013FF00000000000003FF0000000000000000000000000000000800000013FF0000000000000000000000000000000000000000000000080000001000000000000000000000000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00A000000400000004000000050080000001000000000000000000000000000000000000000000000000008000000100000000000000003FF0000000000000000000000000000000800000013FF00000000000003FF0000000000000000000000000000000800000013FF0000000000000000000000000000000000000000000000080000001000000000000000000000000000000000000000000000000");
cu_wkb("MULTIPOINT(0 0 0, 0.26794919243112270647255365849413 1 3)");
- CU_ASSERT_STRING_EQUAL(s,"008000000400000002008000000100000000000000000000000000000000000000000000000000800000013FD126145E9ECD563FF00000000000004008000000000000");
+ ASSERT_STRING_EQUAL(s,"008000000400000002008000000100000000000000000000000000000000000000000000000000800000013FD126145E9ECD563FF00000000000004008000000000000");
cu_wkb("MULTIPOINT EMPTY");
- CU_ASSERT_STRING_EQUAL(s,"000000000400000000");
+ ASSERT_STRING_EQUAL(s,"000000000400000000");
}
static void test_wkb_out_multilinestring(void) {}
@@ -150,50 +150,50 @@ static void test_wkb_out_multilinestring(void) {}
static void test_wkb_out_multipolygon(void)
{
cu_wkb("SRID=14;MULTIPOLYGON(((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),((-1 -1 0,-1 2 0,2 2 0,2 -1 0,-1 -1 0),(0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)))");
- CU_ASSERT_STRING_EQUAL(s,"00A00000060000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000030000000200000005BFF0000000000000BFF00000000000000000000000000000BFF0000000000000400000000000000000000000000000004000000000000000400000000000000000000000000000004000000000000000BFF00000000000000000000000000000BFF0000000000000BFF000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00A00000060000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000030000000200000005BFF0000000000000BFF00000000000000000000000000000BFF0000000000000400000000000000000000000000000004000000000000000400000000000000000000000000000004000000000000000BFF00000000000000000000000000000BFF0000000000000BFF000000000000000000000000000000000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
cu_wkb("MULTIPOLYGON EMPTY");
- CU_ASSERT_STRING_EQUAL(s,"000000000600000000");
+ ASSERT_STRING_EQUAL(s,"000000000600000000");
}
static void test_wkb_out_collection(void)
{
cu_wkb("SRID=14;GEOMETRYCOLLECTION(POLYGON((0 0 0,0 1 0,1 1 0,1 0 0,0 0 0)),POINT(1 1 1))");
- CU_ASSERT_STRING_EQUAL(s,"00A00000070000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000013FF00000000000003FF00000000000003FF0000000000000");
+ ASSERT_STRING_EQUAL(s,"00A00000070000000E000000020080000003000000010000000500000000000000000000000000000000000000000000000000000000000000003FF000000000000000000000000000003FF00000000000003FF000000000000000000000000000003FF00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000800000013FF00000000000003FF00000000000003FF0000000000000");
cu_wkb("GEOMETRYCOLLECTION EMPTY");
- CU_ASSERT_STRING_EQUAL(s,"000000000700000000");
+ ASSERT_STRING_EQUAL(s,"000000000700000000");
cu_wkb("GEOMETRYCOLLECTION(LINESTRING EMPTY)");
- CU_ASSERT_STRING_EQUAL(s,"000000000700000001000000000200000000");
+ ASSERT_STRING_EQUAL(s,"000000000700000001000000000200000000");
cu_wkb("GEOMETRYCOLLECTION(LINESTRING EMPTY, MULTILINESTRING(EMPTY,EMPTY))");
// printf("%s\n",s );
- CU_ASSERT_STRING_EQUAL(s,"000000000700000002000000000200000000000000000500000002000000000200000000000000000200000000");
+ ASSERT_STRING_EQUAL(s,"000000000700000002000000000200000000000000000500000002000000000200000000000000000200000000");
}
static void test_wkb_out_circularstring(void)
{
cu_wkb("CIRCULARSTRING(0 -2,-2 0,0 2,2 0,0 -2)");
- CU_ASSERT_STRING_EQUAL(s,"0000000008000000050000000000000000C000000000000000C000000000000000000000000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000C000000000000000");
+ ASSERT_STRING_EQUAL(s,"0000000008000000050000000000000000C000000000000000C000000000000000000000000000000000000000000000004000000000000000400000000000000000000000000000000000000000000000C000000000000000");
cu_wkb("CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)");
- CU_ASSERT_STRING_EQUAL(s,"00C000000800000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00C000000800000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000");
cu_wkb("SRID=43;CIRCULARSTRING(-5 0 0 4, 0 5 1 3, 5 0 2 2, 10 -5 3 1, 15 0 4 0)");
- CU_ASSERT_STRING_EQUAL(s,"00E00000080000002B00000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"00E00000080000002B00000005C014000000000000000000000000000000000000000000004010000000000000000000000000000040140000000000003FF0000000000000400800000000000040140000000000000000000000000000400000000000000040000000000000004024000000000000C01400000000000040080000000000003FF0000000000000402E000000000000000000000000000040100000000000000000000000000000");
}
static void test_wkb_out_compoundcurve(void)
{
cu_wkb("COMPOUNDCURVE(CIRCULARSTRING(0 0 0, 0.26794919243112270647255365849413 1 3, 0.5857864376269049511983112757903 1.4142135623730950488016887242097 1),(0.5857864376269049511983112757903 1.4142135623730950488016887242097 1,2 0 0,0 0 0))");
- CU_ASSERT_STRING_EQUAL(s,"0080000009000000020080000008000000030000000000000000000000000000000000000000000000003FD126145E9ECD563FF000000000000040080000000000003FE2BEC3330188673FF6A09E667F3BCD3FF00000000000000080000002000000033FE2BEC3330188673FF6A09E667F3BCD3FF0000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
+ ASSERT_STRING_EQUAL(s,"0080000009000000020080000008000000030000000000000000000000000000000000000000000000003FD126145E9ECD563FF000000000000040080000000000003FE2BEC3330188673FF6A09E667F3BCD3FF00000000000000080000002000000033FE2BEC3330188673FF6A09E667F3BCD3FF0000000000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000");
}
static void test_wkb_out_curvpolygon(void)
{
cu_wkb("CURVEPOLYGON(CIRCULARSTRING(-2 0 0 0,-1 -1 1 2,0 0 2 4,1 -1 3 6,2 0 4 8,0 2 2 4,-2 0 0 0),(-1 0 1 2,0 0.5 2 4,1 0 3 6,0 1 3 4,-1 0 1 2))");
- CU_ASSERT_STRING_EQUAL(s,"00C000000A0000000200C000000800000007C000000000000000000000000000000000000000000000000000000000000000BFF0000000000000BFF00000000000003FF0000000000000400000000000000000000000000000000000000000000000400000000000000040100000000000003FF0000000000000BFF00000000000004008000000000000401800000000000040000000000000000000000000000000401000000000000040200000000000000000000000000000400000000000000040000000000000004010000000000000C00000000000000000000000000000000000000000000000000000000000000000C000000200000005BFF000000000000000000000000000003FF0000000000000400000000000000000000000000000003FE0000000000000400000000000000040100000000000003FF000000000000000000000000000004008000000000000401800000000000000000000000000003FF000000000000040080000000000004010000000000000BFF000000000000000000000000000003FF00000000000004000000000000000");
+ ASSERT_STRING_EQUAL(s,"00C000000A0000000200C000000800000007C000000000000000000000000000000000000000000000000000000000000000BFF0000000000000BFF00000000000003FF0000000000000400000000000000000000000000000000000000000000000400000000000000040100000000000003FF0000000000000BFF00000000000004008000000000000401800000000000040000000000000000000000000000000401000000000000040200000000000000000000000000000400000000000000040000000000000004010000000000000C00000000000000000000000000000000000000000000000000000000000000000C000000200000005BFF000000000000000000000000000003FF0000000000000400000000000000000000000000000003FE0000000000000400000000000000040100000000000003FF000000000000000000000000000004008000000000000401800000000000000000000000000003FF000000000000040080000000000004010000000000000BFF000000000000000000000000000003FF00000000000004000000000000000");
}
static void test_wkb_out_multicurve(void) {}
@@ -203,7 +203,7 @@ static void test_wkb_out_multisurface(void) {}
static void test_wkb_out_polyhedralsurface(void)
{
// cu_wkb("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))");
-// CU_ASSERT_STRING_EQUAL(s, t);
+// ASSERT_STRING_EQUAL(s, t);
// printf("\nnew: %s\nold: %s\n",s,t);
}
diff --git a/liblwgeom/cunit/cu_out_wkt.c b/liblwgeom/cunit/cu_out_wkt.c
index 5dd4bc574..39c61f32a 100644
--- a/liblwgeom/cunit/cu_out_wkt.c
+++ b/liblwgeom/cunit/cu_out_wkt.c
@@ -59,24 +59,24 @@ static char* cu_wkt(char *wkt, uint8_t variant)
static void test_wkt_out_point(void)
{
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0.1111 0.1111 0.1111 0)",WKT_ISO), "POINT ZM (0.1111 0.1111 0.1111 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_EXTENDED), "POINT(0 0 0 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_SFSQL), "POINT(0 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(0.1111 0.1111 0.1111 0)",WKT_ISO), "POINT ZM (0.1111 0.1111 0.1111 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_EXTENDED), "POINT(0 0 0 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(0 0 0 0)",WKT_SFSQL), "POINT(0 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_ISO), "POINT M (0 0 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_EXTENDED), "POINTM(0 0 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_SFSQL), "POINT(0 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_ISO), "POINT M (0 0 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_EXTENDED), "POINTM(0 0 0)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINTM(0 0 0)",WKT_SFSQL), "POINT(0 0)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_ISO), "POINT(100 100)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_EXTENDED), "POINT(100 100)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_SFSQL), "POINT(100 100)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_ISO), "POINT(100 100)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_EXTENDED), "POINT(100 100)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100 100)",WKT_SFSQL), "POINT(100 100)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_ISO), "POINT ZM (100.1 100 12 12)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_EXTENDED), "POINT(100.1 100 12 12)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_ISO), "POINT ZM (100.1 100 12 12)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_EXTENDED), "POINT(100.1 100 12 12)");
+ ASSERT_STRING_EQUAL(cu_wkt("POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_EXTENDED), "SRID=100;POINT(100.1 100 12 12)");
+ ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_SFSQL), "POINT(100.1 100)");
+ ASSERT_STRING_EQUAL(cu_wkt("SRID=100;POINT(100.1 100 12 12)",WKT_EXTENDED), "SRID=100;POINT(100.1 100 12 12)");
/* Test big numbers */
ASSERT_STRING_EQUAL(cu_wkt("POINT(-123456789012345.12345678 -1234567890123458.12345678)", WKT_ISO),
@@ -92,41 +92,41 @@ static void test_wkt_out_point(void)
static void test_wkt_out_linestring(void)
{
- CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3 4,5 6 7 8)",WKT_ISO), "LINESTRING ZM (1 2 3 4,5 6 7 8)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3,5 6 7)",WKT_ISO), "LINESTRING Z (1 2 3,5 6 7)");
- CU_ASSERT_STRING_EQUAL(cu_wkt("LINESTRINGM(1 2 3,5 6 7)",WKT_ISO), "LINESTRING M (1 2 3,5 6 7)");
+ ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3 4,5 6 7 8)",WKT_ISO), "LINESTRING ZM (1 2 3 4,5 6 7 8)");
+ ASSERT_STRING_EQUAL(cu_wkt("LINESTRING(1 2 3,5 6 7)",WKT_ISO), "LINESTRING Z (1 2 3,5 6 7)");
+ ASSERT_STRING_EQUAL(cu_wkt("LINESTRINGM(1 2 3,5 6 7)",WKT_ISO), "LINESTRING M (1 2 3,5 6 7)");
}
static void test_wkt_out_polygon(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))",WKT_ISO),
"POLYGON Z ((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))",WKT_EXTENDED),
"POLYGON((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))"
);
}
static void test_wkt_out_multipoint(void)
{
- CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3 4,5 6 7 8)",WKT_ISO), "MULTIPOINT ZM ((1 2 3 4),(5 6 7 8))");
- CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT Z ((1 2 3),(5 6 7))");
- CU_ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINTM(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT M ((1 2 3),(5 6 7))");
+ ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3 4,5 6 7 8)",WKT_ISO), "MULTIPOINT ZM ((1 2 3 4),(5 6 7 8))");
+ ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINT(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT Z ((1 2 3),(5 6 7))");
+ ASSERT_STRING_EQUAL(cu_wkt("MULTIPOINTM(1 2 3,5 6 7)",WKT_ISO), "MULTIPOINT M ((1 2 3),(5 6 7))");
}
static void test_wkt_out_multilinestring(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTILINESTRING((1 2 3 4,5 6 7 8))",WKT_ISO),
"MULTILINESTRING ZM ((1 2 3 4,5 6 7 8))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTILINESTRING((1 2 3,5 6 7))",WKT_ISO),
"MULTILINESTRING Z ((1 2 3,5 6 7))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTILINESTRINGM((1 2 3,5 6 7))",WKT_ISO),
"MULTILINESTRING M ((1 2 3,5 6 7))"
);
@@ -134,11 +134,11 @@ static void test_wkt_out_multilinestring(void)
static void test_wkt_out_multipolygon(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)))",WKT_ISO),
"MULTIPOLYGON Z (((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)))",WKT_EXTENDED),
"MULTIPOLYGON(((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)))"
);
@@ -147,17 +147,17 @@ static void test_wkt_out_multipolygon(void)
static void test_wkt_out_collection(void)
{
//printf("%s\n",cu_wkt("GEOMETRYCOLLECTION(MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))),MULTIPOINT(.5 .5 .5,1 1 1),CURVEPOLYGON((.8 .8 .8,.8 .8 .8,.8 .8 .8)))",WKT_ISO));
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("GEOMETRYCOLLECTION(POLYGON((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2)),POINT(.5 .5 .5),CIRCULARSTRING(.8 .8 .8,.8 .8 .8,.8 .8 .8))",WKT_ISO),
"GEOMETRYCOLLECTION Z (POLYGON Z ((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2)),POINT Z (0.5 0.5 0.5),CIRCULARSTRING Z (0.8 0.8 0.8,0.8 0.8 0.8,0.8 0.8 0.8))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("GEOMETRYCOLLECTION(MULTIPOLYGON(((100 100 2, 100 200 2, 200 200 2, 200 100 2, 100 100 2))),MULTIPOINT(.5 .5 .5,1 1 1),CURVEPOLYGON((.8 .8 .8,.8 .8 .8,.8 .8 .8)))",WKT_ISO),
"GEOMETRYCOLLECTION Z (MULTIPOLYGON Z (((100 100 2,100 200 2,200 200 2,200 100 2,100 100 2))),MULTIPOINT Z ((0.5 0.5 0.5),(1 1 1)),CURVEPOLYGON Z ((0.8 0.8 0.8,0.8 0.8 0.8,0.8 0.8 0.8)))"
);
/* See http://trac.osgeo.org/postgis/ticket/724 */
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("GEOMETRYCOLLECTIONM(MULTIPOINTM(0 0 0), POINTM(1 1 1))", WKT_EXTENDED),
"GEOMETRYCOLLECTIONM(MULTIPOINTM(0 0 0),POINTM(1 1 1))"
);
@@ -165,11 +165,11 @@ static void test_wkt_out_collection(void)
static void test_wkt_out_circularstring(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)",WKT_ISO),
"CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0)"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)",WKT_EXTENDED),
"CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0)"
);
@@ -178,7 +178,7 @@ static void test_wkt_out_circularstring(void)
static void test_wkt_out_compoundcurve(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("COMPOUNDCURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,4 3 2 1,1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO),
"COMPOUNDCURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,4 3 2 1,1 2 3 4,4 5 6 7,7 8 9 0))"
);
@@ -186,7 +186,7 @@ static void test_wkt_out_compoundcurve(void)
static void test_wkt_out_curvpolygon(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("CURVEPOLYGON((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,1 2 1 1,1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO),
"CURVEPOLYGON ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,1 2 1 1,1 2 3 4,4 5 6 7,7 8 9 0))"
);
@@ -194,11 +194,11 @@ static void test_wkt_out_curvpolygon(void)
static void test_wkt_out_multicurve(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTICURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO),
"MULTICURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0))"
);
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTICURVE(COMPOUNDCURVE((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(7 8 9 0,8 9 0 0,1 2 3 4,4 5 6 7,7 8 9 0)),(1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING(1 2 3 4,4 5 6 7,7 8 9 0))",WKT_ISO),
"MULTICURVE ZM (COMPOUNDCURVE ZM ((1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (7 8 9 0,8 9 0 0,1 2 3 4,4 5 6 7,7 8 9 0)),(1 2 3 4,4 5 6 7,7 8 9 0),CIRCULARSTRING ZM (1 2 3 4,4 5 6 7,7 8 9 0))"
);
@@ -206,7 +206,7 @@ static void test_wkt_out_multicurve(void)
static void test_wkt_out_multisurface(void)
{
- CU_ASSERT_STRING_EQUAL(
+ ASSERT_STRING_EQUAL(
cu_wkt("MULTISURFACE(((1 2 3 4,4 5 6 7,7 8 9 0)),CURVEPOLYGON((1 2 3 4,4 5 6 7,7 8 9 0)))",WKT_ISO),
"MULTISURFACE ZM (((1 2 3 4,4 5 6 7,7 8 9 0)),CURVEPOLYGON ZM ((1 2 3 4,4 5 6 7,7 8 9 0)))"
);
diff --git a/liblwgeom/cunit/cu_print.c b/liblwgeom/cunit/cu_print.c
index 7274b6109..6b9da1805 100644
--- a/liblwgeom/cunit/cu_print.c
+++ b/liblwgeom/cunit/cu_print.c
@@ -31,7 +31,7 @@ test_lwpoint_to_latlon_assert_format(char *point_wkt, const char *format, const
CU_FAIL();
}
num_old_failures = CU_get_number_of_failures();
- CU_ASSERT_STRING_EQUAL(actual, expected);
+ ASSERT_STRING_EQUAL(actual, expected);
num_new_failures = CU_get_number_of_failures();
if (num_new_failures > num_old_failures)
{
diff --git a/liblwgeom/cunit/cu_sfcgal.c b/liblwgeom/cunit/cu_sfcgal.c
index 0cba17319..f226b0ea9 100644
--- a/liblwgeom/cunit/cu_sfcgal.c
+++ b/liblwgeom/cunit/cu_sfcgal.c
@@ -80,7 +80,7 @@ test_sfcgal_noop(void)
out_ewkt = lwgeom_to_ewkt(geom_out);
if (strcmp(expected_ewkt[i], out_ewkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", expected_ewkt[i], out_ewkt);
- CU_ASSERT_STRING_EQUAL(expected_ewkt[i], out_ewkt);
+ ASSERT_STRING_EQUAL(expected_ewkt[i], out_ewkt);
lwfree(out_ewkt);
lwgeom_free(geom_out);
lwgeom_free(geom_in);
diff --git a/liblwgeom/cunit/cu_stringbuffer.c b/liblwgeom/cunit/cu_stringbuffer.c
index b6479426a..57c9f99e0 100644
--- a/liblwgeom/cunit/cu_stringbuffer.c
+++ b/liblwgeom/cunit/cu_stringbuffer.c
@@ -28,7 +28,7 @@ static void test_stringbuffer_append(void)
stringbuffer_append(sb, "hello world");
str = stringbuffer_getstring(sb);
- CU_ASSERT_STRING_EQUAL("hello world", str);
+ ASSERT_STRING_EQUAL("hello world", str);
stringbuffer_destroy(sb);
}
@@ -42,7 +42,7 @@ static void test_stringbuffer_aprintf(void)
stringbuffer_aprintf(sb, "hello %dth world", 14);
str = stringbuffer_getstring(sb);
- CU_ASSERT_STRING_EQUAL("hello 14th world", str);
+ ASSERT_STRING_EQUAL("hello 14th world", str);
stringbuffer_destroy(sb);
}
diff --git a/liblwgeom/cunit/cu_surface.c b/liblwgeom/cunit/cu_surface.c
index ce9db5274..074a9dd05 100644
--- a/liblwgeom/cunit/cu_surface.c
+++ b/liblwgeom/cunit/cu_surface.c
@@ -24,7 +24,7 @@ void triangle_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TRIANGLE((0 1,2 3,4 5,0 1))", tmp);
+ ASSERT_STRING_EQUAL("TRIANGLE((0 1,2 3,4 5,0 1))", tmp);
lwfree(tmp);
lwgeom_free(geom);
/* 3DM */
@@ -32,49 +32,49 @@ void triangle_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TRIANGLEM((0 1 2,3 4 5,6 7 8,0 1 2))", tmp);
+ ASSERT_STRING_EQUAL("TRIANGLEM((0 1 2,3 4 5,6 7 8,0 1 2))", tmp);
lwfree(tmp);
lwgeom_free(geom);
/* ERROR: a missing Z values */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7,0 1 2))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
+ ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed rings */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 0 2))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 3))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim, with a 4D geom */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: only 3 points in a face */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,0 1 2))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
+ ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: more than 4 points in a face */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
+ ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: no interior rings allowed */
geom = lwgeom_from_wkt("TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg);
+ ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
@@ -83,7 +83,7 @@ void triangle_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE);
tmp = lwgeom_to_wkt(geom, LW_PARSER_CHECK_NONE, 0, 0);
- CU_ASSERT_STRING_EQUAL("TRIANGLE EMPTY", tmp);
+ ASSERT_STRING_EQUAL("TRIANGLE EMPTY", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -93,7 +93,7 @@ void triangle_parse(void)
CU_ASSERT_EQUAL(geom->type, TRIANGLETYPE);
CU_ASSERT_EQUAL(geom->srid, 4326);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("SRID=4326;TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2))", tmp);
+ ASSERT_STRING_EQUAL("SRID=4326;TRIANGLE((0 1 2,3 4 5,6 7 8,0 1 2))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -119,7 +119,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TINTYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TIN EMPTY", tmp);
+ ASSERT_STRING_EQUAL("TIN EMPTY", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -128,7 +128,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TINTYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TIN(((0 1,2 3,4 5,0 1)))", tmp);
+ ASSERT_STRING_EQUAL("TIN(((0 1,2 3,4 5,0 1)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -137,49 +137,49 @@ void tin_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TINTYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TINM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp);
+ ASSERT_STRING_EQUAL("TINM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
/* ERROR: a missing Z values */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7,0 1 2)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
+ ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed rings */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 0 2)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 1 3)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim, with a 4D geom */
geom = lwgeom_from_wkt("TIN(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: only 3 points in a face */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,0 1 2)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
+ ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: more than 3 points in a face */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,9 10 11,0 1 2)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
+ ASSERT_STRING_EQUAL("triangle must have exactly 4 points", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: use ring for triangle */
geom = lwgeom_from_wkt("TIN(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg);
+ ASSERT_STRING_EQUAL("parse error - invalid geometry", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
@@ -188,7 +188,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, TINTYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TIN EMPTY", tmp);
+ ASSERT_STRING_EQUAL("TIN EMPTY", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -198,7 +198,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(geom->type, TINTYPE);
CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -209,7 +209,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(FLAGS_GET_M(geom->flags), 1);
CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("TIN(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("TIN(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -219,7 +219,7 @@ void tin_parse(void)
CU_ASSERT_EQUAL(geom->type, TINTYPE);
CU_ASSERT_EQUAL(geom->srid, 4326);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("SRID=4326;TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("SRID=4326;TIN(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -245,10 +245,10 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F00000001000000010300000001000000040000000000000000000000000000000000F03F00000000000000400000000000000840000000000000104000000000000014400000000000000000000000000000F03F", tmp);
+ ASSERT_STRING_EQUAL("010F00000001000000010300000001000000040000000000000000000000000000000000F03F00000000000000400000000000000840000000000000104000000000000014400000000000000000000000000000F03F", tmp);
lwfree(tmp);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)))", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1,2 3,4 5,0 1)))", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -257,16 +257,16 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACEM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACEM(((0 1 2,3 4 5,6 7 8,0 1 2)))", tmp);
lwfree(tmp);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F00004001000000010300004001000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F0000000000000040", tmp);
+ ASSERT_STRING_EQUAL("010F00004001000000010300004001000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F0000000000000040", tmp);
lwfree(tmp);
lwgeom_free(geom);
/* ERROR: a missing Z values */
geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7,0 1 2)))", LW_PARSER_CHECK_NONE);
- CU_ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
+ ASSERT_STRING_EQUAL("can not mix dimensionality in a geometry", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
@@ -275,34 +275,34 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 2),(9 10 11,12 13 14,15 16 17,9 10 11)))", tmp);
lwfree(tmp);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F00008001000000010300008002000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F00000000000000400400000000000000000022400000000000002440000000000000264000000000000028400000000000002A400000000000002C400000000000002E4000000000000030400000000000003140000000000000224000000000000024400000000000002640", tmp);
+ ASSERT_STRING_EQUAL("010F00008001000000010300008002000000040000000000000000000000000000000000F03F000000000000004000000000000008400000000000001040000000000000144000000000000018400000000000001C4000000000000020400000000000000000000000000000F03F00000000000000400400000000000000000022400000000000002440000000000000264000000000000028400000000000002A400000000000002C400000000000002E4000000000000030400000000000003140000000000000224000000000000024400000000000002640", tmp);
lwfree(tmp);
lwgeom_free(geom);
/* ERROR: non closed rings */
geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 0 2)))", LW_PARSER_CHECK_ALL);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim */
geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,6 7 8,0 1 3)))", LW_PARSER_CHECK_ALL);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: non closed face in Z dim, with a 4D geom */
geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2 3,4 5 6 7,8 9 10 11,0 1 3 3)))", LW_PARSER_CHECK_ALL);
- CU_ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry contains non-closed rings", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
/* ERROR: only 3 points in a face */
geom = lwgeom_from_wkt("POLYHEDRALSURFACE(((0 1 2,3 4 5,0 1 2)))", LW_PARSER_CHECK_ALL);
- CU_ASSERT_STRING_EQUAL("geometry requires more points", cu_error_msg);
+ ASSERT_STRING_EQUAL("geometry requires more points", cu_error_msg);
cu_error_msg_reset();
lwgeom_free(geom);
@@ -311,10 +311,10 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(strlen(cu_error_msg), 0);
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
tmp = (char *)lwgeom_to_hexwkb_buffer(geom, WKB_HEX | WKB_ISO | WKB_NDR);
- CU_ASSERT_STRING_EQUAL("010F00000000000000", tmp);
+ ASSERT_STRING_EQUAL("010F00000000000000", tmp);
lwfree(tmp);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE EMPTY", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACE EMPTY", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -324,10 +324,10 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
lwfree(tmp);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F000080040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp);
+ ASSERT_STRING_EQUAL("010F000080040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -338,10 +338,10 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(FLAGS_GET_M(geom->flags), 1);
CU_ASSERT_EQUAL(geom->srid, SRID_UNKNOWN);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("POLYHEDRALSURFACE(((0 0 0 0,0 0 1 0,0 1 0 2,0 0 0 0)),((0 0 0 0,0 1 0 0,1 0 0 4,0 0 0 0)),((0 0 0 0,1 0 0 0,0 0 1 6,0 0 0 0)),((1 0 0 0,0 1 0 0,0 0 1 0,1 0 0 0)))", tmp);
lwfree(tmp);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F0000C00400000001030000C00100000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000001030000C0010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000001040000000000000000000000000000000000000000000000000000000000000000001030000C001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000001840000000000000000000000000000000000000000000000000000000000000000001030000C00100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000000000
0000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F000000000000000000000000000000000000000000000000", tmp);
+ ASSERT_STRING_EQUAL("010F0000C00400000001030000C00100000004000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F00000000000000000000000000000040000000000000000000000000000000000000000000000000000000000000000001030000C0010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000001040000000000000000000000000000000000000000000000000000000000000000001030000C001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000001840000000000000000000000000000000000000000000000000000000000000000001030000C00100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000000000000
0000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F000000000000000000000000000000000000000000000000", tmp);
lwfree(tmp);
lwgeom_free(geom);
@@ -352,10 +352,10 @@ void polyhedralsurface_parse(void)
CU_ASSERT_EQUAL(geom->type, POLYHEDRALSURFACETYPE);
CU_ASSERT_EQUAL(geom->srid, 4326);
tmp = lwgeom_to_ewkt(geom);
- CU_ASSERT_STRING_EQUAL("SRID=4326;POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
+ ASSERT_STRING_EQUAL("SRID=4326;POLYHEDRALSURFACE(((0 0 0,0 0 1,0 1 0,0 0 0)),((0 0 0,0 1 0,1 0 0,0 0 0)),((0 0 0,1 0 0,0 0 1,0 0 0)),((1 0 0,0 1 0,0 0 1,1 0 0)))", tmp);
lwfree(tmp);
tmp = lwgeom_to_hexwkb_buffer(geom, WKB_NDR | WKB_EXTENDED);
- CU_ASSERT_STRING_EQUAL("010F0000A0E6100000040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp);
+ ASSERT_STRING_EQUAL("010F0000A0E6100000040000000103000080010000000400000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000010300008001000000040000000000000000000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000000001030000800100000004000000000000000000000000000000000000000000000000000000000000000000F03F0000000000000000000000000000000000000000000000000000000000000000000000000000F03F00000000000000000000000000000000000000000000000001030000800100000004000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000000000000000000000000000000000000000000000000000F03F000000000000F03F00000000000000000000000000000000", tmp);
lwfree(tmp);
lwgeom_free(geom);
diff --git a/liblwgeom/cunit/cu_triangulate.c b/liblwgeom/cunit/cu_triangulate.c
index 45b8398e2..f54ebfe68 100644
--- a/liblwgeom/cunit/cu_triangulate.c
+++ b/liblwgeom/cunit/cu_triangulate.c
@@ -40,7 +40,7 @@ test_lwgeom_delaunay_triangulation(void)
if (strcmp(wkt, exp_wkt))
fprintf(stderr, "\nExp: %s\nObt: %s\n", exp_wkt, wkt);
- CU_ASSERT_STRING_EQUAL(wkt, exp_wkt);
+ ASSERT_STRING_EQUAL(wkt, exp_wkt);
lwfree(wkt);
}
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/cunit/cu_chaikin.c | 2 +-
liblwgeom/cunit/cu_clean.c | 6 +--
liblwgeom/cunit/cu_clip_by_rect.c | 8 +--
liblwgeom/cunit/cu_filterm.c | 2 +-
liblwgeom/cunit/cu_force_dims.c | 12 ++---
liblwgeom/cunit/cu_force_sfs.c | 2 +-
liblwgeom/cunit/cu_gserialized1.c | 22 ++++----
liblwgeom/cunit/cu_gserialized2.c | 2 +-
liblwgeom/cunit/cu_homogenize.c | 2 +-
liblwgeom/cunit/cu_in_encoded_polyline.c | 2 +-
liblwgeom/cunit/cu_in_geojson.c | 6 +--
liblwgeom/cunit/cu_in_twkb.c | 58 ++++++++++-----------
liblwgeom/cunit/cu_in_wkb.c | 48 ++++++++---------
liblwgeom/cunit/cu_in_wkt.c | 80 ++++++++++++++---------------
liblwgeom/cunit/cu_misc.c | 26 +++++-----
liblwgeom/cunit/cu_node.c | 10 ++--
liblwgeom/cunit/cu_out_twkb.c | 64 +++++++++++------------
liblwgeom/cunit/cu_out_wkb.c | 50 +++++++++---------
liblwgeom/cunit/cu_out_wkt.c | 74 +++++++++++++--------------
liblwgeom/cunit/cu_print.c | 2 +-
liblwgeom/cunit/cu_sfcgal.c | 2 +-
liblwgeom/cunit/cu_stringbuffer.c | 4 +-
liblwgeom/cunit/cu_surface.c | 88 ++++++++++++++++----------------
liblwgeom/cunit/cu_triangulate.c | 2 +-
24 files changed, 287 insertions(+), 287 deletions(-)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list