From 234eba764d7fea67b597d8f9ed5225e651f4a945 Mon Sep 17 00:00:00 2001 From: Kristian Evers Date: Mon, 26 Mar 2018 23:36:15 +0200 Subject: Validate that units match between pipeline steps MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit As suggested in [0], steps in a pipeline are now checked for compliance. If the right side units in step n differ from the left side units in step n+1 the pipeline can't be constructed and an error is raised. [0] https://lists.osgeo.org/pipermail/grass-dev/2018-March/088123.html --- test/gie/4D-API_cs2cs-style.gie | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'test') diff --git a/test/gie/4D-API_cs2cs-style.gie b/test/gie/4D-API_cs2cs-style.gie index 3d3bf207..bbd9ee39 100644 --- a/test/gie/4D-API_cs2cs-style.gie +++ b/test/gie/4D-API_cs2cs-style.gie @@ -243,4 +243,26 @@ accept 440720 3751320 0 expect 440719.958709357 3751294.2109841 -4.44340920541435 ------------------------------------------------------------------------------- +------------------------------------------------------------------------------- +Test that pipelines with unit mismatch between steps can't be constructed. +------------------------------------------------------------------------------- +operation +proj=pipeline + +step +proj=merc + +step +proj=merc +expect failure pjd_err_malformed_pipeline + +operation +proj=pipeline + +step +proj=latlong + +step +proj=merc + +step +proj=helmert +x=200 +y=100 +expect failure pjd_err_malformed_pipeline + +operation +proj=pipeline + +step +proj=merc + +step +proj=unitconvert +xy_in=m +xy_out=km +accept 12 56 +expect 1335.8339 7522.963 +------------------------------------------------------------------------------- + + -- cgit v1.2.3