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-04-25 10:04:21 +0300
committerAleksandr Zatsepin <alexzatsepin@users.noreply.github.com>2018-04-25 15:38:50 +0300
commit4365e749419054e114c4f73dac8f6df58a50799f (patch)
tree41a37e5218a900d74606c378e3afc8210f283054 /routing
parent033e38343146162bcece9545ca636fba19cf5b91 (diff)
Two more routing integration tests.
Diffstat (limited to 'routing')
-rw-r--r--routing/routing_integration_tests/turn_test.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/routing/routing_integration_tests/turn_test.cpp b/routing/routing_integration_tests/turn_test.cpp
index f4b695bb70..2f5c9fdc29 100644
--- a/routing/routing_integration_tests/turn_test.cpp
+++ b/routing/routing_integration_tests/turn_test.cpp
@@ -929,3 +929,34 @@ UNIT_TEST(USATampaTest)
integration::GetNthTurn(route, 0).TestValid().TestOneOfDirections(
{CarDirection::TurnSlightRight, CarDirection::TurnRight});
}
+
+// Test on go straight direction if it's possible to go through a roundabout.
+UNIT_TEST(RussiaMoscowMinskia1TurnTest)
+{
+ TRouteResult const routeResult =
+ integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
+ MercatorBounds::FromLatLon(55.7355, 37.48717), {0., 0.},
+ MercatorBounds::FromLatLon(55.73694, 37.48587));
+
+ 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::GoStraight);
+}
+
+UNIT_TEST(RussiaMoscowMinskia2TurnTest)
+{
+ TRouteResult const routeResult =
+ integration::CalculateRoute(integration::GetVehicleComponents<VehicleType::Car>(),
+ MercatorBounds::FromLatLon(55.74244, 37.4808), {0., 0.},
+ MercatorBounds::FromLatLon(55.74336, 37.48124));
+
+ 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);
+}