aboutsummaryrefslogtreecommitdiff
path: root/test/unit/test_c_api.cpp
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2020-08-19 16:31:27 +0200
committerEven Rouault <even.rouault@spatialys.com>2020-08-19 16:31:27 +0200
commit2b3475c853b37b1485e92ef8cf78b02fb0db6142 (patch)
treed2f24a0c787de856ceb3eede89e64c5441412c01 /test/unit/test_c_api.cpp
parent846455f9585a7a44af5fb6d019fc76c5612c9d84 (diff)
downloadPROJ-2b3475c853b37b1485e92ef8cf78b02fb0db6142.tar.gz
PROJ-2b3475c853b37b1485e92ef8cf78b02fb0db6142.zip
Code reformatting
Diffstat (limited to 'test/unit/test_c_api.cpp')
-rw-r--r--test/unit/test_c_api.cpp15
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);