aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_io.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/unit/test_io.cpp')
-rw-r--r--test/unit/test_io.cpp20
1 files changed, 20 insertions, 0 deletions
diff --git a/test/unit/test_io.cpp b/test/unit/test_io.cpp
index 646a990a..4e888f2c 100644
--- a/test/unit/test_io.cpp
+++ b/test/unit/test_io.cpp
@@ -7881,6 +7881,26 @@ TEST(io, projstringformatter_axisswap_minus_two_one_followed_two_one) {
// ---------------------------------------------------------------------------
+TEST(io, projstringformatter_axisswap_two_minus_one_followed_minus_two_one) {
+ auto fmt = PROJStringFormatter::create();
+ fmt->ingestPROJString("+proj=pipeline "
+ "+step +proj=axisswap +order=2,-1 "
+ "+step +proj=axisswap +order=-2,1");
+ EXPECT_EQ(fmt->toString(), "+proj=noop");
+}
+
+// ---------------------------------------------------------------------------
+
+TEST(io, projstringformatter_axisswap_two_minus_one_followed_one_minus_two) {
+ auto fmt = PROJStringFormatter::create();
+ fmt->ingestPROJString("+proj=pipeline "
+ "+step +proj=axisswap +order=2,-1 "
+ "+step +proj=axisswap +order=1,-2");
+ EXPECT_EQ(fmt->toString(), "+proj=axisswap +order=2,1");
+}
+
+// ---------------------------------------------------------------------------
+
TEST(io, projstringformatter_unmodified) {
const char *const strs[] = {"+proj=pipeline "
"+step +proj=axisswap +order=2,-1 "