Skip to content

Commit e71cc1b

Browse files
committed
Merges test datasets: keeps Berlin, removes Monaco
1 parent 6168060 commit e71cc1b

File tree

14 files changed

+86
-258
lines changed

14 files changed

+86
-258
lines changed

.gitignore

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ Thumbs.db
4646
#######################
4747
/build/
4848
/example/build/
49-
/test/data/monaco*
49+
/test/data/berlin*
5050
/test/bindings/node/data/berlin*
5151
/cmake/postinst
5252

@@ -87,7 +87,7 @@ stxxl.errlog
8787
/test/cache
8888
/test/speeds.csv
8989
/test/penalties.csv
90-
/test/data/monaco.*
90+
/test/data/berlin.*
9191
node_modules
9292

9393
# Deprecated config file #

.travis.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -198,10 +198,10 @@ script:
198198
- echo "travis_fold:start:BENCHMARK"
199199
- make -C test/data benchmark
200200
- echo "travis_fold:end:BENCHMARK"
201-
- ./example/build/osrm-example test/data/monaco.osrm
201+
- ./example/build/osrm-example test/data/berlin.osrm
202202
# All tests assume to be run from the build directory
203203
- pushd ${OSRM_BUILD_DIR}
204-
- ./unit_tests/library-tests ../test/data/monaco.osrm
204+
- ./unit_tests/library-tests ../test/data/berlin.osrm
205205
- ./unit_tests/extractor-tests
206206
- ./unit_tests/engine-tests
207207
- ./unit_tests/util-tests

docs/testing.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ You should see the compiled binaries in `build/unit_tests`, you can then run eac
4949
For `library-tests` you will need to provide a path to the test data:
5050

5151
```
52-
./library-tests ../../test/data/monaco.osrm
52+
./library-tests ../../test/data/berlin.osrm
5353
```
5454

5555
## Cucumber

example/example.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -39,9 +39,9 @@ int main(int argc, const char *argv[])
3939
// The following shows how to use the Route service; configure this service
4040
RouteParameters params;
4141

42-
// Route in monaco
43-
params.coordinates.push_back({util::FloatLongitude{7.419758}, util::FloatLatitude{43.731142}});
44-
params.coordinates.push_back({util::FloatLongitude{7.419505}, util::FloatLatitude{43.736825}});
42+
// Route in Berlin: Alexanderplatz to Hackescher Markt
43+
params.coordinates.push_back({util::FloatLongitude{13.414307}, util::FloatLatitude{52.521835}});
44+
params.coordinates.push_back({util::FloatLongitude{13.402290}, util::FloatLatitude{52.523728}});
4545

4646
// Response is in JSON format
4747
json::Object result;
@@ -59,7 +59,7 @@ int main(int argc, const char *argv[])
5959
const auto duration = route.values["duration"].get<json::Number>().value;
6060

6161
// Warn users if extract does not contain the default Berlin coordinates from above
62-
if (distance == 0 or duration == 0)
62+
if (distance == 0 || duration == 0)
6363
{
6464
std::cout << "Note: distance or duration is zero. ";
6565
std::cout << "You are probably doing a query outside of the OSM extract.\n\n";

example/example.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ var OSRM = require('..');
55
var path = require('path');
66

77
var app = express();
8-
var osrm = new OSRM(path.join(__dirname,"../test/data/monaco.osrm"));
8+
var osrm = new OSRM(path.join(__dirname,"../test/data/berlin.osrm"));
99

1010
// Accepts a query like:
11-
// http://localhost:8888?start=13.438640,52.519930&end=13.415852,52.513191
11+
// http://localhost:8888?start=13.414307,52.521835&end=13.402290,52.523728
1212
app.get('/', function(req, res) {
1313
if (!req.query.start || !req.query.end) {
1414
return res.json({"error":"invalid start and end query"});

scripts/poly2req.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,8 +51,8 @@ else if (process.argv.length > 2 && process.argv[2] == "dc")
5151
}
5252
else if (process.argv.length > 2)
5353
{
54-
let monaco_poly_path = process.argv[2];
55-
let poly_data = fs.readFileSync(monaco_poly_path, 'utf-8');
54+
let poly_path = process.argv[2];
55+
let poly_data = fs.readFileSync(poly_path, 'utf-8');
5656

5757
// lets assume there is only one ring
5858
// cut of name and ring number and the two END statements

src/benchmarks/match.cpp

Lines changed: 61 additions & 108 deletions
Large diffs are not rendered by default.

test/data/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
DATA_NAME:=monaco
1+
DATA_NAME:=berlin
22
DATA_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).osm.pbf
33
DATA_POLY_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).poly
44
OSRM_BUILD_DIR?=../../build

test/data/data.md5sum

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
2b8dd9343d5e615afc9c67bcc7028a63 monaco.osm.pbf
2-
b0788991ab3791d53c1c20b6281f81ad monaco.poly
1+
54707104e9f411d1a3032c00fb1276c6 berlin.osm.pbf
2+
031d988f23fc2a30371c9ef8d2a49bae berlin.poly

test/nodejs/data/Makefile

Lines changed: 0 additions & 32 deletions
This file was deleted.

test/nodejs/data/data.md5sum

Lines changed: 0 additions & 1 deletion
This file was deleted.

test/nodejs/data/md5sum.js

Lines changed: 0 additions & 92 deletions
This file was deleted.

test/nodejs/osrm-data-path.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ if (process.env.OSRM_DATA_PATH !== undefined) {
44
exports.data_path = path.join(path.resolve(process.env.OSRM_DATA_PATH),"berlin-latest.osrm");
55
console.log('Setting custom data path to ' + exports.data_path);
66
} else {
7-
exports.data_path = path.resolve(path.join(__dirname,"data/berlin-latest.osrm"));
7+
exports.data_path = path.resolve(path.join(__dirname, "../data/berlin-latest.osrm"));
88
}

unit_tests/library/coordinates.hpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
#include <vector>
77

8-
// Somewhere in 2b8dd9343d5e615afc9c67bcc7028a63 Monaco
8+
// Somewhere in d41d8cd98f00b204e9800998ecf8427e Berlin
99

1010
// Convenience aliases
1111
using Longitude = osrm::util::FloatLongitude;
@@ -15,21 +15,21 @@ using Locations = std::vector<Location>;
1515

1616
inline Location get_dummy_location()
1717
{
18-
return {osrm::util::FloatLongitude{7.437069}, osrm::util::FloatLatitude{43.749249}};
18+
return {osrm::util::FloatLongitude{13.388860}, osrm::util::FloatLatitude{52.517037}};
1919
}
2020

2121
inline Locations get_locations_in_small_component()
2222
{
23-
return {{Longitude{7.438023}, Latitude{43.746465}},
24-
{Longitude{7.439263}, Latitude{43.746543}},
25-
{Longitude{7.438190}, Latitude{43.747560}}};
23+
return {{Longitude{13.459765}, Latitude{52.543193}},
24+
{Longitude{13.461455}, Latitude{52.542381}},
25+
{Longitude{13.462940}, Latitude{52.541774}}};
2626
}
2727

2828
inline Locations get_locations_in_big_component()
2929
{
30-
return {{Longitude{7.415800}, Latitude{43.734132}},
31-
{Longitude{7.417710}, Latitude{43.736721}},
32-
{Longitude{7.421315}, Latitude{43.738814}}};
30+
return {{Longitude{13.442631}, Latitude{52.551110}},
31+
{Longitude{13.441193}, Latitude{52.549506}},
32+
{Longitude{13.439648}, Latitude{52.547705}}};
3333
}
3434

3535
#endif

0 commit comments

Comments
 (0)