From 002da129c8eb366eb32d2cc45dfe2d6c4d51a5fb Mon Sep 17 00:00:00 2001 From: Kajari Ghosh Date: Fri, 3 Nov 2017 13:31:22 -0400 Subject: [PATCH] update tests --- features/car/bridge.feature | 20 +++++++++---------- features/car/weight.feature | 10 +++++----- features/guidance/advanced-lanes.feature | 2 +- features/guidance/roundabout.feature | 2 +- features/guidance/turn.feature | 8 +++++--- .../options/profiles/invalid_version.feature | 2 +- test/nodejs/constants.js | 2 +- 7 files changed, 24 insertions(+), 22 deletions(-) diff --git a/features/car/bridge.feature b/features/car/bridge.feature index 1a1c0d3c2..7c43f24cc 100644 --- a/features/car/bridge.feature +++ b/features/car/bridge.feature @@ -20,9 +20,9 @@ Feature: Car - Handle driving | efg | primary | | | When I route I should get - | from | to | route | modes | - | a | g | abc,cde,efg,efg | driving,driving,driving,driving | - | e | a | cde,abc,abc | driving,driving,driving | + | from | to | route | modes | turns | + | a | g | abc,cde,efg,efg | driving,driving,driving,driving | depart,new name right,new name left,arrive | + | e | a | cde,abc,abc | driving,driving,driving | depart,new name left,arrive | Scenario: Car - Control test without durations, osrm uses movable bridge speed to calculate duration Given the node map @@ -39,9 +39,9 @@ Feature: Car - Handle driving | efg | primary | | When I route I should get - | from | to | route | modes | speed | time | - | a | g | abc,cde,efg,efg | driving,driving,driving,driving | 13 km/h | 340s +-1 | - | e | c | cde,cde | driving,driving | 5 km/h | 295s +-1 | + | from | to | route | modes | speed | time | turns | + | a | g | abc,cde,efg,efg | driving,driving,driving,driving | 13 km/h | 332s +-1 | depart,new name right,new name left,arrive | + | e | c | cde,cde | driving,driving | 5 km/h | 288s +-1 | depart,arrive | Scenario: Car - Properly handle durations Given the node map @@ -58,7 +58,7 @@ Feature: Car - Handle driving | efg | primary | | | When I route I should get - | from | to | route | modes | speed | - | a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h | - | c | e | cde,cde | driving,driving | 2 km/h | - | e | c | cde,cde | driving,driving | 2 km/h | + | from | to | route | modes | speed | turns | + | a | g | abc,cde,efg,efg | driving,driving,driving,driving | 7 km/h | depart,new name right,new name left,arrive | + | c | e | cde,cde | driving,driving | 2 km/h | depart,arrive | + | e | c | cde,cde | driving,driving | 2 km/h | depart,arrive | diff --git a/features/car/weight.feature b/features/car/weight.feature index 6889a2b1f..6bf7a1d6e 100644 --- a/features/car/weight.feature +++ b/features/car/weight.feature @@ -6,9 +6,9 @@ Feature: Car - weights And the node map """ a--b--c - | - d - | + | | + d | + | | e--f--g """ And the ways @@ -19,7 +19,7 @@ Feature: Car - weights | bdf | service | When I route I should get | from | to | route | speed | weight | - | a | e | abc,cg,efg,efg | 28 km/h | 126.6 | + | a | e | abc,cg,efg,efg | 29 km/h | 122.4 | | a | d | abc,bdf,bdf | 18 km/h | 71.7 | Scenario: Does not jump off the highway to go down service road @@ -59,7 +59,7 @@ Feature: Car - weights When I route I should get | from | to | route | speed | weight | | a | d | ab,bc,cd,cd | 65 km/h | 44.4 | - | a | e | ab,be,be | 14 km/h | 112 | + | a | e | ab,be,be | 14 km/h | 111.8 | Scenario: Distance weights Given the profile file "car" initialized with diff --git a/features/guidance/advanced-lanes.feature b/features/guidance/advanced-lanes.feature index 09c946c73..b920dfdce 100644 --- a/features/guidance/advanced-lanes.feature +++ b/features/guidance/advanced-lanes.feature @@ -47,7 +47,7 @@ Feature: Turn Lane Guidance e a . . b . . . c g ` . - ` . + ` . ` d f """ diff --git a/features/guidance/roundabout.feature b/features/guidance/roundabout.feature index e63b8bbdf..062a683c8 100644 --- a/features/guidance/roundabout.feature +++ b/features/guidance/roundabout.feature @@ -765,7 +765,7 @@ Feature: Basic Roundabout | e,h | 90 135 | edf,gch,gch,gch | depart,roundabout-exit-2,exit roundabout straight,arrive | | g,f | 45 90 | gch,edf,edf,edf | depart,roundabout-exit-2,exit roundabout right,arrive | | g,h | 45 135 | gch,gch,gch | depart,exit roundabout right,arrive | - | e,e | 90 270 | edf,edf,edf,edf | depart,roundabout-exit-3,exit roundabout sharp left,arrive | + | e,e | 90 270 | edf,edf,edf | depart,continue uturn,arrive | Scenario: CCW and CW roundabouts with overlaps Given the node map diff --git a/features/guidance/turn.feature b/features/guidance/turn.feature index e27231652..d3816c73a 100644 --- a/features/guidance/turn.feature +++ b/features/guidance/turn.feature @@ -972,6 +972,8 @@ Feature: Simple Turns d h + + q """ And the nodes @@ -981,16 +983,16 @@ Feature: Simple Turns And the ways | nodes | name | highway | oneway | | yf | yf | trunk_link | yes | - | gfeh | Centreville Road | primary | | + | gfehq | Centreville Road | primary | | | fi | fi | trunk_link | yes | | ij | Bloomingdale Road | residential | | - | jkabx | Blue Star Memorial Hwy | trunk | | + | jkabx | Blue Star Memorial Hwy | trunk | yes | | bcde | bcde | trunk_link | yes | | kh | kh | trunk_link | yes | When I route I should get | waypoints | turns | route | - | a,h | depart,off ramp right,turn sharp left,arrive | Blue Star Memorial Hwy,bcde,Centreville Road,Centreville Road | + | a,q | depart,off ramp right,turn sharp left,arrive | Blue Star Memorial Hwy,bcde,Centreville Road,Centreville Road | @todo # https://www.openstreetmap.org/#map=20/52.51609/13.41080 diff --git a/features/options/profiles/invalid_version.feature b/features/options/profiles/invalid_version.feature index a6ed04f76..d34c56828 100644 --- a/features/options/profiles/invalid_version.feature +++ b/features/options/profiles/invalid_version.feature @@ -24,7 +24,7 @@ Feature: Invalid profile API versions Scenario: Profile API version too high Given the profile file """ - api_version = 4 + api_version = 5 """ And the node map """ diff --git a/test/nodejs/constants.js b/test/nodejs/constants.js index f5746b37a..06789bf2c 100644 --- a/test/nodejs/constants.js +++ b/test/nodejs/constants.js @@ -10,7 +10,7 @@ exports.three_test_coordinates = [[7.41337, 43.72956], exports.two_test_coordinates = exports.three_test_coordinates.slice(0, 2) -exports.test_tile = {'at': [17059, 11948, 15], 'size': 167166}; +exports.test_tile = {'at': [17059, 11948, 15], 'size': 167159}; // Test files generated by the routing engine; check test/data