MCPcopy Create free account
hub / github.com/comaps/comaps / UNIT_TEST

Function UNIT_TEST

libs/routing/routing_integration_tests/bicycle_turn_test.cpp:14–30  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace routing::turns;
13
14UNIT_TEST(RussiaMoscowSevTushinoParkBicycleWayTurnTest)
15{
16 TRouteResult const routeResult = integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Bicycle),
17 mercator::FromLatLon(55.87467, 37.43658), {0.0, 0.0},
18 mercator::FromLatLon(55.8719, 37.4464));
19
20 Route const & route = *routeResult.first;
21 RouterResultCode const result = routeResult.second;
22 TEST_EQUAL(result, RouterResultCode::NoError, ());
23
24 integration::TestTurnCount(route, 3 /* expectedTurnCount */);
25 integration::GetNthTurn(route, 0).TestValid().TestDirection(CarDirection::TurnSlightRight);
26 integration::GetNthTurn(route, 1).TestValid().TestDirection(CarDirection::TurnLeft);
27 integration::GetNthTurn(route, 2).TestValid().TestDirection(CarDirection::TurnSlightRight);
28
29 integration::TestRouteLength(route, 753.0);
30}
31
32UNIT_TEST(SpainTenerifeSlightTurnMain_TurnTest)
33{

Callers

nothing calls this directly

Calls 7

TestTurnCountFunction · 0.85
GetNthTurnFunction · 0.85
TestRouteLengthFunction · 0.85
CalculateRouteFunction · 0.70
FromLatLonFunction · 0.50
TestValidMethod · 0.45

Tested by

no test coverage detected