Fix tests.
This commit is contained in:
parent
be94c670b7
commit
5b3690b982
@ -52,14 +52,13 @@ public class PathTest {
|
||||
d2e = new Arc(nodes[3], nodes[4], 20, speed20, null);
|
||||
e2d = new Arc(nodes[4], nodes[0], 10, speed10, null);
|
||||
|
||||
graph = new Graph("ID", "", Arrays.asList(nodes));
|
||||
graph = new Graph("ID", "", Arrays.asList(nodes), null);
|
||||
|
||||
emptyPath = new Path(graph, new ArrayList<Arc>());
|
||||
shortPath = new Path(graph, Arrays.asList(new Arc[] { a2b, b2c, c2d_1 }));
|
||||
longPath = new Path(graph, Arrays.asList(new Arc[] { a2b, b2c, c2d_1, d2e }));
|
||||
loopPath = new Path(graph, Arrays.asList(new Arc[] { a2b, b2c, c2d_1, d2a }));
|
||||
longLoopPath = new Path(graph,
|
||||
Arrays.asList(new Arc[]{ a2b, b2c, c2d_1, d2a, a2c, c2d_3, d2a, a2b, b2c }));
|
||||
longLoopPath = new Path(graph, Arrays.asList(new Arc[] { a2b, b2c, c2d_1, d2a, a2c, c2d_3, d2a, a2b, b2c }));
|
||||
invalidPath = new Path(graph, Arrays.asList(new Arc[] { a2b, c2d_1, d2e }));
|
||||
|
||||
}
|
||||
@ -125,8 +124,7 @@ public class PathTest {
|
||||
Arc[] expected;
|
||||
|
||||
// Simple construction
|
||||
path = Path.createFastestPathFromNodes(graph,
|
||||
Arrays.asList(new Node[]{ nodes[0], nodes[1], nodes[2] }));
|
||||
path = Path.createFastestPathFromNodes(graph, Arrays.asList(new Node[] { nodes[0], nodes[1], nodes[2] }));
|
||||
expected = new Arc[] { a2b, b2c };
|
||||
assertEquals(expected.length, path.getArcs().size());
|
||||
for (int i = 0; i < expected.length; ++i) {
|
||||
@ -149,8 +147,7 @@ public class PathTest {
|
||||
Arc[] expected;
|
||||
|
||||
// Simple construction
|
||||
path = Path.createShortestPathFromNodes(graph,
|
||||
Arrays.asList(new Node[]{ nodes[0], nodes[1], nodes[2] }));
|
||||
path = Path.createShortestPathFromNodes(graph, Arrays.asList(new Node[] { nodes[0], nodes[1], nodes[2] }));
|
||||
expected = new Arc[] { a2b, b2c };
|
||||
assertEquals(expected.length, path.getArcs().size());
|
||||
for (int i = 0; i < expected.length; ++i) {
|
||||
|
@ -2,9 +2,6 @@ package org.insa.graph.io;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
|
||||
import java.io.BufferedInputStream;
|
||||
import java.io.DataInputStream;
|
||||
import java.io.FileInputStream;
|
||||
import java.io.IOException;
|
||||
import java.util.List;
|
||||
|
||||
@ -23,9 +20,7 @@ public class BinaryGraphReaderTest {
|
||||
|
||||
@BeforeClass
|
||||
public static void initAll() throws IOException {
|
||||
BinaryGraphReaderInsa2016 reader = new BinaryGraphReaderInsa2016(
|
||||
new DataInputStream(new BufferedInputStream(new FileInputStream("Maps/midip.map"))));
|
||||
midip = reader.read();
|
||||
// TODO
|
||||
}
|
||||
|
||||
public void assertPointAt(Point p1, double longitude, double latitude) {
|
||||
|
Loading…
Reference in New Issue
Block a user