From 5e1dc11000ad9417f75860a398394399f6d7fede Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Thu, 4 Oct 2012 14:39:59 +0200 Subject: [PATCH 1/2] fix a few tests --- features/car/access.feature | 2 +- features/testbot/weight.feature | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/features/car/access.feature b/features/car/access.feature index 2e1acd1e5..a2aca3b57 100644 --- a/features/car/access.feature +++ b/features/car/access.feature @@ -32,7 +32,7 @@ Reference: http://wiki.openstreetmap.org/wiki/Key:access Scenario: Car - Access tag hierachy on nodes Then routability should be - | node/access | node/vehicle | node/motor_vehicle | mnode/otorcar | bothw | + | node/access | node/vehicle | node/motor_vehicle | node/motorcar | bothw | | | | | | x | | yes | | | | x | | no | | | | | diff --git a/features/testbot/weight.feature b/features/testbot/weight.feature index 4b82c0f5e..b884a37bf 100644 --- a/features/testbot/weight.feature +++ b/features/testbot/weight.feature @@ -6,19 +6,21 @@ Feature: Choosing route based on length, speed, etc Scenario: Pick the geometrically shortest route, way types being equal Given the node map - | | s | | - | | t | | - | a | | b | + | | | s | | | + | | | t | | | + | x | a | | b | y | And the ways | nodes | highway | + | xa | primary | + | by | primary | | atb | primary | | asb | primary | When I route I should get - | from | to | route | - | a | b | atb | - | b | a | atb | + | from | to | route | + | x | y | xa,atb,by | + | y | x | by,atb,xa | Scenario: Pick the shortest travel time, even when it's longer Given the node map @@ -34,4 +36,3 @@ Feature: Choosing route based on length, speed, etc | from | to | route | | a | b | apb | | b | a | apb | - From 8e756a24769ad383e3f0cf00de9dc2e659f3413e Mon Sep 17 00:00:00 2001 From: Emil Tin Date: Thu, 4 Oct 2012 15:00:46 +0200 Subject: [PATCH 2/2] tests for cycleways --- features/bicycle/cycleway.feature | 77 +++++++++++++++++++++++++++++++ 1 file changed, 77 insertions(+) create mode 100644 features/bicycle/cycleway.feature diff --git a/features/bicycle/cycleway.feature b/features/bicycle/cycleway.feature new file mode 100644 index 000000000..9a303901d --- /dev/null +++ b/features/bicycle/cycleway.feature @@ -0,0 +1,77 @@ +@routing @bicycle @cycleway +Feature: Bike - Cycle tracks/lanes +Reference: http://wiki.openstreetmap.org/wiki/Key:cycleway + + Background: + Given the speedprofile "bicycle" + + Scenario: Bike - Cycle tracks/lanes should enable biking + Then routability should be + | highway | cycleway | bothw | + | motorway | | | + | motorway | track | x | + | motorway | lane | x | + | motorway | shared | x | + | motorway | share_busway | x | + | motorway | sharrow | x | + | some_tag | track | x | + | some_tag | lane | x | + | some_tag | shared | x | + | some_tag | share_busway | x | + | some_tag | sharrow | x | + | residential | track | x | + | residential | lane | x | + | residential | shared | x | + | residential | share_busway | x | + | residential | sharrow | x | + + Scenario: Bike - Left/right side cycleways + Then routability should be + | highway | cycleway | cycleway:left | cycleway:right | forw | backw | + | primary | | | | x | x | + | motorway | | | | | | + | motorway | track | | | x | x | + | motorway | lane | | | x | x | + | motorway | oppposite | | | | x | + | motorway | opposite_track | | | | x | + | motorway | opposite_lane | | | | x | + | motorway | | track | | | x | + | motorway | | lane | | | x | + | motorway | | opposite_track | | x | | + | motorway | | opposite_lane | | x | | + | motorway | | | track | x | | + | motorway | | | lane | x | | + | motorway | | | opposite_track | | x | + | motorway | | | opposite_lane | | x | + | motorway | | track | track | x | x | + | motorway | | lane | lane | x | x | + | motorway | | opposite_track | opposite_track | x | x | + | motorway | | opposite_lane | opposite_lane | x | x | + | motorway | | track | opposite_track | | x | + | motorway | | lane | opposite_lane | | x | + | motorway | | opposite_track | track | x | | + | motorway | | opposite_lane | lane | x | | + + Scenario: Bike - Invalid cycleway tags + Then routability should be + | highway | cycleway | bothw | + | primary | | x | + | primary | yes | x | + | primary | no | x | + | primary | some_track | x | + | motorway | | | + | motorway | yes | | + | motorway | no | | + | motorway | some_track | | + + Scenario: Bike - Access tags should overwrite cycleway access + Then routability should be + | highway | cycleway | access | bothw | + | motorway | track | no | | + | residential | track | no | | + | footway | track | no | | + | cycleway | track | no | | + | motorway | lane | yes | x | + | residential | lane | yes | x | + | footway | lane | yes | x | + | cycleway | lane | yes | x | \ No newline at end of file