Fix turn-lanes test

This commit is contained in:
Victor Shcherb 2016-04-13 00:14:31 +02:00
parent e5d4d3df9a
commit 602154b629
2 changed files with 6 additions and 5 deletions

View file

@ -650,7 +650,8 @@ public class RouteResultPreparation {
String turnLanes = getTurnLanesString(prevSegm); String turnLanes = getTurnLanesString(prevSegm);
int[] lanesArray ; int[] lanesArray ;
if (turnLanes == null) { if (turnLanes == null) {
if(prevSegm.getTurnType() != null && prevSegm.getTurnType().getLanes() != null) { if(prevSegm.getTurnType() != null && prevSegm.getTurnType().getLanes() != null
&& prevSegm.getDistance() < 100) {
int[] lns = prevSegm.getTurnType().getLanes(); int[] lns = prevSegm.getTurnType().getLanes();
TIntArrayList lst = new TIntArrayList(); TIntArrayList lst = new TIntArrayList();
for(int i = 0; i < lns.length; i++) { for(int i = 0; i < lns.length; i++) {
@ -1031,7 +1032,6 @@ public class RouteResultPreparation {
for (int i = 0; i < splitLaneOptions.length; i++) { for (int i = 0; i < splitLaneOptions.length; i++) {
String[] laneOptions = splitLaneOptions[i].split(";"); String[] laneOptions = splitLaneOptions[i].split(";");
boolean isTertiaryTurn = false; boolean isTertiaryTurn = false;
for (int j = 0; j < laneOptions.length; j++) { for (int j = 0; j < laneOptions.length; j++) {
int turn; int turn;
if (laneOptions[j].equals("none") || laneOptions[j].equals("through")) { if (laneOptions[j].equals("none") || laneOptions[j].equals("through")) {
@ -1052,7 +1052,8 @@ public class RouteResultPreparation {
turn = TurnType.TU; turn = TurnType.TU;
} else { } else {
// Unknown string // Unknown string
continue; turn = TurnType.C;
// continue;
} }
final int primary = TurnType.getPrimaryTurn(lanes[i]); final int primary = TurnType.getPrimaryTurn(lanes[i]);

View file

@ -307,8 +307,8 @@
"longitude": 35.47155582904816 "longitude": 35.47155582904816
}, },
"expectedResults": { "expectedResults": {
"102447": "TL|+C", "102992": "C|+C|TR",
"102992": "+C|+C|TR" "102447": "TL|+C"
} }
} }