Add test to ignore
This commit is contained in:
parent
602154b629
commit
c499d701d5
4 changed files with 27 additions and 12 deletions
|
@ -544,10 +544,16 @@ public class RouteResultPreparation {
|
|||
} else {
|
||||
// next turn is get through (take out the left and the right turn)
|
||||
if (target.activeLen < active.activeLen) {
|
||||
float ratio = (active.activeLen - target.activeLen) / 2f;
|
||||
active.activeEndIndex = (int) Math.ceil(active.activeEndIndex - ratio);
|
||||
active.activeStartIndex = (int) Math.floor(active.activeStartIndex + ratio);
|
||||
changed = true;
|
||||
if(target.originalLanes.length == active.activeLen) {
|
||||
active.activeEndIndex = active.activeStartIndex + target.activeEndIndex;
|
||||
active.activeStartIndex = active.activeStartIndex + target.activeStartIndex;
|
||||
changed = true;
|
||||
} else {
|
||||
float ratio = (active.activeLen - target.activeLen) / 2f;
|
||||
active.activeEndIndex = (int) Math.ceil(active.activeEndIndex - ratio);
|
||||
active.activeStartIndex = (int) Math.floor(active.activeStartIndex + ratio);
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!changed) {
|
||||
|
@ -556,7 +562,8 @@ public class RouteResultPreparation {
|
|||
|
||||
// set the allowed lane bit
|
||||
for (int i = 0; i < active.disabledLanes.length; i++) {
|
||||
if (i >= active.activeStartIndex && i <= active.activeEndIndex) {
|
||||
if (i >= active.activeStartIndex && i <= active.activeEndIndex &&
|
||||
active.originalLanes[i] % 2 == 1) {
|
||||
active.disabledLanes[i] |= 1;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -72,13 +72,11 @@ public class RouteResultPreparationTest {
|
|||
TestEntry[] testEntries = gson.fromJson(reader, TestEntry[].class);
|
||||
ArrayList<Object[]> twoDArray = new ArrayList<Object[]>();
|
||||
for (int i = 0; i < testEntries.length; ++i) {
|
||||
Object[] arr = new Object[]{
|
||||
testEntries[i].getTestName(),
|
||||
testEntries[i].getStartPoint(),
|
||||
testEntries[i].getEndPoint(),
|
||||
testEntries[i].getExpectedResults()
|
||||
};
|
||||
twoDArray.add(arr);
|
||||
if (!testEntries[i].isIgnore()) {
|
||||
Object[] arr = new Object[] { testEntries[i].getTestName(), testEntries[i].getStartPoint(),
|
||||
testEntries[i].getEndPoint(), testEntries[i].getExpectedResults() };
|
||||
twoDArray.add(arr);
|
||||
}
|
||||
}
|
||||
reader.close();
|
||||
return twoDArray;
|
||||
|
|
|
@ -12,6 +12,7 @@ public class TestEntry {
|
|||
private String testName;
|
||||
private LatLon startPoint;
|
||||
private LatLon endPoint;
|
||||
private boolean ignore;
|
||||
private Map<Long, String> expectedResults;
|
||||
|
||||
public LatLon getStartPoint() {
|
||||
|
@ -21,6 +22,14 @@ public class TestEntry {
|
|||
public void setStartPoint(LatLon startPoint) {
|
||||
this.startPoint = startPoint;
|
||||
}
|
||||
|
||||
public void setIgnore(boolean ignore) {
|
||||
this.ignore = ignore;
|
||||
}
|
||||
|
||||
public boolean isIgnore() {
|
||||
return ignore;
|
||||
}
|
||||
|
||||
public LatLon getEndPoint() {
|
||||
return endPoint;
|
||||
|
|
|
@ -219,6 +219,7 @@
|
|||
},
|
||||
{
|
||||
"testName": "11.Graaf Lodewijkstraat to Graaf Lodewijkstraat u-turn",
|
||||
"ignore":true,
|
||||
"startPoint": {
|
||||
"latitude": 52.076116774796496,
|
||||
"longitude": 4.821222126483946
|
||||
|
|
Loading…
Reference in a new issue