osrm-backend/features/general/bad.feature

81 lines
1.6 KiB
Gherkin
Raw Normal View History

@routing @bad
Feature: Handle bad data in a graceful manner
Scenario: Empty dataset
Given the node map
2012-09-28 09:29:13 -04:00
| |
Given the ways
| nodes |
2012-09-28 09:29:13 -04:00
When I preprocess data
Then preparing should return code 255
Scenario: Only dead-end oneways
Given the node map
| a | b | c |
Given the ways
| nodes | oneway |
| ab | yes |
| cb | yes |
When I preprocess data
Then preparing should return code 255
Scenario: Start/end point at the same location
Given the node map
| a | b |
| 1 | 2 |
Given the ways
| nodes |
| ab |
When I route I should get
| from | to | route |
| a | a | |
| b | b | |
| 1 | 1 | |
| 2 | 2 | |
2012-09-27 08:19:06 -04:00
@poles
2012-09-28 09:29:13 -04:00
Scenario: Routing close to the north/south pole
2012-09-27 08:19:06 -04:00
Mercator is undefined close to the poles.
2012-09-27 08:48:29 -04:00
All nodes and request with latitude to close to either of the poles should therefore be ignored.
2012-09-27 08:19:06 -04:00
Given the node locations
| node | lat | lon |
| a | 89 | 0 |
| b | 87 | 0 |
| c | 82 | 0 |
| d | 80 | 0 |
2012-09-27 08:48:29 -04:00
| e | 78 | 0 |
| k | -78 | 0 |
2012-09-27 08:19:06 -04:00
| l | -80 | 0 |
| m | -82 | 0 |
| n | -87 | 0 |
| o | -89 | 0 |
And the ways
| nodes |
| ab |
| bc |
2012-09-27 08:48:29 -04:00
| cd |
| de |
| kl |
| lm |
2012-09-27 08:19:06 -04:00
| mn |
| no |
When I route I should get
| from | to | route |
| a | b | |
| b | c | |
| a | d | |
| c | d | cd |
2012-09-27 08:48:29 -04:00
| l | m | lm |
2012-09-27 08:19:06 -04:00
| o | l | |
| n | m | |
2012-09-27 08:48:29 -04:00
| o | n | |