Unit tests are compatible with new plugin API.

This commit is contained in:
Denis Chaplygin
2019-08-13 11:17:15 +03:00
parent e26a5cc392
commit a44a75b211
8 changed files with 148 additions and 109 deletions
+3 -2
View File
@@ -214,9 +214,10 @@ int main(int argc, const char *argv[]) try
auto NUM = 100;
for (int i = 0; i < NUM; ++i)
{
json::Object result;
engine::api::ResultT result = json::Object();
const auto rc = osrm.Match(params, result);
if (rc != Status::Ok || result.values.at("matchings").get<json::Array>().values.size() != 1)
auto& json_result=result.get<json::Object>();
if (rc != Status::Ok || json_result.values.at("matchings").get<json::Array>().values.size() != 1)
{
return EXIT_FAILURE;
}