mirror of
https://github.com/osm2pgsql-dev/osm2pgsql.git
synced 2025-08-22 19:42:12 +00:00
clang-format tests
This commit is contained in:
@ -7,20 +7,23 @@ static testing::db::import_t db;
|
||||
|
||||
TEST_CASE("compute Z order")
|
||||
{
|
||||
REQUIRE_NOTHROW(db.run_file(testing::opt_t().slim(),
|
||||
"test_output_pgsql_z_order.osm"));
|
||||
REQUIRE_NOTHROW(
|
||||
db.run_file(testing::opt_t().slim(), "test_output_pgsql_z_order.osm"));
|
||||
|
||||
auto conn = db.db().connect();
|
||||
|
||||
char const *expected[] = {"motorway", "trunk", "primary",
|
||||
"secondary", "tertiary"};
|
||||
char const *expected[] = {"motorway", "trunk", "primary", "secondary",
|
||||
"tertiary"};
|
||||
|
||||
for (unsigned i = 0; i < 5; ++i) {
|
||||
auto sql = boost::format("SELECT highway FROM osm2pgsql_test_line"
|
||||
" WHERE layer IS NULL ORDER BY z_order DESC"
|
||||
" LIMIT 1 OFFSET %1%") % i;
|
||||
" LIMIT 1 OFFSET %1%") %
|
||||
i;
|
||||
REQUIRE(expected[i] == conn.require_scalar<std::string>(sql.str()));
|
||||
}
|
||||
|
||||
REQUIRE("residential" == conn.require_scalar<std::string>("SELECT highway FROM osm2pgsql_test_line ORDER BY z_order DESC LIMIT 1 OFFSET 0"));
|
||||
REQUIRE("residential" == conn.require_scalar<std::string>(
|
||||
"SELECT highway FROM osm2pgsql_test_line "
|
||||
"ORDER BY z_order DESC LIMIT 1 OFFSET 0"));
|
||||
}
|
||||
|
Reference in New Issue
Block a user