diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2021-09-28 14:47:10 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2021-09-28 14:47:10 +0200 |
| commit | 40ab72f2e9d913c7128fde24576183068dcd7ee2 (patch) | |
| tree | ecaabb15882203178135bbabe37bad860dcca772 /test/unit | |
| parent | e6e6e4ca345e774910afa5bbe485c3d9f7851cd4 (diff) | |
| download | PROJ-40ab72f2e9d913c7128fde24576183068dcd7ee2.tar.gz PROJ-40ab72f2e9d913c7128fde24576183068dcd7ee2.zip | |
PROJStringFormatter: add optimizations useful for IAU CRS transformation pipelines
Diffstat (limited to 'test/unit')
| -rw-r--r-- | test/unit/test_io.cpp | 20 |
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 " |
