[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0rc1-19-g2cbf963
git at osgeo.org
git at osgeo.org
Mon Dec 21 03:39:23 PST 2020
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 2cbf963cdca36364048a2bd580c9bae585ea9413 (commit)
from d890e2c6c7e91d414aff7750f732fd97492544cf (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 2cbf963cdca36364048a2bd580c9bae585ea9413
Author: Sandro Santilli <strk at kbt.io>
Date: Mon Dec 21 12:39:06 2020 +0100
Add unit test for cleaning single empty component collection
References #4814
diff --git a/liblwgeom/cunit/cu_clean.c b/liblwgeom/cunit/cu_clean.c
index e3652c5..291bc6b 100644
--- a/liblwgeom/cunit/cu_clean.c
+++ b/liblwgeom/cunit/cu_clean.c
@@ -147,6 +147,24 @@ static void test_lwgeom_make_valid(void)
lwgeom_free(gout);
lwgeom_free(gin);
+
+ /* Test collection with empty component */
+
+ gin = lwgeom_from_hexwkb( "0106000020110F000000000000",
+ LW_PARSER_CHECK_NONE);
+ CU_ASSERT(gin != NULL);
+
+ gout = lwgeom_make_valid(gin);
+ CU_ASSERT(gout != NULL);
+
+ ewkt = lwgeom_to_ewkt(gout);
+ /* printf("c = %s\n", ewkt); */
+ CU_ASSERT_STRING_EQUAL(ewkt, "MULTIPOLYGON EMPTY");
+ lwfree(ewkt);
+
+ lwgeom_free(gout);
+ lwgeom_free(gin);
+
}
/* TODO: add more tests ! */
-----------------------------------------------------------------------
Summary of changes:
liblwgeom/cunit/cu_clean.c | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
hooks/post-receive
--
PostGIS
More information about the postgis-tickets
mailing list