Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 5ec2712fe1 | |||
| 8b806cb7bd | |||
| 56d2d4dacd | |||
| 1107a14a2c | |||
| 5b23b11129 | |||
| 23fb96c4f2 | |||
| 45bfe937aa |
+1
-1
@@ -19,7 +19,7 @@
|
|||||||
- NodeJS:
|
- NodeJS:
|
||||||
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
|
- CHANGED: Use node-api instead of NAN. [#6452](https://github.com/Project-OSRM/osrm-backend/pull/6452)
|
||||||
- Misc:
|
- Misc:
|
||||||
- CHANGED: Partial fix migration from boost::optional to std::optional [#6551](https://github.com/Project-OSRM/osrm-backend/issues/6551)
|
- CHANGED: Partial fix migration from boost::optional to std::optional [#6551](https://github.com/Project-OSRM/osrm-backend/issues/6551), see also [#6592](https://github.com/Project-OSRM/osrm-backend/issues/6592)
|
||||||
- CHANGED: Update Conan Boost version to 1.85.0. [#6868](https://github.com/Project-OSRM/osrm-backend/pull/6868)
|
- CHANGED: Update Conan Boost version to 1.85.0. [#6868](https://github.com/Project-OSRM/osrm-backend/pull/6868)
|
||||||
- FIXED: Fix an error in a RouteParameters AnnotationsType operator overload. [#6646](https://github.com/Project-OSRM/osrm-backend/pull/6646)
|
- FIXED: Fix an error in a RouteParameters AnnotationsType operator overload. [#6646](https://github.com/Project-OSRM/osrm-backend/pull/6646)
|
||||||
- ADDED: Add support for "unlimited" to be passed as a value for the default-radius and max-matching-radius flags. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599)
|
- ADDED: Add support for "unlimited" to be passed as a value for the default-radius and max-matching-radius flags. [#6599](https://github.com/Project-OSRM/osrm-backend/pull/6599)
|
||||||
|
|||||||
+1
-1
@@ -359,7 +359,7 @@ if(ENABLE_CONAN)
|
|||||||
KEEP_RPATHS
|
KEEP_RPATHS
|
||||||
NO_OUTPUT_DIRS
|
NO_OUTPUT_DIRS
|
||||||
OPTIONS boost:filesystem_version=3 # https://stackoverflow.com/questions/73392648/error-with-boost-filesystem-version-in-cmake
|
OPTIONS boost:filesystem_version=3 # https://stackoverflow.com/questions/73392648/error-with-boost-filesystem-version-in-cmake
|
||||||
# onetbb:shared=${TBB_SHARED}
|
onetbb:shared=${TBB_SHARED}
|
||||||
boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
|
boost:without_stacktrace=True # Apple Silicon cross-compilation fails without it
|
||||||
BUILD missing
|
BUILD missing
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -12,8 +12,6 @@
|
|||||||
|
|
||||||
#include "osrm/coordinate.hpp"
|
#include "osrm/coordinate.hpp"
|
||||||
|
|
||||||
#include <boost/optional.hpp>
|
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <iterator>
|
#include <iterator>
|
||||||
|
|||||||
@@ -450,7 +450,7 @@ IntersectionHandler::getNextIntersection(const NodeID at, const EdgeID via) cons
|
|||||||
if (intersection_parameters.node == SPECIAL_NODEID ||
|
if (intersection_parameters.node == SPECIAL_NODEID ||
|
||||||
intersection_parameters.edge == SPECIAL_EDGEID)
|
intersection_parameters.edge == SPECIAL_EDGEID)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto intersection = extractor::intersection::getConnectedRoads<false>(node_based_graph,
|
auto intersection = extractor::intersection::getConnectedRoads<false>(node_based_graph,
|
||||||
@@ -465,7 +465,7 @@ IntersectionHandler::getNextIntersection(const NodeID at, const EdgeID via) cons
|
|||||||
|
|
||||||
if (intersection.size() <= 2 || intersection.isTrafficSignalOrBarrier())
|
if (intersection.size() <= 2 || intersection.isTrafficSignalOrBarrier())
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::make_optional(IntersectionViewAndNode{std::move(intersection), intersection_node});
|
return std::make_optional(IntersectionViewAndNode{std::move(intersection), intersection_node});
|
||||||
|
|||||||
@@ -652,7 +652,7 @@ std::optional<std::size_t> SliproadHandler::getObviousIndexWithSliproads(
|
|||||||
// then the non-Sliproad is the obvious one.
|
// then the non-Sliproad is the obvious one.
|
||||||
if (intersection.size() != 3)
|
if (intersection.size() != 3)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto forking = intersection[1].instruction.type == TurnType::Fork &&
|
const auto forking = intersection[1].instruction.type == TurnType::Fork &&
|
||||||
@@ -660,7 +660,7 @@ std::optional<std::size_t> SliproadHandler::getObviousIndexWithSliproads(
|
|||||||
|
|
||||||
if (!forking)
|
if (!forking)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
const auto first = getNextIntersection(at, intersection.getRightmostRoad().eid);
|
const auto first = getNextIntersection(at, intersection.getRightmostRoad().eid);
|
||||||
@@ -668,12 +668,12 @@ std::optional<std::size_t> SliproadHandler::getObviousIndexWithSliproads(
|
|||||||
|
|
||||||
if (!first || !second)
|
if (!first || !second)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
if (first->intersection.isDeadEnd() || second->intersection.isDeadEnd())
|
if (first->intersection.isDeadEnd() || second->intersection.isDeadEnd())
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// In case of loops at the end of the road, we will arrive back at the intersection
|
// In case of loops at the end of the road, we will arrive back at the intersection
|
||||||
@@ -688,7 +688,7 @@ std::optional<std::size_t> SliproadHandler::getObviousIndexWithSliproads(
|
|||||||
return std::make_optional(std::size_t{1});
|
return std::make_optional(std::size_t{1});
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
bool SliproadHandler::nextIntersectionIsTooFarAway(const NodeID start, const EdgeID onto) const
|
bool SliproadHandler::nextIntersectionIsTooFarAway(const NodeID start, const EdgeID onto) const
|
||||||
|
|||||||
@@ -647,7 +647,7 @@ TurnHandler::findForkCandidatesByGeometry(Intersection &intersection) const
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// check if the fork candidates (all roads between left and right) and the
|
// check if the fork candidates (all roads between left and right) and the
|
||||||
@@ -740,7 +740,7 @@ std::optional<TurnHandler::Fork> TurnHandler::findFork(const EdgeID via_edge,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
void TurnHandler::handleDistinctConflict(const EdgeID via_edge,
|
void TurnHandler::handleDistinctConflict(const EdgeID via_edge,
|
||||||
|
|||||||
@@ -0,0 +1,68 @@
|
|||||||
|
#ifndef OSRM_BINDINGS_NODE_JSON_V8_RENDERER_HPP
|
||||||
|
#define OSRM_BINDINGS_NODE_JSON_V8_RENDERER_HPP
|
||||||
|
|
||||||
|
#include "osrm/json_container.hpp"
|
||||||
|
#include <napi.h>
|
||||||
|
|
||||||
|
#include <functional>
|
||||||
|
|
||||||
|
namespace node_osrm
|
||||||
|
{
|
||||||
|
|
||||||
|
struct V8Renderer
|
||||||
|
{
|
||||||
|
explicit V8Renderer(const Napi::Env &env, Napi::Value &out) : env(env), out(out) {}
|
||||||
|
|
||||||
|
void operator()(const osrm::json::String &string) const
|
||||||
|
{
|
||||||
|
out = Napi::String::New(env, string.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator()(const osrm::json::Number &number) const
|
||||||
|
{
|
||||||
|
out = Napi::Number::New(env, number.value);
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator()(const osrm::json::Object &object) const
|
||||||
|
{
|
||||||
|
Napi::Object obj = Napi::Object::New(env);
|
||||||
|
for (const auto &keyValue : object.values)
|
||||||
|
{
|
||||||
|
Napi::Value child;
|
||||||
|
mapbox::util::apply_visitor(V8Renderer(env, child), keyValue.second);
|
||||||
|
obj.Set(keyValue.first, child);
|
||||||
|
}
|
||||||
|
out = obj;
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator()(const osrm::json::Array &array) const
|
||||||
|
{
|
||||||
|
Napi::Array a = Napi::Array::New(env, array.values.size());
|
||||||
|
for (auto i = 0u; i < array.values.size(); ++i)
|
||||||
|
{
|
||||||
|
Napi::Value child;
|
||||||
|
mapbox::util::apply_visitor(V8Renderer(env, child), array.values[i]);
|
||||||
|
a.Set(i, child);
|
||||||
|
}
|
||||||
|
out = a;
|
||||||
|
}
|
||||||
|
|
||||||
|
void operator()(const osrm::json::True &) const { out = Napi::Boolean::New(env, true); }
|
||||||
|
|
||||||
|
void operator()(const osrm::json::False &) const { out = Napi::Boolean::New(env, false); }
|
||||||
|
|
||||||
|
void operator()(const osrm::json::Null &) const { out = env.Null(); }
|
||||||
|
|
||||||
|
private:
|
||||||
|
const Napi::Env &env;
|
||||||
|
Napi::Value &out;
|
||||||
|
};
|
||||||
|
|
||||||
|
inline void renderToV8(const Napi::Env &env, Napi::Value &out, const osrm::json::Object &object)
|
||||||
|
{
|
||||||
|
V8Renderer renderer(env, out);
|
||||||
|
renderer(object);
|
||||||
|
}
|
||||||
|
} // namespace node_osrm
|
||||||
|
|
||||||
|
#endif // JSON_V8_RENDERER_HPP
|
||||||
@@ -0,0 +1,32 @@
|
|||||||
|
#ifndef OSRM_BINDINGS_NODE_HPP
|
||||||
|
#define OSRM_BINDINGS_NODE_HPP
|
||||||
|
|
||||||
|
#include "osrm/osrm_fwd.hpp"
|
||||||
|
|
||||||
|
#include <napi.h>
|
||||||
|
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
|
namespace node_osrm
|
||||||
|
{
|
||||||
|
|
||||||
|
class Engine final : public Napi::ObjectWrap<Engine>
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
static Napi::Object Init(Napi::Env env, Napi::Object exports);
|
||||||
|
Engine(const Napi::CallbackInfo &info);
|
||||||
|
|
||||||
|
std::shared_ptr<osrm::OSRM> this_;
|
||||||
|
|
||||||
|
private:
|
||||||
|
Napi::Value route(const Napi::CallbackInfo &info);
|
||||||
|
Napi::Value nearest(const Napi::CallbackInfo &info);
|
||||||
|
Napi::Value table(const Napi::CallbackInfo &info);
|
||||||
|
Napi::Value tile(const Napi::CallbackInfo &info);
|
||||||
|
Napi::Value match(const Napi::CallbackInfo &info);
|
||||||
|
Napi::Value trip(const Napi::CallbackInfo &info);
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace node_osrm
|
||||||
|
|
||||||
|
#endif
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -2,72 +2,88 @@
|
|||||||
#include "engine/polyline_compressor.hpp"
|
#include "engine/polyline_compressor.hpp"
|
||||||
|
|
||||||
#include <boost/fusion/include/adapt_struct.hpp>
|
#include <boost/fusion/include/adapt_struct.hpp>
|
||||||
#include <boost/optional.hpp>
|
#include <boost/phoenix.hpp>
|
||||||
#include <boost/spirit/home/x3.hpp>
|
#include <boost/spirit/include/qi.hpp>
|
||||||
#include <boost/spirit/home/x3/support/ast/position_tagged.hpp>
|
#include <boost/spirit/repository/include/qi_iter_pos.hpp>
|
||||||
#include <boost/spirit/home/x3/support/utility/annotate_on_success.hpp>
|
|
||||||
#include <iostream>
|
|
||||||
#include <sstream>
|
|
||||||
#include <string>
|
#include <string>
|
||||||
|
#include <type_traits>
|
||||||
|
|
||||||
BOOST_FUSION_ADAPT_STRUCT(osrm::server::api::ParsedURL,
|
BOOST_FUSION_ADAPT_STRUCT(osrm::server::api::ParsedURL,
|
||||||
(std::string, service)(unsigned, version)(std::string,
|
(std::string, service)(unsigned, version)(std::string,
|
||||||
profile)(std::string, query))
|
profile)(std::string, query))
|
||||||
|
|
||||||
|
// Keep impl. TU local
|
||||||
|
namespace
|
||||||
|
{
|
||||||
|
namespace ph = boost::phoenix;
|
||||||
|
namespace qi = boost::spirit::qi;
|
||||||
|
|
||||||
|
template <typename Iterator, typename Into> //
|
||||||
|
struct URLParser final : qi::grammar<Iterator, Into>
|
||||||
|
{
|
||||||
|
URLParser() : URLParser::base_type(start)
|
||||||
|
{
|
||||||
|
using boost::spirit::repository::qi::iter_pos;
|
||||||
|
|
||||||
|
identifier = qi::char_("a-zA-Z0-9_.~:-");
|
||||||
|
percent_encoding =
|
||||||
|
qi::char_('%') > qi::uint_parser<unsigned char, 16, 2, 2>()[qi::_val = qi::_1];
|
||||||
|
polyline_chars = qi::char_("a-zA-Z0-9_[]{}@?|\\~`^") | percent_encoding;
|
||||||
|
all_chars = polyline_chars | qi::char_("=,;:&().-");
|
||||||
|
|
||||||
|
service = +identifier;
|
||||||
|
version = qi::uint_;
|
||||||
|
profile = +identifier;
|
||||||
|
query = +all_chars;
|
||||||
|
|
||||||
|
// Example input: /route/v1/driving/7.416351,43.731205;7.420363,43.736189
|
||||||
|
|
||||||
|
start = qi::lit('/') > service > qi::lit('/') > qi::lit('v') > version > qi::lit('/') >
|
||||||
|
profile > qi::lit('/') >
|
||||||
|
qi::omit[iter_pos[ph::bind(&osrm::server::api::ParsedURL::prefix_length, qi::_val) =
|
||||||
|
qi::_1 - qi::_r1]] > query;
|
||||||
|
|
||||||
|
BOOST_SPIRIT_DEBUG_NODES((start)(service)(version)(profile)(query))
|
||||||
|
}
|
||||||
|
|
||||||
|
qi::rule<Iterator, Into> start;
|
||||||
|
|
||||||
|
qi::rule<Iterator, std::string()> service;
|
||||||
|
qi::rule<Iterator, unsigned()> version;
|
||||||
|
qi::rule<Iterator, std::string()> profile;
|
||||||
|
qi::rule<Iterator, std::string()> query;
|
||||||
|
|
||||||
|
qi::rule<Iterator, char()> identifier;
|
||||||
|
qi::rule<Iterator, char()> all_chars;
|
||||||
|
qi::rule<Iterator, char()> polyline_chars;
|
||||||
|
qi::rule<Iterator, char()> percent_encoding;
|
||||||
|
};
|
||||||
|
|
||||||
|
} // namespace
|
||||||
|
|
||||||
namespace osrm::server::api
|
namespace osrm::server::api
|
||||||
{
|
{
|
||||||
namespace x3 = boost::spirit::x3;
|
|
||||||
|
|
||||||
struct ParsedURLClass : x3::annotate_on_success
|
|
||||||
{
|
|
||||||
};
|
|
||||||
const x3::rule<struct Service, std::string> service = "service";
|
|
||||||
const x3::rule<struct Version, unsigned> version = "version";
|
|
||||||
const x3::rule<struct Profile, std::string> profile = "profile";
|
|
||||||
const x3::rule<struct Query, std::string> query = "query";
|
|
||||||
const x3::rule<struct ParsedURL, ParsedURL> start = "start";
|
|
||||||
|
|
||||||
const auto identifier = x3::char_("a-zA-Z0-9_.~:-");
|
|
||||||
|
|
||||||
const auto service_def = +identifier;
|
|
||||||
const auto version_def = x3::uint_;
|
|
||||||
const auto profile_def = +identifier;
|
|
||||||
|
|
||||||
const auto percent_encoding = x3::lit('%') >> x3::uint_parser<unsigned char, 16, 2, 2>();
|
|
||||||
|
|
||||||
const auto query_char = percent_encoding | x3::char_("a-zA-Z0-9_[]{}@?|\\~`^=,;:&().-");
|
|
||||||
|
|
||||||
const auto query_def = +query_char;
|
|
||||||
|
|
||||||
const auto start_def = x3::lit('/') > service > x3::lit('/') > x3::lit('v') > version
|
|
||||||
> x3::lit('/') > profile > x3::lit('/') > query;
|
|
||||||
|
|
||||||
BOOST_SPIRIT_DEFINE(service, version, profile, query, start)
|
|
||||||
|
|
||||||
boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::string::iterator end)
|
boost::optional<ParsedURL> parseURL(std::string::iterator &iter, const std::string::iterator end)
|
||||||
{
|
{
|
||||||
|
using It = std::decay<decltype(iter)>::type;
|
||||||
|
|
||||||
|
static URLParser<It, ParsedURL(It)> const parser;
|
||||||
ParsedURL out;
|
ParsedURL out;
|
||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
auto iter_copy = iter;
|
const auto ok = boost::spirit::qi::parse(iter, end, parser(boost::phoenix::val(iter)), out);
|
||||||
bool r = x3::phrase_parse(iter_copy, end, start, x3::space, out);
|
|
||||||
|
|
||||||
if (r && iter_copy == end)
|
if (ok && iter == end)
|
||||||
{
|
|
||||||
iter = iter_copy;
|
|
||||||
// TODO: find a way to do it more effective
|
|
||||||
std::string parsed_part =
|
|
||||||
"/" + out.service + "/v" + std::to_string(out.version) + "/" + out.profile + "/";
|
|
||||||
out.prefix_length = parsed_part.length();
|
|
||||||
return boost::make_optional(out);
|
return boost::make_optional(out);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
catch (const x3::expectation_failure<std::string::iterator> &failure)
|
catch (const qi::expectation_failure<It> &failure)
|
||||||
{
|
{
|
||||||
// The grammar above using expectation parsers ">" does not automatically increment the
|
// The grammar above using expectation parsers ">" does not automatically increment the
|
||||||
// iterator to the failing position. Extract the position from the exception ourselves.
|
// iterator to the failing position. Extract the position from the exception ourselves.
|
||||||
iter = failure.where();
|
iter = failure.first;
|
||||||
}
|
}
|
||||||
|
|
||||||
return boost::none;
|
return boost::none;
|
||||||
|
|||||||
@@ -181,7 +181,7 @@ circleCenter(const Coordinate C1, const Coordinate C2, const Coordinate C3)
|
|||||||
// require three distinct points
|
// require three distinct points
|
||||||
if (C1 == C2 || C2 == C3 || C1 == C3)
|
if (C1 == C2 || C2 == C3 || C1 == C3)
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
// define line through c1, c2 and c2,c3
|
// define line through c1, c2 and c2,c3
|
||||||
@@ -196,7 +196,7 @@ circleCenter(const Coordinate C1, const Coordinate C2, const Coordinate C3)
|
|||||||
(std::abs(C2C1_lat) < std::numeric_limits<double>::epsilon() &&
|
(std::abs(C2C1_lat) < std::numeric_limits<double>::epsilon() &&
|
||||||
std::abs(C3C2_lat) < std::numeric_limits<double>::epsilon()))
|
std::abs(C3C2_lat) < std::numeric_limits<double>::epsilon()))
|
||||||
{
|
{
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
else if (std::abs(C2C1_lon) < std::numeric_limits<double>::epsilon())
|
else if (std::abs(C2C1_lon) < std::numeric_limits<double>::epsilon())
|
||||||
{
|
{
|
||||||
@@ -234,7 +234,7 @@ circleCenter(const Coordinate C1, const Coordinate C2, const Coordinate C3)
|
|||||||
|
|
||||||
// can this ever happen?
|
// can this ever happen?
|
||||||
if (std::abs(C2C1_slope - C3C2_slope) < std::numeric_limits<double>::epsilon())
|
if (std::abs(C2C1_slope - C3C2_slope) < std::numeric_limits<double>::epsilon())
|
||||||
return std::nullopt;
|
return {};
|
||||||
|
|
||||||
const double C1_y = static_cast<double>(toFloating(C1.lat));
|
const double C1_y = static_cast<double>(toFloating(C1.lat));
|
||||||
const double C1_x = static_cast<double>(toFloating(C1.lon));
|
const double C1_x = static_cast<double>(toFloating(C1.lon));
|
||||||
@@ -248,7 +248,7 @@ circleCenter(const Coordinate C1, const Coordinate C2, const Coordinate C3)
|
|||||||
(2 * (C3C2_slope - C2C1_slope));
|
(2 * (C3C2_slope - C2C1_slope));
|
||||||
const double lat = (0.5 * (C1_x + C2_x) - lon) / C2C1_slope + 0.5 * (C1_y + C2_y);
|
const double lat = (0.5 * (C1_x + C2_x) - lon) / C2C1_slope + 0.5 * (C1_y + C2_y);
|
||||||
if (lon < -180.0 || lon > 180.0 || lat < -90.0 || lat > 90.0)
|
if (lon < -180.0 || lon > 180.0 || lat < -90.0 || lat > 90.0)
|
||||||
return std::nullopt;
|
return {};
|
||||||
else
|
else
|
||||||
return Coordinate(FloatLongitude{lon}, FloatLatitude{lat});
|
return Coordinate(FloatLongitude{lon}, FloatLatitude{lat});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -168,6 +168,6 @@ std::optional<struct tm> Timezoner::operator()(const point_t &point) const
|
|||||||
if (boost::geometry::within(point, local_times[index].first))
|
if (boost::geometry::within(point, local_times[index].first))
|
||||||
return local_times[index].second;
|
return local_times[index].second;
|
||||||
}
|
}
|
||||||
return std::nullopt;
|
return {};
|
||||||
}
|
}
|
||||||
} // namespace osrm::updater
|
} // namespace osrm::updater
|
||||||
|
|||||||
@@ -130,15 +130,6 @@ BOOST_AUTO_TEST_CASE(valid_urls)
|
|||||||
BOOST_CHECK_EQUAL(reference_9.profile, result_9->profile);
|
BOOST_CHECK_EQUAL(reference_9.profile, result_9->profile);
|
||||||
CHECK_EQUAL_RANGE(reference_9.query, result_9->query);
|
CHECK_EQUAL_RANGE(reference_9.query, result_9->query);
|
||||||
BOOST_CHECK_EQUAL(reference_9.prefix_length, result_9->prefix_length);
|
BOOST_CHECK_EQUAL(reference_9.prefix_length, result_9->prefix_length);
|
||||||
|
|
||||||
api::ParsedURL reference_10{"match", 1, "car", "poly line ", 14UL};
|
|
||||||
auto result_10 = api::parseURL("/match/v1/car/poly%20line%20");
|
|
||||||
BOOST_CHECK(result_10);
|
|
||||||
BOOST_CHECK_EQUAL(reference_10.service, result_10->service);
|
|
||||||
BOOST_CHECK_EQUAL(reference_10.version, result_10->version);
|
|
||||||
BOOST_CHECK_EQUAL(reference_10.profile, result_10->profile);
|
|
||||||
CHECK_EQUAL_RANGE(reference_10.query, result_10->query);
|
|
||||||
BOOST_CHECK_EQUAL(reference_10.prefix_length, result_10->prefix_length);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|||||||
Reference in New Issue
Block a user