return speed annotations

This commit is contained in:
karenzshea
2017-02-09 19:37:56 +01:00
committed by Patrick Niklaus
parent 1ed1bae249
commit 921ff43acf
6 changed files with 34 additions and 9 deletions
+15
View File
@@ -350,6 +350,21 @@ BOOST_AUTO_TEST_CASE(valid_route_urls)
true);
BOOST_CHECK_EQUAL(result_15->annotations, true);
RouteParameters reference_speed{};
reference_speed.annotations_type = RouteParameters::AnnotationsType::Duration;
reference_speed.coordinates = coords_1;
auto result_speed =
parseParameters<RouteParameters>("1,2;3,4?geometries=polyline&"
"overview=simplified&annotations=duration,distance,speed");
BOOST_CHECK(result_speed);
BOOST_CHECK_EQUAL(reference_speed.geometries, result_speed->geometries);
BOOST_CHECK_EQUAL(reference_speed.overview, result_speed->overview);
BOOST_CHECK_EQUAL(result_speed->annotations_type == (RouteParameters::AnnotationsType::Duration |
RouteParameters::AnnotationsType::Distance |
RouteParameters::AnnotationsType::Speed),
true);
BOOST_CHECK_EQUAL(result_speed->annotations, true);
// parse multiple annotations correctly
RouteParameters reference_16{};
reference_16.annotations_type = RouteParameters::AnnotationsType::Duration |