add tests for hierachy of access tags

This commit is contained in:
Emil Tin 2012-10-03 22:56:41 +02:00
parent 17fab42f25
commit 59025ca2da
2 changed files with 60 additions and 24 deletions

View File

@ -1,56 +1,63 @@
@routing @bicycle @access @routing @bicycle @access
Feature: Bike - Restricted access Feature: Bike - Restricted access
Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background: Background:
Given the speedprofile "bicycle" Given the speedprofile "bicycle"
Scenario: Bike - Access tags on ways Scenario: Bike - Access tag hierachy
Then routability should be
| access | vehicle | bicycle | bothw |
| yes | | | x |
| no | | | |
| yes | yes | | x |
| no | yes | | x |
| yes | no | | |
| no | no | | |
| yes | yes | yes | x |
| no | yes | yes | x |
| yes | no | yes | x |
| no | no | yes | x |
| yes | yes | no | |
| no | yes | no | |
| yes | no | no | |
| no | no | no | |
Scenario: Bike - Access tags on ways
Then routability should be Then routability should be
| access | bothw | | access | bothw |
| | x | | | x |
| yes | x | | yes | x |
| motorcar | x |
| motor_vehicle | x |
| vehicle | x |
| permissive | x | | permissive | x |
| designated | x | | designated | x |
| no | | | no | |
| foot | |
| private | | | private | |
| agricultural | | | agricultural | |
| forestery | | | forestery | |
| some_tag | x | | some_tag | x |
Scenario: Bike - Access tags on nodes
Scenario: Bike - Access tags on nodes
Then routability should be Then routability should be
| node/access | bothw | | node/access | bothw |
| | x | | | x |
| yes | x | | yes | x |
| motorcar | x |
| motor_vehicle | x |
| vehicle | x |
| permissive | x | | permissive | x |
| designated | x | | designated | x |
| no | | | no | |
| foot | |
| private | | | private | |
| agricultural | | | agricultural | |
| forestery | | | forestery | |
| some_tag | x | | some_tag | x |
Scenario: Bike - Access tags on both nodes and way Scenario: Bike - Access tags on both node and way
Then routability should be Then routability should be
| access | node/access | bothw | | access | node/access | bothw |
| yes | yes | x | | yes | yes | x |
| yes | no | | | yes | no | |
| yes | foot | |
| yes | some_tag | x | | yes | some_tag | x |
| no | yes | | | no | yes | |
| no | no | | | no | no | |
| no | foot | |
| no | some_tag | | | no | some_tag | |
| some_tag | yes | x | | some_tag | yes | x |
| some_tag | no | | | some_tag | no | |
| some_tag | foot | |
| some_tag | some_tag | x | | some_tag | some_tag | x |

View File

@ -1,16 +1,48 @@
@routing @car @access @routing @car @access
Feature: Car - Restricted access Feature: Car - Restricted access
Reference: http://wiki.openstreetmap.org/wiki/Key:access
Background: Background:
Given the speedprofile "car" Given the speedprofile "car"
Scenario: Car - Access tags on ways Scenario: Car - Access tag hierachy
Then routability should be
| access | vehicle | motor_vehicle | motorcar | bothw |
| yes | | | | x |
| no | | | | |
| yes | yes | | | x |
| no | yes | | | x |
| yes | no | | | |
| no | no | | | |
| yes | yes | yes | | x |
| no | yes | yes | | x |
| yes | no | yes | | x |
| no | no | yes | | x |
| yes | yes | no | | |
| no | yes | no | | |
| yes | no | no | | |
| no | no | no | | |
| yes | yes | yes | yes | x |
| no | yes | yes | yes | x |
| yes | no | yes | yes | x |
| no | no | yes | yes | x |
| yes | yes | no | yes | x |
| no | yes | no | yes | x |
| yes | no | no | yes | x |
| no | no | no | yes | x |
| yes | yes | yes | no | |
| no | yes | yes | no | |
| yes | no | yes | no | |
| no | no | yes | no | |
| yes | yes | no | no | |
| no | yes | no | no | |
| yes | no | no | no | |
| no | no | no | no | |
Scenario: Car - Access tags on ways
Then routability should be Then routability should be
| access | bothw | | access | bothw |
| yes | x | | yes | x |
| motorcar | x |
| motor_vehicle | x |
| vehicle | x |
| permissive | x | | permissive | x |
| designated | x | | designated | x |
| no | | | no | |
@ -20,13 +52,10 @@ Feature: Car - Restricted access
| some_tag | x | | some_tag | x |
Scenario: Car - Access tags on nodes Scenario: Car - Access tags on nodes
Then routability should be Then routability should be
| node/access | bothw | | node/access | bothw |
| yes | x | | yes | x |
| motorcar | x |
| motor_vehicle | x |
| vehicle | x |
| permissive | x | | permissive | x |
| designated | x | | designated | x |
| no | | | no | |
@ -35,7 +64,7 @@ Feature: Car - Restricted access
| forestery | | | forestery | |
| some_tag | x | | some_tag | x |
Scenario: Car - Access tags on both nodes and way Scenario: Car - Access tags on both node and way
Then routability should be Then routability should be
| access | node/access | bothw | | access | node/access | bothw |
| yes | yes | x | | yes | yes | x |