Restore original intend of roundabout test

When doing the new Lua version refactor we changed the expectation to
use `continue uturn` instead of making a whole circle in the roundabout
as the original test case. This was only the shortest path since there
was no roundabout penalty.
This commit is contained in:
Patrick Niklaus 2017-12-23 14:08:55 +00:00 committed by Patrick Niklaus
parent e45d44cb8e
commit 6dd029e6ea
2 changed files with 14 additions and 11 deletions

View File

@ -745,12 +745,15 @@ Feature: Basic Roundabout
Scenario: Drive through roundabout
Given a grid size of 5 meters
Given the node map
"""
a
b e d f
c
g h
. a .
. .
b e --- d ---- f
. .
.c.
g h
"""
And the ways
@ -760,12 +763,12 @@ Feature: Basic Roundabout
| gch | | yes |
When I route I should get
| waypoints | bearings | route | turns |
| e,f | 90 90 | edf,edf | depart,arrive |
| 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 | depart,continue uturn,arrive |
| waypoints | bearings | route | turns |
| e,f | 90 90 | edf,edf | depart,arrive |
| e,h | 90 130 | edf,gch,gch,gch | depart,roundabout-exit-2,exit roundabout straight,arrive |
| g,f | 50 90 | gch,edf,edf,edf | depart,roundabout-exit-2,exit roundabout slight right,arrive |
| g,h | 50 130 | 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 |
Scenario: CCW and CW roundabouts with overlaps
Given the node map

View File

@ -80,7 +80,7 @@ struct TurnInstruction
bool IsUTurn() const
{
return type == TurnType::Turn && direction_modifier == DirectionModifier::UTurn;
return type != TurnType::NoTurn && direction_modifier == DirectionModifier::UTurn;
}
static TurnInstruction INVALID() { return {TurnType::Invalid, DirectionModifier::UTurn}; }