[geos-commits] [SCM] GEOS branch 3.12 updated. 22fe1a6cf245316c93eeec69836c3a5d378ce220

git at osgeo.org git at osgeo.org
Mon Mar 4 12:32:19 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.12 has been updated
       via  22fe1a6cf245316c93eeec69836c3a5d378ce220 (commit)
      from  540a6aad1e909284385b6403d7a61d56c4deeab7 (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 22fe1a6cf245316c93eeec69836c3a5d378ce220
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