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

Function BOOST_AUTO_TEST_CASE

unit_tests/engine/polyline_compressor.cpp:11–28  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

9BOOST_AUTO_TEST_SUITE(polyline_compression)
10
11BOOST_AUTO_TEST_CASE(polyline5_test_case)
12{
13 using namespace osrm::engine;
14 using namespace osrm::util;
15
16 const std::vector<Coordinate> coords({{-73.990171_lon, 40.714701_lat},
17 {-73.991801_lon, 40.717571_lat},
18 {-73.985751_lon, 40.715651_lat}});
19
20 const std::vector<Coordinate> coords_truncated({{-73.990170_lon, 40.714700_lat},
21 {-73.991800_lon, 40.717570_lat},
22 {-73.985750_lon, 40.715650_lat}});
23
24 BOOST_CHECK_EQUAL(encodePolyline(coords.begin(), coords.end()), "{aowFperbM}PdI~Jyd@");
25 BOOST_CHECK(std::equal(coords_truncated.begin(),
26 coords_truncated.end(),
27 decodePolyline(encodePolyline(coords.begin(), coords.end())).begin()));
28}
29
30BOOST_AUTO_TEST_CASE(polyline6_test_case)
31{

Callers

nothing calls this directly

Calls 7

encodePolylineFunction · 0.85
decodePolylineFunction · 0.85
toFixedFunction · 0.85
beginMethod · 0.45
endMethod · 0.45
emptyMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected