mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-21 13:53:37 +00:00
[routing][tests] Updated integration tests.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
76d7ef146c
commit
001246fd10
@@ -87,11 +87,10 @@ UNIT_TEST(Zgrad924aToKrukovo)
|
||||
|
||||
UNIT_TEST(MoscowMailRuStarbucksToPetrovskoRazumovskyAlley)
|
||||
{
|
||||
// Avoids footway gravel (-> path) and uses footway compacted.
|
||||
integration::CalculateRouteAndTestRouteLength(
|
||||
integration::GetVehicleComponents(VehicleType::Pedestrian),
|
||||
mercator::FromLatLon(55.7971, 37.5376), {0., 0.},
|
||||
mercator::FromLatLon(55.7953, 37.5597), 1849.6);
|
||||
mercator::FromLatLon(55.7953, 37.5597), 1802.31);
|
||||
}
|
||||
|
||||
UNIT_TEST(AustraliaMelburn_AvoidMotorway)
|
||||
@@ -373,10 +372,12 @@ UNIT_TEST(ItalyRome_WalkOverStreetWithSidewalkBoth)
|
||||
|
||||
UNIT_TEST(USARedlandsEsriHQToRedlandsCommunity)
|
||||
{
|
||||
// OM makes like OSRM with footway.
|
||||
// Valhalla uses shorter South San Mateo + West Olive.
|
||||
integration::CalculateRouteAndTestRouteLength(
|
||||
integration::GetVehicleComponents(VehicleType::Pedestrian),
|
||||
mercator::FromLatLon(34.0556, -117.19567), {0., 0.},
|
||||
mercator::FromLatLon(34.03682, -117.20649), 3142.15);
|
||||
mercator::FromLatLon(34.03682, -117.20649), 3212.65);
|
||||
}
|
||||
|
||||
UNIT_TEST(USANewYorkEmpireStateBuildingToUnitedNations)
|
||||
@@ -629,7 +630,7 @@ UNIT_TEST(France_Uphill_Downlhill)
|
||||
TEST(routeResult.first, ());
|
||||
Route const & route = *routeResult.first;
|
||||
|
||||
TestRouteLength(route, 20388.7);
|
||||
TestRouteLength(route, 19771);
|
||||
timeDownhill = route.GetTotalTimeSec();
|
||||
TEST_GREATER(timeDownhill, 4 * 3600, ());
|
||||
}
|
||||
@@ -643,7 +644,7 @@ UNIT_TEST(France_Uphill_Downlhill)
|
||||
TEST(routeResult.first, ());
|
||||
Route const & route = *routeResult.first;
|
||||
|
||||
TestRouteLength(route, 20388.7);
|
||||
TestRouteLength(route, 19771);
|
||||
timeUphill = route.GetTotalTimeSec();
|
||||
TEST_GREATER(timeUphill, 4 * 3600, ());
|
||||
}
|
||||
|
||||
@@ -246,10 +246,10 @@ UNIT_TEST(CanadaBridgeCrossToEdwardIsland)
|
||||
UNIT_TEST(ParisCrossDestinationInForwardHeapCase)
|
||||
{
|
||||
// Forward.
|
||||
// Updated after fixing primary/trunk factors. Route looks good, but it differs from OSRM/Valhalla/GraphHopper.
|
||||
// Updated after fixing primary/trunk factors. Route looks good, but it differs from Valhalla.
|
||||
CalculateRouteAndTestRouteLength(GetVehicleComponents(VehicleType::Car),
|
||||
FromLatLon(49.85015, 2.24296), {0., 0.},
|
||||
FromLatLon(48.85458, 2.36291), 128749);
|
||||
FromLatLon(48.85458, 2.36291), 132906);
|
||||
|
||||
// Backward.
|
||||
// OM makes the same as GraphHopper and Valhalla. OSRM makes a bit shorter route.
|
||||
@@ -269,11 +269,11 @@ UNIT_TEST(RussiaSmolenskRussiaMoscowTimeTest)
|
||||
|
||||
TEST(routeResult.first, ());
|
||||
Route const & route = *routeResult.first;
|
||||
TestRouteLength(route, 391659);
|
||||
TestRouteLength(route, 391699);
|
||||
|
||||
// https://www.openstreetmap.org/directions?engine=graphhopper_car&route=54.800%2C32.055%3B55.753%2C37.602
|
||||
// Middle between GraphHopper and OSRM
|
||||
TestRouteTime(route, 18607.2);
|
||||
TestRouteTime(route, 19079.5);
|
||||
}
|
||||
|
||||
UNIT_TEST(Russia_Moscow_Leningradskiy39GeroevPanfilovtsev22TimeTest)
|
||||
@@ -287,7 +287,7 @@ UNIT_TEST(Russia_Moscow_Leningradskiy39GeroevPanfilovtsev22TimeTest)
|
||||
TEST(routeResult.first, ());
|
||||
Route const & route = *routeResult.first;
|
||||
TestRouteLength(route, 14276.3);
|
||||
TestRouteTime(route, 1126.09);
|
||||
TestRouteTime(route, 1163.63);
|
||||
}
|
||||
|
||||
UNIT_TEST(Russia_Moscow_Leningradskiy39GeroevPanfilovtsev22SubrouteTest)
|
||||
|
||||
@@ -781,9 +781,7 @@ UNIT_TEST(Russia_Moscow_LeninskyProsp_TurnTest)
|
||||
|
||||
TEST_EQUAL(result, RouterResultCode::NoError, ());
|
||||
|
||||
/// @todo Temporary fix until the construction will be finished.
|
||||
integration::TestTurnCount(route, 5 /* expectedTurnCount */);
|
||||
//integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::ExitHighwayToRight);
|
||||
integration::TestTurnCount(route, 6 /* expectedTurnCount */);
|
||||
}
|
||||
|
||||
// Test on the route from TTK (primary) to a link.
|
||||
|
||||
Reference in New Issue
Block a user