From 59025ca2dadd58644e588d48c004d62b24608e01 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Wed, 3 Oct 2012 22:56:41 +0200 Subject: [PATCH] add tests for hierachy of access tags --- features/bicycle/access.feature | 37 +++++++++++++++----------- features/car/access.feature | 47 ++++++++++++++++++++++++++------- 2 files changed, 60 insertions(+), 24 deletions(-) diff --git a/features/bicycle/access.feature b/features/bicycle/access.feature index e28559b85..240f16590 100644 --- a/features/bicycle/access.feature +++ b/features/bicycle/access.feature @@ -1,56 +1,63 @@ @routing @bicycle @access Feature: Bike - Restricted access +Reference: http://wiki.openstreetmap.org/wiki/Key:access Background: 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 | access | bothw | | | x | | yes | x | - | motorcar | x | - | motor_vehicle | x | - | vehicle | x | | permissive | x | | designated | x | | no | | - | foot | | | private | | | agricultural | | | forestery | | | some_tag | x | - - Scenario: Bike - Access tags on nodes + Scenario: Bike - Access tags on nodes Then routability should be | node/access | bothw | | | x | | yes | x | - | motorcar | x | - | motor_vehicle | x | - | vehicle | x | | permissive | x | | designated | x | | no | | - | foot | | | private | | | agricultural | | | forestery | | | 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 | access | node/access | bothw | | yes | yes | x | | yes | no | | - | yes | foot | | | yes | some_tag | x | | no | yes | | | no | no | | - | no | foot | | | no | some_tag | | | some_tag | yes | x | | some_tag | no | | - | some_tag | foot | | | some_tag | some_tag | x | diff --git a/features/car/access.feature b/features/car/access.feature index 5e1292df7..840f30106 100644 --- a/features/car/access.feature +++ b/features/car/access.feature @@ -1,16 +1,48 @@ @routing @car @access Feature: Car - Restricted access +Reference: http://wiki.openstreetmap.org/wiki/Key:access Background: 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 | access | bothw | | yes | x | - | motorcar | x | - | motor_vehicle | x | - | vehicle | x | | permissive | x | | designated | x | | no | | @@ -20,13 +52,10 @@ Feature: Car - Restricted access | some_tag | x | - Scenario: Car - Access tags on nodes + Scenario: Car - 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 | | @@ -35,7 +64,7 @@ Feature: Car - Restricted access | forestery | | | 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 | access | node/access | bothw | | yes | yes | x |