JAL-3082 one more test condition bug/JAL-3082selectRegex
authorgmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Aug 2018 09:00:07 +0000 (10:00 +0100)
committergmungoc <g.m.carstairs@dundee.ac.uk>
Thu, 16 Aug 2018 09:00:07 +0000 (10:00 +0100)
test/jalview/datamodel/ColumnSelectionTest.java

index c594dda..2dda4d3 100644 (file)
@@ -713,5 +713,17 @@ public class ColumnSelectionTest
     assertEquals(2, added);
     assertTrue(cs.contains(1));
     assertTrue(cs.contains(4));
+
+    /*
+     * select < 1f or Helix; one annotation matches both
+     * return value should only count it once
+     */
+    filter.setThresholdType(ThresholdType.BELOW_THRESHOLD);
+    filter.setThresholdValue(1f);
+    added = cs
+            .filterAnnotations(new Annotation[]
+            { null, helix, sheet, turn, ann4 }, filter);
+    assertEquals(1, added);
+    assertTrue(cs.contains(1));
   }
 }