Refactoring of parameter garammars
* signature changed from void() to void(engine::api::Parameters&)
* performance increase due to use "static const GrammarT" and avoid
construction and destruction of grammars during parsing
* removed code duplication in inherited grammars
* rule unlimited changed to qi::lit
* added rule size_t_
* parser accepts "&geometries=" and "&overview=" and fails at "foo"
instead of "&geometries=foo" and &overview=foo
* added expectations checks for derived grammars
* changed rules qi::list(".") to character rules '.'
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
#include "extractor/raster_source.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
#include "util/exception.hpp"
|
||||
#include "util/typedefs.hpp"
|
||||
|
||||
#include <osrm/coordinate.hpp>
|
||||
|
||||
@@ -15,14 +15,10 @@ using namespace osrm::extractor;
|
||||
int normalize(double coord) { return static_cast<int>(coord * COORDINATE_PRECISION); }
|
||||
|
||||
#define CHECK_QUERY(source_id, lon, lat, expected) \
|
||||
BOOST_CHECK_EQUAL( \
|
||||
sources.getRasterDataFromSource(source_id, lon, lat).datum, \
|
||||
expected)
|
||||
BOOST_CHECK_EQUAL(sources.getRasterDataFromSource(source_id, lon, lat).datum, expected)
|
||||
|
||||
#define CHECK_INTERPOLATE(source_id, lon, lat, expected) \
|
||||
BOOST_CHECK_EQUAL( \
|
||||
sources.getRasterInterpolateFromSource(source_id, lon, lat).datum, \
|
||||
expected)
|
||||
BOOST_CHECK_EQUAL(sources.getRasterInterpolateFromSource(source_id, lon, lat).datum, expected)
|
||||
|
||||
BOOST_AUTO_TEST_CASE(raster_test)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user