Browse Source

Clean tests.

Mikael Capelle 6 years ago
parent
commit
b8d73963a6

src/main/org/insa/algo/datastructures/BinaryHeap.java → src/main/org/insa/algo/utils/BinaryHeap.java View File

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

src/test/org/insa/utility/BinaryHeapTest.java → src/test/org/insa/algo/utils/BinaryHeapTest.java View File

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

+ 0
- 52
src/test/org/insa/graph/io/BinaryGraphReaderTest.java View File

@@ -1,52 +0,0 @@
1
-package org.insa.graph.io;
2
-
3
-import static org.junit.Assert.assertEquals;
4
-
5
-import java.io.IOException;
6
-import java.util.List;
7
-
8
-import org.insa.graph.Graph;
9
-import org.insa.graph.Node;
10
-import org.insa.graph.Point;
11
-import org.junit.BeforeClass;
12
-import org.junit.Test;
13
-
14
-public class BinaryGraphReaderTest {
15
-
16
-    // Epsilon for latitude and longitude.
17
-    private static final double EPS = 1e-5;
18
-
19
-    private static Graph midip;
20
-
21
-    @BeforeClass
22
-    public static void initAll() throws IOException {
23
-        // TODO
24
-    }
25
-
26
-    public void assertPointAt(Point p1, double longitude, double latitude) {
27
-        assertEquals(p1.getLongitude(), longitude, EPS);
28
-        assertEquals(p1.getLatitude(), latitude, EPS);
29
-    }
30
-
31
-    @Test
32
-    public void testMidipNodes() {
33
-        List<Node> nodes = midip.getNodes();
34
-
35
-        assertEquals(nodes.size(), 150827);
36
-
37
-        // Check the locations of some nodes.
38
-        assertPointAt(nodes.get(58411).getPoint(), 1.799864, 43.92864);
39
-        assertPointAt(nodes.get(133312).getPoint(), 0.539752, 43.317505);
40
-        assertPointAt(nodes.get(113688).getPoint(), 1.682739, 44.799774);
41
-        assertPointAt(nodes.get(118141).getPoint(), 0.274857, 43.47475);
42
-        assertPointAt(nodes.get(146918).getPoint(), 0.116148, 43.811386);
43
-
44
-    }
45
-
46
-    @Test
47
-    public void testMidipArcs() {
48
-        // TODO: Check the number of edges.
49
-        // TODO: Check information for some edges.
50
-    }
51
-
52
-}

Loading…
Cancel
Save