[geos-commits] [SCM] GEOS branch main updated. 4767afd144f86a7a2be0f796639eac34ea5760eb

git at osgeo.org git at osgeo.org
Mon Nov 20 10:57:11 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  4767afd144f86a7a2be0f796639eac34ea5760eb (commit)
      from  cfad2ab8f338045d0862dde9f205eca0bdc99f32 (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 4767afd144f86a7a2be0f796639eac34ea5760eb
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon Nov 20 10:56:50 2023 -0800

    Add test for LINESTRING EMPTY, GH-993

diff --git a/tests/unit/capi/GEOSHasZMTest.cpp b/tests/unit/capi/GEOSHasZMTest.cpp
index 54b0431cf..ff36ef7b2 100644
--- a/tests/unit/capi/GEOSHasZMTest.cpp
+++ b/tests/unit/capi/GEOSHasZMTest.cpp
@@ -20,7 +20,7 @@ template<>
 template<>
 void object::test<1>()
 {
-    input_ = GEOSGeomFromWKT("POLYGON ((1 -2, 9 -2, 9 5, 1 5, 1 -2))");
+    input_ = fromWKT("POLYGON ((1 -2, 9 -2, 9 5, 1 5, 1 -2))");
 
     ensure_equals(GEOSHasZ(input_), 0);
     ensure_equals(GEOSHasM(input_), 0);
@@ -30,7 +30,7 @@ template<>
 template<>
 void object::test<2>()
 {
-    input_ = GEOSGeomFromWKT("POINT M (1 2 3)");
+    input_ = fromWKT("POINT M (1 2 3)");
 
     ensure_equals(GEOSHasZ(input_), 0);
     ensure_equals(GEOSHasM(input_), 1);
@@ -40,7 +40,7 @@ template<>
 template<>
 void object::test<3>()
 {
-    input_ = GEOSGeomFromWKT("POINT EMPTY");
+    input_ = fromWKT("POINT EMPTY");
 
     ensure_equals(GEOSHasZ(input_), 0);
     ensure_equals(GEOSHasM(input_), 0);
@@ -50,7 +50,7 @@ template<>
 template<>
 void object::test<4>()
 {
-    input_ = GEOSGeomFromWKT("POINT Z EMPTY");
+    input_ = fromWKT("POINT Z EMPTY");
 
     ensure_equals(GEOSHasZ(input_), 1);
     ensure_equals(GEOSHasM(input_), 0);
@@ -60,7 +60,7 @@ template<>
 template<>
 void object::test<5>()
 {
-    input_ = GEOSGeomFromWKT("POINT M EMPTY");
+    input_ = fromWKT("POINT M EMPTY");
 
     ensure_equals(GEOSHasZ(input_), 0);
     ensure_equals(GEOSHasM(input_), 1);
@@ -70,11 +70,41 @@ template<>
 template<>
 void object::test<6>()
 {
-    input_ = GEOSGeomFromWKT("POINT ZM EMPTY");
+    input_ = fromWKT("POINT ZM EMPTY");
 
     ensure_equals(GEOSHasZ(input_), 1);
     ensure_equals(GEOSHasM(input_), 1);
 }
 
+template<>
+template<>
+void object::test<7>()
+{
+    input_ = fromWKT("LINESTRING EMPTY");
+
+    ensure_equals(GEOSHasZ(input_), 0);
+    ensure_equals(GEOSHasM(input_), 0);
+}
+
+template<>
+template<>
+void object::test<8>()
+{
+    input_ = fromWKT("LINESTRING Z EMPTY");
+
+    ensure_equals(GEOSHasZ(input_), 1);
+    ensure_equals(GEOSHasM(input_), 0);
+}
+
+template<>
+template<>
+void object::test<9>()
+{
+    input_ = fromWKT("LINESTRING M EMPTY");
+
+    ensure_equals(GEOSHasZ(input_), 0);
+    ensure_equals(GEOSHasM(input_), 1);
+}
+
 } // namespace tut
 

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

Summary of changes:
 tests/unit/capi/GEOSHasZMTest.cpp | 42 +++++++++++++++++++++++++++++++++------
 1 file changed, 36 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list