JAL-2291 fixed broken asserts for SequenceI.getInsertionsAsBits
authorJim Procter <jprocter@issues.jalview.org>
Sun, 4 Jun 2017 11:02:16 +0000 (12:02 +0100)
committerJim Procter <jprocter@issues.jalview.org>
Sun, 4 Jun 2017 11:02:16 +0000 (12:02 +0100)
test/jalview/datamodel/SequenceTest.java

index ae82d13..a52f0a2 100644 (file)
@@ -78,8 +78,13 @@ public class SequenceTest
 
     BitSet gapfield = aseq.getInsertionsAsBits();
     BitSet expectedgaps = new BitSet();
-    expectedgaps.set(2, 4);
-    expectedgaps.set(6, 8);
+    expectedgaps.set(2, 5);
+    expectedgaps.set(6, 9);
+
+    assertEquals(6, expectedgaps.cardinality());
+
+    assertEquals("getInsertionsAsBits didn't mark expected number of gaps",
+            6, gapfield.cardinality());
 
     assertEquals("getInsertionsAsBits not correct.", expectedgaps, gapfield);
   }