Updated changelog entry

This commit is contained in:
Denis Chaplygin
2019-08-15 11:40:23 +03:00
parent ff46e98d21
commit a9c187c99b
39 changed files with 591 additions and 457 deletions
+6 -6
View File
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(test_trip_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
@@ -74,7 +74,7 @@ BOOST_AUTO_TEST_CASE(test_route_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
@@ -102,7 +102,7 @@ BOOST_AUTO_TEST_CASE(test_table_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
@@ -130,7 +130,7 @@ BOOST_AUTO_TEST_CASE(test_match_coordinate_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
@@ -163,7 +163,7 @@ BOOST_AUTO_TEST_CASE(test_match_radiuses_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
@@ -190,7 +190,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_limits)
BOOST_CHECK(rc == Status::Error);
// Make sure we're not accidentally hitting a guard code path before
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values["code"].get<json::String>().value;
BOOST_CHECK(code == "TooBig"); // per the New-Server API spec
}
+2 -2
View File
@@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(test_match)
const auto rc = osrm.Match(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -79,7 +79,7 @@ BOOST_AUTO_TEST_CASE(test_match_split)
const auto rc = osrm.Match(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
+4 -4
View File
@@ -27,7 +27,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response)
const auto rc = osrm.Nearest(params, result);
BOOST_REQUIRE(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -54,7 +54,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates)
const auto rc = osrm.Nearest(params, result);
BOOST_REQUIRE(rc == Status::Error);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "InvalidOptions");
}
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates)
const auto rc = osrm.Nearest(params, result);
BOOST_REQUIRE(rc == Status::Error);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "InvalidOptions");
}
@@ -94,7 +94,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component)
const auto rc = osrm.Nearest(params, result);
BOOST_REQUIRE(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
+8 -8
View File
@@ -32,7 +32,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates_fixture)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
// unset snapping dependent hint
for (auto &itr : json_result.values["waypoints"].get<json::Array>().values)
{
@@ -132,7 +132,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -286,7 +286,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -322,7 +322,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_big_component)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -360,7 +360,7 @@ BOOST_AUTO_TEST_CASE(test_route_response_for_locations_across_components)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -395,7 +395,7 @@ BOOST_AUTO_TEST_CASE(test_route_user_disables_generating_hints)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
for (auto waypoint : json_result.values["waypoints"].get<json::Array>().values)
BOOST_CHECK_EQUAL(waypoint.get<json::Object>().values.count("hint"), 0);
}
@@ -417,7 +417,7 @@ BOOST_AUTO_TEST_CASE(speed_annotation_matches_duration_and_distance)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto &routes = json_result.values["routes"].get<json::Array>().values;
const auto &legs = routes[0].get<json::Object>().values.at("legs").get<json::Array>().values;
const auto &annotation =
@@ -458,7 +458,7 @@ BOOST_AUTO_TEST_CASE(test_manual_setting_of_annotations_property)
const auto rc = osrm.Route(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
+10 -7
View File
@@ -33,7 +33,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_one_dest_matrix)
const auto rc = osrm.Table(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -61,7 +61,8 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_one_dest_matrix)
}
// check destinations array of waypoint objects
const auto &destinations_array = json_result.values.at("destinations").get<json::Array>().values;
const auto &destinations_array =
json_result.values.at("destinations").get<json::Array>().values;
BOOST_CHECK_EQUAL(destinations_array.size(), params.destinations.size());
for (const auto &destination : destinations_array)
{
@@ -91,7 +92,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_matrix)
const auto rc = osrm.Table(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -108,7 +109,8 @@ BOOST_AUTO_TEST_CASE(test_table_three_coords_one_source_matrix)
params.sources.size() * params.coordinates.size());
}
// check destinations array of waypoint objects
const auto &destinations_array = json_result.values.at("destinations").get<json::Array>().values;
const auto &destinations_array =
json_result.values.at("destinations").get<json::Array>().values;
BOOST_CHECK_EQUAL(destinations_array.size(), params.coordinates.size());
for (const auto &destination : destinations_array)
{
@@ -139,7 +141,7 @@ BOOST_AUTO_TEST_CASE(test_table_three_coordinates_matrix)
const auto rc = osrm.Table(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -154,7 +156,8 @@ BOOST_AUTO_TEST_CASE(test_table_three_coordinates_matrix)
BOOST_CHECK_EQUAL(durations_matrix[i].get<json::Number>().value, 0);
BOOST_CHECK_EQUAL(durations_matrix.size(), params.coordinates.size());
}
const auto &destinations_array = json_result.values.at("destinations").get<json::Array>().values;
const auto &destinations_array =
json_result.values.at("destinations").get<json::Array>().values;
for (const auto &destination : destinations_array)
{
BOOST_CHECK(waypoint_check(destination));
@@ -185,7 +188,7 @@ BOOST_AUTO_TEST_CASE(test_table_no_segment_for_some_coordinates)
const auto rc = osrm.Table(params, result);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
BOOST_CHECK(rc == Status::Error);
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "NoSegment");
+4 -4
View File
@@ -166,7 +166,7 @@ void validate_tile(const osrm::OSRM &osrm)
const auto rc = osrm.Tile(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& str_result = result.get<std::string>();
auto &str_result = result.get<std::string>();
BOOST_CHECK(str_result.size() > 114000);
vtzero::vector_tile tile{str_result};
@@ -212,7 +212,7 @@ void test_tile_turns(const osrm::OSRM &osrm)
const auto rc = osrm.Tile(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& str_result = result.get<std::string>();
auto &str_result = result.get<std::string>();
BOOST_CHECK_GT(str_result.size(), 128);
vtzero::vector_tile tile{str_result};
@@ -354,7 +354,7 @@ void test_tile_speeds(const osrm::OSRM &osrm)
const auto rc = osrm.Tile(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& str_result = result.get<std::string>();
auto &str_result = result.get<std::string>();
BOOST_CHECK_GT(str_result.size(), 128);
vtzero::vector_tile tile{str_result};
@@ -435,7 +435,7 @@ void test_tile_nodes(const osrm::OSRM &osrm)
const auto rc = osrm.Tile(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& str_result = result.get<std::string>();
auto &str_result = result.get<std::string>();
BOOST_CHECK_GT(str_result.size(), 128);
vtzero::vector_tile tile{str_result};
+7 -7
View File
@@ -30,7 +30,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_small_component)
const auto rc = osrm.Trip(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -73,7 +73,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_in_big_component)
const auto rc = osrm.Trip(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -118,7 +118,7 @@ BOOST_AUTO_TEST_CASE(test_roundtrip_response_for_locations_across_components)
const auto rc = osrm.Trip(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -167,7 +167,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_1)
const auto rc = osrm.Trip(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -214,7 +214,7 @@ BOOST_AUTO_TEST_CASE(test_tfse_2)
const auto rc = osrm.Trip(params, result);
BOOST_CHECK(rc == Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
const auto code = json_result.values.at("code").get<json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
@@ -254,7 +254,7 @@ void CheckNotImplemented(const osrm::OSRM &osrm, osrm::TripParameters &params)
engine::api::ResultT result = json::Object();
auto rc = osrm.Trip(params, result);
BOOST_REQUIRE(rc == osrm::Status::Error);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
auto code = json_result.values.at("code").get<osrm::json::String>().value;
BOOST_CHECK_EQUAL(code, "NotImplemented");
}
@@ -265,7 +265,7 @@ void CheckOk(const osrm::OSRM &osrm, osrm::TripParameters &params)
engine::api::ResultT result = json::Object();
auto rc = osrm.Trip(params, result);
BOOST_REQUIRE(rc == osrm::Status::Ok);
auto& json_result=result.get<json::Object>();
auto &json_result = result.get<json::Object>();
auto code = json_result.values.at("code").get<osrm::json::String>().value;
BOOST_CHECK_EQUAL(code, "Ok");
}