add failing cuke test

This commit is contained in:
Kajari Ghosh 2018-12-04 23:26:54 -05:00
parent 4976233cff
commit 590421bc0d
2 changed files with 27 additions and 1 deletions

View File

@ -666,4 +666,29 @@ Feature: Basic Distance Matrix
| a | 0 | 300.2 | 900.7 | 1200.9 | | a | 0 | 300.2 | 900.7 | 1200.9 |
| b | 300.2 | 0 | 600.5 | 900.7 | | b | 300.2 | 0 | 600.5 | 900.7 |
| f | 900.7 | 600.5 | 0 | 302.2 | | f | 900.7 | 600.5 | 0 | 302.2 |
| 1 | 1200.9 | 900.7 | 300.2 | 0 | | 1 | 1200.9 | 900.7 | 300.2 | 0 |
Scenario: Testbot - Filling in noroutes with estimates - use snapped coordinate - asymetric
Given a grid size of 300 meters
Given the extract extra arguments "--small-component-size 4"
Given the query options
| fallback_speed | 5 |
| fallback_coordinate | snapped |
Given the node map
"""
a b f h 1
d e g i
"""
And the ways
| nodes |
| abeda |
| fhigf |
When I request a travel distance matrix I should get
| | a |
| a | 0 |
| b | 300.2 |
| f | 900.7 |
| 1 | 1200.9 |

View File

@ -103,6 +103,7 @@ Status TablePlugin::HandleRequest(const RoutingAlgorithmsInterface &algorithms,
for (std::size_t column = 0; column < num_destinations; column++) for (std::size_t column = 0; column < num_destinations; column++)
{ {
const auto &table_index = row * num_sources + column; const auto &table_index = row * num_sources + column;
BOOST_ASSERT(table_index < result_tables_pair.first.size());
if (result_tables_pair.first[table_index] == MAXIMAL_EDGE_DURATION) if (result_tables_pair.first[table_index] == MAXIMAL_EDGE_DURATION)
{ {
const auto &source = const auto &source =