Add 'to' and 'from' OSM Node Ids in the result of nearest webservice. #2548

This commit is contained in:
David Audrain
2017-08-23 14:20:06 -04:00
committed by Patrick Niklaus
parent e1149bd4b7
commit 493a9a1cb2
2 changed files with 49 additions and 1 deletions
+7
View File
@@ -105,6 +105,13 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component)
// Nearest service should snap to road network without considering components.
const auto distance = waypoint_object.values.at("distance").get<json::Number>().value;
BOOST_CHECK_LT(distance, 20);
const auto &nodes = waypoint_object.values.at("nodes").get<json::Array>().values;
BOOST_CHECK(nodes.size() == 2);
BOOST_CHECK(nodes[0].get<util::json::Number>().value !=
static_cast<std::uint64_t>(SPECIAL_OSM_NODEID));
BOOST_CHECK(nodes[1].get<util::json::Number>().value !=
static_cast<std::uint64_t>(SPECIAL_OSM_NODEID));
}
}