File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 77
88static testing::db::import_t db;
99
10- static std::random_device dev;
11- static std::mt19937 rng (dev());
10+ // Use a random device with a fixed seed. We don't really care about
11+ // the quality of random numbers here, we just need to generate valid
12+ // OSM test data. The fixed seed ensures that the results are reproducible.
13+ static std::mt19937_64 rng (47382 );
1214
1315class node_opl_t
1416{
@@ -72,7 +74,7 @@ class way_opl_t
7274 unsigned const num_nodes = intdist (rng);
7375
7476 // compute the start point, all points afterwards are relative
75- std::uniform_real_distribution<double > dist{-90 , 89.99 };
77+ std::uniform_real_distribution<double > dist{-89.9 , 89.9 };
7678 double x = 2 * dist (rng);
7779 double y = dist (rng);
7880
@@ -138,7 +140,7 @@ class relation_opl_t
138140 osmid_t make_nodes ()
139141 {
140142 // compute a centre points and compute four corners from this
141- std::uniform_real_distribution<double > dist{-90 , 89.99 };
143+ std::uniform_real_distribution<double > dist{-89.9 , 89.9 };
142144 double const x = 2 * dist (rng);
143145 double const y = dist (rng);
144146
You can’t perform that action at this time.
0 commit comments