diff --git a/unit_tests/library/fixture.hpp b/unit_tests/library/fixture.hpp index 273fda25f..568593dc1 100644 --- a/unit_tests/library/fixture.hpp +++ b/unit_tests/library/fixture.hpp @@ -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}; diff --git a/unit_tests/library/limits.cpp b/unit_tests/library/limits.cpp index f14e7e6a9..8632171cd 100644 --- a/unit_tests/library/limits.cpp +++ b/unit_tests/library/limits.cpp @@ -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; diff --git a/unit_tests/library/match.cpp b/unit_tests/library/match.cpp index db4329b84..5cd273935 100644 --- a/unit_tests/library/match.cpp +++ b/unit_tests/library/match.cpp @@ -2,6 +2,7 @@ #include #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; diff --git a/unit_tests/library/nearest.cpp b/unit_tests/library/nearest.cpp index 3b631ccd1..b56f0f7c4 100644 --- a/unit_tests/library/nearest.cpp +++ b/unit_tests/library/nearest.cpp @@ -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; diff --git a/unit_tests/library/route.cpp b/unit_tests/library/route.cpp index 807c26648..49fc3c820 100644 --- a/unit_tests/library/route.cpp +++ b/unit_tests/library/route.cpp @@ -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; diff --git a/unit_tests/library/tile.cpp b/unit_tests/library/tile.cpp index 2765d2b26..2ca674bde 100644 --- a/unit_tests/library/tile.cpp +++ b/unit_tests/library/tile.cpp @@ -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;