[geos-commits] [SCM] GEOS branch 3.12 updated. 10254fe4493d7482769e935700410653e712b711

git at osgeo.org git at osgeo.org
Mon Nov 20 10:59:43 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, 3.12 has been updated
       via  10254fe4493d7482769e935700410653e712b711 (commit)
      from  8ebdba2bda5a55d37c156b509d98aee5339defb1 (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 10254fe4493d7482769e935700410653e712b711
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