Adapt get_osrm to EngineConfig changes

This commit is contained in:
Patrick Niklaus
2016-03-24 17:45:14 +01:00
parent f998cb8c54
commit 7e5274e6e6
6 changed files with 20 additions and 17 deletions
+3 -2
View File
@@ -9,9 +9,10 @@
// I couldn't get Boost.UnitTest to provide a test suite level fixture with custom
// arguments per test suite (osrm base path from argv), so this has to suffice.
inline osrm::OSRM get_osrm(const std::string &base_path)
inline osrm::OSRM getOSRM(const std::string &base_path)
{
osrm::EngineConfig config{base_path};
osrm::EngineConfig config;
config.storage_config = {base_path};
config.use_shared_memory = false;
return osrm::OSRM{config};
+8 -4
View File
@@ -23,7 +23,8 @@ BOOST_AUTO_TEST_CASE(test_trip_limits)
using namespace osrm;
EngineConfig config{args[0]};
EngineConfig config;
config.storage_config = {args[0]};
config.use_shared_memory = false;
config.max_locations_trip = 2;
@@ -52,7 +53,8 @@ BOOST_AUTO_TEST_CASE(test_route_limits)
using namespace osrm;
EngineConfig config{args[0]};
EngineConfig config;
config.storage_config = {args[0]};
config.use_shared_memory = false;
config.max_locations_viaroute = 2;
@@ -81,7 +83,8 @@ BOOST_AUTO_TEST_CASE(test_table_limits)
using namespace osrm;
EngineConfig config{args[0]};
EngineConfig config;
config.storage_config = {args[0]};
config.use_shared_memory = false;
config.max_locations_distance_table = 2;
@@ -110,7 +113,8 @@ BOOST_AUTO_TEST_CASE(test_match_limits)
using namespace osrm;
EngineConfig config{args[0]};
EngineConfig config;
config.storage_config = {args[0]};
config.use_shared_memory = false;
config.max_locations_map_matching = 2;
+2 -4
View File
@@ -2,6 +2,7 @@
#include <boost/test/test_case_template.hpp>
#include "args.hpp"
#include "fixture.hpp"
#include "osrm/match_parameters.hpp"
@@ -20,10 +21,7 @@ BOOST_AUTO_TEST_CASE(test_match)
using namespace osrm;
EngineConfig config{args[0]};
config.use_shared_memory = false;
OSRM osrm{config};
auto osrm = getOSRM(args[0]);
/*
MatchParameters params;
+4 -4
View File
@@ -18,7 +18,7 @@ BOOST_AUTO_TEST_SUITE(nearest)
BOOST_AUTO_TEST_CASE(test_nearest_response)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
@@ -46,7 +46,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response)
BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
@@ -63,7 +63,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_no_coordinates)
BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
@@ -82,7 +82,7 @@ BOOST_AUTO_TEST_CASE(test_nearest_response_multiple_coordinates)
BOOST_AUTO_TEST_CASE(test_nearest_response_for_location_in_small_component)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
+2 -2
View File
@@ -18,7 +18,7 @@ BOOST_AUTO_TEST_SUITE(route)
BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
@@ -146,7 +146,7 @@ BOOST_AUTO_TEST_CASE(test_route_same_coordinates)
BOOST_AUTO_TEST_CASE(test_route_response_for_locations_in_small_component)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;
+1 -1
View File
@@ -17,7 +17,7 @@ BOOST_AUTO_TEST_SUITE(tile)
BOOST_AUTO_TEST_CASE(test_tile)
{
const auto args = get_args();
auto osrm = get_osrm(args.at(0));
auto osrm = getOSRM(args.at(0));
using namespace osrm;