Skip to content

Commit b6d8645

Browse files
committed
Remove unused way nodes in test data
1 parent 3d1eab5 commit b6d8645

File tree

2 files changed

+12
-12
lines changed

2 files changed

+12
-12
lines changed

tests/test-output-flex-uni.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ TEST_CASE("ways as linestrings and polygons")
118118
"n11 v1 dV x10.0 y10.2\n"
119119
"n12 v1 dV x10.2 y10.2\n"
120120
"n13 v1 dV x10.2 y10.0\n"
121-
"w20 v1 dV Tbuilding=yes Nn10,n11,n12,n13,n14,n10\n"));
121+
"w20 v1 dV Tbuilding=yes Nn10,n11,n12,n13,n10\n"));
122122

123123
auto conn = db.db().connect();
124124

@@ -139,7 +139,7 @@ TEST_CASE("ways as linestrings and polygons")
139139
// now change the way tags...
140140
REQUIRE_NOTHROW(db.run_import(
141141
testing::opt_t().slim().append().flex("test_output_flex_uni.lua"),
142-
"w20 v2 dV Thighway=secondary Nn10,n11,n12,n13,n14,n10\n"));
142+
"w20 v2 dV Thighway=secondary Nn10,n11,n12,n13,n10\n"));
143143

144144
REQUIRE(0 == conn.get_count("osm2pgsql_test_data", "osm_type != 'W'"));
145145
REQUIRE(
@@ -156,7 +156,7 @@ TEST_CASE("ways as linestrings and polygons")
156156
// now remove a node from the way...
157157
REQUIRE_NOTHROW(db.run_import(
158158
testing::opt_t().slim().append().flex("test_output_flex_uni.lua"),
159-
"w20 v3 dV Thighway=secondary Nn10,n11,n12,n13,n14\n"));
159+
"w20 v3 dV Thighway=secondary Nn10,n11,n12,n13\n"));
160160

161161
REQUIRE(0 == conn.get_count("osm2pgsql_test_data", "osm_type != 'W'"));
162162
REQUIRE(
@@ -173,14 +173,14 @@ TEST_CASE("ways as linestrings and polygons")
173173
// now change the tag back to an area tag (but the way is not closed)...
174174
REQUIRE_NOTHROW(db.run_import(
175175
testing::opt_t().slim().append().flex("test_output_flex_uni.lua"),
176-
"w20 v4 dV Tbuilding=yes Nn10,n11,n12,n13,n14\n"));
176+
"w20 v4 dV Tbuilding=yes Nn10,n11,n12,n13\n"));
177177

178178
REQUIRE(0 == conn.get_count("osm2pgsql_test_data"));
179179

180180
// now close the way again
181181
REQUIRE_NOTHROW(db.run_import(
182182
testing::opt_t().slim().append().flex("test_output_flex_uni.lua"),
183-
"w20 v5 dV Tbuilding=yes Nn10,n11,n12,n13,n14,n10\n"));
183+
"w20 v5 dV Tbuilding=yes Nn10,n11,n12,n13,n10\n"));
184184

185185
REQUIRE(0 == conn.get_count("osm2pgsql_test_data", "osm_type != 'W'"));
186186
REQUIRE(
@@ -200,7 +200,7 @@ TEST_CASE("multipolygons")
200200
"n11 v1 dV x10.0 y10.2\n"
201201
"n12 v1 dV x10.2 y10.2\n"
202202
"n13 v1 dV x10.2 y10.0\n"
203-
"w20 v1 dV Nn10,n11,n12,n13,n14,n10\n"
203+
"w20 v1 dV Nn10,n11,n12,n13,n10\n"
204204
"r30 v1 dV Ttype=multipolygon,building=yes Mw20@\n"));
205205

206206
auto conn = db.db().connect();

tests/test-output-flex-update.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ TEST_CASE("ways as linestrings and polygons")
112112
"n11 v1 dV x10.0 y10.2\n"
113113
"n12 v1 dV x10.2 y10.2\n"
114114
"n13 v1 dV x10.2 y10.0\n"
115-
"w20 v1 dV Tbuilding=yes Nn10,n11,n12,n13,n14,n10\n"));
115+
"w20 v1 dV Tbuilding=yes Nn10,n11,n12,n13,n10\n"));
116116

117117
auto conn = db.db().connect();
118118

@@ -126,7 +126,7 @@ TEST_CASE("ways as linestrings and polygons")
126126
// now change the way tags...
127127
REQUIRE_NOTHROW(db.run_import(
128128
testing::opt_t().slim().append().flex("test_output_flex.lua"),
129-
"w20 v2 dV Thighway=secondary Nn10,n11,n12,n13,n14,n10\n"));
129+
"w20 v2 dV Thighway=secondary Nn10,n11,n12,n13,n10\n"));
130130

131131
REQUIRE(0 == conn.get_count("osm2pgsql_test_point"));
132132
REQUIRE(1 == conn.get_count("osm2pgsql_test_line"));
@@ -139,7 +139,7 @@ TEST_CASE("ways as linestrings and polygons")
139139
// now remove a node from the way...
140140
REQUIRE_NOTHROW(db.run_import(
141141
testing::opt_t().slim().append().flex("test_output_flex.lua"),
142-
"w20 v3 dV Thighway=secondary Nn10,n11,n12,n13,n14\n"));
142+
"w20 v3 dV Thighway=secondary Nn10,n11,n12,n13\n"));
143143

144144
REQUIRE(0 == conn.get_count("osm2pgsql_test_point"));
145145
REQUIRE(1 == conn.get_count("osm2pgsql_test_line"));
@@ -152,7 +152,7 @@ TEST_CASE("ways as linestrings and polygons")
152152
// now change the tag back to an area tag (but the way is not closed)...
153153
REQUIRE_NOTHROW(db.run_import(
154154
testing::opt_t().slim().append().flex("test_output_flex.lua"),
155-
"w20 v4 dV Tbuilding=yes Nn10,n11,n12,n13,n14\n"));
155+
"w20 v4 dV Tbuilding=yes Nn10,n11,n12,n13\n"));
156156

157157
REQUIRE(0 == conn.get_count("osm2pgsql_test_point"));
158158
REQUIRE(0 == conn.get_count("osm2pgsql_test_line"));
@@ -161,7 +161,7 @@ TEST_CASE("ways as linestrings and polygons")
161161
// now close the way again
162162
REQUIRE_NOTHROW(db.run_import(
163163
testing::opt_t().slim().append().flex("test_output_flex.lua"),
164-
"w20 v5 dV Tbuilding=yes Nn10,n11,n12,n13,n14,n10\n"));
164+
"w20 v5 dV Tbuilding=yes Nn10,n11,n12,n13,n10\n"));
165165

166166
REQUIRE(0 == conn.get_count("osm2pgsql_test_point"));
167167
REQUIRE(0 == conn.get_count("osm2pgsql_test_line"));
@@ -180,7 +180,7 @@ TEST_CASE("multipolygons")
180180
"n11 v1 dV x10.0 y10.2\n"
181181
"n12 v1 dV x10.2 y10.2\n"
182182
"n13 v1 dV x10.2 y10.0\n"
183-
"w20 v1 dV Nn10,n11,n12,n13,n14,n10\n"
183+
"w20 v1 dV Nn10,n11,n12,n13,n10\n"
184184
"r30 v1 dV Ttype=multipolygon,building=yes Mw20@\n"));
185185

186186
auto conn = db.db().connect();

0 commit comments

Comments
 (0)