2016-03-16 06:58:39 -04:00
|
|
|
#include <boost/test/unit_test.hpp>
|
|
|
|
#include <boost/test/test_case_template.hpp>
|
|
|
|
|
2016-03-16 09:53:14 -04:00
|
|
|
#include "args.hpp"
|
|
|
|
#include "fixture.hpp"
|
2016-03-16 07:42:26 -04:00
|
|
|
|
|
|
|
#include "osrm/route_parameters.hpp"
|
|
|
|
|
|
|
|
#include "osrm/coordinate.hpp"
|
|
|
|
#include "osrm/engine_config.hpp"
|
|
|
|
#include "osrm/json_container.hpp"
|
|
|
|
#include "osrm/status.hpp"
|
|
|
|
#include "osrm/osrm.hpp"
|
|
|
|
|
2016-03-16 06:58:39 -04:00
|
|
|
BOOST_AUTO_TEST_SUITE(route)
|
|
|
|
|
2016-03-16 07:42:26 -04:00
|
|
|
BOOST_AUTO_TEST_CASE(test_route)
|
|
|
|
{
|
|
|
|
const auto args = get_args();
|
2016-03-16 09:53:14 -04:00
|
|
|
auto osrm = get_osrm(args.at(0));
|
2016-03-16 07:42:26 -04:00
|
|
|
|
|
|
|
using namespace osrm;
|
|
|
|
|
|
|
|
RouteParameters params;
|
|
|
|
|
|
|
|
params.coordinates.emplace_back(util::FloatLongitude{}, util::FloatLatitude{});
|
|
|
|
params.coordinates.emplace_back(util::FloatLongitude{}, util::FloatLatitude{});
|
|
|
|
|
|
|
|
json::Object result;
|
|
|
|
|
|
|
|
const auto rc = osrm.Route(params, result);
|
|
|
|
|
|
|
|
BOOST_CHECK(rc == Status::Ok || rc == Status::Error);
|
|
|
|
}
|
2016-03-16 06:58:39 -04:00
|
|
|
|
|
|
|
BOOST_AUTO_TEST_SUITE_END()
|