Commit Graph

5368 Commits

Author SHA1 Message Date
Daniel J. Hofmann
2539fd53dc Enable unit test that should pass with fixes from this branch 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
8a2bd09fd0 Adapts all grammars to use expectation parsers without backtracking.
Sequence parsers using `>>` allow for backtracking, expectation parsers
`>` do not. This allows us to properly report the position where parsing
failed, by catching the expectation_failure exception and adapting the
iterator ourselves.

References:
- https://github.com/Project-OSRM/osrm-backend/pull/2188
- https://github.com/Project-OSRM/osrm-backend/issues/2168
- http://www.boost.org/doc/libs/1_55_0/libs/spirit/doc/html/spirit/qi/reference/operator/expect.html
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
def89ac079 Conform to v5 spec and support "unlimited" as radiuses value.
Supersedes: https://github.com/Project-OSRM/osrm-backend/pull/2231

Thanks to Michael Krasnyk (@oxidase) for figuring out the reason for the
segfault earlier:

> https://github.com/Project-OSRM/osrm-backend/pull/2231#issuecomment-207114226
2016-04-08 21:03:50 +02:00
Michael Krasnyk
fe08726387 Fix BOOST_FUSION_ADAPT_STRUCT parameters for ParsedURL
Fix build error: macro "BOOST_FUSION_ADAPT_STRUCT" passed 5 arguments, but takes just 2
https://travis-ci.org/Project-OSRM/osrm-backend/builds/121406444
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
9bb4a68599 Fixes grammar includes and formats them 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
996a27dbd1 Report position where parsing failed; resolves #2168 2016-04-08 21:03:50 +02:00
Michael Krasnyk
58ebadd7b3 Fix #2173 with a no_trailing_dot_policy
no_trailing_dot_policy rejects parsing exp, exp_n, nan, inf
and rejects parsing a fractional part if detects ".Fmt".
For Fmt = 'j', 's', 'o', 'n':
 42.foo    rule parses 42.
 42.json   rule parses 42
 42..json  rule parses 42.

Reference:
- https://github.com/Project-OSRM/osrm-backend/pull/2222#issuecomment-206206239
2016-04-08 21:03:50 +02:00
Michael Krasnyk
cae06ba2c1 Fix type "osrm::server::api::ParsedURL ()" 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
0274afa0f7 Allow 4.json and 4.3.json format; needs -lit(".") >> -lit("json") hack^Wworkaround
Rainer Deyke's workaround without the need to do ugly backtracking.

References:
- http://lists.boost.org/boost-users/2016/03/85960.php
- https://github.com/Project-OSRM/osrm-backend/issues/2173#issuecomment-204342785
2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
221f70ac7b Synthesize parser only once from DSL: static storage duration 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
d3dbca374d Do not modify the end iterator for parameter parsing, too 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
6f0b6a8158 Re-factor URL parser: make grammar stateless 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
b25cd6aaf2 Moving from references is a bad idea in parameter parsers, too 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
d27025003a Do not move from references in grammar handlers 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
66eb90d9d0 Adapts move(*optional) to *move(optional) to get rvalue operator* overload 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
6a81a9d191 Extra semicolon 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
64cb134113 Align Spirit rules for URL parser 2016-04-08 21:03:50 +02:00
Daniel J. Hofmann
891ff7dd80 Do not modify the end iterator, make const 2016-04-08 21:03:50 +02:00
Patrick Niklaus
6643e7f499 Integrate converage reporting 2016-04-08 20:37:51 +02:00
Moritz Kobitzsch
fcbf527ba5 refactor of turn analysis into turn handlers 2016-04-08 18:14:43 +02:00
Moritz Kobitzsch
dfd180a292 fixing unit tests 2016-04-08 11:21:14 +02:00
Moritz Kobitzsch
fa0a5040e5 adding tests for guidance 2016-04-08 10:43:22 +02:00
Dane Springmeyer
56ba2cb251 Add missing -lz to fix linking of server-tests 2016-04-08 01:52:35 +02:00
Patrick Niklaus
dea12779cf basename -> filename, fixes #2027 2016-04-08 01:50:25 +02:00
karenzshea
6033c05ff0 checks for waypoint index and route lengths 2016-04-07 22:11:28 +02:00
karenzshea
407da8bd15 start match test 2016-04-07 22:11:28 +02:00
Daniel J. Hofmann
43413ff980 Add license to storage and storage config exposed in public API, closes #2036 2016-04-07 10:41:32 +02:00
Moritz Kobitzsch
4d864b8267 fix warnings in compilation on clang 2016-04-06 18:44:42 +02:00
Daniel J. Hofmann
a516245c94 Modularize benchmarks subproject 2016-04-06 18:36:08 +02:00
Daniel J. Hofmann
b1ed268d0e Start modularizing the CMake buildsystem
The main reason for modularizing the unit tests was to split off
libboost_unit_test_framework from the osrm toolchain binaries.

Now only the unit test binaries link against it, unblocking
binary distribution without unit test library dependencies.

I started this on v4 a couple of weeks ago and hit a -llua5 issue on
Travis. By now v5 diverged quite a bit (especially in the code that I
have to stare at for debugging the issues).

https://github.com/Project-OSRM/osrm-backend/pull/2073

Let's bring this to v5+ only.

This is blocking:

- https://github.com/Project-OSRM/osrm-backend/issues/2065
- https://github.com/Project-OSRM/osrm-backend/issues/2197#issuecomment-204864938
2016-04-06 18:36:06 +02:00
Patrick Niklaus
83b86bf092 Fix typo .travis.yml for clang compiler name 2016-04-06 18:08:22 +02:00
Daniel J. Hofmann
954caa6804 The C compiler is used for several CMake tests, match with C++ compiler 2016-04-06 15:25:18 +02:00
Patrick Niklaus
8b6da4d2fe Enable server-tests on travis 2016-04-06 15:20:53 +02:00
Patrick Niklaus
f2d70d972d Temporarily enable travis for rewrite/new-api branch 2016-04-06 15:16:28 +02:00
Daniel J. Hofmann
b20de76037 Make verbose sections foldable on Travis 2016-04-06 10:58:49 +02:00
Patrick Niklaus
a33bd9dfe6 Adapt benchmarking script 2016-04-05 23:40:24 +02:00
Moritz Kobitzsch
f2443c64db adds distinction between rotaries/rounabouts 2016-04-05 22:59:14 +02:00
Patrick Niklaus
278ec04f5e Remove left-over summary code 2016-04-05 22:59:14 +02:00
Patrick Niklaus
95787255a1 Fix broken uturns test 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
eaf9993dd9 Removes summary from legs property 2016-04-05 22:59:14 +02:00
Moritz Kobitzsch
470d7600b8 fixes 2219 2016-04-05 22:59:14 +02:00
Patrick Niklaus
849baea544 Fix uturn detection in match plugin 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
4f1ca20dda Do not rely on alternatives being found in unit tests 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
97401ad99a Disable steps and alternatives by default 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
59f5e364c1 Suppress pedantic ISO C++ warning about argv[0] size check 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
29c2a117c0 Adapts tests to case sensitive "Ok" status code. 2016-04-05 22:59:14 +02:00
Patrick Niklaus
c209e31ce1 Fix tests for 2016-04-05 22:59:14 +02:00
Patrick Niklaus
12608889e2 Fix 'ok' -> 'Ok' 2016-04-05 22:59:14 +02:00
Daniel J. Hofmann
3343882876 Resolves issues with multiple includedirs in pkg-config file; closes #2195. 2016-04-05 22:59:14 +02:00
Patrick Niklaus
6e50b5fc60 Filter segments correctly by bounding box 2016-04-05 22:59:14 +02:00