[geos-commits] [SCM] GEOS branch main updated. bdceea69174e80cf2cc2959d6da8d9dd0e766e3e

git at osgeo.org git at osgeo.org
Mon Mar 4 12:30:21 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, main has been updated
       via  bdceea69174e80cf2cc2959d6da8d9dd0e766e3e (commit)
      from  0a8fc37a965bd29d61d14249ba22a2ae66fd58fa (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 bdceea69174e80cf2cc2959d6da8d9dd0e766e3e
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 efaf1ad0d..5cdf79604 100644
--- a/tests/unit/capi/GEOSDifferenceTest.cpp
+++ b/tests/unit/capi/GEOSDifferenceTest.cpp
@@ -32,5 +32,33 @@ void object::test<1>()
     ensure_equals(GEOSGetSRID(geom1_), GEOSGetSRID(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