From: gmungoc Date: Thu, 16 Aug 2018 09:00:07 +0000 (+0100) Subject: JAL-3082 one more test condition X-Git-Tag: Release_2_11_0~17^2~76^2 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=d8720fc191cba996c440171ef8e07462ef9f7035;p=jalview.git JAL-3082 one more test condition --- diff --git a/test/jalview/datamodel/ColumnSelectionTest.java b/test/jalview/datamodel/ColumnSelectionTest.java index c594dda..2dda4d3 100644 --- a/test/jalview/datamodel/ColumnSelectionTest.java +++ b/test/jalview/datamodel/ColumnSelectionTest.java @@ -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)); } }