mirror of
https://codeberg.org/comaps/comaps
synced 2025-12-19 13:03:36 +00:00
[routing][tests] Updated Turn integration tests.
Signed-off-by: Viktor Govako <viktor.govako@gmail.com>
This commit is contained in:
committed by
Konstantin Pastbin
parent
a25ae124d7
commit
014b54b1f7
@@ -14,26 +14,6 @@ namespace turn_test
|
||||
using namespace routing;
|
||||
using namespace routing::turns;
|
||||
|
||||
UNIT_TEST(Russia_Moscow_NagatinoUturn_TurnTest)
|
||||
{
|
||||
TRouteResult const routeResult =
|
||||
integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Car),
|
||||
mercator::FromLatLon(55.67251, 37.63604), {0.01, -0.01},
|
||||
mercator::FromLatLon(55.67293, 37.63507));
|
||||
|
||||
Route const & route = *routeResult.first;
|
||||
RouterResultCode const result = routeResult.second;
|
||||
TEST_EQUAL(result, RouterResultCode::NoError, ());
|
||||
|
||||
integration::TestTurnCount(route, 2 /* expectedTurnCount */);
|
||||
|
||||
integration::GetNthTurn(route, 0)
|
||||
.TestValid()
|
||||
.TestDirection(CarDirection::UTurnLeft);
|
||||
|
||||
integration::TestRouteLength(route, 251.3);
|
||||
}
|
||||
|
||||
// Secondary should be preferred against residential.
|
||||
UNIT_TEST(StPetersburg_SideRoadPenalty_TurnTest)
|
||||
{
|
||||
@@ -301,17 +281,16 @@ UNIT_TEST(Russia_HugeRoundabout_TurnTest)
|
||||
Route const & route = *routeResult.first;
|
||||
RouterResultCode const result = routeResult.second;
|
||||
|
||||
/// @todo Actualized exit num. But one exit is highway=unclassified, that (probably?) should not be counted?
|
||||
TEST_EQUAL(result, RouterResultCode::NoError, ());
|
||||
integration::TestTurnCount(route, 2 /* expectedTurnCount */);
|
||||
integration::GetNthTurn(route, 0)
|
||||
.TestValid()
|
||||
.TestDirection(CarDirection::EnterRoundAbout)
|
||||
.TestRoundAboutExitNum(6);
|
||||
.TestRoundAboutExitNum(7);
|
||||
integration::GetNthTurn(route, 1)
|
||||
.TestValid()
|
||||
.TestDirection(CarDirection::LeaveRoundAbout)
|
||||
.TestRoundAboutExitNum(6);
|
||||
.TestRoundAboutExitNum(7);
|
||||
}
|
||||
|
||||
UNIT_TEST(Belarus_Misk_ProspNezavisimostiMKAD_TurnTest)
|
||||
@@ -1274,9 +1253,9 @@ UNIT_TEST(Cyprus_Governors_Beach_TurnTestNextRoad)
|
||||
|
||||
RouteSegment::RoadNameInfo ri;
|
||||
route.GetNextTurnStreetName(ri);
|
||||
TEST_EQUAL(ri.m_destination, "Governer's Beach; Pentakomo", ());
|
||||
TEST_EQUAL(ri.m_destination, "ΑΚΤΗ ΚΥΒΕΡΝΗΤΗ; Governer's Beach; ΠΕΝΤΑΚΩΜΟ; Pentakomo", ());
|
||||
// Aggregated network/ref tags.
|
||||
TEST_EQUAL(ri.m_destination_ref, "CY:B/B1", ());
|
||||
TEST_EQUAL(ri.m_destination_ref, "B1", ());
|
||||
}
|
||||
|
||||
// Exit which is marked as non-link, but has link tags m_destination_ref and m_destination.
|
||||
|
||||
Reference in New Issue
Block a user