MCPcopy Create free account
hub / github.com/Project-OSRM/osrm-backend / BOOST_AUTO_TEST_CASE

Function BOOST_AUTO_TEST_CASE

unit_tests/engine/tidy.cpp:14–36  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

12using namespace osrm::engine::api;
13
14BOOST_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
38BOOST_AUTO_TEST_CASE(two_item_trace_needs_tidiying_test)
39{

Callers

nothing calls this directly

Calls 5

tidyFunction · 0.85
emplace_backMethod · 0.45
sizeMethod · 0.45
beginMethod · 0.45
endMethod · 0.45

Tested by

no test coverage detected