Commit 32e9a6cf authored by Guilhelm SAVIN's avatar Guilhelm SAVIN

Change JUnit deps to latest version 4.12 and fix some warnings in tests.

parent f636e753
......@@ -294,7 +294,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.3.1</version>
<version>4.12</version>
<optional>false</optional>
</dependency>
<dependency>
......@@ -311,3 +311,4 @@
</dependency>
</dependencies>
</project>
......@@ -197,13 +197,13 @@ public abstract class TestFileSinkBase {
aTemporaryGraphFileName()));
input.addSink(inGraph);
input.readAll(aTemporaryGraphFileName());
testAttributedTriangle();
} catch (IOException e) {
e.printStackTrace();
fail("Should not happen !");
} finally {
//removeFile(aTemporaryGraphFileName());
// removeFile(aTemporaryGraphFileName());
}
}
}
......@@ -360,10 +360,11 @@ public abstract class TestFileSinkBase {
assertNotNull(B);
assertNotNull(C);
assertEquals(1, inGraph.getAttribute("a"));
assertEquals(1.0, ((Number) inGraph.getAttribute("a")).doubleValue(),
1E-12);
assertEquals("foo", inGraph.getAttribute("b"));
assertEquals(1, A.getAttribute("a"));
assertEquals(1.0, ((Number) A.getAttribute("a")).doubleValue(), 1E-12);
assertEquals("foo", B.getAttribute("b"));
assertEquals("bar", C.getAttribute("c"));
}
......
......@@ -300,7 +300,7 @@ public abstract class TestFileSourceBase {
assertTrue(B.hasAttribute("cc"));
assertTrue(C.hasAttribute("aaa"));
assertEquals(1.0, A.getAttribute("a"));
assertEquals(1.0, ((Number) A.getAttribute("a")).doubleValue(), 1E-12);
assertEquals("truc", A.getAttribute("b"));
assertEquals("true", A.getAttribute("c"));
......
......@@ -140,10 +140,10 @@ public class TestRMI {
assertEquals(points.length, 2);
assertEquals(points[0].length, 2);
assertEquals(points[1].length, 2);
assertEquals(points[0][0], 1.0);
assertEquals(points[0][1], 1.0);
assertEquals(points[1][0], 2.0);
assertEquals(points[1][1], 2.0);
assertEquals(1.0, points[0][0], 1E-12);
assertEquals(1.0, points[0][1], 1E-12);
assertEquals(2.0, points[1][0], 1E-12);
assertEquals(2.0, points[1][1], 1E-12);
} catch (ClassCastException e) {
fail();
} catch (NullPointerException e) {
......
......@@ -592,7 +592,7 @@ public class TestNetStream {
}
public void stepBegins(String sourceId, long timeId, double step) {
assertEquals(1.1, step);
assertEquals(1.1, step, 1E-12);
}
});
......@@ -672,6 +672,7 @@ public class TestNetStream {
@Test
public void testNetStreamVarint() {
@SuppressWarnings("unused")
NetStreamReceiver net = null;
try {
net = new NetStreamReceiver("localhost", 2004, false);
......@@ -782,6 +783,8 @@ public class TestNetStream {
assertEquals(1, (bt & 127) + (bt & 128));
}
@SuppressWarnings("unused")
private void outBuffer(ByteBuffer buf) {
System.out.println(buf.toString());
int nbytes = buf.capacity();
......
......@@ -31,7 +31,7 @@
*/
package org.graphstream.stream.test;
import static junit.framework.Assert.assertEquals;
import static org.junit.Assert.assertEquals;
import org.graphstream.graph.implementations.AdjacencyListGraph;
import org.graphstream.stream.AnnotatedSink;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment