From 9a865384a155c0ea50d57aeba387ab70821eb949 Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Wed, 28 Nov 2012 18:42:49 +0100 Subject: [PATCH] tests for except tag on turn restrictions --- features/bicycle/restrictions.feature | 138 ++++++++++++++++++-------- features/car/restrictions.feature | 52 ++++++++++ 2 files changed, 147 insertions(+), 43 deletions(-) diff --git a/features/bicycle/restrictions.feature b/features/bicycle/restrictions.feature index c21ae8b90..d009fec04 100644 --- a/features/bicycle/restrictions.feature +++ b/features/bicycle/restrictions.feature @@ -14,11 +14,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -38,11 +38,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -62,11 +62,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -86,11 +86,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -110,11 +110,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -122,9 +122,9 @@ Feature: Bike - Turn restrictions When I route I should get | from | to | route | - | s | w | sj,wj | - | s | n | | - | s | e | | + | s | w | sj,wj | + | s | n | | + | s | e | | @only_turning Scenario: Bike - Only right turn @@ -134,11 +134,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -158,11 +158,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -182,11 +182,11 @@ Feature: Bike - Turn restrictions | | s | | And the ways - | nodes | oneway | - | sj | yes | - | nj | -1 | - | wj | -1 | - | ej | -1 | + | nodes | oneway | + | sj | yes | + | nj | -1 | + | wj | -1 | + | ej | -1 | And the relations | from | to | via | restriction | @@ -197,3 +197,55 @@ Feature: Bike - Turn restrictions | s | w | | | s | n | sj,nj | | s | e | | + + @except @todo + Scenario: Bike - Except tag and on no_ restrictions + Given the node map + | b | x | c | + | a | j | d | + | | s | | + + And the ways + | nodes | oneway | + | sj | yes | + | xj | -1 | + | aj | -1 | + | bj | -1 | + | cj | -1 | + | dj | -1 | + + And the relations + | from | to | via | restriction | except | + | sj | aj | j | no_left_turn | bicycle | + | sj | bj | j | no_left_turn | | + | sj | cj | j | no_right_turn | bicycle | + | sj | dj | j | no_right_turn | | + + When I route I should get + | from | to | route | + | s | a | sj,aj | + | s | b | | + | s | c | | + | s | d | sj,dj | + + @except @todo + Scenario: Bike - Except tag and on only_ restrictions + Given the node map + | a | | b | + | | j | | + | | s | | + + And the ways + | nodes | oneway | + | sj | yes | + | aj | -1 | + | bj | -1 | + + And the relations + | from | to | via | restriction | except | + | sj | aj | j | only_straight_on | bicycle | + + When I route I should get + | from | to | route | + | s | a | sj,aj | + | s | b | sj,bj | diff --git a/features/car/restrictions.feature b/features/car/restrictions.feature index 9f2c69f56..a20182ce6 100644 --- a/features/car/restrictions.feature +++ b/features/car/restrictions.feature @@ -197,3 +197,55 @@ Feature: Car - Turn restrictions | s | w | | | s | n | sj,nj | | s | e | | + + @except @todo + Scenario: Bike - Except tag and on no_ restrictions + Given the node map + | b | x | c | + | a | j | d | + | | s | | + + And the ways + | nodes | oneway | + | sj | yes | + | xj | -1 | + | aj | -1 | + | bj | -1 | + | cj | -1 | + | dj | -1 | + + And the relations + | from | to | via | restriction | except | + | sj | aj | j | no_left_turn | motorcar | + | sj | bj | j | no_left_turn | | + | sj | cj | j | no_right_turn | motorcar | + | sj | dj | j | no_right_turn | | + + When I route I should get + | from | to | route | + | s | a | sj,aj | + | s | b | | + | s | c | | + | s | d | sj,dj | + + @except @todo + Scenario: Bike - Except tag and on only_ restrictions + Given the node map + | a | | b | + | | j | | + | | s | | + + And the ways + | nodes | oneway | + | sj | yes | + | aj | -1 | + | bj | -1 | + + And the relations + | from | to | via | restriction | except | + | sj | aj | j | only_straight_on | motorcar | + + When I route I should get + | from | to | route | + | s | a | sj,aj | + | s | b | sj,bj |