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

git at osgeo.org git at osgeo.org
Tue Nov 21 05:41:04 PST 2023


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  cbfa2ec36e2e33e3290ce78007c36d46b99517d4 (commit)
      from  54ed380c031c9bec3b2eac02119c518e7eeb643e (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 cbfa2ec36e2e33e3290ce78007c36d46b99517d4
Author: Daniel Baston <dbaston at gmail.com>
Date:   Tue Nov 21 08:38:58 2023 -0500

    Test that GEOSGeom_createEmpty returns 2D geoms

diff --git a/tests/unit/capi/GEOSGeom_createTest.cpp b/tests/unit/capi/GEOSGeom_createTest.cpp
index b2a2d7376..78ca61cf1 100644
--- a/tests/unit/capi/GEOSGeom_createTest.cpp
+++ b/tests/unit/capi/GEOSGeom_createTest.cpp
@@ -66,6 +66,10 @@ void object::test<1>
     geom1_ = GEOSGeom_createEmptyPoint_r(handle_);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_POINT);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -79,6 +83,10 @@ void object::test<2>
     geom1_ = GEOSGeom_createEmptyLineString_r(handle_);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_LINESTRING);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -93,6 +101,10 @@ void object::test<3>
     geom1_ = GEOSGeom_createEmptyPolygon_r(handle_);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_POLYGON);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -106,6 +118,10 @@ void object::test<4>
     geom1_ = GEOSGeom_createEmptyCollection_r(handle_, GEOS_MULTIPOINT);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_MULTIPOINT);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -119,6 +135,10 @@ void object::test<5>
     geom1_ = GEOSGeom_createEmptyCollection_r(handle_, GEOS_MULTILINESTRING);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_MULTILINESTRING);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -132,6 +152,10 @@ void object::test<6>
     geom1_ = GEOSGeom_createEmptyCollection_r(handle_, GEOS_MULTIPOLYGON);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_MULTIPOLYGON);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }
@@ -145,6 +169,10 @@ void object::test<7>
     geom1_ = GEOSGeom_createEmptyCollection_r(handle_, GEOS_GEOMETRYCOLLECTION);
     ensure(0 != GEOSisEmpty_r(handle_, geom1_));
     ensure_equals(GEOSGeomTypeId_r(handle_, geom1_), GEOS_GEOMETRYCOLLECTION);
+
+    ensure_equals(GEOSHasZ_r(handle_, geom1_), 0);
+    ensure_equals(GEOSHasM_r(handle_, geom1_), 0);
+
     GEOSGeom_destroy(geom1_);
     geom1_ = nullptr;
 }

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

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


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list