From 55a38c9e014ddd0e17db3b5cffa55635179480b9 Mon Sep 17 00:00:00 2001 From: Michael Krasnyk Date: Wed, 16 Aug 2017 12:25:26 +0200 Subject: [PATCH] Add tests to check local side-dependent turn bias --- features/car/side_bias.feature | 51 ++++++++++++++++++++++++++++++---- 1 file changed, 46 insertions(+), 5 deletions(-) diff --git a/features/car/side_bias.feature b/features/car/side_bias.feature index 8b8dd1ed0..2ddc27de0 100644 --- a/features/car/side_bias.feature +++ b/features/car/side_bias.feature @@ -7,7 +7,7 @@ Feature: Testbot - side bias profile.left_hand_driving = true profile.turn_bias = 1.075 """ - Given the node map + And the node map """ a b c @@ -43,10 +43,9 @@ Feature: Testbot - side bias | bd | When I route I should get - | from | to | route | time | - | d | a | bd,ab,ab | 27s +-1 | - # should be inverse of left hand bias - | d | c | bd,bc,bc | 24s +-1 | + | from | to | route | time | # | + | d | a | bd,ab,ab | 27s +-1 | should be inverse of left hand bias | + | d | c | bd,bc,bc | 24s +-1 | | Scenario: Roundabout exit counting for left sided driving Given the profile file "testbot" initialized with @@ -75,3 +74,45 @@ Feature: Testbot - side bias | a,d | ab,cd,cd | depart,roundabout turn left exit-1,arrive | | a,f | ab,ef,ef | depart,roundabout turn straight exit-2,arrive | | a,h | ab,gh,gh | depart,roundabout turn right exit-3,arrive | + + + Scenario: Left-hand bias via location-dependent tags + Given the profile "car" + And the node map + """ + a b c + + d + """ + And the ways with locations + | nodes | + | ab | + | bc | + | bd | + And the extract extra arguments "--location-dependent-data test/data/regions/null-island.geojson" + + When I route I should get + | from | to | route | time | + | d | a | bd,ab,ab | 24s +-1 | + | d | c | bd,bc,bc | 27s +-1 | + + + Scenario: Left-hand bias via OSM tags + Given the profile "car" + And the node map + """ + a b c + + d + """ + And the ways with locations + | nodes | driving_side | + | ab | right | + | bc | right | + | bd | right | + And the extract extra arguments "--location-dependent-data test/data/regions/null-island.geojson" + + When I route I should get + | from | to | route | time | + | d | a | bd,ab,ab | 27s +-1 | + | d | c | bd,bc,bc | 24s +-1 |