Back to Monaco for unit tests
This commit is contained in:
parent
934f87bcdd
commit
c772210cc0
7
.gitignore
vendored
7
.gitignore
vendored
@ -46,8 +46,10 @@ Thumbs.db
|
||||
#######################
|
||||
/build/
|
||||
/example/build/
|
||||
/test/data/berlin*
|
||||
/test/bindings/node/data/berlin*
|
||||
/test/data/monaco*
|
||||
/test/data/ch
|
||||
/test/data/corech
|
||||
/test/data/mld
|
||||
/cmake/postinst
|
||||
|
||||
# Eclipse related files #
|
||||
@ -87,7 +89,6 @@ stxxl.errlog
|
||||
/test/cache
|
||||
/test/speeds.csv
|
||||
/test/penalties.csv
|
||||
/test/data/berlin.*
|
||||
node_modules
|
||||
|
||||
# Deprecated config file #
|
||||
|
@ -1,4 +1,4 @@
|
||||
DATA_NAME:=berlin
|
||||
DATA_NAME:=monaco
|
||||
DATA_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).osm.pbf
|
||||
DATA_POLY_URL:=https://s3.amazonaws.com/mapbox/osrm/testing/$(DATA_NAME).poly
|
||||
OSRM_BUILD_DIR?=../../build
|
||||
@ -19,8 +19,8 @@ all: data
|
||||
data: ch/$(DATA_NAME).osrm.hsgr corech/$(DATA_NAME).osrm.hsgr mld/$(DATA_NAME).osrm.partition
|
||||
|
||||
clean:
|
||||
-rm $(DATA_NAME).*
|
||||
-rm $(DATA_NAME)_*
|
||||
-rm -r $(DATA_NAME).*
|
||||
-rm -r ch corech mld
|
||||
|
||||
$(DATA_NAME).osm.pbf:
|
||||
wget $(DATA_URL) -O $(DATA_NAME).osm.pbf
|
||||
|
@ -1,2 +1,2 @@
|
||||
54707104e9f411d1a3032c00fb1276c6 berlin.osm.pbf
|
||||
031d988f23fc2a30371c9ef8d2a49bae berlin.poly
|
||||
2b8dd9343d5e615afc9c67bcc7028a63 monaco.osm.pbf
|
||||
b0788991ab3791d53c1c20b6281f81ad monaco.poly
|
||||
|
@ -5,7 +5,7 @@
|
||||
|
||||
#include <vector>
|
||||
|
||||
// Somewhere in d41d8cd98f00b204e9800998ecf8427e Berlin
|
||||
// Somewhere in 2b8dd9343d5e615afc9c67bcc7028a63 Monaco
|
||||
|
||||
// Convenience aliases
|
||||
using Longitude = osrm::util::FloatLongitude;
|
||||
@ -15,21 +15,21 @@ using Locations = std::vector<Location>;
|
||||
|
||||
inline Location get_dummy_location()
|
||||
{
|
||||
return {osrm::util::FloatLongitude{13.388860}, osrm::util::FloatLatitude{52.517037}};
|
||||
return {osrm::util::FloatLongitude{7.437069}, osrm::util::FloatLatitude{43.749249}};
|
||||
}
|
||||
|
||||
inline Locations get_locations_in_small_component()
|
||||
{
|
||||
return {{Longitude{13.459765}, Latitude{52.543193}},
|
||||
{Longitude{13.461455}, Latitude{52.542381}},
|
||||
{Longitude{13.462940}, Latitude{52.541774}}};
|
||||
return {{Longitude{7.438023}, Latitude{43.746465}},
|
||||
{Longitude{7.439263}, Latitude{43.746543}},
|
||||
{Longitude{7.438190}, Latitude{43.747560}}};
|
||||
}
|
||||
|
||||
inline Locations get_locations_in_big_component()
|
||||
{
|
||||
return {{Longitude{13.442631}, Latitude{52.551110}},
|
||||
{Longitude{13.441193}, Latitude{52.549506}},
|
||||
{Longitude{13.439648}, Latitude{52.547705}}};
|
||||
return {{Longitude{7.415800}, Latitude{43.734132}},
|
||||
{Longitude{7.417710}, Latitude{43.736721}},
|
||||
{Longitude{7.421315}, Latitude{43.738814}}};
|
||||
}
|
||||
|
||||
#endif
|
||||
|
@ -19,7 +19,7 @@ BOOST_AUTO_TEST_CASE(test_extract_with_invalid_config)
|
||||
BOOST_AUTO_TEST_CASE(test_extract_with_valid_config)
|
||||
{
|
||||
osrm::ExtractorConfig config;
|
||||
config.input_path = OSRM_TEST_DATA_DIR "/berlin.osm.pbf";
|
||||
config.input_path = OSRM_TEST_DATA_DIR "/monaco.osm.pbf";
|
||||
config.requested_num_threads = tbb::task_scheduler_init::default_num_threads();
|
||||
BOOST_CHECK_NO_THROW(osrm::extract(config));
|
||||
}
|
||||
|
@ -28,7 +28,7 @@ BOOST_AUTO_TEST_CASE(test_trip_limits)
|
||||
using namespace osrm;
|
||||
|
||||
EngineConfig config;
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/berlin.osrm"};
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/monaco.osrm"};
|
||||
config.use_shared_memory = false;
|
||||
config.max_locations_trip = 2;
|
||||
|
||||
@ -55,7 +55,7 @@ BOOST_AUTO_TEST_CASE(test_route_limits)
|
||||
using namespace osrm;
|
||||
|
||||
EngineConfig config;
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/berlin.osrm"};
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/monaco.osrm"};
|
||||
config.use_shared_memory = false;
|
||||
config.max_locations_viaroute = 2;
|
||||
|
||||
@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(test_table_limits)
|
||||
using namespace osrm;
|
||||
|
||||
EngineConfig config;
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/berlin.osrm"};
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/monaco.osrm"};
|
||||
config.use_shared_memory = false;
|
||||
config.max_locations_distance_table = 2;
|
||||
|
||||
@ -109,7 +109,7 @@ BOOST_AUTO_TEST_CASE(test_match_limits)
|
||||
using namespace osrm;
|
||||
|
||||
EngineConfig config;
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/berlin.osrm"};
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/monaco.osrm"};
|
||||
config.use_shared_memory = false;
|
||||
config.max_locations_map_matching = 2;
|
||||
|
||||
@ -136,7 +136,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_limits)
|
||||
using namespace osrm;
|
||||
|
||||
EngineConfig config;
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/berlin.osrm"};
|
||||
config.storage_config = {OSRM_TEST_DATA_DIR "/ch/monaco.osrm"};
|
||||
config.use_shared_memory = false;
|
||||
config.max_results_nearest = 2;
|
||||
|
||||
|
@ -19,7 +19,7 @@ BOOST_AUTO_TEST_CASE(test_match)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
MatchParameters params;
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
|
@ -16,7 +16,7 @@ BOOST_AUTO_TEST_SUITE(nearest)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_nearest_response)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -43,7 +43,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -59,7 +59,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -77,7 +77,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
|
@ -14,7 +14,7 @@ BOOST_AUTO_TEST_CASE(test_ch)
|
||||
using namespace osrm;
|
||||
EngineConfig config;
|
||||
config.use_shared_memory = false;
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
config.algorithm = EngineConfig::Algorithm::CH;
|
||||
OSRM osrm{config};
|
||||
}
|
||||
@ -24,7 +24,7 @@ BOOST_AUTO_TEST_CASE(test_corech)
|
||||
using namespace osrm;
|
||||
EngineConfig config;
|
||||
config.use_shared_memory = false;
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/corech/berlin.osrm");
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/corech/monaco.osrm");
|
||||
config.algorithm = EngineConfig::Algorithm::CoreCH;
|
||||
OSRM osrm{config};
|
||||
}
|
||||
@ -34,7 +34,7 @@ BOOST_AUTO_TEST_CASE(test_mld)
|
||||
using namespace osrm;
|
||||
EngineConfig config;
|
||||
config.use_shared_memory = false;
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/mld/berlin.osrm");
|
||||
config.storage_config = storage::StorageConfig(OSRM_TEST_DATA_DIR "/mld/monaco.osrm");
|
||||
config.algorithm = EngineConfig::Algorithm::MLD;
|
||||
OSRM osrm{config};
|
||||
}
|
||||
|
@ -17,7 +17,7 @@ BOOST_AUTO_TEST_SUITE(route)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -25,38 +25,44 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
|
||||
params.steps = true;
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
params.generate_hints = false;
|
||||
|
||||
json::Object result;
|
||||
const auto rc = osrm.Route(params, result);
|
||||
BOOST_CHECK(rc == Status::Ok);
|
||||
|
||||
const auto location = json::Array{{{13.3888}, {52.517033}}};
|
||||
// unset snapping dependent hint
|
||||
for (auto &itr : result.values["waypoints"].get<json::Array>().values)
|
||||
itr.get<json::Object>().values["hint"] = "";
|
||||
|
||||
const auto location = json::Array{{{7.437070}, {43.749248}}};
|
||||
|
||||
json::Object reference{
|
||||
{{"code", "Ok"},
|
||||
{"waypoints",
|
||||
json::Array{{json::Object{{{"name", "Friedrichstraße"}, {"location", location}}},
|
||||
json::Object{{{"name", "Friedrichstraße"}, {"location", location}}}}}},
|
||||
json::Array{
|
||||
{json::Object{
|
||||
{{"name", "Boulevard du Larvotto"}, {"location", location}, {"hint", ""}}},
|
||||
json::Object{
|
||||
{{"name", "Boulevard du Larvotto"}, {"location", location}, {"hint", ""}}}}}},
|
||||
{"routes",
|
||||
json::Array{{json::Object{
|
||||
{{"distance", 0.},
|
||||
{"duration", 0.},
|
||||
{"weight", 0.},
|
||||
{"weight_name", "routability"},
|
||||
{"geometry", "mfp_I__vpA??"},
|
||||
{"geometry", "yw_jGupkl@??"},
|
||||
{"legs",
|
||||
json::Array{{json::Object{
|
||||
{{"distance", 0.},
|
||||
{"duration", 0.},
|
||||
{"weight", 0.},
|
||||
{"summary", "Friedrichstraße"},
|
||||
{"summary", "Boulevard du Larvotto"},
|
||||
{"steps",
|
||||
json::Array{{{json::Object{{{"duration", 0.},
|
||||
{"distance", 0.},
|
||||
{"weight", 0.},
|
||||
{"geometry", "mfp_I__vpA??"},
|
||||
{"name", "Friedrichstraße"},
|
||||
{"geometry", "yw_jGupkl@??"},
|
||||
{"name", "Boulevard du Larvotto"},
|
||||
{"mode", "driving"},
|
||||
{"maneuver",
|
||||
json::Object{{
|
||||
@ -75,8 +81,8 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
|
||||
json::Object{{{"duration", 0.},
|
||||
{"distance", 0.},
|
||||
{"weight", 0.},
|
||||
{"geometry", "mfp_I__vpA"},
|
||||
{"name", "Friedrichstraße"},
|
||||
{"geometry", "yw_jGupkl@"},
|
||||
{"name", "Boulevard du Larvotto"},
|
||||
{"mode", "driving"},
|
||||
{"maneuver",
|
||||
json::Object{{{"location", location},
|
||||
@ -97,7 +103,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -249,7 +255,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -284,7 +290,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_big_component)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -319,7 +325,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_big_component)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_response_for_locations_across_components)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -356,7 +362,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_across_components)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_route_user_disables_generating_hints)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -376,7 +382,7 @@ BOOST_AUTO_TEST_CASE(test_route_user_disables_generating_hints)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
@ -410,7 +416,7 @@ BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_manual_setting_of_annotations_property)
|
||||
{
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
using namespace osrm;
|
||||
|
||||
|
@ -19,7 +19,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_one_dest_matrix)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
TableParameters params;
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
@ -66,7 +66,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_matrix)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
TableParameters params;
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
@ -113,7 +113,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coordinates_matrix)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
TableParameters params;
|
||||
params.coordinates.push_back(get_dummy_location());
|
||||
|
@ -24,17 +24,16 @@ BOOST_AUTO_TEST_CASE(test_tile)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
// Tile within Berlin dataset at Hackescher Markt (13.40294, 52.52330)
|
||||
TileParameters params{140831, 85967, 18};
|
||||
// This tile should contain most of monaco
|
||||
TileParameters params{17059, 11948, 15};
|
||||
|
||||
std::string result;
|
||||
const auto rc = osrm.Tile(params, result);
|
||||
BOOST_CHECK(rc == Status::Ok);
|
||||
|
||||
BOOST_CHECK_GT(result.size(), 1500);
|
||||
BOOST_CHECK_LT(result.size(), 2500);
|
||||
BOOST_CHECK(result.size() > 114000);
|
||||
|
||||
protozero::pbf_reader tile_message(result);
|
||||
tile_message.next();
|
||||
@ -209,24 +208,22 @@ BOOST_AUTO_TEST_CASE(test_tile)
|
||||
}
|
||||
|
||||
BOOST_CHECK_EQUAL(number_of_turn_keys, 3);
|
||||
BOOST_CHECK_GT(number_of_turns_found, 10); // roughly ten turns in the tile
|
||||
BOOST_CHECK(number_of_turns_found > 700);
|
||||
}
|
||||
|
||||
BOOST_AUTO_TEST_CASE(test_tile_turns)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
|
||||
// Tile within Berlin dataset at Hackescher Markt (13.40294, 52.52330)
|
||||
TileParameters params{140831, 85967, 18};
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
// Small tile where we can test all the values
|
||||
TileParameters params{272953, 191177, 19};
|
||||
|
||||
std::string result;
|
||||
const auto rc = osrm.Tile(params, result);
|
||||
BOOST_CHECK(rc == Status::Ok);
|
||||
|
||||
BOOST_CHECK_GT(result.size(), 1500);
|
||||
BOOST_CHECK_LT(result.size(), 2500);
|
||||
BOOST_CHECK_GT(result.size(), 128);
|
||||
|
||||
protozero::pbf_reader tile_message(result);
|
||||
tile_message.next();
|
||||
@ -334,7 +331,7 @@ BOOST_AUTO_TEST_CASE(test_tile_turns)
|
||||
}
|
||||
std::sort(actual_turn_penalties.begin(), actual_turn_penalties.end());
|
||||
const std::vector<float> expected_turn_penalties = {
|
||||
0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.f, 0.1f, 0.7f, 5.2f, 7.1f, 7.4f};
|
||||
0, 0, 0, 0, 0, 0, .1f, .1f, .3f, .4f, 1.2f, 1.9f, 5.3f, 5.5f, 5.8f, 7.1f, 7.2f, 7.2f};
|
||||
CHECK_EQUAL_RANGE(actual_turn_penalties, expected_turn_penalties);
|
||||
|
||||
// Verify the expected turn angles
|
||||
@ -346,7 +343,7 @@ BOOST_AUTO_TEST_CASE(test_tile_turns)
|
||||
}
|
||||
std::sort(actual_turn_angles.begin(), actual_turn_angles.end());
|
||||
const std::vector<std::int64_t> expected_turn_angles = {
|
||||
-142, -118, -49, -13, -4, -2, -2, 2, 4, 13, 34, 49, 118};
|
||||
-122, -120, -117, -65, -57, -30, -28, -3, -2, 2, 3, 28, 30, 57, 65, 117, 120, 122};
|
||||
CHECK_EQUAL_RANGE(actual_turn_angles, expected_turn_angles);
|
||||
|
||||
// Verify the expected bearings
|
||||
@ -358,7 +355,7 @@ BOOST_AUTO_TEST_CASE(test_tile_turns)
|
||||
}
|
||||
std::sort(actual_turn_bearings.begin(), actual_turn_bearings.end());
|
||||
const std::vector<std::int64_t> expected_turn_bearings = {
|
||||
75, 75, 124, 124, 128, 242, 242, 255, 304, 304, 306, 308, 308};
|
||||
49, 49, 107, 107, 169, 169, 171, 171, 229, 229, 257, 257, 286, 286, 349, 349, 352, 352};
|
||||
CHECK_EQUAL_RANGE(actual_turn_bearings, expected_turn_bearings);
|
||||
}
|
||||
|
||||
@ -366,7 +363,7 @@ BOOST_AUTO_TEST_CASE(test_tile_speeds)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
|
||||
// Small tile so we can test all the values
|
||||
// TileParameters params{272953, 191177, 19};
|
||||
@ -502,7 +499,26 @@ BOOST_AUTO_TEST_CASE(test_tile_speeds)
|
||||
actual_names.push_back(string_vals[i]);
|
||||
}
|
||||
std::sort(actual_names.begin(), actual_names.end());
|
||||
const std::vector<std::string> expected_names = {};
|
||||
const std::vector<std::string> expected_names = {"Avenue du Carnier",
|
||||
"Avenue du Carnier",
|
||||
"Avenue du Carnier",
|
||||
"Avenue du Carnier",
|
||||
"Avenue du Carnier",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Maréchal Foch",
|
||||
"Avenue du Professeur Langevin",
|
||||
"Avenue du Professeur Langevin",
|
||||
"Avenue du Professeur Langevin",
|
||||
"Montée de la Crémaillère",
|
||||
"Montée de la Crémaillère",
|
||||
"Rue Jules Ferry",
|
||||
"Rue Jules Ferry",
|
||||
"Rue Professeur Calmette",
|
||||
"Rue Professeur Calmette"};
|
||||
BOOST_CHECK(actual_names == expected_names);
|
||||
}
|
||||
|
||||
|
@ -18,7 +18,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_small_component)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_small_component();
|
||||
|
||||
TripParameters params;
|
||||
@ -60,7 +60,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_big_component)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_big_component();
|
||||
|
||||
TripParameters params;
|
||||
@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_across_components)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto small = get_locations_in_small_component();
|
||||
const auto big = get_locations_in_big_component();
|
||||
|
||||
@ -148,7 +148,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_1)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_small_component();
|
||||
|
||||
TripParameters params;
|
||||
@ -194,7 +194,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_2)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_big_component();
|
||||
|
||||
TripParameters params;
|
||||
@ -265,7 +265,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_illegal_parameters)
|
||||
{
|
||||
using namespace osrm;
|
||||
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_big_component();
|
||||
auto params = osrm::TripParameters();
|
||||
|
||||
@ -315,7 +315,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_illegal_parameters)
|
||||
BOOST_AUTO_TEST_CASE(test_tfse_legal_parameters)
|
||||
{
|
||||
using namespace osrm;
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/berlin.osrm");
|
||||
auto osrm = getOSRM(OSRM_TEST_DATA_DIR "/ch/monaco.osrm");
|
||||
const auto locations = get_locations_in_big_component();
|
||||
json::Object result;
|
||||
TripParameters params;
|
||||
|
Loading…
Reference in New Issue
Block a user