[geos-commits] [SCM] GEOS branch master updated. 9c5854b0852a1879b7c95953652b41bbccacd60d

git at osgeo.org git at osgeo.org
Thu Apr 30 09:42:36 PDT 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 "GEOS".

The branch, master has been updated
       via  9c5854b0852a1879b7c95953652b41bbccacd60d (commit)
      from  069769904739850a2a53b1dd10809fe06182a588 (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 9c5854b0852a1879b7c95953652b41bbccacd60d
Author: Daniel Baston <dbaston at gmail.com>
Date:   Sun Mar 22 22:19:37 2020 -0400

    Add failing test for GEOSDistance segfault

diff --git a/tests/unit/capi/GEOSDistanceTest.cpp b/tests/unit/capi/GEOSDistanceTest.cpp
index 0b8cef1..30051c4 100644
--- a/tests/unit/capi/GEOSDistanceTest.cpp
+++ b/tests/unit/capi/GEOSDistanceTest.cpp
@@ -132,6 +132,20 @@ void object::test<2>
     GEOSGeom_destroy(g2);
 }
 
+// https://github.com/libgeos/geos/issues/295
+template<>
+template<>
+void object::test<3>
+()
+{
+    GEOSGeometry* g1 = GEOSGeomFromWKT("MultiPolygon Z (EMPTY,((-0.14000000000000001 44.89999999999999858 0, -0.14699999999999999 44.90400000000000347 0, -0.14729999999999999 44.90500000000000114 0, -0.14000000000000001 44.89999999999999858 0)))");
+    GEOSGeometry* g2 = GEOSGeomFromWKT("POLYGON ((0 0, 1 0, 1 1, 0 0))");
+
+    double d;
+    int status = GEOSDistance(g1, g2, &d);
+
+    ensure_equals(status, 1);
+}
 
 } // namespace tut
 

-----------------------------------------------------------------------

Summary of changes:
 tests/unit/capi/GEOSDistanceTest.cpp | 14 ++++++++++++++
 1 file changed, 14 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list