Add proper support for travis CI
Conflicts: .travis.yml
This commit is contained in:
commit
ef1d75db83
@ -19,6 +19,9 @@ branches:
|
|||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
- develop
|
- develop
|
||||||
|
env:
|
||||||
|
- OPTIONS="-DCMAKE_BUILD_TYPE=Release"
|
||||||
|
- OPTIONS="-DCMAKE_BUILD_TYPE=Debug"
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
channels:
|
channels:
|
||||||
|
30
features/bicycle/roundabout.feature
Normal file
30
features/bicycle/roundabout.feature
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@routing @bicycle @roundabout @instruction
|
||||||
|
Feature: Roundabout Instructions
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "bicycle"
|
||||||
|
|
||||||
|
Scenario: Bicycle - Roundabout instructions
|
||||||
|
Given the node map
|
||||||
|
| | | v | | |
|
||||||
|
| | | d | | |
|
||||||
|
| s | a | | c | u |
|
||||||
|
| | | b | | |
|
||||||
|
| | | t | | |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | junction |
|
||||||
|
| sa | |
|
||||||
|
| tb | |
|
||||||
|
| uc | |
|
||||||
|
| vd | |
|
||||||
|
| abcda | roundabout |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns |
|
||||||
|
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||||
|
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||||
|
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||||
|
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||||
|
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||||
|
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
30
features/car/roundabout.feature
Normal file
30
features/car/roundabout.feature
Normal file
@ -0,0 +1,30 @@
|
|||||||
|
@routing @car @roundabout @instruction
|
||||||
|
Feature: Roundabout Instructions
|
||||||
|
|
||||||
|
Background:
|
||||||
|
Given the profile "car"
|
||||||
|
|
||||||
|
Scenario: Car - Roundabout instructions
|
||||||
|
Given the node map
|
||||||
|
| | | v | | |
|
||||||
|
| | | d | | |
|
||||||
|
| s | a | | c | u |
|
||||||
|
| | | b | | |
|
||||||
|
| | | t | | |
|
||||||
|
|
||||||
|
And the ways
|
||||||
|
| nodes | junction |
|
||||||
|
| sa | |
|
||||||
|
| tb | |
|
||||||
|
| uc | |
|
||||||
|
| vd | |
|
||||||
|
| abcda | roundabout |
|
||||||
|
|
||||||
|
When I route I should get
|
||||||
|
| from | to | route | turns |
|
||||||
|
| s | t | sa,tb | head,enter_roundabout-1,destination |
|
||||||
|
| s | u | sa,uc | head,enter_roundabout-2,destination |
|
||||||
|
| s | v | sa,vd | head,enter_roundabout-3,destination |
|
||||||
|
| u | v | uc,vd | head,enter_roundabout-1,destination |
|
||||||
|
| u | s | uc,sa | head,enter_roundabout-2,destination |
|
||||||
|
| u | t | uc,tb | head,enter_roundabout-3,destination |
|
@ -122,9 +122,13 @@ def turn_list instructions
|
|||||||
16 => :enter_contraflow,
|
16 => :enter_contraflow,
|
||||||
17 => :leave_contraflow
|
17 => :leave_contraflow
|
||||||
}
|
}
|
||||||
instructions.
|
# replace instructions codes with strings
|
||||||
map { |r| types[r[0].to_i].to_s }.
|
# "11-3" (enter roundabout and leave a 3rd exit) gets converted to "enter_roundabout-3"
|
||||||
join(',')
|
instructions.map do |r|
|
||||||
|
r[0].to_s.gsub!(/^\d*/) do |match|
|
||||||
|
types[match.to_i].to_s
|
||||||
|
end
|
||||||
|
end.join(',')
|
||||||
end
|
end
|
||||||
|
|
||||||
def mode_list instructions
|
def mode_list instructions
|
||||||
|
Loading…
Reference in New Issue
Block a user