package jalview.util;
-import static org.testng.Assert.assertEquals;
-import static org.testng.Assert.assertNull;
-
import jalview.datamodel.HMMNode;
import jalview.datamodel.HiddenMarkovModel;
import jalview.datamodel.Sequence;
import jalview.datamodel.SequenceI;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertNull;
+
import java.io.BufferedReader;
import java.io.FileReader;
import java.io.IOException;
{
analyser.readBinned("test/jalview/util/");
Map<String, Double> map = analyser.binned;
- assertEquals(map.get("1.8"), 4.53);
- assertEquals(map.get("3.4"), 2.65);
- assertEquals(map.get("6.4"), 10.8);
- assertEquals(map.get("0"), 5.4);
+ assertEquals((double) map.get("1.8"), 4.53);
+ assertEquals((double) map.get("3.4"), 2.65);
+ assertEquals((double) map.get("6.4"), 10.8);
+ assertEquals((double) map.get("0"), 5.4);
}
@Test
analyser.readRaw("test/jalview/util/");
List<ArrayList<Double>> list = analyser.raw;
- assertEquals(list.get(0).get(0), 1.43);
+ assertEquals((double) list.get(0).get(0), 1.43);
assertNull(list.get(0).get(2));
- assertEquals(list.get(1).get(1), 1.2);
- assertEquals(list.get(2).get(0), 5.6);
- assertEquals(list.get(2).get(2), 6.8);
+ assertEquals((double) list.get(1).get(1), 1.2);
+ assertEquals((double) list.get(2).get(0), 5.6);
+ assertEquals((double) list.get(2).get(2), 6.8);
}
analyser.processData(6);
Map<String, Double> map = analyser.binned;
List<ArrayList<Double>> list = analyser.raw;
- assertEquals(map.get("1.8"), 4.863, 0.001d);
- assertEquals(map.get("3.4"), 2.65);
- assertEquals(map.get("0"), 5.4);
- assertEquals(map.get("6.4"), 10.8);
- assertEquals(map.get("1.4"), 0.166667, 0.00001d);
- assertEquals(map.get("4.4"), 0.5);
+ assertEquals((double) map.get("1.8"), 4.863d, 0.001d);
+ assertEquals((double) map.get("3.4"), 2.65);
+ assertEquals((double) map.get("0"), 5.4);
+ assertEquals((double) map.get("6.4"), 10.8);
+ assertEquals((double) map.get("1.4"), 0.166667, 0.00001d);
+ assertEquals((double) map.get("4.4"), 0.5);
}
}