From 69b7fafb110ece6a86289463630344ed953eb771 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Thu, 5 Sep 2019 09:03:29 +0300 Subject: [PATCH] [routing] Adding tests of reducing offroad speed. --- .../routing_integration_tests/route_test.cpp | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/routing/routing_integration_tests/route_test.cpp b/routing/routing_integration_tests/route_test.cpp index 5548d3abb3..3b06b1f2cc 100644 --- a/routing/routing_integration_tests/route_test.cpp +++ b/routing/routing_integration_tests/route_test.cpp @@ -569,4 +569,23 @@ namespace TEST_EQUAL(route.second, RouterResultCode::NoError, ()); } + + // Test RussiaShorterFakeEdges1 and RussiaShorterFakeEdges2 are on reducing + // |kSpeedOffroadKMpH| for car routing. This lets us make + // fake edges shorter that prevent crossing lakes, forests and so on. + UNIT_TEST(RussiaBlackLakeShorterFakeEdges1) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + MercatorBounds::FromLatLon(55.62466, 39.71385), {0., 0.}, + MercatorBounds::FromLatLon(55.63114, 39.70979), 1469.54); + } + + UNIT_TEST(RussiaShorterFakeEdges2) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + MercatorBounds::FromLatLon(55.31103, 38.80954), {0., 0.}, + MercatorBounds::FromLatLon(55.31155, 38.8217), 2489.8); + } } // namespace