| 12 | BOOST_AUTO_TEST_SUITE(guidance_assembly) |
| 13 | |
| 14 | BOOST_AUTO_TEST_CASE(trim_short_segments) |
| 15 | { |
| 16 | using namespace osrm::extractor; |
| 17 | using namespace osrm::guidance; |
| 18 | using namespace osrm::engine::guidance; |
| 19 | using namespace osrm::engine; |
| 20 | using namespace osrm::util; |
| 21 | |
| 22 | IntermediateIntersection intersection1{{-73.981154_lon, 40.767762_lat}, |
| 23 | {302}, |
| 24 | {1}, |
| 25 | IntermediateIntersection::NO_INDEX, |
| 26 | 0, |
| 27 | {0, 255}, |
| 28 | {}, |
| 29 | {}}; |
| 30 | IntermediateIntersection intersection2{{-73.981495_lon, 40.768275_lat}, |
| 31 | {180}, |
| 32 | {1}, |
| 33 | 0, |
| 34 | IntermediateIntersection::NO_INDEX, |
| 35 | {0, 255}, |
| 36 | {}, |
| 37 | {}}; |
| 38 | |
| 39 | // Check that duplicated coordinate in the end is removed |
| 40 | std::vector<RouteStep> steps = {{0, |
| 41 | 324, |
| 42 | false, |
| 43 | "Central Park West", |
| 44 | "", |
| 45 | "", |
| 46 | "", |
| 47 | "", |
| 48 | "", |
| 49 | "", |
| 50 | 0.2, |
| 51 | 1.9076601161280742, |
| 52 | 0.2, |
| 53 | TRAVEL_MODE_DRIVING, |
| 54 | {{-73.981492_lon, 40.768258_lat}, |
| 55 | 329, |
| 56 | 348, |
| 57 | {TurnType::ExitRotary, DirectionModifier::Straight}, |
| 58 | WaypointType::Depart, |
| 59 | 0}, |
| 60 | 0, |
| 61 | 3, |
| 62 | {intersection1}, |
| 63 | false}, |
| 64 | {0, |
| 65 | 324, |
| 66 | false, |
| 67 | "Central Park West", |
| 68 | "", |
| 69 | "", |
| 70 | "", |
| 71 | "", |
nothing calls this directly
no test coverage detected