JAL-3082 one more test condition
[jalview.git] / 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));
   }
 }