| 12 | using namespace osrm::engine::api; |
| 13 | |
| 14 | BOOST_AUTO_TEST_CASE(two_item_trace_already_tidied_test) |
| 15 | { |
| 16 | MatchParameters params; |
| 17 | params.coordinates.emplace_back(FloatLongitude{13.207993}, FloatLatitude{52.446379}); |
| 18 | params.coordinates.emplace_back(FloatLongitude{13.231658}, FloatLatitude{52.465416}); |
| 19 | |
| 20 | params.timestamps.emplace_back(1477090402); |
| 21 | params.timestamps.emplace_back(1477090663); |
| 22 | |
| 23 | tidy::Thresholds thresholds; |
| 24 | thresholds.distance_in_meters = 15.; |
| 25 | thresholds.duration_in_seconds = 5; |
| 26 | |
| 27 | auto result = tidy::tidy(params, thresholds); |
| 28 | |
| 29 | BOOST_CHECK_EQUAL(result.can_be_removed.size(), 2); |
| 30 | BOOST_CHECK_EQUAL(result.tidied_to_original.size(), 2); |
| 31 | |
| 32 | BOOST_CHECK(result.can_be_removed[0] == false); |
| 33 | BOOST_CHECK(result.can_be_removed[1] == false); |
| 34 | BOOST_CHECK_EQUAL(result.tidied_to_original[0], 0); |
| 35 | BOOST_CHECK_EQUAL(result.tidied_to_original[1], 1); |
| 36 | } |
| 37 | |
| 38 | BOOST_AUTO_TEST_CASE(two_item_trace_needs_tidiying_test) |
| 39 | { |
nothing calls this directly
no test coverage detected