From f06045c2f0145ec2290913fa144cd690e70736fd Mon Sep 17 00:00:00 2001 From: Even Rouault Date: Thu, 6 Dec 2018 21:28:16 +0100 Subject: Add API to retrieve non-deprecated equivalent of an object --- test/unit/test_c_api.cpp | 14 ++++++++++++++ 1 file changed, 14 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 20f4180b..b119d914 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -2552,4 +2552,18 @@ TEST_F(CApi, proj_obj_convert_conversion_to_other_method) { } } +// --------------------------------------------------------------------------- + +TEST_F(CApi, proj_obj_get_non_deprecated) { + auto crs = proj_obj_create_from_database( + m_ctxt, "EPSG", "4226", PJ_OBJ_CATEGORY_CRS, false, nullptr); + ObjectKeeper keeper(crs); + ASSERT_NE(crs, nullptr); + + auto list = proj_obj_get_non_deprecated(m_ctxt, crs); + ASSERT_NE(list, nullptr); + ObjListKeeper keeper_list(list); + EXPECT_EQ(proj_obj_list_get_count(list), 2); +} + } // namespace -- cgit v1.2.3