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

@ -18,7 +18,7 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
When I route I should get
| from | to | route | speed |
| 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
Given the node map
@ -32,7 +32,7 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
When I route I should get
| from | to | route | speed |
| a | b | ab | 25 km/h |
| b | c | bc | 59 km/h |
| b | c | bc | 60 km/h +- 1 |
Scenario: Car - Forward/backward maxspeed
Given a grid size of 100 meters
@ -43,8 +43,8 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
| primary | 60 | | | 40 km/h | 40 km/h |
| primary | | 60 | | 40 km/h | 65 km/h |
| primary | | | 60 | 65 km/h | 40 km/h |
| primary | 15 | 60 | | 40 km/h | 9 km/h |
| primary | 15 | | 60 | 9 km/h | 40 km/h |
| primary | 15 | 60 | | 40 km/h | 10 km/h +- 1 |
| primary | 15 | | 60 | 10 km/h +- 1| 40 km/h |
| primary | 15 | 30 | 60 | 20 km/h | 40 km/h |
Scenario: Car - Maxspeed should not allow routing on unroutable ways

View File

@ -10,11 +10,11 @@ Feature: Car - speeds
| highway | oneway | bothw |
| motorway | no | 90 km/h |
| motorway_link | no | 75 km/h |
| trunk | no | 84 km/h |
| trunk_link | no | 69 km/h |
| primary | no | 64 km/h |
| trunk | no | 85 km/h +- 1 |
| trunk_link | no | 70 km/h +- 1 |
| primary | no | 65 km/h +- 1 |
| primary_link | no | 60 km/h |
| secondary | no | 54 km/h |
| secondary | no | 55 km/h +- 1 |
| secondary_link | no | 50 km/h |
| tertiary | no | 40 km/h |
| tertiary_link | no | 30 km/h |

View File

@ -15,4 +15,4 @@ Feature: Separate settings for forward/backward direction
When I route I should get
| from | to | route | distance | speed |
| 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

@ -28,4 +28,4 @@ Feature: Testbot - speeds
When I route I should get
| from | to | route | speed | time | distance |
| 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 |