update cucumber to 1.2.1 and remove hack

This commit is contained in:
Moritz Kobitzsch 2016-07-07 15:31:20 +02:00 committed by Patrick Niklaus
parent e76e39a398
commit 2ddc00c21e
No known key found for this signature in database
GPG Key ID: E426891B5F978B1B
8 changed files with 192 additions and 216 deletions

View File

@ -16,9 +16,9 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | | nodes | turn:lanes:forward |
| ab | through\|right&right&right | | ab | through\|right\|right\|right |
| bx | | | bx | |
| bc | left\|left&through | | bc | left\|left\|through |
| cd | through\|right | | cd | through\|right |
| cy | | | cy | |
| dz | | | dz | |
@ -40,11 +40,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | turn:lanes:backward | name | | nodes | turn:lanes:forward | turn:lanes:backward | name |
| ab | through\|right&right | | MySt | | ab | through\|right\|right | | MySt |
| bx | | | XSt | | bx | | | XSt |
| bc | | left\|right | MySt | | bc | | left\|right | MySt |
| cd | left\|right | through\|through | MySt | | cd | left\|right | through\|through | MySt |
| de | | left\|left&through | MySt | | de | | left\|left\|through | MySt |
| dy | | | YSt | | dy | | | YSt |
When I route I should get When I route I should get
@ -63,11 +63,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | turn:lanes:backward | name | | nodes | turn:lanes:forward | turn:lanes:backward | name |
| ab | through\|right&right | | AXSt | | ab | through\|right\|right | | AXSt |
| bx | | | AXSt | | bx | | | AXSt |
| bc | | left\|right | BDSt | | bc | | left\|right | BDSt |
| cd | left\|right | through\|through | BDSt | | cd | left\|right | through\|through | BDSt |
| de | | left\|left&through | EYSt | | de | | left\|left\|through | EYSt |
| dy | | | EYSt | | dy | | | EYSt |
When I route I should get When I route I should get
@ -106,10 +106,10 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | lanes | highway | oneway | name | | nodes | turn:lanes:forward | lanes | highway | oneway | name |
| ab | none\|none&none&slight_right&slight_right | 5 | motorway | | abx | | ab | none\|none\|none\|slight_right\|slight_right | 5 | motorway | | abx |
| bx | | 3 | motorway | | abx | | bx | | 3 | motorway | | abx |
| bc | | 2 | motorway_link | yes | bcd | | bc | | 2 | motorway_link | yes | bcd |
| cd | slight_left\|slight_left;slight_right&slight_right | 3 | motorway_link | yes | bcd | | cd | slight_left\|slight_left;slight_right\|slight_right | 3 | motorway_link | yes | bcd |
| di | slight_left\|slight_right | 2 | motorway_link | yes | di | | di | slight_left\|slight_right | 2 | motorway_link | yes | di |
| dj | | 2 | motorway_link | yes | dj | | dj | | 2 | motorway_link | yes | dj |
@ -151,9 +151,9 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | name | | nodes | turn:lanes:forward | name |
| ab | through\|right&right&right | abx | | ab | through\|right\|right\|right | abx |
| bx | | abx | | bx | | abx |
| bc | left\|left&through | bcy | | bc | left\|left\|through | bcy |
| cy | | bcy | | cy | | bcy |
| cd | through\|right | cdz | | cd | through\|right | cdz |
| dz | | cdz | | dz | | cdz |
@ -176,9 +176,9 @@ Feature: Turn Lane Guidance
| nodes | turn:lanes:forward | name | | nodes | turn:lanes:forward | name |
| ab | through\|right | abx | | ab | through\|right | abx |
| bx | | abx | | bx | | abx |
| bc | left\|left&through | bcy | | bc | left\|left\|through | bcy |
| cy | | bcy | | cy | | bcy |
| cd | through\|right&right&right | cdz | | cd | through\|right\|right\|right | cdz |
| dz | | cdz | | dz | | cdz |
| de | | de | | de | | de |
@ -197,11 +197,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | name | | nodes | turn:lanes:forward | name |
| ab | through\|right&right&right | abx | | ab | through\|right\|right\|right | abx |
| bx | | abx | | bx | | abx |
| bc | left\|left&through | bcy | | bc | left\|left\|through | bcy |
| cy | | bcy | | cy | | bcy |
| cd | through\|right&right&right | cdz | | cd | through\|right\|right\|right | cdz |
| dz | | cdz | | dz | | cdz |
| de | | de | | de | | de |
@ -222,7 +222,7 @@ Feature: Turn Lane Guidance
| nodes | turn:lanes:forward | name | | nodes | turn:lanes:forward | name |
| ab | through\|right | abx | | ab | through\|right | abx |
| bx | | abx | | bx | | abx |
| bc | left\|left&through | bcy | | bc | left\|left\|through | bcy |
| cy | | bcy | | cy | | bcy |
| cd | through\|right | cdz | | cd | through\|right | cdz |
| dz | | cdz | | dz | | cdz |
@ -245,11 +245,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | name | | nodes | turn:lanes:forward | name |
| ab | through\|right&right&right | abx | | ab | through\|right\|right\|right | abx |
| bx | | abx | | bx | | abx |
| bc | left\|left&through | bcy | | bc | left\|left\|through | bcy |
| cy | | bcy | | cy | | bcy |
| cd | through\|right&right | cdz | | cd | through\|right\|right | cdz |
| dz | | cdz | | dz | | cdz |
| de | left\|through | dew | | de | left\|through | dew |
| ew | | dew | | ew | | dew |
@ -407,10 +407,10 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | highway | name | | nodes | turn:lanes:forward | highway | name |
| abi | \|&right&right | primary | start | | abi | \|\|right\|right | primary | start |
| bch | \|&right&right | primary | first | | bch | \|\|right\|right | primary | first |
| cdj | \|&right&right | primary | second | | cdj | \|\|right\|right | primary | second |
| de | left\|right&right | secondary | third | | de | left\|right\|right | secondary | third |
| feg | | tertiary | fourth | | feg | | tertiary | fourth |
When I route I should get When I route I should get
@ -432,10 +432,10 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes:forward | highway | name | | nodes | turn:lanes:forward | highway | name |
| abi | left\|left&& | primary | start | | abi | left\|left\|\| | primary | start |
| bch | left\|left&& | primary | first | | bch | left\|left\|\| | primary | first |
| cdj | left\|left&& | primary | second | | cdj | left\|left\|\| | primary | second |
| de | left\|left&right | secondary | third | | de | left\|left\|right | secondary | third |
| feg | | tertiary | fourth | | feg | | tertiary | fourth |
When I route I should get When I route I should get

View File

@ -5,9 +5,7 @@ Feature: Turn Lane Guidance
Given the profile "car" Given the profile "car"
Given a grid size of 20 meters Given a grid size of 20 meters
#requires https://github.com/cucumber/cucumber-js/issues/417 @bug
#Due to this, we use & as a pipe character. Switch them out for \| when 417 is fixed
@bug @WORKAROUND-FIXME
Scenario: Basic Turn Lane 3-way Turn with empty lanes Scenario: Basic Turn Lane 3-way Turn with empty lanes
Given the node map Given the node map
| a | | b | | c | | a | | b | | c |
@ -16,7 +14,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | turn:lanes | turn:lanes:forward | turn:lanes:backward | name | | nodes | turn:lanes | turn:lanes:forward | turn:lanes:backward | name |
| ab | | through\|right | | in | | ab | | through\|right | | in |
| bc | | | left\|through&& | straight | | bc | | | left\|through\|\| | straight |
| bd | | | left\|right | right | | bd | | | left\|right | right |
When I route I should get When I route I should get
@ -89,7 +87,7 @@ Feature: Turn Lane Guidance
#this next test requires decision on how to announce lanes for going straight if there is no turn #this next test requires decision on how to announce lanes for going straight if there is no turn
@TODO @WORKAROUND-FIXME @TODO
Scenario: Turn with Bus-Lane Scenario: Turn with Bus-Lane
Given the node map Given the node map
| a | | b | | c | | a | | b | | c |
@ -98,7 +96,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | lanes:psv:forward | | nodes | name | turn:lanes:forward | lanes:psv:forward |
| ab | road | through\|right& | 1 | | ab | road | through\|right\| | 1 |
| bc | road | | | | bc | road | | |
| bd | turn | | | | bd | turn | | |
@ -126,7 +124,7 @@ Feature: Turn Lane Guidance
| a,c | road,road | depart,arrive | | a,c | road,road | depart,arrive |
#turn lanes are often drawn at the incoming road, even though the actual turn requires crossing the intersection first #turn lanes are often drawn at the incoming road, even though the actual turn requires crossing the intersection first
@todo @WORKAROUND-FIXME @bug @todo @bug
Scenario: Turn Lanes at Segregated Road Scenario: Turn Lanes at Segregated Road
Given the node map Given the node map
| | | i | l | | | | | | i | l | | |
@ -138,11 +136,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | oneway | | nodes | name | turn:lanes:forward | oneway |
| ab | road | left\|through&right | yes | | ab | road | left\|through\|right | yes |
| bc | road | left\|through | yes | | bc | road | left\|through | yes |
| cd | road | | yes | | cd | road | | yes |
| ef | road | \|through&through;right | yes | | ef | road | \|through\|through;right | yes |
| fg | road | left;through\|through& | yes | | fg | road | left;through\|through\| | yes |
| gh | road | | yes | | gh | road | | yes |
| ig | cross | | yes | | ig | cross | | yes |
| gb | cross | left\|through | yes | | gb | cross | left\|through | yes |
@ -182,11 +180,11 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | oneway | | nodes | name | turn:lanes:forward | oneway |
| ab | road | left\|through&right | yes | | ab | road | left\|through\|right | yes |
| bc | road | left\|through | yes | | bc | road | left\|through | yes |
| cd | road | | yes | | cd | road | | yes |
| ef | road | \|through&through;right | yes | | ef | road | \|through\|through;right | yes |
| fg | road | left;through\|through& | yes | | fg | road | left;through\|through\| | yes |
| gh | road | | yes | | gh | road | | yes |
| ig | cross | | yes | | ig | cross | | yes |
| gb | cross | left\|through | yes | | gb | cross | left\|through | yes |
@ -213,7 +211,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | oneway | | nodes | name | turn:lanes:forward | oneway |
| ab | road | left\|through&right | yes | | ab | road | left\|through\|right | yes |
| bc | road | | yes | | bc | road | | yes |
| cd | road | | yes | | cd | road | | yes |
| gb | cross | | yes | | gb | cross | | yes |
@ -330,7 +328,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | | nodes | name | turn:lanes:forward |
| ab | road | left\|through&right | | ab | road | left\|through\|right |
| bc | road | | | bc | road | |
| cd | road | left\|through | | cd | road | left\|through |
| de | through | | | de | through | |
@ -387,7 +385,7 @@ Feature: Turn Lane Guidance
| nodes | name | turn:lanes:forward | junction | oneway | highway | | nodes | name | turn:lanes:forward | junction | oneway | highway |
| abcdef | roundabout | | roundabout | yes | primary | | abcdef | roundabout | | roundabout | yes | primary |
| gha | roundabout | | roundabout | yes | primary | | gha | roundabout | | roundabout | yes | primary |
| fg | roundabout | slight_left\|slight_left;slight_right&slight_right&slight_right | roundabout | yes | primary | | fg | roundabout | slight_left\|slight_left;slight_right\|slight_right\|slight_right | roundabout | yes | primary |
| aoib | top | | | yes | primary | | aoib | top | | | yes | primary |
| cjd | left | | | yes | primary | | cjd | left | | | yes | primary |
| ekf | bottom | | | yes | primary | | ekf | bottom | | | yes | primary |
@ -412,7 +410,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | oneway | highway | | nodes | name | turn:lanes:forward | oneway | highway |
| ab | road | left\|left&through&through | yes | primary | | ab | road | left\|left\|through\|through | yes | primary |
| bd | road | through\|through | yes | primary | | bd | road | through\|through | yes | primary |
| bc | road | left\|left | yes | primary | | bc | road | left\|left | yes | primary |
| de | road | | yes | primary | | de | road | | yes | primary |
@ -440,8 +438,8 @@ Feature: Turn Lane Guidance
| nodes | name | turn:lanes:forward | oneway | highway | | nodes | name | turn:lanes:forward | oneway | highway |
| ab | road | | no | primary | | ab | road | | no | primary |
| di | road | | yes | primary | | di | road | | yes | primary |
| bc | road | \|through&right | yes | primary | | bc | road | \|through\|right | yes | primary |
| cd | road | \|through&right | yes | primary | | cd | road | \|through\|right | yes | primary |
| fc | road | | no | tertiary | | fc | road | | no | tertiary |
| jefb | road | | yes | primary | | jefb | road | | yes | primary |
| gdeh | cross | | no | primary | | gdeh | cross | | no | primary |
@ -465,7 +463,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | oneway | highway | | nodes | name | turn:lanes:forward | oneway | highway |
| abc | road | left\|left&left&through&through | yes | primary | | abc | road | left\|left\|left\|through\|through | yes | primary |
| cde | road | | yes | primary | | cde | road | | yes | primary |
| hc | cross | | yes | secondary | | hc | cross | | yes | secondary |
| cg | straight | | no | tertiary | | cg | straight | | no | tertiary |
@ -492,10 +490,10 @@ Feature: Turn Lane Guidance
| nodes | name | turn:lanes:forward | oneway | highway | junction | | nodes | name | turn:lanes:forward | oneway | highway | junction |
| efgha | round | | yes | primary | roundabout | | efgha | round | | yes | primary | roundabout |
| ab | round | | yes | primary | roundabout | | ab | round | | yes | primary | roundabout |
| bc | round | slight_left\|slight_left&slight_right | yes | primary | roundabout | | bc | round | slight_left\|slight_left\|slight_right | yes | primary | roundabout |
| cd | round | | yes | primary | roundabout | | cd | round | | yes | primary | roundabout |
| de | round | slight_left\|slight_right | yes | primary | roundabout | | de | round | slight_left\|slight_right | yes | primary | roundabout |
| ib | left | slight_left\|slight_left&slight_right | yes | primary | | | ib | left | slight_left\|slight_left\|slight_right | yes | primary | |
| cj | bottom | | yes | primary | | | cj | bottom | | yes | primary | |
| ek | right | | yes | primary | | | ek | right | | yes | primary | |
@ -515,7 +513,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | | nodes | name | turn:lanes:forward | highway |
| abc | road | through\|through&through;slight_right&slight_right | primary | | abc | road | through\|through\|through;slight_right\|slight_right | primary |
| cd | road | | primary | | cd | road | | primary |
| ce | cross | | primary | | ce | cross | | primary |
@ -531,7 +529,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | | nodes | name | turn:lanes:forward | highway |
| abc | hwy | through\|through&through;slight_right&slight_right | motorway | | abc | hwy | through\|through\|through;slight_right\|slight_right | motorway |
| cd | hwy | | motorway | | cd | hwy | | motorway |
| ce | ramp | | motorway_link | | ce | ramp | | motorway_link |
@ -571,7 +569,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | oneway | | nodes | name | turn:lanes:forward | highway | oneway |
| ab | hwy | through\|through&slight_right | motorway | yes | | ab | hwy | through\|through\|slight_right | motorway | yes |
| bc | hwy | | motorway | yes | | bc | hwy | | motorway | yes |
| bd | ramp | | motorway_link | yes | | bd | ramp | | motorway_link | yes |
@ -589,7 +587,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | oneway | | nodes | name | turn:lanes:forward | highway | oneway |
| ab | road | reverse\|through&through | primary | yes | | ab | road | reverse\|through\|through | primary | yes |
| bc | road | | primary | yes | | bc | road | | primary | yes |
| bdeg | road | | primary_link | yes | | bdeg | road | | primary_link | yes |
| fgh | road | | primary | yes | | fgh | road | | primary | yes |
@ -607,7 +605,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | oneway | | nodes | name | turn:lanes:forward | highway | oneway |
| ab | road | reverse\|through&none | primary | yes | | ab | road | reverse\|through\|none | primary | yes |
| bc | road | | primary | yes | | bc | road | | primary | yes |
| bdeg | road | | primary_link | yes | | bdeg | road | | primary_link | yes |
| fgh | road | | primary | yes | | fgh | road | | primary | yes |
@ -626,7 +624,7 @@ Feature: Turn Lane Guidance
And the ways And the ways
| nodes | name | turn:lanes:forward | highway | oneway | | nodes | name | turn:lanes:forward | highway | oneway |
| ajb | road | reverse\|through&none | primary | yes | | ajb | road | reverse\|through\|none | primary | yes |
| bc | road | | primary | yes | | bc | road | | primary | yes |
| bdeg | road | | primary_link | yes | | bdeg | road | | primary_link | yes |
| fgh | road | | primary | yes | | fgh | road | | primary | yes |

View File

@ -15,16 +15,4 @@ module.exports = function () {
this.setOrigin(this.DEFAULT_ORIGIN); this.setOrigin(this.DEFAULT_ORIGIN);
callback(); callback();
}); });
this.Before('@ignore-platform-windows', () => {
this.skipThisScenario();
});
this.Before('@ignore-platform-unix', () => {
this.skipThisScenario();
});
this.Before('@ignore-platform-mac', () => {
this.skipThisScenario();
});
}; };

View File

@ -33,9 +33,4 @@ module.exports = function () {
}); });
}); });
}); });
this.Around('@stress', (scenario, callback) => {
// TODO implement stress timeout? Around support is being dropped in cucumber-js anyway
callback();
});
}; };

View File

@ -29,7 +29,7 @@ Feature: Basic Routing
Scenario: Check handling empty values Scenario: Check handling empty values
Given the node map Given the node map
| a | b | | c | | d | f | | a | b | | c | | d | f |
| | | | | | e | | | | | | | e | |
And the ways And the ways
| nodes | name | | nodes | name |

View File

@ -4,13 +4,13 @@
"private": true, "private": true,
"description": "The Open Source Routing Machine is a high performance routing engine written in C++11 designed to run on OpenStreetMap data.", "description": "The Open Source Routing Machine is a high performance routing engine written in C++11 designed to run on OpenStreetMap data.",
"dependencies": { "dependencies": {
"cucumber": "^0.9.4", "chalk": "^1.1.3",
"cucumber": "^1.2.1",
"d3-queue": "^2.0.3", "d3-queue": "^2.0.3",
"node-timeout": "0.0.4", "node-timeout": "0.0.4",
"polyline": "^0.2.0",
"request": "^2.69.0", "request": "^2.69.0",
"xmlbuilder": "^4.2.1", "xmlbuilder": "^4.2.1"
"chalk": "^1.1.3",
"polyline": "^0.2.0"
}, },
"bin": { "bin": {
"cucumber": "./node_modules/cucumber/bin/cucumber.js" "cucumber": "./node_modules/cucumber/bin/cucumber.js"

View File

@ -154,7 +154,7 @@ void ExtractorCallbacks::ProcessWay(const osmium::Way &input_way, const Extracti
TurnLaneDescription lane_description; TurnLaneDescription lane_description;
typedef boost::tokenizer<boost::char_separator<char>> tokenizer; typedef boost::tokenizer<boost::char_separator<char>> tokenizer;
boost::char_separator<char> sep("|&", "", boost::keep_empty_tokens); boost::char_separator<char> sep("|", "", boost::keep_empty_tokens);
boost::char_separator<char> inner_sep(";", ""); boost::char_separator<char> inner_sep(";", "");
tokenizer tokens(lane_string, sep); tokenizer tokens(lane_string, sep);

View File

@ -45,11 +45,6 @@ bool TurnLaneData::operator<(const TurnLaneData &other) const
LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_description) LaneDataVector laneDataFromDescription(const TurnLaneDescription &turn_lane_description)
{ {
typedef std::unordered_map<TurnLaneType::Mask, std::pair<LaneID, LaneID>> LaneMap; typedef std::unordered_map<TurnLaneType::Mask, std::pair<LaneID, LaneID>> LaneMap;
// FIXME this is a workaround due to https://github.com/cucumber/cucumber-js/issues/417,
// need to switch statements when fixed
// const auto num_lanes = std::count(turn_lane_string.begin(), turn_lane_string.end(), '|') + 1;
// count the number of lanes
const auto num_lanes = boost::numeric_cast<LaneID>(turn_lane_description.size()); const auto num_lanes = boost::numeric_cast<LaneID>(turn_lane_description.size());
const auto setLaneData = [&]( const auto setLaneData = [&](
LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) { LaneMap &map, TurnLaneType::Mask full_mask, const LaneID current_lane) {