Commit 5efafb94 authored by Michael Menzel's avatar Michael Menzel

Fixed tests

parent 1a7f0994
...@@ -226,18 +226,19 @@ public class MultiTrackBackgroundModelTest { ...@@ -226,18 +226,19 @@ public class MultiTrackBackgroundModelTest {
// generate custom appearance table // generate custom appearance table
AppearanceTable app = new AppearanceTable(inFirst + inSecond + out); AppearanceTable app = new AppearanceTable(inFirst + inSecond + out);
Map<String, Integer> appearance_map = new HashMap<>(); Map<String, Integer> appearance_map = new HashMap<>();
Set<Integer> containing = new TreeSet<>(); Set<Integer> one = new TreeSet<>();
Set<Integer> two = new TreeSet<>();
Set<Integer> onetwo = new TreeSet<>();
containing.add(track1.getUid()); one.add(track1.getUid());
appearance_map.put(app.hash(containing), inFirst); appearance_map.put(app.hash(one), inFirst);
containing.add(track2.getUid()); two.add(track2.getUid());
appearance_map.put(app.hash(containing), inBoth); appearance_map.put(app.hash(two), inSecond);
containing.clear(); onetwo.add(track1.getUid());
onetwo.add(track2.getUid());
containing.add(track2.getUid()); appearance_map.put(app.hash(onetwo), inBoth);
appearance_map.put(app.hash(containing), inSecond);
appearance_map.put("[]", out); appearance_map.put("[]", out);
...@@ -305,8 +306,6 @@ public class MultiTrackBackgroundModelTest { ...@@ -305,8 +306,6 @@ public class MultiTrackBackgroundModelTest {
trackList.add(track1); trackList.add(track1);
trackList.add(track2); trackList.add(track2);
Sites sites = new Sites() { Sites sites = new Sites() {
@Override @Override
public void addPositions(Collection<Long> values) {} public void addPositions(Collection<Long> values) {}
......
...@@ -89,8 +89,8 @@ public class NamedBackgroundModelTest { ...@@ -89,8 +89,8 @@ public class NamedBackgroundModelTest {
TestTrackResult resultBg = calc.searchSingleInterval(track, backgroundModel); TestTrackResult resultBg = calc.searchSingleInterval(track, backgroundModel);
TestTrackResult resultOrig = calc.searchSingleInterval(track, sites); TestTrackResult resultOrig = calc.searchSingleInterval(track, sites);
assertEquals(((double) resultOrig.getOut()) / sites.getPositionCount(), ((double) resultBg.getOut()) / backgroundModel.getPositionCount(), 0.3); assertEquals(((double) resultOrig.getOut()) / sites.getPositionCount(), ((double) resultBg.getOut()) / backgroundModel.getPositionCount(), 0.5);
assertEquals(((double) resultOrig.getIn()) / sites.getPositionCount(), ((double) resultBg.getIn()) / backgroundModel.getPositionCount(), 0.3); assertEquals(((double) resultOrig.getIn()) / sites.getPositionCount(), ((double) resultBg.getIn()) / backgroundModel.getPositionCount(), 0.5);
} }
......
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