make tests use fuzzy matching instead of tweaked expectations

This commit is contained in:
Dennis Luxen 2014-04-25 15:24:18 +02:00
parent 78f5753a3a
commit 51e8113a69
4 changed files with 35 additions and 35 deletions

View File

@ -16,9 +16,9 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
| bc | trunk | 60 | | bc | trunk | 60 |
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 85 km/h | | a | b | ab | 85 km/h |
| b | c | bc | 39 km/h | | b | c | bc | 40 km/h +- 1 |
Scenario: Car - Do not ignore maxspeed when higher than way speed Scenario: Car - Do not ignore maxspeed when higher than way speed
Given the node map Given the node map
@ -30,22 +30,22 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
| bc | residential | 90 | | bc | residential | 90 |
When I route I should get When I route I should get
| from | to | route | speed | | from | to | route | speed |
| a | b | ab | 25 km/h | | a | b | ab | 25 km/h |
| b | c | bc | 59 km/h | | b | c | bc | 60 km/h +- 1 |
Scenario: Car - Forward/backward maxspeed Scenario: Car - Forward/backward maxspeed
Given a grid size of 100 meters Given a grid size of 100 meters
Then routability should be Then routability should be
| highway | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw | | highway | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| primary | | | | 65 km/h | 65 km/h | | primary | | | | 65 km/h | 65 km/h |
| primary | 60 | | | 40 km/h | 40 km/h | | primary | 60 | | | 40 km/h | 40 km/h |
| primary | | 60 | | 40 km/h | 65 km/h | | primary | | 60 | | 40 km/h | 65 km/h |
| primary | | | 60 | 65 km/h | 40 km/h | | primary | | | 60 | 65 km/h | 40 km/h |
| primary | 15 | 60 | | 40 km/h | 9 km/h | | primary | 15 | 60 | | 40 km/h | 10 km/h +- 1 |
| primary | 15 | | 60 | 9 km/h | 40 km/h | | primary | 15 | | 60 | 10 km/h +- 1| 40 km/h |
| primary | 15 | 30 | 60 | 20 km/h | 40 km/h | | primary | 15 | 30 | 60 | 20 km/h | 40 km/h |
Scenario: Car - Maxspeed should not allow routing on unroutable ways Scenario: Car - Maxspeed should not allow routing on unroutable ways
Then routability should be Then routability should be

View File

@ -7,18 +7,18 @@ Feature: Car - speeds
Scenario: Car - speed of various way types Scenario: Car - speed of various way types
Then routability should be Then routability should be
| highway | oneway | bothw | | highway | oneway | bothw |
| motorway | no | 90 km/h | | motorway | no | 90 km/h |
| motorway_link | no | 75 km/h | | motorway_link | no | 75 km/h |
| trunk | no | 84 km/h | | trunk | no | 85 km/h +- 1 |
| trunk_link | no | 69 km/h | | trunk_link | no | 70 km/h +- 1 |
| primary | no | 64 km/h | | primary | no | 65 km/h +- 1 |
| primary_link | no | 60 km/h | | primary_link | no | 60 km/h |
| secondary | no | 54 km/h | | secondary | no | 55 km/h +- 1 |
| secondary_link | no | 50 km/h | | secondary_link | no | 50 km/h |
| tertiary | no | 40 km/h | | tertiary | no | 40 km/h |
| tertiary_link | no | 30 km/h | | tertiary_link | no | 30 km/h |
| unclassified | no | 25 km/h | | unclassified | no | 25 km/h |
| residential | no | 25 km/h | | residential | no | 25 km/h |
| living_street | no | 10 km/h | | living_street | no | 10 km/h |
| service | no | 15 km/h | | service | no | 15 km/h |

View File

@ -13,6 +13,6 @@ Feature: Separate settings for forward/backward direction
| abcd | river | | abcd | river |
When I route I should get When I route I should get
| from | to | route | distance | speed | | from | to | route | distance | speed |
| a | d | abcd | 300 +- 1m | 36 km/h | | a | d | abcd | 300 +- 1m | 36 km/h |
| d | a | abcd | 300 +- 1m | 15 km/h | | d | a | abcd | 300 +- 1m | 16 km/h +- 1 |

View File

@ -26,6 +26,6 @@ Feature: Testbot - speeds
| ab | river | | ab | river |
When I route I should get When I route I should get
| from | to | route | speed | time | distance | | from | to | route | speed | time | distance |
| a | b | ab | 36 km/h | 10s | 100m | | a | b | ab | 36 km/h | 10s | 100m |
| b | a | ab | 15 km/h | 23s | 100m | | b | a | ab | 16 km/h +- 1 | 23s | 100m |