osrm-backend/features/bicycle/mode.feature

98 lines
3.0 KiB
Gherkin
Raw Normal View History

@routing @bicycle @mode
2013-03-18 10:37:10 -04:00
Feature: Bike - Mode flag
2014-08-09 05:44:35 -04:00
Background:
Given the profile "bicycle"
2016-03-04 15:11:05 -05:00
2013-03-18 10:37:10 -04:00
Scenario: Bike - Mode when using a ferry
2014-08-09 05:44:35 -04:00
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
c d
"""
2014-08-09 05:44:35 -04:00
And the ways
| nodes | highway | route | duration |
| ab | primary | | |
| bc | | ferry | 0:01 |
| cd | primary | | |
When I route I should get
2016-03-23 08:04:23 -04:00
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,ferry,cycling,cycling |
| c | a | bc,ab,ab | ferry,cycling,cycling |
| d | b | cd,bc,bc | cycling,ferry,ferry |
2014-08-09 05:44:35 -04:00
Scenario: Bike - Mode when using a train
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
c d
"""
2014-08-09 05:44:35 -04:00
And the ways
| nodes | highway | railway | bicycle |
| ab | primary | | |
| bc | | train | yes |
| cd | primary | | |
When I route I should get
2016-03-23 08:04:23 -04:00
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,train,cycling,cycling |
| c | a | bc,ab,ab | train,cycling,cycling |
| d | b | cd,bc,bc | cycling,train,train |
#representative test for all pushes (and mode changes). Where a bike is pushed is tested over in access.feature
2014-08-09 05:44:35 -04:00
Scenario: Bike - Mode when pushing bike against oneways
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b e
f c d
"""
2014-08-09 05:44:35 -04:00
And the ways
| nodes | highway | oneway |
| ab | primary | |
| bc | primary | yes |
| cd | primary | |
2016-05-13 13:18:00 -04:00
| be | primary | |
| cf | primary | |
2014-08-09 05:44:35 -04:00
When I route I should get
2016-03-23 08:04:23 -04:00
| from | to | route | modes |
| a | d | ab,bc,cd,cd | cycling,cycling,cycling,cycling |
| d | a | cd,bc,ab,ab | cycling,pushing bike,cycling,cycling |
| c | a | bc,ab,ab | pushing bike,cycling,cycling |
| d | b | cd,bc,bc | cycling,pushing bike,pushing bike |
2014-08-12 13:31:31 -04:00
Scenario: Bicycle - Modes when starting on forward oneway
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
"""
2014-08-12 13:31:31 -04:00
And the ways
| nodes | oneway |
| ab | yes |
When I route I should get
| from | to | route | modes |
| a | b | ab,ab | cycling,cycling |
| b | a | ab,ab | pushing bike,pushing bike |
2014-08-12 13:31:31 -04:00
Scenario: Bicycle - Modes when starting on reverse oneway
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b
"""
2014-08-12 13:31:31 -04:00
And the ways
| nodes | oneway |
| ab | -1 |
When I route I should get
| from | to | route | modes |
| a | b | ab,ab | pushing bike,pushing bike |
| b | a | ab,ab | cycling,cycling |