From 6cac8e03056db41a8314756c16507ef39bd78e0a Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 13 Dec 2018 15:32:24 +0100 Subject: Add helpers to create polar cartesian CS --- test/unit/test_c_api.cpp | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'test/unit/test_c_api.cpp') diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 394e87ca..d53f38fd 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -2666,4 +2666,35 @@ TEST_F(CApi, proj_uom_get_info_from_database) { } } +// --------------------------------------------------------------------------- + +TEST_F(CApi, proj_obj_create_cartesian_2D_cs) { + { + auto cs = proj_obj_create_cartesian_2D_cs( + m_ctxt, PJ_CART2D_EASTING_NORTHING, nullptr, 0); + ObjectKeeper keeper_cs(cs); + ASSERT_NE(cs, nullptr); + } + { + auto cs = proj_obj_create_cartesian_2D_cs( + m_ctxt, PJ_CART2D_NORTHING_EASTING, nullptr, 0); + ObjectKeeper keeper_cs(cs); + ASSERT_NE(cs, nullptr); + } + { + auto cs = proj_obj_create_cartesian_2D_cs( + m_ctxt, PJ_CART2D_NORTH_POLE_EASTING_SOUTH_NORTHING_SOUTH, nullptr, + 0); + ObjectKeeper keeper_cs(cs); + ASSERT_NE(cs, nullptr); + } + { + auto cs = proj_obj_create_cartesian_2D_cs( + m_ctxt, PJ_CART2D_SOUTH_POLE_EASTING_NORTH_NORTHING_NORTH, nullptr, + 0); + ObjectKeeper keeper_cs(cs); + ASSERT_NE(cs, nullptr); + } +} + } // namespace -- cgit v1.2.3