mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2025-08-22 19:42:12 +00:00
Code style fix via clang-format
This commit is contained in:
@ -21,8 +21,7 @@ lua_tagtransform_t::lua_tagtransform_t(options_t const *options)
|
||||
luaL_openlibs(L);
|
||||
if (luaL_dofile(L, options->tag_transform_script->c_str())) {
|
||||
throw std::runtime_error(
|
||||
(boost::format(
|
||||
"Lua tag transform style error: %1%") %
|
||||
(boost::format("Lua tag transform style error: %1%") %
|
||||
lua_tostring(L, -1))
|
||||
.str());
|
||||
}
|
||||
|
@ -135,18 +135,22 @@ void test_outputs()
|
||||
void test_lua_styles()
|
||||
{
|
||||
#ifdef HAVE_LUA
|
||||
const char* a1[] = {"osm2pgsql", "--tag-transform-script", "non_existing.lua", "tests/liechtenstein-2013-08-03.osm.pbf"};
|
||||
const char *a1[] = {"osm2pgsql", "--tag-transform-script",
|
||||
"non_existing.lua",
|
||||
"tests/liechtenstein-2013-08-03.osm.pbf"};
|
||||
options_t options = options_t(len(a1), const_cast<char **>(a1));
|
||||
|
||||
try
|
||||
{
|
||||
std::unique_ptr<tagtransform_t> tagtransform = tagtransform_t::make_tagtransform(&options);
|
||||
|
||||
try {
|
||||
std::unique_ptr<tagtransform_t> tagtransform =
|
||||
tagtransform_t::make_tagtransform(&options);
|
||||
throw std::logic_error("Expected 'No such file or directory'");
|
||||
}
|
||||
catch(const std::runtime_error& e)
|
||||
{
|
||||
if(!alg::icontains(e.what(), "No such file or directory"))
|
||||
throw std::logic_error((boost::format("Expected 'No such file or directory' but instead got '%1%'") % e.what()).str());
|
||||
} catch (const std::runtime_error &e) {
|
||||
if (!alg::icontains(e.what(), "No such file or directory"))
|
||||
throw std::logic_error(
|
||||
(boost::format("Expected 'No such file or directory' but "
|
||||
"instead got '%1%'") %
|
||||
e.what())
|
||||
.str());
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
Reference in New Issue
Block a user