From 937c3b80e47cbc5b183eca64b61732f85e36b650 Mon Sep 17 00:00:00 2001 From: Vladimir Byko-Ianko Date: Fri, 9 Oct 2015 17:13:25 +0300 Subject: [PATCH] Adding a integration test after reducing factors: kMaxPointsCount and kMinDistMeters. --- .../routing_integration_tests/osrm_turn_test.cpp | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/routing/routing_integration_tests/osrm_turn_test.cpp b/routing/routing_integration_tests/osrm_turn_test.cpp index f505e9ff0b..a4a4bda5b8 100644 --- a/routing/routing_integration_tests/osrm_turn_test.cpp +++ b/routing/routing_integration_tests/osrm_turn_test.cpp @@ -348,3 +348,18 @@ UNIT_TEST(RussiaMoscowLeningradskiyPrptToTheCenterUTurnTest) integration::TestTurnCount(route, 2); integration::GetNthTurn(route, 0).TestValid().TestDirection(TurnDirection::TurnLeft); } + +// Test case: checking that no unnecessary turn on a serpentine road. +// This test was written after reducing factors kMaxPointsCount and kMinDistMeters. +UNIT_TEST(SwitzerlandSamstagernBergstrasseTest) +{ + TRouteResult const routeResult = integration::CalculateRoute( + integration::GetOsrmComponents(), MercatorBounds::FromLatLon(47.19300, 8.67568), {0., 0.}, + MercatorBounds::FromLatLon(47.19162, 8.67590)); + + Route const & route = *routeResult.first; + IRouter::ResultCode const result = routeResult.second; + + TEST_EQUAL(result, IRouter::NoError, ()); + integration::TestTurnCount(route, 0); +}