Skip to content

Commit 2c3992a

Browse files
committed
Move data_t class into testing::db namespace for consistency
1 parent 4385d22 commit 2c3992a

File tree

6 files changed

+28
-28
lines changed

6 files changed

+28
-28
lines changed

tests/common-import.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ inline void parse_file(options_t const &options,
5151
}
5252
}
5353

54+
namespace db {
55+
5456
/**
5557
* This is used as a helper to assemble OSM objects into an OPL file which
5658
* can later be used as input for testing.
@@ -114,8 +116,6 @@ class data_t
114116
std::string m_result;
115117
};
116118

117-
namespace db {
118-
119119
/**
120120
* Convenience class around tempdb_t that offers functions for
121121
* data import from file and strings.

tests/test-output-flex-way-add.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ TEST_CASE("add way")
2828
{
2929
options_t options = testing::opt_t().slim().flex(conf_file);
3030

31-
testing::data_t data{tdata};
31+
testing::db::data_t data{tdata};
3232

3333
REQUIRE_NOTHROW(db.run_import(options, data()));
3434

tests/test-output-flex-way-change.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST_CASE("change way from t1")
2020
{
2121
options_t options = testing::opt_t().slim().flex(conf_file);
2222

23-
testing::data_t data{tdata};
23+
testing::db::data_t data{tdata};
2424
data.add({"w10 v1 dV Tt1=yes Nn10,n11",
2525
"r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark"});
2626

@@ -63,7 +63,7 @@ TEST_CASE("change way from t2")
6363
{
6464
options_t options = testing::opt_t().slim().flex(conf_file);
6565

66-
testing::data_t data{tdata};
66+
testing::db::data_t data{tdata};
6767
data.add({"w10 v1 dV Tt2=yes Nn10,n11",
6868
"r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark"});
6969

@@ -106,7 +106,7 @@ TEST_CASE("change way from t1 and t2")
106106
{
107107
options_t options = testing::opt_t().slim().flex(conf_file);
108108

109-
testing::data_t data{tdata};
109+
testing::db::data_t data{tdata};
110110
data.add({"w10 v1 dV Tt1=yes,t2=yes Nn10,n11",
111111
"r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark"});
112112

@@ -149,7 +149,7 @@ TEST_CASE("change valid geom to invalid geom")
149149
{
150150
options_t options = testing::opt_t().slim().flex(conf_file);
151151

152-
testing::data_t data{tdata};
152+
testing::db::data_t data{tdata};
153153
data.add({"w10 v1 dV Tt1=yes,t2=yes,tboth=yes Nn10,n11",
154154
"r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark"});
155155

@@ -189,7 +189,7 @@ TEST_CASE("change invalid geom to valid geom")
189189
{
190190
options_t options = testing::opt_t().slim().flex(conf_file);
191191

192-
testing::data_t data{tdata};
192+
testing::db::data_t data{tdata};
193193
data.add({"w10 v1 dV Tt1=yes,t2=yes,tboth=yes Nn10",
194194
"r30 v1 dV Tt=ag Mw10@mark,w11@,w12@mark,w13@,w14@mark"});
195195

tests/test-output-flex-way-del.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ TEST_CASE("delete way: not a member")
2020
{
2121
options_t options = testing::opt_t().slim().flex(conf_file);
2222

23-
testing::data_t data{tdata};
23+
testing::db::data_t data{tdata};
2424

2525
unsigned long num_t1 = 0;
2626
unsigned long num_tboth = 0;
@@ -58,7 +58,7 @@ TEST_CASE("delete way: relation member")
5858
{
5959
options_t options = testing::opt_t().slim().flex(conf_file);
6060

61-
testing::data_t data{tdata};
61+
testing::db::data_t data{tdata};
6262

6363
unsigned long num_t1 = 0;
6464
unsigned long num_t2 = 0;

tests/test-output-flex-way-relation-add.cpp

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ TEST_CASE("test way: add relation with way in t1 (marked)")
3232
{
3333
options_t options = testing::opt_t().slim().flex(conf_file);
3434

35-
testing::data_t data{tdata};
35+
testing::db::data_t data{tdata};
3636

3737
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
3838

@@ -72,7 +72,7 @@ TEST_CASE("test way: add relation with way in t2 (marked)")
7272
{
7373
options_t options = testing::opt_t().slim().flex(conf_file);
7474

75-
testing::data_t data{tdata};
75+
testing::db::data_t data{tdata};
7676

7777
data.add("w10 v1 dV Tt2=yes Nn10,n11");
7878
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");
@@ -107,7 +107,7 @@ TEST_CASE("test way: add relation with way in t1 and t2 (marked)")
107107
{
108108
options_t options = testing::opt_t().slim().flex(conf_file);
109109

110-
testing::data_t data{tdata};
110+
testing::db::data_t data{tdata};
111111

112112
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
113113
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");
@@ -142,7 +142,7 @@ TEST_CASE("test way: add (to) relation with way in tboth stage 1 (marked)")
142142
{
143143
options_t options = testing::opt_t().slim().flex(conf_file);
144144

145-
testing::data_t data{tdata};
145+
testing::db::data_t data{tdata};
146146

147147
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
148148

@@ -188,7 +188,7 @@ TEST_CASE("test way: add relation with way in tboth stage 2 (marked)")
188188
{
189189
options_t options = testing::opt_t().slim().flex(conf_file);
190190

191-
testing::data_t data{tdata};
191+
testing::db::data_t data{tdata};
192192

193193
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
194194
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");
@@ -228,7 +228,7 @@ TEST_CASE("test way: add relation with way in t1 (not marked)")
228228
{
229229
options_t options = testing::opt_t().slim().flex(conf_file);
230230

231-
testing::data_t data{tdata};
231+
testing::db::data_t data{tdata};
232232

233233
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
234234

@@ -267,7 +267,7 @@ TEST_CASE("test way: add relation with way in t2 (not marked)")
267267
{
268268
options_t options = testing::opt_t().slim().flex(conf_file);
269269

270-
testing::data_t data{tdata};
270+
testing::db::data_t data{tdata};
271271

272272
data.add("w10 v1 dV Tt2=yes Nn10,n11");
273273
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");
@@ -302,7 +302,7 @@ TEST_CASE("test way: add relation with way in t1 and t2 (not marked)")
302302
{
303303
options_t options = testing::opt_t().slim().flex(conf_file);
304304

305-
testing::data_t data{tdata};
305+
testing::db::data_t data{tdata};
306306

307307
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
308308
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");
@@ -337,7 +337,7 @@ TEST_CASE("test way: add relation with way in tboth stage 1 (not marked)")
337337
{
338338
options_t options = testing::opt_t().slim().flex(conf_file);
339339

340-
testing::data_t data{tdata};
340+
testing::db::data_t data{tdata};
341341

342342
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
343343
data.add("r31 v1 dV Tt=ag Mw10@,w11@,w12@,w13@,w14@");
@@ -374,7 +374,7 @@ TEST_CASE("test way: add relation with way in tboth stage 2 (not marked)")
374374
{
375375
options_t options = testing::opt_t().slim().flex(conf_file);
376376

377-
testing::data_t data{tdata};
377+
testing::db::data_t data{tdata};
378378

379379
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
380380
data.add("r31 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@");

tests/test-output-flex-way-relation-del.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ TEST_CASE("test way: delete relation with way not in relation")
2929
{
3030
options_t options = testing::opt_t().slim().flex(conf_file);
3131

32-
testing::data_t data{tdata};
32+
testing::db::data_t data{tdata};
3333

3434
data.add("w10 v1 dV Tt=ag Nn10,n11");
3535
data.add("r32 v1 dV Tt=ag Mw11@,w12@,w13@,w14@,w15@");
@@ -61,7 +61,7 @@ TEST_CASE("test way: delete relation with way in t1")
6161
{
6262
options_t options = testing::opt_t().slim().flex(conf_file);
6363

64-
testing::data_t data{tdata};
64+
testing::db::data_t data{tdata};
6565

6666
data.add("w10 v1 dV Tt1=yes Nn10,n11");
6767
data.add("r32 v1 dV Tt=ag Mw11@,w12@,w13@,w14@,w15@");
@@ -93,7 +93,7 @@ TEST_CASE("test way: delete relation with way in t2 (multi)")
9393
{
9494
options_t options = testing::opt_t().slim().flex(conf_file);
9595

96-
testing::data_t data{tdata};
96+
testing::db::data_t data{tdata};
9797

9898
data.add("w10 v1 dV Tt2=yes Nn10,n11");
9999
data.add("r31 v1 dV Tt=ag Mw10@mark");
@@ -137,7 +137,7 @@ TEST_CASE("test way: delete relation with way in t2 (single)")
137137
{
138138
options_t options = testing::opt_t().slim().flex(conf_file);
139139

140-
testing::data_t data{tdata};
140+
testing::db::data_t data{tdata};
141141

142142
data.add("w10 v1 dV Tt2=yes Nn10,n11");
143143
data.add("r32 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@");
@@ -180,7 +180,7 @@ TEST_CASE("test way: delete relation with way in t1 + t2 (multi)")
180180
{
181181
options_t options = testing::opt_t().slim().flex(conf_file);
182182

183-
testing::data_t data{tdata};
183+
testing::db::data_t data{tdata};
184184

185185
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
186186
data.add("r31 v1 dV Tt=ag Mw10@mark");
@@ -224,7 +224,7 @@ TEST_CASE("test way: delete relation with way in t1 + t2 (single)")
224224
{
225225
options_t options = testing::opt_t().slim().flex(conf_file);
226226

227-
testing::data_t data{tdata};
227+
testing::db::data_t data{tdata};
228228

229229
data.add("w10 v1 dV Tt1=yes,t2=yes Nn10,n11");
230230
data.add("r32 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@");
@@ -266,7 +266,7 @@ TEST_CASE("test way: delete relation with way in tboth (multi)")
266266
{
267267
options_t options = testing::opt_t().slim().flex(conf_file);
268268

269-
testing::data_t data{tdata};
269+
testing::db::data_t data{tdata};
270270

271271
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
272272
data.add("r31 v1 dV Tt=ag Mw10@mark");
@@ -310,7 +310,7 @@ TEST_CASE("test way: delete relation with way in tboth (single)")
310310
{
311311
options_t options = testing::opt_t().slim().flex(conf_file);
312312

313-
testing::data_t data{tdata};
313+
testing::db::data_t data{tdata};
314314

315315
data.add("w10 v1 dV Ttboth=yes Nn10,n11");
316316
data.add("r32 v1 dV Tt=ag Mw10@mark,w11@,w12@,w13@,w14@,w15@");

0 commit comments

Comments
 (0)