improve tests for travel mode
This commit is contained in:
parent
dae9c9a7ed
commit
181dbe8493
@ -97,10 +97,22 @@ Feature: Testbot - Mode flag
|
|||||||
| 0 | 1 | ab | 5 | 60s +-1 |
|
| 0 | 1 | ab | 5 | 60s +-1 |
|
||||||
| 1 | 0 | ab | 6 | 60s +-1 |
|
| 1 | 0 | ab | 6 | 60s +-1 |
|
||||||
|
|
||||||
Scenario: Testbot - Modes for opposite direction
|
Scenario: Testbot - Modes for oneway
|
||||||
Given the node map
|
Given the node map
|
||||||
| | 0 | 1 | |
|
| a | b |
|
||||||
| a | | | b |
|
|
||||||
|
And the ways
|
||||||
|
| nodes | highway | oneway |
|
||||||
|
| ab | steps | yes |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | modes |
|
||||||
|
| a | b | ab | 5 |
|
||||||
|
| b | a | | |
|
||||||
|
|
||||||
|
Scenario: Testbot - Modes for reverse oneway
|
||||||
|
Given the node map
|
||||||
|
| a | b |
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | highway | oneway |
|
| nodes | highway | oneway |
|
||||||
@ -108,8 +120,8 @@ Feature: Testbot - Mode flag
|
|||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | modes |
|
| from | to | route | modes |
|
||||||
| 0 | 1 | | |
|
| b | a | ab | 6 |
|
||||||
| 1 | 0 | ab | 6 |
|
| a | b | | |
|
||||||
|
|
||||||
@via
|
@via
|
||||||
Scenario: Testbot - Modes and via point at dead end
|
Scenario: Testbot - Modes and via point at dead end
|
||||||
@ -143,19 +155,4 @@ Feature: Testbot - Mode flag
|
|||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | modes |
|
| waypoints | route | modes |
|
||||||
| a,0,d | ab,bc,cd | 1,3,1 |
|
| a,0,d | ab,bc,cd | 1,3,1 |
|
||||||
| d,0,a | cd,bc,ab | 1,4,1 |
|
| d,0,a | cd,bc,ab | 1,4,1 |
|
||||||
|
|
||||||
Scenario: Testbot - Modes for opposite direction
|
|
||||||
Given the node map
|
|
||||||
| a | b | c | d | e |
|
|
||||||
|
|
||||||
And the ways
|
|
||||||
| nodes | highway |
|
|
||||||
| ab | primary |
|
|
||||||
| bc | primary |
|
|
||||||
| cd | river |
|
|
||||||
| de | river |
|
|
||||||
|
|
||||||
When I route I should get
|
|
||||||
| from | to | route | modes |
|
|
||||||
| a | e | ab,bc,cd,de | 1,1,3,3 |
|
|
@ -42,3 +42,57 @@ Feature: Testbot - oneways
|
|||||||
| g | f | gh,ha,ab,bc,cd,de,ef |
|
| g | f | gh,ha,ab,bc,cd,de,ef |
|
||||||
| h | g | ha,ab,bc,cd,de,ef,fg |
|
| h | g | ha,ab,bc,cd,de,ef,fg |
|
||||||
| a | h | ab,bc,cd,de,ef,fg,gh |
|
| a | h | ab,bc,cd,de,ef,fg,gh |
|
||||||
|
|
||||||
|
Scenario: Testbot - Simple oneway
|
||||||
|
Then routability should be
|
||||||
|
| highway | foot | oneway | forw | backw |
|
||||||
|
| primary | no | yes | x | |
|
||||||
|
|
||||||
|
Scenario: Simple reverse oneway
|
||||||
|
Then routability should be
|
||||||
|
| highway | foot | oneway | forw | backw |
|
||||||
|
| primary | no | -1 | | x |
|
||||||
|
|
||||||
|
Scenario: Testbot - Around the Block
|
||||||
|
Given the node map
|
||||||
|
| a | b |
|
||||||
|
| d | c |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway | foot |
|
||||||
|
| ab | yes | no |
|
||||||
|
| bc | | no |
|
||||||
|
| cd | | no |
|
||||||
|
| da | | no |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | b | ab |
|
||||||
|
| b | a | bc,cd,da |
|
||||||
|
|
||||||
|
Scenario: Testbot - Handle various oneway tag values
|
||||||
|
Then routability should be
|
||||||
|
| foot | oneway | forw | backw |
|
||||||
|
| no | | x | x |
|
||||||
|
| no | nonsense | x | x |
|
||||||
|
| no | no | x | x |
|
||||||
|
| no | false | x | x |
|
||||||
|
| no | 0 | x | x |
|
||||||
|
| no | yes | x | |
|
||||||
|
| no | true | x | |
|
||||||
|
| no | 1 | x | |
|
||||||
|
| no | -1 | | x |
|
||||||
|
|
||||||
|
Scenario: Testbot - Two consecutive oneways
|
||||||
|
Given the node map
|
||||||
|
| a | b | c |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | oneway |
|
||||||
|
| ab | yes |
|
||||||
|
| bc | yes |
|
||||||
|
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route |
|
||||||
|
| a | c | ab,bc |
|
||||||
|
Loading…
Reference in New Issue
Block a user