[geos-commits] [SCM] GEOS branch 3.11 updated. dc4c486c169d5444fe49ec678a149659678f1371

git at osgeo.org git at osgeo.org
Mon Mar 4 13:12:51 PST 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 "GEOS".

The branch, 3.11 has been updated
       via  dc4c486c169d5444fe49ec678a149659678f1371 (commit)
      from  04e7cbed5e3f49e4338f5aa680296c34079e192c (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 dc4c486c169d5444fe49ec678a149659678f1371
Author: Mike Taves <mwtoews at gmail.com>
Date:   Mon Feb 26 20:24:06 2024 +1300

    Test overlay op with mixed GeometryCollection

diff --git a/tests/unit/capi/GEOSDifferenceTest.cpp b/tests/unit/capi/GEOSDifferenceTest.cpp
index b2ff86a2c..7abe8badc 100644
--- a/tests/unit/capi/GEOSDifferenceTest.cpp
+++ b/tests/unit/capi/GEOSDifferenceTest.cpp
@@ -40,5 +40,33 @@ void object::test<1>()
     GEOSGeom_destroy(result);
 }
 
+/**
+* Mixed GeometryCollection types permitted at a high-level
+*/
+template<>
+template<>
+void object::test<2>()
+{
+    GEOSGeometry* a = GEOSGeomFromWKT("GEOMETRYCOLLECTION (POINT (51 -1), LINESTRING (52 -1, 49 2))");
+    GEOSGeometry* b = GEOSGeomFromWKT("POINT (2 3)");
+
+    ensure(a);
+    ensure(b);
+
+    GEOSGeometry* ab = GEOSDifference(a, b);
+    GEOSGeometry* ba = GEOSDifference(b, a);
+
+    ensure(ab);
+    ensure(ba);
+
+    ensure_geometry_equals(ab, a);
+    ensure_geometry_equals(ba, b);
+
+    GEOSGeom_destroy(a);
+    GEOSGeom_destroy(b);
+    GEOSGeom_destroy(ab);
+    GEOSGeom_destroy(ba);
+}
+
 } // namespace tut
 

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

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


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list