From f5adf198adaded8b8db359f592266c5984f24d4f Mon Sep 17 00:00:00 2001 From: kiramt Date: Mon, 15 Jan 2018 09:38:00 +0000 Subject: [PATCH] JAL-2759 Update to getHiddenBoundaryRight + unit test after review --- src/jalview/datamodel/HiddenColumns.java | 2 ++ test/jalview/datamodel/HiddenColumnsTest.java | 3 +++ 2 files changed, 5 insertions(+) diff --git a/src/jalview/datamodel/HiddenColumns.java b/src/jalview/datamodel/HiddenColumns.java index 3b1a574..6a2ca1d 100644 --- a/src/jalview/datamodel/HiddenColumns.java +++ b/src/jalview/datamodel/HiddenColumns.java @@ -868,6 +868,8 @@ public class HiddenColumns * @param alPos * the absolute (visible) alignmentPosition to find the next hidden * column for + * @return the index of the next hidden column, or alPos if there is no next + * hidden column */ public int getHiddenBoundaryRight(int alPos) { diff --git a/test/jalview/datamodel/HiddenColumnsTest.java b/test/jalview/datamodel/HiddenColumnsTest.java index 5d57ed2..b4bab22 100644 --- a/test/jalview/datamodel/HiddenColumnsTest.java +++ b/test/jalview/datamodel/HiddenColumnsTest.java @@ -1060,6 +1060,9 @@ public class HiddenColumnsTest h.hideColumns(15, 20); assertEquals(15, h.getHiddenBoundaryRight(7)); assertEquals(15, h.getHiddenBoundaryRight(14)); + + // returns same value if there is no next hidden column + assertEquals(22, h.getHiddenBoundaryRight(22)); } @Test(groups = "Functional") -- 1.7.10.2