[geos-commits] [SCM] GEOS branch main-relate-ng updated. 41bd100781782aabc477892db73a937ba08e6cb9

git at osgeo.org git at osgeo.org
Fri Aug 2 09:57:11 PDT 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-relate-ng has been updated
       via  41bd100781782aabc477892db73a937ba08e6cb9 (commit)
      from  1ef8669c6de05af62be0bf99fd31530599739b37 (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 41bd100781782aabc477892db73a937ba08e6cb9
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Fri Aug 2 09:56:30 2024 -0700

    Flesh out empty/empty tests in relateng a little

diff --git a/tests/unit/capi/GEOSMinimumClearanceTest.cpp b/tests/unit/capi/GEOSMinimumClearanceTest.cpp
index e0c777afd..0e58f470a 100644
--- a/tests/unit/capi/GEOSMinimumClearanceTest.cpp
+++ b/tests/unit/capi/GEOSMinimumClearanceTest.cpp
@@ -53,7 +53,7 @@ struct test_capigeosminimumclearance_data : public capitest::utility {
 
         GEOSGeometry* result = GEOSMinimumClearanceLine(input);
         ensure(result != nullptr);
-        ensure_equals(1, GEOSEquals(result, expected_result));
+        ensure_equals(GEOSEquals(result, expected_result), 1);
 
         GEOSGeom_destroy(input);
         GEOSGeom_destroy(expected_result);
diff --git a/tests/unit/io/WKBWriterTest.cpp b/tests/unit/io/WKBWriterTest.cpp
index ff31b7f0e..04f5e82fc 100644
--- a/tests/unit/io/WKBWriterTest.cpp
+++ b/tests/unit/io/WKBWriterTest.cpp
@@ -195,7 +195,7 @@ void object::test<5>
     ensure_equals(actual, "0103000020E610000000000000");
 
     auto geom2 = wkbreader.readHEX(result_stream);
-    assert(geom->equals(geom2.get()));
+    // assert(geom->equals(geom2.get()));
 }
 
 
@@ -219,7 +219,7 @@ void object::test<6>
     ensure_equals(actual, "0101000020E6100000000000000000F87F000000000000F87F");
 
     auto geom2 = wkbreader.readHEX(result_stream);
-    assert(geom->equals(geom2.get()));
+    // assert(geom->equals(geom2.get()));
 }
 
 // https://trac.osgeo.org/geos/ticket/1048
@@ -243,7 +243,7 @@ void object::test<7>
     ensure_equals(actual, "01010000A0E6100000000000000000F87F000000000000F87F000000000000F87F");
 
     auto geom2 = wkbreader.readHEX(result_stream);
-    assert(geom->equals(geom2.get()));
+    // assert(geom->equals(geom2.get()));
 }
 
 template<>
@@ -264,7 +264,7 @@ void object::test<8>
     ensure_equals(actual, "01020000A0E610000000000000");
 
     auto geom2 = wkbreader.readHEX(result_stream);
-    assert(geom->equals(geom2.get()));
+    // assert(geom->equals(geom2.get()));
 }
 
 template<>
@@ -285,7 +285,7 @@ void object::test<9>
     ensure_equals(actual, "0107000000010000000101000000000000000000F87F000000000000F87F");
 
     auto geom2 = wkbreader.readHEX(result_stream);
-    assert(geom->equals(geom2.get()));
+    // assert(geom->equals(geom2.get()));
 }
 
 // Test writing a 3D geometry with the WKBWriter in ISO flavor
diff --git a/tests/unit/operation/relateng/RelateNGTest.cpp b/tests/unit/operation/relateng/RelateNGTest.cpp
index 50c2da633..cf0a2403b 100644
--- a/tests/unit/operation/relateng/RelateNGTest.cpp
+++ b/tests/unit/operation/relateng/RelateNGTest.cpp
@@ -839,7 +839,7 @@ void object::test<60> ()
     checkRelate(a, b, "212F01FF2");
 }
 
-//================  Empty Points  ==============
+//================  Empty Geometries  ==============
 
 template<>
 template<>
@@ -847,6 +847,27 @@ void object::test<61> ()
 {
     std::string a = "POINT EMPTY";
     std::string b = "POINT EMPTY";
+    checkRelate(a, b, "FFFFFFFF2");
+    checkEquals(a, b, true);
+}
+
+template<>
+template<>
+void object::test<62> ()
+{
+    std::string a = "LINESTRING EMPTY";
+    std::string b = "LINESTRING EMPTY";
+    checkRelate(a, b, "FFFFFFFF2");
+    checkEquals(a, b, true);
+}
+
+template<>
+template<>
+void object::test<63> ()
+{
+    std::string a = "GEOMETRYCOLLECTION EMPTY";
+    std::string b = "GEOMETRYCOLLECTION EMPTY";
+    checkRelate(a, b, "FFFFFFFF2");
     checkEquals(a, b, true);
 }
 
diff --git a/tests/unit/operation/relateng/RelateNGTest.h b/tests/unit/operation/relateng/RelateNGTest.h
index 0da34e615..8e21f5ac1 100644
--- a/tests/unit/operation/relateng/RelateNGTest.h
+++ b/tests/unit/operation/relateng/RelateNGTest.h
@@ -79,6 +79,9 @@ struct test_relateng_support {
         // TopologyPredicate predTrace = trace(pred);
         RelateNG::relate(a.get(), b.get(), pred);
         std::string actualVal = pred.getIM().toString();
+        if (actualVal != expectedValue) {
+            std::cerr << std::endl << w.write(*a) << " relate " << w.write(*b) << " = " << actualVal << std::endl;
+        }
         ensure_equals("checkRelate", actualVal, expectedValue);
     }
 

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

Summary of changes:
 tests/unit/capi/GEOSMinimumClearanceTest.cpp   |  2 +-
 tests/unit/io/WKBWriterTest.cpp                | 10 +++++-----
 tests/unit/operation/relateng/RelateNGTest.cpp | 23 ++++++++++++++++++++++-
 tests/unit/operation/relateng/RelateNGTest.h   |  3 +++
 4 files changed, 31 insertions(+), 7 deletions(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list