osrm-backend/features/testbot/via.feature

103 lines
3.9 KiB
Gherkin
Raw Normal View History

2013-05-05 05:14:09 -04:00
@routing @testbot @via
Feature: Via points
2013-05-05 05:14:09 -04:00
Background:
Given the profile "testbot"
2013-08-29 13:29:13 -04:00
Scenario: Simple via point
Given the node map
| a | b | c |
2013-05-05 05:14:09 -04:00
2013-08-29 13:29:13 -04:00
And the ways
| nodes |
| abc |
2013-05-05 05:14:09 -04:00
2013-08-29 13:29:13 -04:00
When I route I should get
| waypoints | route |
| a,b,c | abc |
| c,b,a | abc |
2013-05-05 05:14:09 -04:00
Scenario: Via point at a dead end
Given the node map
2013-08-29 13:29:13 -04:00
| a | b | c |
| | d | |
2013-05-05 05:14:09 -04:00
And the ways
2013-08-29 13:29:13 -04:00
| nodes |
| abc |
| bd |
2013-05-05 05:14:09 -04:00
When I route I should get
2013-08-29 13:29:13 -04:00
| waypoints | route |
| a,d,c | abc,bd,bd,abc |
| c,d,a | abc,bd,bd,abc |
2013-05-05 05:14:09 -04:00
2013-08-29 13:29:13 -04:00
Scenario: Multiple via points
Given the node map
| a | | | | e | f | g | |
| | b | c | d | | | | h |
2013-08-29 10:29:21 -04:00
2013-08-29 13:29:13 -04:00
And the ways
| nodes |
| ae |
| ab |
| bcd |
| de |
| efg |
| gh |
| dh |
2013-08-29 10:29:21 -04:00
2013-08-29 13:29:13 -04:00
When I route I should get
2013-12-12 18:37:36 -05:00
| waypoints | route |
| a,c,f | ab,bcd,de,efg |
| a,c,f,h | ab,bcd,de,efg,gh |
2014-05-26 05:46:01 -04:00
Scenario: Via points on ring of oneways
2014-05-26 05:46:01 -04:00
# xa it to avoid only having a single ring, which cna trigger edge cases
Given the node map
| x | | | | | | |
| a | 1 | b | 2 | c | 3 | d |
| f | | | | | | e |
And the ways
| nodes | oneway |
| xa | |
| ab | yes |
| bc | yes |
| cd | yes |
| de | yes |
| ef | yes |
| fa | yes |
When I route I should get
| waypoints | route | distance | turns |
| 1,3 | ab,bc,cd | 400m +-1 | head,straight,straight,destination |
| 3,1 | cd,de,ef,fa,ab | 1000m +-1 | head,right,right,right,right,destination |
2014-05-26 05:59:13 -04:00
| 1,2,3 | ab,bc,cd | 400m +-1 | head,straight,straight,destination |
| 1,3,2 | ab,bc,cd,de,ef,fa,ab,bc | 1600m +-1 | head,straight,straight,right,right,right,right,straight,destination |
| 3,2,1 | cd,de,ef,fa,ab,bc,cd,de,ef,fa,ab | 2400m +-1 | head,right,right,right,right,straight,straight,right,right,right,right,destination |
2014-05-26 05:46:01 -04:00
@bug
Scenario: Via points on ring on the same oneway
2014-05-23 06:52:32 -04:00
# xa it to avoid only having a single ring, which cna trigger edge cases
Given the node map
2014-05-23 06:52:32 -04:00
| x | | | | |
| a | 1 | 2 | 3 | b |
| d | | | | c |
And the ways
| nodes | oneway |
2014-05-23 06:52:32 -04:00
| xa | |
| ab | yes |
| bc | yes |
| cd | yes |
| da | yes |
When I route I should get
| waypoints | route | distance | turns |
| 1,3 | ab | 200m +-1 | head,destination |
| 3,1 | ab,bc,cd,da,ab | 800m +-1 | head,right,right,right,right,destination |
| 1,2,3 | ab | 200m +-1 | head,destination |
| 1,3,2 | ab,bc,cd,da,ab | 1100m +-1 | head,right,right,right,right,destination |
| 3,2,1 | ab,bc,cd,da,ab,bc,cd,da,ab | 1600m +-1 | head,right,right,right,right,right,right,right,right,destination |