diff --git a/pom.xml b/pom.xml index 0242da38..bce1d356 100644 --- a/pom.xml +++ b/pom.xml @@ -4,7 +4,7 @@ org.jam-daq Jam - 3.1.1 + 3.1.2 UTF-8 diff --git a/src/test/java/test/data/HistogramTest.java b/src/test/java/test/data/HistogramTest.java index e2ded0f6..fdf51fd7 100644 --- a/src/test/java/test/data/HistogramTest.java +++ b/src/test/java/test/data/HistogramTest.java @@ -2,9 +2,9 @@ import jam.data.*; import jam.data.func.LinearFunction; -import junit.framework.Assert; import org.junit.After; +import org.junit.Assert; import org.junit.Before; import org.junit.Test; @@ -76,7 +76,7 @@ public void testAddCounts() { final double area1before = hist1.getArea(); Assert.assertEquals( "Expected getArea() and getCount() to yield the same result.", - area1before, hist1.getCount()); + area1before, hist1.getCount(), 0.001); hist1.addCounts(hist1.getCounts()); assertAreaDoubled(hist1, area1before); final double area2before = hist2.getArea(); @@ -101,7 +101,7 @@ private void assertAreaDoubled(final AbstractHistogram histogram, final double area1before) { final String should = "should be double before."; Assert.assertEquals(histogram.getName() + should, histogram.getArea(), - 2 * area1before); + 2 * area1before, 0.001); } /** diff --git a/src/test/java/test/sort/SortOfflineTest.java b/src/test/java/test/sort/SortOfflineTest.java index 3c26eeea..59e79219 100644 --- a/src/test/java/test/sort/SortOfflineTest.java +++ b/src/test/java/test/sort/SortOfflineTest.java @@ -36,7 +36,7 @@ public class SortOfflineTest { private static void assertHistogramZeroed(final AbstractHistogram histogram) { assertEquals("Expected '" + histogram.getName() + "' to be zeroed.", - histogram.getArea(), 0.0); + histogram.getArea(), 0.0, 0.001); } private void sortEventFile(final String eventFileName, final int repitition) { @@ -66,7 +66,7 @@ private void assertPostConditionsForYaleCAEN(final HistInt1D neutronE, assertEquals("Events sorted wasn't the same as expected.", expectedEvents, session.getEventsSorted()); assertEquals("Area in histogram wasn't the same as expected.", - (double) expectedEvents, neutronE.getArea()); + (double) expectedEvents, neutronE.getArea(), 0.001); } private HistInt1D setupYaleCAENOfflineSort() { @@ -102,7 +102,7 @@ public void testYaleOfflineSort() { final HistInt1D cathode = setupYaleOfflineSort(); sortEventFile("sampledata/example.evn", 1); assertEquals("Area in histogram wasn't the same as expected.", - 789.0, cathode.getArea()); + 789.0, cathode.getArea(), 0.001); } finally { session.resetOfflineSorting(); } @@ -127,7 +127,7 @@ public void testYaleOfflineSortTwoFiles() { final HistInt1D cathode = setupYaleOfflineSort(); sortEventFile("sampledata/example.evn", 2); assertEquals("Area in histogram wasn't the same as expected.", - 2 * 789.0, cathode.getArea()); + 2 * 789.0, cathode.getArea(), 0.001); } finally { session.resetOfflineSorting(); }