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

Function TestNoTurns

libs/routing/routing_integration_tests/turn_test.cpp:1221–1236  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1219{
1220template <class ContT>
1221void TestNoTurns(ContT const & cont)
1222{
1223 double constexpr kLengthEps = 0.07;
1224 for (auto const & e : cont)
1225 {
1226 TRouteResult const routeResult = integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Car),
1227 mercator::FromLatLon(std::get<0>(e)), {0., 0.},
1228 mercator::FromLatLon(std::get<1>(e)));
1229
1230 Route const & route = *routeResult.first;
1231
1232 TEST_EQUAL(routeResult.second, RouterResultCode::NoError, ());
1233 integration::TestTurnCount(route, 0);
1234 integration::TestRouteLength(route, std::get<2>(e), kLengthEps);
1235 }
1236}
1237} // namespace
1238
1239// https://github.com/organicmaps/organicmaps/issues/3502

Callers 1

UNIT_TESTFunction · 0.85

Calls 4

TestTurnCountFunction · 0.85
TestRouteLengthFunction · 0.85
CalculateRouteFunction · 0.70
FromLatLonFunction · 0.50

Tested by

no test coverage detected