reorganizating tests into car/bike/foot
This commit is contained in:
@@ -0,0 +1,66 @@
|
||||
@routing @bicycle @access
|
||||
Feature: Restricted access
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Access tags on ways
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| yes | x |
|
||||
| motorcar | x |
|
||||
| motor_vehicle | x |
|
||||
| vehicle | x |
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags for other modes should have no effect
|
||||
Then routability should be
|
||||
| access | bothw |
|
||||
| ufo:yes | x |
|
||||
| ufo:motorcar | x |
|
||||
| ufo:motor_vehicle | x |
|
||||
| ufo:vehicle | x |
|
||||
| ufo:permissive | x |
|
||||
| ufo:designated | x |
|
||||
| ufo:no | x |
|
||||
| ufo:private | x |
|
||||
| ufo:agricultural | x |
|
||||
| ufo:forestry | x |
|
||||
| ufo:designated | x |
|
||||
| ufo:some_tag | x |
|
||||
|
||||
Scenario: Access tags on nodes
|
||||
Then routability should be
|
||||
| node:access | bothw |
|
||||
| yes | x |
|
||||
| motorcar | x |
|
||||
| motor_vehicle | x |
|
||||
| vehicle | x |
|
||||
| permissive | x |
|
||||
| designated | x |
|
||||
| no | |
|
||||
| private | |
|
||||
| agricultural | |
|
||||
| forestry | |
|
||||
| designated | |
|
||||
| some_tag | x |
|
||||
|
||||
Scenario: Access tags on both nodes and way
|
||||
Then routability should be
|
||||
| access | node:access | bothw |
|
||||
| yes | yes | x |
|
||||
| yes | no | |
|
||||
| yes | some_tag | |
|
||||
| no | yes | |
|
||||
| no | no | |
|
||||
| no | some_tag | |
|
||||
| some_tag | yes | |
|
||||
| some_tag | no | |
|
||||
| some_tag | some_tag | |
|
||||
@@ -0,0 +1,29 @@
|
||||
@routing @bicycle @barrier
|
||||
Feature: Barriers
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Barriers and bicycles
|
||||
Given the speedprofile "bicycle"
|
||||
Then routability should be
|
||||
| highway | node/barrier | node/access | bothw |
|
||||
| primary | | | x |
|
||||
| primary | bollard | | x |
|
||||
| primary | gate | | |
|
||||
| primary | cattle_grid | | |
|
||||
| primary | border_control | | |
|
||||
| primary | toll_booth | | |
|
||||
| primary | sally_port | | |
|
||||
| primary | bollard | yes | x |
|
||||
| primary | gate | yes | x |
|
||||
| primary | cattle_grid | yes | x |
|
||||
| primary | border_control | yes | x |
|
||||
| primary | toll_booth | yes | x |
|
||||
| primary | sally_port | yes | x |
|
||||
| primary | bollard | motorcar | |
|
||||
| primary | bollard | motor_vehicle | |
|
||||
| primary | bollard | vehicle | x |
|
||||
| primary | bollard | motorcar | |
|
||||
| primary | bollard | permissive | x |
|
||||
| primary | bollard | designated | x |
|
||||
@@ -0,0 +1,70 @@
|
||||
@routing @bicycle @destination
|
||||
Feature: Destination only, no passing through
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Destination only street
|
||||
Given the node map
|
||||
| a | | | | |
|
||||
| | b | c | d | |
|
||||
| | | | | e |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
| ab | |
|
||||
| bcd | destination |
|
||||
| de | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab,bcd |
|
||||
| a | d | ab,bcd |
|
||||
| a | e | ab,bcd,de |
|
||||
| e | d | de |
|
||||
| e | c | de,bcd |
|
||||
| e | b | de,bcd |
|
||||
| e | a | de,bcd,ab |
|
||||
| b | c | bcd |
|
||||
| b | d | bcd |
|
||||
| d | c | bcd |
|
||||
| d | b | bcd |
|
||||
|
||||
Scenario: Series of destination only streets
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
| ab | |
|
||||
| bc | destination |
|
||||
| cd | destination |
|
||||
| de | destination |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| a | c | ab |
|
||||
| a | d | ab |
|
||||
| a | e | ab |
|
||||
|
||||
Scenario: Routing inside a destination only area
|
||||
Given the node map
|
||||
| a | | c | | e |
|
||||
| | b | | d | |
|
||||
|
||||
And the ways
|
||||
| nodes | access |
|
||||
| ab | destination |
|
||||
| bc | destination |
|
||||
| cd | destination |
|
||||
| de | destination |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | e | ab,bc,cd,de |
|
||||
| e | a | de,cd,bc,ab |
|
||||
| b | d | bc,cd |
|
||||
| d | b | cd,bc |
|
||||
@@ -0,0 +1,30 @@
|
||||
@routing @bicycle @ferry
|
||||
Feature: Handle ferry routes
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Use a ferry route
|
||||
Given the node map
|
||||
| a | b | c | | |
|
||||
| | | d | | |
|
||||
| | | e | f | g |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | route | bicycle |
|
||||
| abc | primary | | |
|
||||
| cde | | ferry | yes |
|
||||
| efg | primary | | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | g | abc,cde,efg |
|
||||
| b | f | abc,cde,efg |
|
||||
| e | c | cde |
|
||||
| e | b | cde,abc |
|
||||
| e | a | cde,abc |
|
||||
| c | e | cde |
|
||||
| c | f | cde,efg |
|
||||
| c | g | cde,efg |
|
||||
|
||||
|
||||
@@ -0,0 +1,44 @@
|
||||
@routing @bicycle @names
|
||||
Feature: Street names in instructions
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: A named street
|
||||
Given the node map
|
||||
| a | b |
|
||||
| | c |
|
||||
|
||||
And the ways
|
||||
| nodes | name |
|
||||
| ab | My Way |
|
||||
| bc | Your Way |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | My Way,Your Way |
|
||||
|
||||
Scenario: Use way type to describe unnamed ways
|
||||
Given the node map
|
||||
| a | b | c |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| ab | cycleway | |
|
||||
| bc | track | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | c | cycleway,track |
|
||||
|
||||
Scenario: Don't create instructions for every node of unnamed ways
|
||||
Given the node map
|
||||
| a | b | c | d |
|
||||
|
||||
And the ways
|
||||
| nodes | highway | name |
|
||||
| abcd | cycleway | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | d | cycleway |
|
||||
@@ -0,0 +1,120 @@
|
||||
@routing @bicycle @oneway
|
||||
Feature: Oneway streets
|
||||
Handle oneways streets, as defined at http://wiki.openstreetmap.org/wiki/OSM_tags_for_routing
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Simple oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | yes | x | |
|
||||
|
||||
Scenario: Simple reverse oneway
|
||||
Then routability should be
|
||||
| highway | oneway | forw | backw |
|
||||
| primary | -1 | | x |
|
||||
|
||||
Scenario: Around the Block
|
||||
Given the node map
|
||||
| a | b |
|
||||
| d | c |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| ab | yes |
|
||||
| bc | |
|
||||
| cd | |
|
||||
| da | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| a | b | ab |
|
||||
| b | a | bc,cd,da |
|
||||
|
||||
Scenario: Handle various oneway tag values
|
||||
Then routability should be
|
||||
| oneway | forw | backw |
|
||||
| | x | x |
|
||||
| nonsense | x | x |
|
||||
| no | x | x |
|
||||
| false | x | x |
|
||||
| 0 | x | x |
|
||||
| yes | x | |
|
||||
| true | x | |
|
||||
| 1 | x | |
|
||||
| -1 | | x |
|
||||
|
||||
Scenario: Implied oneways
|
||||
Then routability should be
|
||||
| junction | forw | backw |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| | x | x |
|
||||
| roundabout | x | |
|
||||
| roundabout | x | |
|
||||
| roundabout | x | |
|
||||
| roundabout | x | |
|
||||
|
||||
Scenario: Overriding implied oneways
|
||||
Then routability should be
|
||||
| highway | junction | oneway | forw | backw |
|
||||
| primary | roundabout | no | x | x |
|
||||
| primary | roundabout | yes | x | |
|
||||
| motorway_link | | -1 | | |
|
||||
| trunk_link | | -1 | | |
|
||||
| primary | roundabout | -1 | | x |
|
||||
|
||||
@bicycle
|
||||
Scenario: Oneway:bicycle should override normal oneways tags
|
||||
Then routability should be
|
||||
| oneway:bicycle | oneway | junction | forw | backw |
|
||||
| yes | | | x | |
|
||||
| yes | yes | | x | |
|
||||
| yes | no | | x | |
|
||||
| yes | -1 | | x | |
|
||||
| yes | | roundabout | x | |
|
||||
| no | | | x | x |
|
||||
| no | yes | | x | x |
|
||||
| no | no | | x | x |
|
||||
| no | -1 | | x | x |
|
||||
| no | | roundabout | x | x |
|
||||
| -1 | | | | x |
|
||||
| -1 | yes | | | x |
|
||||
| -1 | no | | | x |
|
||||
| -1 | -1 | | | x |
|
||||
| -1 | | roundabout | | x |
|
||||
|
||||
@bicycle
|
||||
Scenario: Bicycles and contra flow
|
||||
Then routability should be
|
||||
| oneway | cycleway | forw | backw |
|
||||
| yes | opposite | x | x |
|
||||
| yes | opposite_track | x | x |
|
||||
| yes | opposite_lane | x | x |
|
||||
| -1 | opposite | x | x |
|
||||
| -1 | opposite_track | x | x |
|
||||
| -1 | opposite_lane | x | x |
|
||||
| no | opposite | x | x |
|
||||
| no | opposite_track | x | x |
|
||||
| no | opposite_lane | x | x |
|
||||
|
||||
Scenario: Bikes should not be affected by car tags
|
||||
Then routability should be
|
||||
| junction | oneway | oneway:car | forw | backw |
|
||||
| | yes | yes | x | |
|
||||
| | yes | no | x | |
|
||||
| | yes | -1 | x | |
|
||||
| | no | yes | x | x |
|
||||
| | no | no | x | x |
|
||||
| | no | -1 | x | x |
|
||||
| | -1 | yes | | x |
|
||||
| | -1 | no | | x |
|
||||
| | -1 | -1 | | x |
|
||||
| roundabout | | yes | x | |
|
||||
| roundabout | | no | x | |
|
||||
| roundabout | | -1 | x | |
|
||||
@@ -0,0 +1,199 @@
|
||||
@routing @bicycle @restrictions
|
||||
Feature: Turn restrictions
|
||||
Handle turn restrictions as defined by http://wiki.openstreetmap.org/wiki/Relation:restriction
|
||||
Note that if u-turns are allowed, turn restrictions can lead to suprising, but correct, routes.
|
||||
|
||||
Background: Use car routing
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
@no_turning
|
||||
Scenario: No left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | wj | j | no_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: No right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | ej | j | no_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: No u-turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | wj | j | no_u_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any no_* relation
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | wj | j | no_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only left turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | wj | j | only_left_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | sj,wj |
|
||||
| s | n | |
|
||||
| s | e | |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only right turn
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | ej | j | only_right_turn |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | |
|
||||
| s | e | sj,ej |
|
||||
|
||||
@only_turning
|
||||
Scenario: Only straight on
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | nj | j | only_straight_on |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
|
||||
@no_turning
|
||||
Scenario: Handle any only_* restriction
|
||||
Given the node map
|
||||
| | n | |
|
||||
| w | j | e |
|
||||
| | s | |
|
||||
|
||||
And the ways
|
||||
| nodes | oneway |
|
||||
| sj | yes |
|
||||
| nj | -1 |
|
||||
| wj | -1 |
|
||||
| ej | -1 |
|
||||
|
||||
And the relations
|
||||
| from | to | via | restriction |
|
||||
| sj | nj | j | only_weird_zigzags |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| s | w | |
|
||||
| s | n | sj,nj |
|
||||
| s | e | |
|
||||
@@ -0,0 +1,34 @@
|
||||
@routing @bicycle @way
|
||||
Feature: Accessability of different way types
|
||||
|
||||
Background:
|
||||
Given the speedprofile "bicycle"
|
||||
|
||||
Scenario: Basic access for bicycles
|
||||
Bikes are allowed on footways etc because you can pull your bike at a lower speed.
|
||||
Given the speedprofile "bicycle"
|
||||
Then routability should be
|
||||
| highway | forw |
|
||||
| motorway | |
|
||||
| motorway_link | |
|
||||
| trunk | |
|
||||
| trunk_link | |
|
||||
| primary | x |
|
||||
| primary_link | x |
|
||||
| secondary | x |
|
||||
| secondary_link | x |
|
||||
| tertiary | x |
|
||||
| tertiary_link | x |
|
||||
| residential | x |
|
||||
| service | x |
|
||||
| unclassified | x |
|
||||
| living_street | x |
|
||||
| road | x |
|
||||
| track | x |
|
||||
| path | x |
|
||||
| footway | x |
|
||||
| pedestrian | x |
|
||||
| steps | x |
|
||||
| pier | x |
|
||||
| cycleway | x |
|
||||
| bridleway | |
|
||||
Reference in New Issue
Block a user