Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2018-02-16 15:51:19 +0300
committermpimenov <mpimenov@users.noreply.github.com>2018-02-26 15:39:04 +0300
commit7551da58e01eac38131c174decd369d0da0766dc (patch)
tree698de0f558fdc8508e0f7c9532799800d660dc68 /routing
parent9d1a016d430caa34bba37b106ddf4ae44ac6a7e1 (diff)
Routing integration tests on stop discarding junctions if all turn candidates go straight or make only slight turns.
Diffstat (limited to 'routing')
-rw-r--r--routing/routing_integration_tests/turn_test.cpp51
1 files changed, 48 insertions, 3 deletions
diff --git a/routing/routing_integration_tests/turn_test.cpp b/routing/routing_integration_tests/turn_test.cpp
index bfbe6245f7..ae99b2853f 100644
--- a/routing/routing_integration_tests/turn_test.cpp
+++ b/routing/routing_integration_tests/turn_test.cpp
@@ -755,12 +755,57 @@ UNIT_TEST(RussiaMoscowMKADTest)
{
TRouteResult const routeResult =
integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
- MercatorBounds::FromLatLon(55.90394, 37.61034), {0., 0.},
- MercatorBounds::FromLatLon(55.77431, 37.36945));
+ MercatorBounds::FromLatLon(52.15866, 5.56538), {0., 0.},
+ MercatorBounds::FromLatLon(52.16668, 5.55665));
Route const & route = *routeResult.first;
IRouter::ResultCode const result = routeResult.second;
TEST_EQUAL(result, IRouter::NoError, ());
- integration::TestTurnCount(route, 0 /* expectedTurnCount */);
+ integration::TestTurnCount(route, 1 /* expectedTurnCount */);
+}
+
+UNIT_TEST(NetherlandsBarneveldTest)
+{
+ TRouteResult const routeResult =
+ integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
+ MercatorBounds::FromLatLon(52.15866, 5.56538), {0., 0.},
+ MercatorBounds::FromLatLon(52.16667, 5.55663));
+
+ Route const & route = *routeResult.first;
+ IRouter::ResultCode const result = routeResult.second;
+
+ TEST_EQUAL(result, IRouter::NoError, ());
+ integration::TestTurnCount(route, 1 /* expectedTurnCount */);
+ integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnSlightRight);
+}
+
+UNIT_TEST(GermanyRaunheimAirportTest)
+{
+ TRouteResult const routeResult =
+ integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
+ MercatorBounds::FromLatLon(50.03322, 8.50995), {0., 0.},
+ MercatorBounds::FromLatLon(50.02089, 8.49441));
+
+ Route const & route = *routeResult.first;
+ IRouter::ResultCode const result = routeResult.second;
+
+ TEST_EQUAL(result, IRouter::NoError, ());
+ integration::TestTurnCount(route, 1 /* expectedTurnCount */);
+ integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnSlightRight);
+}
+
+UNIT_TEST(BelorussianMinskTest)
+{
+ TRouteResult const routeResult =
+ integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
+ MercatorBounds::FromLatLon(53.90991, 27.57946), {0., 0.},
+ MercatorBounds::FromLatLon(53.91552, 27.58211));
+
+ Route const & route = *routeResult.first;
+ IRouter::ResultCode const result = routeResult.second;
+
+ TEST_EQUAL(result, IRouter::NoError, ());
+ integration::TestTurnCount(route, 1 /* expectedTurnCount */);
+ integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnRight);
}