@@ -145,66 +145,6 @@ TEST_CASE("change way from t1 and t2")
145145 CHECK (2 == conn.get_count (" osm2pgsql_test_tboth" ));
146146}
147147
148- TEST_CASE (" change tboth with stage2 to tboth without stage2" )
149- {
150- options_t options = testing::opt_t ().slim ().flex (conf_file);
151-
152- testing::data_t data{tdata};
153- data.add ({" w10 v1 dV Ttboth=yes Nn10,n11" ,
154- " r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark" });
155-
156- REQUIRE_NOTHROW (db.run_import (options, data ()));
157-
158- auto conn = db.db ().connect ();
159-
160- CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
161- CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
162- CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
163- CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
164- " way_id = 10 AND rel_ids = '{30}'" ));
165-
166- options.append = true ;
167-
168- REQUIRE_NOTHROW (db.run_import (
169- options, " r30 v2 dV Tt=ag Mw10@,w11@,w12@mark,w13@,w14@mark" ));
170-
171- CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
172- CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
173- CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
174- CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
175- " way_id = 10 AND rel_ids IS NULL" ));
176- }
177-
178- TEST_CASE (" change tboth without stage2 to tboth with stage2" )
179- {
180- options_t options = testing::opt_t ().slim ().flex (conf_file);
181-
182- testing::data_t data{tdata};
183- data.add ({" w10 v1 dV Ttboth=yes Nn10,n11" ,
184- " r30 v1 dV Tt=ag Mw10@,w11@,w12@mark,w13@,w14@mark" });
185-
186- REQUIRE_NOTHROW (db.run_import (options, data ()));
187-
188- auto conn = db.db ().connect ();
189-
190- CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
191- CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
192- CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
193- CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
194- " way_id = 10 AND rel_ids IS NULL" ));
195-
196- options.append = true ;
197-
198- REQUIRE_NOTHROW (db.run_import (
199- options, " r30 v2 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark" ));
200-
201- CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
202- CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
203- CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
204- CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
205- " way_id = 10 AND rel_ids = '{30}'" ));
206- }
207-
208148TEST_CASE (" change valid geom to invalid geom" )
209149{
210150 options_t options = testing::opt_t ().slim ().flex (conf_file);
@@ -219,6 +159,8 @@ TEST_CASE("change valid geom to invalid geom")
219159
220160 CHECK (2 == conn.get_count (" osm2pgsql_test_t1" ));
221161 CHECK (2 == conn.get_count (" osm2pgsql_test_t2" ));
162+ CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ,
163+ " way_id = 10 AND rel_ids = '{30}'" ));
222164 CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
223165 CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
224166 " way_id = 10 AND rel_ids = '{30}'" ));
@@ -238,9 +180,9 @@ TEST_CASE("change valid geom to invalid geom")
238180
239181 CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
240182 CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
183+ CHECK (0 == conn.get_count (" osm2pgsql_test_t2" , " way_id = 10" ));
241184 CHECK (2 == conn.get_count (" osm2pgsql_test_tboth" ));
242- CHECK (0 == conn.get_count (" osm2pgsql_test_tboth" ,
243- " way_id = 10 AND rel_ids = '{30}'" ));
185+ CHECK (0 == conn.get_count (" osm2pgsql_test_tboth" , " way_id = 10" ));
244186}
245187
246188TEST_CASE (" change invalid geom to valid geom" )
@@ -257,9 +199,9 @@ TEST_CASE("change invalid geom to valid geom")
257199
258200 CHECK (1 == conn.get_count (" osm2pgsql_test_t1" ));
259201 CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ));
202+ CHECK (0 == conn.get_count (" osm2pgsql_test_t2" , " way_id = 10" ));
260203 CHECK (2 == conn.get_count (" osm2pgsql_test_tboth" ));
261- CHECK (0 == conn.get_count (" osm2pgsql_test_tboth" ,
262- " way_id = 10 AND rel_ids = '{30}'" ));
204+ CHECK (0 == conn.get_count (" osm2pgsql_test_tboth" , " way_id = 10" ));
263205
264206 options.append = true ;
265207
@@ -268,6 +210,8 @@ TEST_CASE("change invalid geom to valid geom")
268210
269211 CHECK (2 == conn.get_count (" osm2pgsql_test_t1" ));
270212 CHECK (2 == conn.get_count (" osm2pgsql_test_t2" ));
213+ CHECK (1 == conn.get_count (" osm2pgsql_test_t2" ,
214+ " way_id = 10 AND rel_ids = '{30}'" ));
271215 CHECK (3 == conn.get_count (" osm2pgsql_test_tboth" ));
272216 CHECK (1 == conn.get_count (" osm2pgsql_test_tboth" ,
273217 " way_id = 10 AND rel_ids = '{30}'" ));
0 commit comments