aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2018-12-03 13:51:41 +0100
committerEven Rouault <even.rouault@spatialys.com>2018-12-03 13:51:41 +0100
commit2d8f295354ce20f2d375a985ff48fd5e7f8b90ca (patch)
tree1fb113fb542eca8cc1387fbf4eb23b1e3ab38114 /test
parent98ebc4687a1bc601589ff9b1769008c5c4a891d2 (diff)
downloadPROJ-2d8f295354ce20f2d375a985ff48fd5e7f8b90ca.tar.gz
PROJ-2d8f295354ce20f2d375a985ff48fd5e7f8b90ca.zip
WKTParser: fix to avoid creation of empty nodes
Diffstat (limited to 'test')
-rw-r--r--test/unit/test_io.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 6a2de028..606d57a3 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -119,6 +119,11 @@ TEST(io, wkt_parsing) {
str = "A[" + str + "]";
}
EXPECT_THROW(WKTNode::createFrom(str), ParsingException);
+
+ {
+ auto wkt = "A[\"a\",B[\"b\",C[\"c\"]],D[\"d\"]]";
+ EXPECT_EQ(WKTNode::createFrom(wkt)->toString(), wkt);
+ }
}
// ---------------------------------------------------------------------------