[geos-commits] [SCM] GEOS branch master updated. a57d337ca05c1089f7935d3548e18e8ed85e19d6

git at osgeo.org git at osgeo.org
Mon May 4 15:26:52 PDT 2020


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, master has been updated
       via  a57d337ca05c1089f7935d3548e18e8ed85e19d6 (commit)
      from  7ddcd6cdbc6dcdcb6b3d55dc2730e67a182302a3 (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 a57d337ca05c1089f7935d3548e18e8ed85e19d6
Author: Paul Ramsey <pramsey at cleverelephant.ca>
Date:   Mon May 4 15:26:47 2020 -0700

    Add unit tests for empty WKB variants

diff --git a/tests/unit/io/WKBReaderTest.cpp b/tests/unit/io/WKBReaderTest.cpp
index 0bf32e1..c313252 100644
--- a/tests/unit/io/WKBReaderTest.cpp
+++ b/tests/unit/io/WKBReaderTest.cpp
@@ -381,5 +381,81 @@ void object::test<15>
     );
 }
 
+
+// 16 - Read a empty multipoint
+template<>
+template<>
+void object::test<16>
+()
+{
+
+    testInputOutput(
+        // WKT
+        "MULTIPOINT EMPTY",
+        // NDR HEXWKB
+        "010400000000000000",
+        // XDR HEXWKB
+        "000000000400000000"
+    );
+
+}
+
+
+// 17 - Read a empty linestring
+template<>
+template<>
+void object::test<17>
+()
+{
+
+    testInputOutput(
+        // WKT
+        "LINESTRING EMPTY",
+        // NDR HEXWKB
+        "010200000000000000",
+        // XDR HEXWKB
+        "000000000200000000"
+    );
+
+}
+
+
+// 18 - Read a empty polygon
+template<>
+template<>
+void object::test<18>
+()
+{
+
+    testInputOutput(
+        // WKT
+        "POLYGON EMPTY",
+        // NDR HEXWKB
+        "010300000000000000",
+        // XDR HEXWKB
+        "000000000300000000"
+    );
+
+}
+
+// 19 - Read a empty collection
+template<>
+template<>
+void object::test<19>
+()
+{
+
+    testInputOutput(
+        // WKT
+        "GEOMETRYCOLLECTION EMPTY",
+        // NDR HEXWKB
+        "010700000000000000",
+        // XDR HEXWKB
+        "000000000700000000"
+    );
+
+}
+
+
 } // namespace tut
 

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

Summary of changes:
 tests/unit/io/WKBReaderTest.cpp | 76 +++++++++++++++++++++++++++++++++++++++++
 1 file changed, 76 insertions(+)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list