diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2018-12-14 12:43:49 +0100 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2018-12-14 12:43:49 +0100 |
| commit | b2aa77f811dc0dd257afe3fccac49c62fcf039b2 (patch) | |
| tree | 11079887422b8de732df38ca9fb678edd8cfb568 /test/unit/test_c_api.cpp | |
| parent | 93d0daa96287e14ec7fa38c9185fe8e3866243db (diff) | |
| download | PROJ-b2aa77f811dc0dd257afe3fccac49c62fcf039b2.tar.gz PROJ-b2aa77f811dc0dd257afe3fccac49c62fcf039b2.zip | |
C API: rename recently added _unref and _free functions as _destroy (fixes #1198)
Diffstat (limited to 'test/unit/test_c_api.cpp')
| -rw-r--r-- | test/unit/test_c_api.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 0e076912..36b08529 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -113,7 +113,7 @@ class CApi : public ::testing::Test { struct ObjectKeeper { PJ_OBJ *m_obj = nullptr; explicit ObjectKeeper(PJ_OBJ *obj) : m_obj(obj) {} - ~ObjectKeeper() { proj_obj_unref(m_obj); } + ~ObjectKeeper() { proj_obj_destroy(m_obj); } ObjectKeeper(const ObjectKeeper &) = delete; ObjectKeeper &operator=(const ObjectKeeper &) = delete; @@ -123,7 +123,7 @@ class CApi : public ::testing::Test { PJ_OPERATION_FACTORY_CONTEXT *m_op_ctxt = nullptr; explicit ContextKeeper(PJ_OPERATION_FACTORY_CONTEXT *op_ctxt) : m_op_ctxt(op_ctxt) {} - ~ContextKeeper() { proj_operation_factory_context_unref(m_op_ctxt); } + ~ContextKeeper() { proj_operation_factory_context_destroy(m_op_ctxt); } ContextKeeper(const ContextKeeper &) = delete; ContextKeeper &operator=(const ContextKeeper &) = delete; @@ -132,7 +132,7 @@ class CApi : public ::testing::Test { struct ObjListKeeper { PJ_OBJ_LIST *m_res = nullptr; explicit ObjListKeeper(PJ_OBJ_LIST *res) : m_res(res) {} - ~ObjListKeeper() { proj_obj_list_unref(m_res); } + ~ObjListKeeper() { proj_obj_list_destroy(m_res); } ObjListKeeper(const ObjListKeeper &) = delete; ObjListKeeper &operator=(const ObjListKeeper &) = delete; @@ -142,7 +142,7 @@ class CApi : public ::testing::Test { // --------------------------------------------------------------------------- TEST_F(CApi, proj_obj_create_from_user_input) { - proj_obj_unref(nullptr); + proj_obj_destroy(nullptr); EXPECT_EQ(proj_obj_create_from_user_input(m_ctxt, "invalid", nullptr), nullptr); { @@ -165,7 +165,7 @@ TEST_F(CApi, proj_obj_create_from_user_input) { // --------------------------------------------------------------------------- TEST_F(CApi, proj_obj_create_from_wkt) { - proj_obj_unref(nullptr); + proj_obj_destroy(nullptr); EXPECT_EQ(proj_obj_create_from_wkt(m_ctxt, "invalid", nullptr), nullptr); auto obj = proj_obj_create_from_wkt( m_ctxt, @@ -179,7 +179,7 @@ TEST_F(CApi, proj_obj_create_from_wkt) { // --------------------------------------------------------------------------- TEST_F(CApi, proj_obj_create_from_proj_string) { - proj_obj_unref(nullptr); + proj_obj_destroy(nullptr); EXPECT_EQ(proj_obj_create_from_proj_string(m_ctxt, "invalid", nullptr), nullptr); auto obj = @@ -927,7 +927,7 @@ TEST_F(CApi, proj_obj_get_source_target_crs_invalid_object) { struct ListFreer { PROJ_STRING_LIST list; ListFreer(PROJ_STRING_LIST ptrIn) : list(ptrIn) {} - ~ListFreer() { proj_free_string_list(list); } + ~ListFreer() { proj_destroy_string_list(list); } ListFreer(const ListFreer &) = delete; ListFreer &operator=(const ListFreer &) = delete; }; @@ -1479,7 +1479,7 @@ TEST_F(CApi, proj_obj_identify) { ObjListKeeper keeper_res(res); EXPECT_EQ(proj_obj_list_get_count(res), 1); EXPECT_EQ(confidence[0], 100); - proj_free_int_list(confidence); + proj_destroy_int_list(confidence); } { auto objEllps = proj_obj_create_from_wkt( |
