diff options
| author | Even Rouault <even.rouault@spatialys.com> | 2020-08-19 16:31:27 +0200 |
|---|---|---|
| committer | Even Rouault <even.rouault@spatialys.com> | 2020-08-19 16:31:27 +0200 |
| commit | 2b3475c853b37b1485e92ef8cf78b02fb0db6142 (patch) | |
| tree | d2f24a0c787de856ceb3eede89e64c5441412c01 /test | |
| parent | 846455f9585a7a44af5fb6d019fc76c5612c9d84 (diff) | |
| download | PROJ-2b3475c853b37b1485e92ef8cf78b02fb0db6142.tar.gz PROJ-2b3475c853b37b1485e92ef8cf78b02fb0db6142.zip | |
Code reformatting
Diffstat (limited to 'test')
| -rw-r--r-- | test/unit/test_c_api.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/test/unit/test_c_api.cpp b/test/unit/test_c_api.cpp index 8c9c3dd1..9fe486b7 100644 --- a/test/unit/test_c_api.cpp +++ b/test/unit/test_c_api.cpp @@ -134,15 +134,13 @@ class CApi : public ::testing::Test { struct PjContextKeeper { PJ_CONTEXT *m_ctxt = nullptr; - explicit PjContextKeeper(PJ_CONTEXT *ctxt) - : m_ctxt(ctxt) {} + explicit PjContextKeeper(PJ_CONTEXT *ctxt) : m_ctxt(ctxt) {} ~PjContextKeeper() { proj_context_destroy(m_ctxt); } PjContextKeeper(const PjContextKeeper &) = delete; PjContextKeeper &operator=(const PjContextKeeper &) = delete; }; - struct ContextKeeper { PJ_OPERATION_FACTORY_CONTEXT *m_op_ctxt = nullptr; explicit ContextKeeper(PJ_OPERATION_FACTORY_CONTEXT *op_ctxt) @@ -4071,9 +4069,8 @@ TEST_F(CApi, proj_context_clone) { if (!tempdir) { tempdir = "/tmp"; } - std::string tmp_filename( - std::string(tempdir) + - "/test_proj_context_set_autoclose_database.db"); + std::string tmp_filename(std::string(tempdir) + + "/test_proj_context_set_autoclose_database.db"); f = fopen(tmp_filename.c_str(), "wb"); if (!f) { std::cerr << "Cannot create " << tmp_filename << std::endl; @@ -4083,14 +4080,14 @@ TEST_F(CApi, proj_context_clone) { fclose(f); auto c_default_path = proj_context_get_database_path(nullptr); - std::string default_path(c_default_path ? c_default_path: ""); + std::string default_path(c_default_path ? c_default_path : ""); EXPECT_TRUE(proj_context_set_database_path(nullptr, tmp_filename.c_str(), nullptr, nullptr)); PJ_CONTEXT *new_ctx = proj_context_create(); EXPECT_TRUE(proj_context_set_database_path( - nullptr, default_path.empty() ? nullptr : default_path.c_str(), - nullptr, nullptr)); + nullptr, default_path.empty() ? nullptr : default_path.c_str(), nullptr, + nullptr)); EXPECT_NE(new_ctx, nullptr); PjContextKeeper keeper_ctxt(new_ctx); |
