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

Function UNIT_TEST

libs/routing/routing_integration_tests/street_names_test.cpp:23–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

21}
22
23UNIT_TEST(RussiaTulskayaToPaveletskayaStreetNamesTest)
24{
25 TRouteResult const routeResult = integration::CalculateRoute(integration::GetVehicleComponents(VehicleType::Car),
26 mercator::FromLatLon(55.70839, 37.62145), {0., 0.},
27 mercator::FromLatLon(55.73198, 37.63945));
28
29 Route & route = *routeResult.first;
30 RouterResultCode const result = routeResult.second;
31 TEST_EQUAL(result, RouterResultCode::NoError, ());
32
33 /// @todo https://github.com/organicmaps/organicmaps/issues/1668
34 integration::TestCurrentStreetName(route, "Большая Тульская улица");
35 integration::TestNextStreetName(route, "Подольское шоссе");
36
37 MoveRoute(route, ms::LatLon(55.71398, 37.62443));
38
39 integration::TestCurrentStreetName(route, "Подольское шоссе");
40 integration::TestNextStreetName(route, "Валовая улица");
41
42 MoveRoute(route, ms::LatLon(55.72059, 37.62766));
43
44 integration::TestCurrentStreetName(route, "Павловская улица");
45 integration::TestNextStreetName(route, "Валовая улица");
46
47 MoveRoute(route, ms::LatLon(55.72469, 37.62624));
48
49 integration::TestCurrentStreetName(route, "Большая Серпуховская улица");
50 integration::TestNextStreetName(route, "Валовая улица");
51
52 MoveRoute(route, ms::LatLon(55.73034, 37.63099));
53
54 // No more extra last turn, so TestNextStreetName returns "".
55 integration::TestCurrentStreetName(route, "Валовая улица");
56 // integration::TestNextStreetName(route, "улица Зацепский Вал");
57
58 MoveRoute(route, ms::LatLon(55.730912, 37.636191));
59
60 integration::TestCurrentStreetName(route, "улица Зацепский Вал");
61 integration::TestNextStreetName(route, "");
62
63 integration::TestRouteLength(route, 3390.);
64}

Callers

nothing calls this directly

Calls 7

TestCurrentStreetNameFunction · 0.85
TestNextStreetNameFunction · 0.85
MoveRouteFunction · 0.85
TestRouteLengthFunction · 0.85
CalculateRouteFunction · 0.70
FromLatLonFunction · 0.50
LatLonClass · 0.50

Tested by

no test coverage detected