osrm-backend/features/guidance/continue.feature

138 lines
4.0 KiB
Gherkin
Raw Normal View History

2016-03-23 08:04:23 -04:00
@routing @guidance
Feature: Continue Instructions
Background:
Given the profile "car"
Given a grid size of 10 meters
Scenario: Road turning left
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc,abc | depart,continue left,arrive |
| a,d | abc,bd,bd | depart,turn straight,arrive |
2016-03-23 08:04:23 -04:00
2016-05-23 09:51:31 -04:00
Scenario: Road turning left and straight
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b d
"""
2016-05-23 09:51:31 -04:00
And the ways
| nodes | highway | name |
| abc | primary | road |
| bd | primary | road |
When I route I should get
| waypoints | route | turns |
| a,c | road,road,road | depart,continue left,arrive |
| a,d | road,road | depart,arrive |
Scenario: Road turning left and straight
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b d
e
"""
2016-05-23 09:51:31 -04:00
And the ways
| nodes | highway | name |
| abc | primary | road |
| bd | primary | road |
| be | primary | road |
When I route I should get
| waypoints | route | turns |
| a,c | road,road,road | depart,continue left,arrive |
| a,d | road,road | depart,arrive |
| a,e | road,road,road | depart,continue right,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Road turning right
Given the node map
2016-09-30 03:33:08 -04:00
"""
a b d
c
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc,abc | depart,continue right,arrive |
| a,d | abc,bd,bd | depart,turn straight,arrive |
2016-03-23 08:04:23 -04:00
Scenario: Road turning slight left
Given the node map
2016-09-30 03:33:08 -04:00
"""
c
a b
d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc,abc | depart,continue left,arrive |
| a,d | abc,bd,bd | depart,turn right,arrive |
Scenario: Road turning slight right
Given the node map
2016-09-30 03:33:08 -04:00
"""
d
a b
c
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abc | primary |
| bd | primary |
When I route I should get
| waypoints | route | turns |
| a,c | abc,abc,abc | depart,continue right,arrive |
| a,d | abc,bd,bd | depart,turn left,arrive |
Scenario: Road Loop
Given the node map
2016-09-30 03:33:08 -04:00
"""
f e
a b g
c d
"""
2016-03-23 08:04:23 -04:00
And the ways
| nodes | highway |
| abcdefb | primary |
| bg | primary |
When I route I should get
| waypoints | route | turns |
| a,c | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
| a,f | abcdefb,abcdefb,abcdefb | depart,continue left,arrive |
| a,d | abcdefb,abcdefb,abcdefb | depart,continue right,arrive |
| a,e | abcdefb,abcdefb,abcdefb | depart,continue left,arrive |