update bicycle test

This commit is contained in:
Emil Tin 2011-12-28 15:08:54 +01:00
parent 093b6c0217
commit 5dda4aba51
4 changed files with 25 additions and 18 deletions

View File

@ -3,20 +3,18 @@ Feature: Bicycle Routing from A to B
To enable bicycle routing To enable bicycle routing
OSRM should handle all relevant bicycle tags OSRM should handle all relevant bicycle tags
Scenario: Respect oneway without additional tags
Scenario: oneway:bicycle Scenario: oneway:bicycle
When I request a route from 55.673168935147,12.563557740441 to 55.67380116846,12.563107129324& When I request a route from 55.673168935147,12.563557740441 to 55.67380116846,12.563107129324&
Then I should get a route Then I should get a route
And the route should follow "Banegårdspladsen" And the route should follow "Banegårdspladsen"
And there should not be any turns And there should not be any turns
And the distance should be close to 70m And the distance should be close to 80m
Scenario: cycleway=opposite_lane Scenario: cycleway=opposite_lane
When I request a route from 55.689236488,12.55317804955 to 55.688510764046,12.552909828648 When I request a route from 55.689126237262,12.553137305887 to 55.688666612359,12.55296564451
Then I should get a route Then I should get a route
And the route should follow "Kapelvej" And the route should follow "Kapelvej"
And there should not be any turns And there should not be any turns
And the distance should be close to 80m And the distance should be close to 50m

View File

@ -11,20 +11,20 @@ Scenario: No left turn when crossing a oneway street
And no error should be reported in terminal And no error should be reported in terminal
Scenario: No left turn at T-junction: Don't turn left from side road into main road Scenario: No left turn at T-junction: Don't turn left from side road into main road
When I request a route from 55.66442995717,12.549384056343 to 55.664060815164,12.548944174065
Then I should get a route
And the route should start at "Sigerstedgade"
And the route should end at "Ingerslevsgade"
And there should be more than 1 turn
And the route should not include "Sigerstedgade, Ingerslevsgade"
Scenario: No left turn at T-junction: OK to turn right from side road into main road
When I request a route from 55.66442995717,12.549384056343 to 55.664218154805,12.5502638209 When I request a route from 55.66442995717,12.549384056343 to 55.664218154805,12.5502638209
Then I should get a route Then I should get a route
And the route should start at "Sigerstedgade" And the route should start at "Sigerstedgade"
And the route should end at "Ingerslevsgade" And the route should end at "Ingerslevsgade"
And there should be 1 turn And the route should not include "Sigerstedgade, Ingerslevsgade"
And there should be more than 1 turn
Scenario: No left turn at T-junction: OK to turn right from side road into main road
When I request a route from 55.66442995717,12.549384056343 to 55.664060815164,12.548944174065
Then I should get a route
And the route should start at "Sigerstedgade"
And the route should end at "Ingerslevsgade"
And the route should include "Sigerstedgade, Ingerslevsgade" And the route should include "Sigerstedgade, Ingerslevsgade"
And there should be 1 turn
Scenario: No left turn at T-junction: OK to go straight on main road Scenario: No left turn at T-junction: OK to go straight on main road
When I request a route from 55.66419092299,12.550333558335 to 55.664060815164,12.548944174065 When I request a route from 55.66419092299,12.550333558335 to 55.664060815164,12.548944174065
@ -36,14 +36,14 @@ Scenario: No left turn at T-junction: OK to turn right from main road into side
Then I should get a route Then I should get a route
And the route should start at "Ingerslevsgade" And the route should start at "Ingerslevsgade"
And the route should end at "Sigerstedgade" And the route should end at "Sigerstedgade"
And there should be 1 turn
And the route should include "Ingerslevsgade, Sigerstedgade" And the route should include "Ingerslevsgade, Sigerstedgade"
And there should be 1 turn
Scenario: No left turn at T-junction: OK to turn left from main road into side road Scenario: No left turn at T-junction: OK to turn left from main road into side road
When I request a route from 55.664218154805,12.5502638209 to 55.66442995717,12.549384056343 When I request a route from 55.664218154805,12.5502638209 to 55.66442995717,12.549384056343
Then I should get a route Then I should get a route
And the route should start at "Ingerslevsgade" And the route should start at "Ingerslevsgade"
And the route should end at "Sigerstedgade" And the route should end at "Sigerstedgade"
And there should be 1 turn
And the route should include "Ingerslevsgade, Sigerstedgade" And the route should include "Ingerslevsgade, Sigerstedgade"
And there should be 1 turn

View File

@ -114,11 +114,11 @@ def computed_route
end end
Then /^the route should follow "([^"]*)"$/ do |route| Then /^the route should follow "([^"]*)"$/ do |route|
sanitize_route(route).should == computed_route computed_route.should == sanitize_route(route)
end end
Then /^the route should not follow "([^"]*)"$/ do |route| Then /^the route should not follow "([^"]*)"$/ do |route|
sanitize_route(route).should_not == computed_route computed_route.should_not == sanitize_route(route)
end end
Then /^the route should include "([^"]*)"$/ do |route| Then /^the route should include "([^"]*)"$/ do |route|

9
test/server.ini Normal file
View File

@ -0,0 +1,9 @@
Threads = 8
IP = 0.0.0.0
Port = 5000
hsgrData=data/kbh.osrm.hsgr
nodesData=data/kbh.osrm.nodes
ramIndex=data/kbh.osrm.ramIndex
fileIndex=data/kbh.osrm.fileIndex
namesData=data/kbh.osrm.names