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
committerVladimir Byko-Ianko <v.bykoianko@corp.mail.ru>2018-02-16 16:16:19 +0300
commitf31979accdd7831a257377e28ac1dcdc108670b4 (patch)
tree217c2e4f60865f2c88d5d402a6da2e7c8b6f9305
parent6eb92324b63d4383c94c2a34aacf6b248c6ad467 (diff)
Routing integration tests on stop discarding junctions if all turn candidates go straight or make only slight turns.master-removing-geometry-based-routing-continue
-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);
}