Fix segfault when route includes very short segments.

This commit is contained in:
Daniel Patterson
2016-06-22 13:25:22 -07:00
parent 256d39b572
commit 6dedd9cb72
5 changed files with 23 additions and 4 deletions
+1 -1
View File
@@ -17,7 +17,7 @@ module.exports = function () {
this.setContractArgs(args, callback);
});
this.Given(/^a grid size of (\d+) meters$/, (meters, callback) => {
this.Given(/^a grid size of ([0-9.]+) meters$/, (meters, callback) => {
this.setGridSize(meters);
callback();
});
+15
View File
@@ -24,3 +24,18 @@ Feature: Fixed bugs, kept to check for regressions
When I route I should get
| from | to | route |
| x | y | abc,abc |
Scenario: Step trimming with very short segments
Given a grid size of 0.1 meters
Given the node map
| a | 1 | b | c | d | 2 | e |
Given the ways
| nodes | oneway |
| ab | yes |
| bcd | yes |
| de | yes |
When I route I should get
| from | to | route |
| 1 | 2 | bcd,bcd |