Merge pull request #141 from emiltin/testing_invalid_oneways

update tests for handling of invalid oneway mapping
This commit is contained in:
Project OSRM 2012-02-21 04:41:48 -08:00
commit 7d42330352
2 changed files with 74 additions and 17 deletions

View File

@ -53,3 +53,77 @@ Feature: Handle bad data in a graceful manner
| 3 | 1 | |
| 3 | 2 | |
@bad_oneway
Scenario: Invalid oneway dead-ends
Given the nodes
| a | x | b |
And the ways
| nodes | oneway |
| ax | -1 |
| xb | yes |
When I route I should get
| from | to | route |
| x | a | ax |
| x | b | xb |
@bad_oneway
Scenario: Impossible-to-leave oneway dead-ends
Given the nodes
| | t | |
| a | x | b |
| | s | |
And the ways
| nodes | oneway |
| ax | -1 |
| xb | yes |
| sxt | |
When I route I should get
| from | to | route |
| x | a | ax |
| x | b | xb |
| a | x | |
| b | x | |
@bad_oneway
Scenario: Impossible-to-reach oneway dead-ends
Given the nodes
| | t | |
| a | x | b |
| | s | |
And the ways
| nodes | oneway |
| ax | yes |
| xb | -1 |
| sxt | |
When I route I should get
| from | to | route |
| a | x | ax |
| b | b | xb |
| x | a | |
| x | b | |
@bad_oneway
Scenario: Impossible-to-leave oneway junctions
Given the nodes
| t | | |
| a | x | b |
| s | | |
And the ways
| nodes | oneway |
| ax | yes |
| bx | yes |
| sat | |
When I route I should get
| from | to | route |
| a | x | ax |
| b | x | xb |
| x | a | |
| x | b | |

View File

@ -31,23 +31,6 @@ Feature: Oneway streets
| a | b | ab |
| b | a | bc,cd,da |
Scenario: Avoid oneway traps
Given the nodes
| | x | |
| a | b | c |
| | y | |
And the ways
| nodes | oneway |
| abc | |
| bx | yes |
| yb | -1 |
When I route I should get
| from | to | route |
| b | x | |
| b | y | |
Scenario: Handle various oneway tag values
Given the speedprofile "bicycle"
Then routability should be