JAL-345 JAL-1738 strengthen test for cardinalty count/range selects
authorJim Procter <jprocter@issues.jalview.org>
Tue, 1 Nov 2016 17:21:49 +0000 (17:21 +0000)
committerJim Procter <jprocter@issues.jalview.org>
Tue, 1 Nov 2016 17:21:49 +0000 (17:21 +0000)
test/jalview/datamodel/SearchResultsTest.java

index b861f99..a08c577 100644 (file)
@@ -260,8 +260,11 @@ public class SearchResultsTest
     s2g.setStartRes(1);
     s2g.setEndRes(1);
     sallg.setEndRes(0);
-    BitSet tbs;
-    assertEquals(1, sr.markColumns(s2g, tbs = new BitSet()));
-    assertEquals(1, sr.markColumns(sallg, tbs = new BitSet()));
+    BitSet tbs = new BitSet();
+    assertEquals("Group start/end didn't select columns to mark",1, sr.markColumns(s2g, tbs));
+    assertEquals("Group start/end didn't select columns to mark", 1, sr.markColumns(sallg, tbs));
+    assertEquals(
+            "Didn't set expected number of columns in total for two successive marks",
+            2, tbs.cardinality());
   }
 }