fixing unit tests

This commit is contained in:
Moritz Kobitzsch
2016-04-06 16:47:16 +02:00
parent fa0a5040e5
commit dfd180a292
11 changed files with 134 additions and 116 deletions
+3 -1
View File
@@ -426,7 +426,9 @@ void trimShortSegments(std::vector<RouteStep> &steps, LegGeometry &geometry)
// This can happen if the last coordinate snaps to a node in the unpacked geometry
geometry.locations.pop_back();
geometry.segment_offsets.back()--;
BOOST_ASSERT(next_to_last_step.geometry_end == steps.back().geometry_begin);
// since the last geometry includes the location of arrival, the arrival instruction
// geometry overlaps with the previous segment
BOOST_ASSERT(next_to_last_step.geometry_end == steps.back().geometry_begin + 1);
BOOST_ASSERT(next_to_last_step.geometry_begin < next_to_last_step.geometry_end);
next_to_last_step.geometry_end--;
steps.back().geometry_begin--;