forked from organicmaps/organicmaps
Two more routing integration tests.
This commit is contained in:
parent
033e383431
commit
4365e74941
1 changed files with 31 additions and 0 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue