Add more guidance tests

This commit is contained in:
Patrick Niklaus 2016-04-21 22:51:03 +02:00
parent 82177c101b
commit b07275694a
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B
3 changed files with 618 additions and 1 deletions

View File

@ -21,7 +21,6 @@ Feature: End Of Road Instructions
| a,c | ab,cbd,cbd | depart,end of road left,arrive |
| a,d | ab,cbd,cbd | depart,end of road right,arrive |
Scenario: End of Road with three streets
Given the node map
| | | c |
@ -104,3 +103,21 @@ Feature: End Of Road Instructions
| waypoints | route | turns |
| a,c | ab,cbd,cbd | depart,end of road left,arrive |
| a,d | ab,cbd,cbd | depart,end of road right,arrive |
Scenario: End of Road with two ramps - prefer ramp over end of road
Given the node map
| | | c |
| a | | b |
| | | d |
And the ways
| nodes | highway |
| ab | primary |
| bc | motorway_link |
| bd | motorway_link |
When I route I should get
| waypoints | route | turns |
| a,c | ab,bc,bc | depart,ramp left,arrive |
| a,d | ab,bd,bd | depart,ramp right,arrive |

View File

@ -211,3 +211,74 @@ Feature: Fork Instructions
| a,c | ,, | depart,fork slight left,arrive |
| a,d | ,, | depart,fork slight right,arrive |
Scenario: Non-Fork on complex intersection - left
Given the node map
| | | | | c |
| a | | b | | |
| | e | | | d |
And the ways
| nodes | highway |
| abc | secondary |
| bd | tertiary |
| eb | tertiary |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| a,d | abc,bd,bd | depart,turn slight right,arrive |
Scenario: Non-Fork on complex intersection - right
Given the node map
| | e | | | c |
| a | | b | | |
| | | | | d |
And the ways
| nodes | highway |
| abd | secondary |
| bc | tertiary |
| eb | tertiary |
When I route I should get
| waypoints | route | turns |
| a,c | abd,bc,bc | depart,turn slight left,arrive |
| a,d | abd,abd | depart,arrive |
@pr2275 @bug
Scenario: Tripple fork
Given the node map
| | | | | | | | | c |
| a | | b | | d | | | | |
| | | | | | | | | e |
And the ways
| nodes | highway |
| ab | secondary |
| bc | secondary |
| bd | secondary |
| be | secondary |
When I route I should get
| waypoints | route | turns |
| a,c | ab,bc,bc | depart,fork slight left,arrive |
| a,d | ab,bd,bd | depart,fork straight,arrive |
| a,e | ab,be,be | depart,fork slight right,arrive |
Scenario: Tripple fork -- middle obvious
Given the node map
| | | | | c |
| a | | b | | d |
| | | | | e |
And the ways
| nodes | highway |
| abd | secondary |
| bc | secondary |
| be | secondary |
When I route I should get
| waypoints | route | turns |
| a,c | abd,bc,bc | depart,turn slight left,arrive |
| a,d | abd,abd | depart,arrive |
| a,e | abd,be,be | depart,turn slight right,arrive |

View File

@ -282,3 +282,532 @@ Feature: Simple Turns
| h,c | first,second,second | depart,turn left,arrive |
| h,i | first,first,first | depart,continue uturn,arrive |
Scenario: Three Way Similar Sharp Turns
Given the node map
| a | | | | b |
| c | | | | |
| | d | | | |
And the ways
| nodes | highway |
| ab | primary |
| bc | primary |
| bd | primary |
When I route I should get
| waypoints | route | turns |
| a,c | ab,bc,bc | depart,turn sharp right,arrive |
| a,d | ab,bd,bd | depart,turn sharp right,arrive |
| d,c | bd,bc,bc | depart,turn sharp left,arrive |
| d,a | bd,ab,ab | depart,turn sharp left,arrive |
Scenario: Left Turn Assignment (1)
Given the node map
| | | | | d |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn slight left,arrive |
Scenario: Left Turn Assignment (2)
Given the node map
| | | | | d |
| | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn left,arrive |
Scenario: Left Turn Assignment (3)
Given the node map
| | | | d | |
| | | | | |
| | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn left,arrive |
Scenario: Left Turn Assignment (4)
Given the node map
| | | d | | |
| | | | | |
| | | | | |
| | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn left,arrive |
Scenario: Left Turn Assignment (5)
Given the node map
| | d | | | |
| | | | | |
| | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn left,arrive |
@bug @pr2275
Scenario: Left Turn Assignment (6)
Given the node map
| d | | | | |
| | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp left,arrive |
Scenario: Left Turn Assignment (7)
Given the node map
| d | | | | |
| a | | b | | c |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp left,arrive |
Scenario: Right Turn Assignment (1)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | d |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn slight right,arrive |
Scenario: Right Turn Assignment (2)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | |
| | | | | d |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
Scenario: Right Turn Assignment (3)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | |
| | | | | |
| | | | d | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
Scenario: Right Turn Assignment (4)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | |
| | | | | |
| | | | | |
| | | d | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
Scenario: Right Turn Assignment (5)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | |
| | | | | |
| | d | | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
@bug @pr2275
Scenario: Right Turn Assignment (6)
Given the node map
| | | e | | |
| a | | b | | c |
| | | | | |
| d | | | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
Scenario: Right Turn Assignment (7)
Given the node map
| | | e | | |
| a | | b | | c |
| d | | | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
Scenario: Right Turn Assignment Two Turns
Given the node map
| | | f | | |
| a | | b | | c |
| | | | | |
| d | e | | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
| a,e | abc,be,be | depart,turn right,arrive |
Scenario: Right Turn Assignment Two Turns (2)
Given the node map
| | | f | c | |
| a | | b | | |
| | | | | e |
| | | | d | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
| a,e | abc,be,be | depart,turn slight right,arrive |
Scenario: Right Turn Assignment Two Turns (3)
Given the node map
| | | f | | |
| a | | b | | c |
| | | | | e |
| | | | d | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
| a,e | abc,be,be | depart,turn slight right,arrive |
Scenario: Right Turn Assignment Two Turns (4)
Given the node map
| | | f | | |
| a | | b | | c |
| | | | | |
| | | d | | e |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn right,arrive |
| a,e | abc,be,be | depart,turn slight right,arrive |
Scenario: Right Turn Assignment Three Turns
Given the node map
| | | g | | |
| a | | b | | c |
| | d | | f | |
| | | e | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
| bg | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
| a,e | abc,be,be | depart,turn right,arrive |
| a,f | abc,bf,bf | depart,turn slight right,arrive |
Scenario: Slight Turn involving Oneways
Given the node map
| | | a | | |
| | | | | |
| | | b | | e |
| d | | | | |
| | | c | | |
And the ways
| nodes | highway | oneway |
| abc | primary | yes |
| dbe | primary | no |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| d,e | dbe,dbe | depart,arrive |
| e,d | dbe,dbe | depart,arrive |
@bug @pr2275
Scenario: Slight Turn involving Oneways
Given the node map
| | | | a | |
| | | | | |
| | | | | |
| | | b | | e |
| d | | | | |
| | | c | | |
And the ways
| nodes | highway | oneway |
| abc | primary | yes |
| dbe | primary | no |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| d,e | dbe,dbe | depart,arrive |
| e,d | dbe,dbe | depart,arrive |
Scenario: Slight Turn involving Oneways - Name Change
Given the node map
| | | a | | |
| | | | | |
| | | b | | e |
| d | | | | |
| | | c | | |
And the ways
| nodes | highway | oneway |
| abc | primary | yes |
| db | primary | no |
| be | primary | no |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc | depart,arrive |
| d,e | db,be,be | depart,new name slight right,arrive |
| e,d | be,db,db | depart,new name slight left,arrive |
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 1
Given the node map
| | | g | | |
| a | | b | | c |
| | | | | |
| | d | e | f | |
And the ways
| nodes | highway | oneway |
| abc | primary | no |
| db | primary | yes |
| eb | primary | no |
| fb | primary | no |
| bg | primary | no |
When I route I should get
| waypoints | route | turns |
| a,e | abc,eb,eb | depart,turn right,arrive |
| a,f | abc,fb,fb | depart,turn slight right,arrive |
@bug @pr2275
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 2
Given the node map
| | | g | | |
| a | | b | | c |
| | | | | |
| | d | e | f | |
And the ways
| nodes | highway | oneway |
| abc | primary | no |
| db | primary | no |
| eb | primary | yes |
| fb | primary | no |
| bg | primary | no |
When I route I should get
| waypoints | route | turns |
| a,d | abc,db,db | depart,turn sharp right,arrive |
| a,f | abc,fb,fb | depart,turn right,arrive |
Scenario: Right Turn Assignment Three Conflicting Turns with invalid - 3
Given the node map
| | | g | | |
| a | | b | | c |
| | | | | |
| | d | e | f | |
And the ways
| nodes | highway | oneway |
| abc | primary | no |
| db | primary | no |
| be | primary | no |
| fb | primary | yes |
| bg | primary | no |
When I route I should get
| waypoints | route | turns |
| a,d | abc,db,db | depart,turn sharp right,arrive |
| a,e | abc,be,be | depart,turn right,arrive |
Scenario: Conflicting Turns with well distinguished turn
Given the node map
| a | | | b | | | c |
| | | | | | | |
| f | | | | | | d |
| | | | | | | e |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn slight right,arrive |
| a,e | abc,be,be | depart,turn right,arrive |
| a,f | abc,bf,bf | depart,turn sharp right,arrive |
@bug @pr2275
Scenario: Conflicting Turns with well distinguished turn (back)
Given the node map
| a | | | b | | | c |
| | | | | | | |
| d | | | | | | f |
| | e | | | | | |
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
| be | primary |
| bf | primary |
When I route I should get
| waypoints | route | turns |
| a,d | abc,bd,bd | depart,turn sharp right,arrive |
| a,e | abc,be,be | depart,turn right,arrive |
| a,f | abc,bf,bf | depart,turn slight right,arrive |