Add 'arrive' step to route descriptions.

This commit is contained in:
Daniel Patterson 2016-03-31 14:32:00 -07:00 committed by Patrick Niklaus
parent 497da1d29b
commit d6e4dc0aa2
2 changed files with 86 additions and 85 deletions

View File

@ -44,6 +44,7 @@ module.exports = function () {
else if (err.code === 'ECONNREFUSED') else if (err.code === 'ECONNREFUSED')
return callback(this.RoutedError('*** osrm-routed is not running')); return callback(this.RoutedError('*** osrm-routed is not running'));
} }
//console.log(body+"\n");
return callback(err, res, body); return callback(err, res, body);
})); }));
}; };

View File

@ -14,9 +14,9 @@ Feature: Basic Routing
| ab | | ab |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
Scenario: Routing in between two nodes of way Scenario: Routing in between two nodes of way
Given the node map Given the node map
@ -27,9 +27,9 @@ Feature: Basic Routing
| abcd | | abcd |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| 1 | 2 | abcd | | 1 | 2 | abcd,abcd |
| 2 | 1 | abcd | | 2 | 1 | abcd,abcd |
Scenario: Routing between the middle nodes of way Scenario: Routing between the middle nodes of way
Given the node map Given the node map
@ -40,19 +40,19 @@ Feature: Basic Routing
| abcdef | | abcdef |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | c | abcdef | | b | c | abcdef,abcdef |
| b | d | abcdef | | b | d | abcdef,abcdef |
| b | e | abcdef | | b | e | abcdef,abcdef |
| c | b | abcdef | | c | b | abcdef,abcdef |
| c | d | abcdef | | c | d | abcdef,abcdef |
| c | e | abcdef | | c | e | abcdef,abcdef |
| d | b | abcdef | | d | b | abcdef,abcdef |
| d | c | abcdef | | d | c | abcdef,abcdef |
| d | e | abcdef | | d | e | abcdef,abcdef |
| e | b | abcdef | | e | b | abcdef,abcdef |
| e | c | abcdef | | e | c | abcdef,abcdef |
| e | d | abcdef | | e | d | abcdef,abcdef |
Scenario: Two ways connected in a straight line Scenario: Two ways connected in a straight line
Given the node map Given the node map
@ -64,13 +64,13 @@ Feature: Basic Routing
| bc | | bc |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | c | ab,bc | | a | c | ab,bc,bc |
| c | a | bc,ab | | c | a | bc,ab,ab |
| a | b | ab | | a | b | ab,ab |
| b | a | ab | | b | a | ab,ab |
| b | c | bc | | b | c | bc,bc |
| c | b | bc | | c | b | bc,bc |
Scenario: 2 unconnected parallel ways Scenario: 2 unconnected parallel ways
Given the node map Given the node map
@ -83,33 +83,33 @@ Feature: Basic Routing
| def | | def |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | abc | | a | b | abc,abc |
| b | a | abc | | b | a | abc,abc |
| b | c | abc | | b | c | abc,abc |
| c | b | abc | | c | b | abc,abc |
| d | e | def | | d | e | def,def |
| e | d | def | | e | d | def,def |
| e | f | def | | e | f | def,def |
| f | e | def | | f | e | def,def |
| a | d | | | a | d | |
| d | a | | | d | a | |
| b | d | | | b | d | |
| d | b | | | d | b | |
| c | d | | | c | d | |
| d | c | | | d | c | |
| a | e | | | a | e | |
| e | a | | | e | a | |
| b | e | | | b | e | |
| e | b | | | e | b | |
| c | e | | | c | e | |
| e | c | | | e | c | |
| a | f | | | a | f | |
| f | a | | | f | a | |
| b | f | | | b | f | |
| f | b | | | f | b | |
| c | f | | | c | f | |
| f | c | | | f | c | |
Scenario: 3 ways connected in a triangle Scenario: 3 ways connected in a triangle
Given the node map Given the node map
@ -124,13 +124,13 @@ Feature: Basic Routing
| ca | | ca |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| a | c | ca | | a | c | ca,ca |
| b | c | bc | | b | c | bc,bc |
| b | a | ab | | b | a | ab,ab |
| c | a | ca | | c | a | ca,ca |
| c | b | bc | | c | b | bc,bc |
Scenario: 3 connected triangles Scenario: 3 connected triangles
Given a grid size of 100 meters Given a grid size of 100 meters
@ -157,12 +157,12 @@ Feature: Basic Routing
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | b | ab | | a | b | ab,ab |
| a | c | ca | | a | c | ca,ca |
| b | c | bc | | b | c | bc,bc |
| b | a | ab | | b | a | ab,ab |
| c | a | ca | | c | a | ca,ca |
| c | b | bc | | c | b | bc,bc |
Scenario: To ways connected at a 45 degree angle Scenario: To ways connected at a 45 degree angle
Given the node map Given the node map
@ -176,13 +176,13 @@ Feature: Basic Routing
| cde | | cde |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| b | d | abc,cde | | b | d | abc,cde,cde |
| a | e | abc,cde | | a | e | abc,cde,cde |
| a | c | abc | | a | c | abc,abc |
| c | a | abc | | c | a | abc,abc |
| c | e | cde | | c | e | cde,cde |
| e | c | cde | | e | c | cde,cde |
Scenario: Grid city center Scenario: Grid city center
Given the node map Given the node map
@ -203,11 +203,11 @@ Feature: Basic Routing
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| f | g | efgh | | f | g | efgh,efgh |
| g | f | efgh | | g | f | efgh,efgh |
| f | j | bfjn | | f | j | bfjn,bfjn |
| j | f | bfjn | | j | f | bfjn,bfjn |
Scenario: Grid city periphery Scenario: Grid city periphery
Given the node map Given the node map
@ -228,11 +228,11 @@ Feature: Basic Routing
| dhlp | | dhlp |
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| a | d | abcd | | a | d | abcd,abcd |
| d | a | abcd | | d | a | abcd,abcd |
| a | m | aeim | | a | m | aeim,aeim |
| m | a | aeim | | m | a | aeim,aeim |
Scenario: Testbot - Triangle challenge Scenario: Testbot - Triangle challenge
Given the node map Given the node map
@ -249,5 +249,5 @@ Feature: Basic Routing
When I route I should get When I route I should get
| from | to | route | | from | to | route |
| d | c | de,ce | | d | c | de,ce,ce |
| e | d | de | | e | d | de,de |