From bce3b682818deeeb26aaf93bfe3b88875eabc467 Mon Sep 17 00:00:00 2001 From: Patrick Niklaus Date: Mon, 15 May 2017 10:46:35 +0000 Subject: [PATCH] Add regression test --- features/bicycle/turn_penalty.feature | 36 +++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/features/bicycle/turn_penalty.feature b/features/bicycle/turn_penalty.feature index fd872a5b8..4fc64f162 100644 --- a/features/bicycle/turn_penalty.feature +++ b/features/bicycle/turn_penalty.feature @@ -34,3 +34,39 @@ Feature: Turn Penalties | s | e | sj,je,je | 53s +-1 | 483m +-1 | | s | f | sj,jf,jf | 50s +-1 | 400m +-1 | | s | g | sj,jg,jg | 63s +-1 | 483m +-1 | + + Scenario: Bicycle - Turn penalties on cyclability + Given the profile file + """ + require 'bicycle' + properties.weight_name = 'cyclability' + """ + + Given the node map + """ + a--b-----c + | + | + d + + e--------f-----------g + / + / + / + h + """ + + And the ways + | nodes | highway | + | abc | residential | + | bd | residential | + | efg | residential | + | fh | residential | + + When I route I should get + | from | to | distance | weight | # | + | a | c | 900m +- 1 | 216 | Going straight has no penalties | + | a | d | 900m +- 1 | 220.2 | Turning right had penalties | + | e | g | 2100m +- 4| 503.9 | Going straght has no penalties | + | e | h | 2100m +- 4| 515.1 | Turn sharp right has even higher penalties| +