Revert "Removes summary from legs property"

This adds the summary back to the RouteLeg, it now depends on if
`steps=true`.
This reverts commit eaf9993dd9.
This commit is contained in:
Patrick Niklaus
2016-04-19 21:10:54 +02:00
parent b3957d87b4
commit da6dbd2159
5 changed files with 109 additions and 5 deletions
+5
View File
@@ -55,6 +55,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
json::Array{{json::Object{
{{"distance", 0.},
{"duration", 0.},
{"summary", ""},
{"steps", json::Array{{json::Object{{{"duration", 0.},
{"distance", 0.},
{"geometry", "yw_jGupkl@??"},
@@ -153,6 +154,10 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
const auto duration = leg_object.values.at("duration").get<json::Number>().value;
BOOST_CHECK_EQUAL(duration, 0);
// nothing can be said about summary, empty or contains human readable summary
const auto summary = leg_object.values.at("summary").get<json::String>().value;
BOOST_CHECK(((void)summary, true));
const auto &steps = leg_object.values.at("steps").get<json::Array>().values;
BOOST_CHECK(!steps.empty());