Clean tests.

This commit is contained in:
Mikael Capelle 2018-03-15 08:25:43 +01:00
parent 7e079df22f
commit b8d73963a6
3 changed files with 2 additions and 55 deletions

View File

@ -7,7 +7,7 @@
// ******************ERRORS********************************
// Throws RuntimeException for findMin and deleteMin when empty
package org.insa.algo.datastructures;
package org.insa.algo.utils;
import java.util.ArrayList;

View File

@ -1,4 +1,4 @@
package org.insa.utility;
package org.insa.algo.utils;
import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
@ -6,7 +6,6 @@ import static org.junit.Assert.assertTrue;
import java.util.Arrays;
import java.util.stream.IntStream;
import org.insa.algo.datastructures.BinaryHeap;
import org.junit.Before;
import org.junit.Test;

View File

@ -1,52 +0,0 @@
package org.insa.graph.io;
import static org.junit.Assert.assertEquals;
import java.io.IOException;
import java.util.List;
import org.insa.graph.Graph;
import org.insa.graph.Node;
import org.insa.graph.Point;
import org.junit.BeforeClass;
import org.junit.Test;
public class BinaryGraphReaderTest {
// Epsilon for latitude and longitude.
private static final double EPS = 1e-5;
private static Graph midip;
@BeforeClass
public static void initAll() throws IOException {
// TODO
}
public void assertPointAt(Point p1, double longitude, double latitude) {
assertEquals(p1.getLongitude(), longitude, EPS);
assertEquals(p1.getLatitude(), latitude, EPS);
}
@Test
public void testMidipNodes() {
List<Node> nodes = midip.getNodes();
assertEquals(nodes.size(), 150827);
// Check the locations of some nodes.
assertPointAt(nodes.get(58411).getPoint(), 1.799864, 43.92864);
assertPointAt(nodes.get(133312).getPoint(), 0.539752, 43.317505);
assertPointAt(nodes.get(113688).getPoint(), 1.682739, 44.799774);
assertPointAt(nodes.get(118141).getPoint(), 0.274857, 43.47475);
assertPointAt(nodes.get(146918).getPoint(), 0.116148, 43.811386);
}
@Test
public void testMidipArcs() {
// TODO: Check the number of edges.
// TODO: Check information for some edges.
}
}