diff --git a/routing/routing_integration_tests/bicycle_route_test.cpp b/routing/routing_integration_tests/bicycle_route_test.cpp index dd0df4e877..d70ed3487d 100644 --- a/routing/routing_integration_tests/bicycle_route_test.cpp +++ b/routing/routing_integration_tests/bicycle_route_test.cpp @@ -162,7 +162,7 @@ UNIT_TEST(SpainTenerifeVilaflorAdeje) } // Two tests on not building route against traffic on road with oneway:bicycle=yes. -UNIT_TEST(MunichRoadWithOnewayBicycleYes1) +UNIT_TEST(Munich_OnewayBicycle1) { /// @todo Should combine TurnSlightLeft, TurnLeft, TurnLeft into UTurnLeft? integration::CalculateRouteAndTestRouteLength( @@ -171,10 +171,19 @@ UNIT_TEST(MunichRoadWithOnewayBicycleYes1) mercator::FromLatLon(48.1606349, 11.5631699), 279.515 /* expectedRouteMeters */); } -UNIT_TEST(MunichRoadWithOnewayBicycleYes2) +UNIT_TEST(Munich_OnewayBicycle2) { integration::CalculateRouteAndTestRouteLength( integration::GetVehicleComponents(VehicleType::Bicycle), mercator::FromLatLon(48.17819, 11.57286), {0.0, 0.0}, mercator::FromLatLon(48.17867, 11.57303), 201.532 /* expectedRouteMeters */); } + +// https://github.com/organicmaps/organicmaps/issues/1603 +UNIT_TEST(London_GreenwichTunnel) +{ + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Bicycle), + mercator::FromLatLon(51.4817397, -0.0100070258), {0.0, 0.0}, + mercator::FromLatLon(51.4883739, -0.00809729298), 1222.44 /* expectedRouteMeters */); +} diff --git a/routing/routing_integration_tests/guides_tests.cpp b/routing/routing_integration_tests/guides_tests.cpp index cc8a02b898..6765f4ed04 100644 --- a/routing/routing_integration_tests/guides_tests.cpp +++ b/routing/routing_integration_tests/guides_tests.cpp @@ -9,10 +9,10 @@ #include +namespace guides_tests +{ using namespace routing; -namespace -{ // Test guide track is laid crosswise the OSM road graph. It doesn't match the OSM roads so we // can test route length, time and points number and it is enough to guarantee that the route // built during the test is the route through the guide which we expect. @@ -100,8 +100,6 @@ UNIT_TEST(Guides_StartPointOnTrack) Checkpoints const checkpoints{mercator::FromLatLon(48.14168, 11.57244), mercator::FromLatLon(48.13741, 11.56095)}; - /// @todo Build route according to the test guide track GetTestGuides(). - /// I can't verify if this numbers are correct .. double const expectedDistM = 1200.45; double const expectedTimeS = 1142.43; size_t const expectedPointsCount = 52; @@ -117,10 +115,10 @@ UNIT_TEST(Guides_MultipleIntermediatePoints) mercator::FromLatLon(48.14192, 11.57548), mercator::FromLatLon(48.14106, 11.57279), mercator::FromLatLon(48.14044, 11.57061)}); - double const expectedDistM = 1221.11; - double const expectedTimeS = 1096.6; - size_t const expectedPointsCount = 67; + double const expectedDistM = 1258.05; + double const expectedTimeS = 1113.8; + size_t const expectedPointsCount = 77; TestGuideRoute(checkpoints, expectedDistM, expectedTimeS, expectedPointsCount); } -} // namespace +} // namespace guides_tests diff --git a/routing/routing_integration_tests/pedestrian_route_test.cpp b/routing/routing_integration_tests/pedestrian_route_test.cpp index c0be564785..182eaf03e0 100644 --- a/routing/routing_integration_tests/pedestrian_route_test.cpp +++ b/routing/routing_integration_tests/pedestrian_route_test.cpp @@ -40,7 +40,7 @@ UNIT_TEST(Zgrad924aToFilaretovskyChurch) integration::CalculateRouteAndTestRouteLength( integration::GetVehicleComponents(VehicleType::Pedestrian), mercator::FromLatLon(55.9844, 37.1808), {0., 0.}, - mercator::FromLatLon(55.9915, 37.1808), 1109.0); + mercator::FromLatLon(55.9915, 37.1808), 1225.82); } UNIT_TEST(Zgrad924aTo1145) @@ -135,7 +135,7 @@ UNIT_TEST(SwedenStockholmSlussenHiltonToMaritimeMuseum) integration::CalculateRouteAndTestRouteLength( integration::GetVehicleComponents(VehicleType::Pedestrian), mercator::FromLatLon(59.32046, 18.06924), {0.0, 0.0}, - mercator::FromLatLon(59.32751, 18.09092), 3442.0); + mercator::FromLatLon(59.32751, 18.09092), 3700.35); } UNIT_TEST(SwedenStockholmSlussenHiltonToAfChapmanHostel) @@ -295,7 +295,7 @@ UNIT_TEST(RussiaSaintPetersburgMoyka93ToAlexanderColumn) integration::CalculateRouteAndTestRouteLength( integration::GetVehicleComponents(VehicleType::Pedestrian), mercator::FromLatLon(59.9241, 30.323), {0., 0.}, - mercator::FromLatLon(59.939, 30.3159), 2247.0); + mercator::FromLatLon(59.939, 30.3159), 2424.6); } UNIT_TEST(RussiaSaintPetersburgMoyka93ToMarsovoPole) diff --git a/routing/routing_integration_tests/route_test.cpp b/routing/routing_integration_tests/route_test.cpp index b542939c0e..b19324949c 100644 --- a/routing/routing_integration_tests/route_test.cpp +++ b/routing/routing_integration_tests/route_test.cpp @@ -684,4 +684,40 @@ using namespace std; mercator::FromLatLon(38.8031, 0.0383), {0., 0.}, mercator::FromLatLon(38.8228, 0.0357), 3479.63); } + + // https://github.com/organicmaps/organicmaps/issues/1773 + UNIT_TEST(Netherlands_CrossMwm_A15) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + mercator::FromLatLon(51.847656, 4.089189), {0., 0.}, + mercator::FromLatLon(51.651632, 4.725924), 70596.3); + } + + // https://github.com/organicmaps/organicmaps/issues/2494 + UNIT_TEST(Netherlands_CrossMwm_GoudaToApenheul) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + mercator::FromLatLon(52.0181, 4.7111), {0., 0.}, + mercator::FromLatLon(52.2153, 5.9187), 103576); + } + + // https://github.com/organicmaps/organicmaps/issues/2285 + UNIT_TEST(Hawaii_KeepH1) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + mercator::FromLatLon(21.277841, -157.779314), {0., 0.}, + mercator::FromLatLon(21.296098, -157.823823), 5289.31); + } + + // https://github.com/organicmaps/organicmaps/issues/1668 + UNIT_TEST(Russia_Moscow_KeepPrimary) + { + integration::CalculateRouteAndTestRouteLength( + integration::GetVehicleComponents(VehicleType::Car), + mercator::FromLatLon(55.7083688, 37.6213856), {0., 0.}, + mercator::FromLatLon(55.724623, 37.62588), 1921.88); + } } // namespace route_test diff --git a/routing/routing_integration_tests/transit_route_test.cpp b/routing/routing_integration_tests/transit_route_test.cpp index 56aa8b20c9..987d84a280 100644 --- a/routing/routing_integration_tests/transit_route_test.cpp +++ b/routing/routing_integration_tests/transit_route_test.cpp @@ -82,7 +82,7 @@ UNIT_TEST(Transit_Vatikan_NotEnoughGraphDataAtThenEnd) mercator::FromLatLon(41.89543, 12.41481), {0.0, 0.0}, mercator::FromLatLon(41.89203, 12.46263)); - // TODO (@gmoryes) here must be RouteNotFound. + /// @todo Returns valid route now with long pedestrian part in the end, I don't see problems here. TEST_EQUAL(routeResult.second, RouterResultCode::TransitRouteNotFoundTooLongPedestrian, ()); }