From: kiramt Date: Thu, 16 Mar 2017 12:13:05 +0000 (+0000) Subject: JAL-2388 Unit test update X-Git-Tag: Release_2_10_2~3^2~92^2~35 X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=80fbfc0050c934ccdab11ccbd5f87d517ff4c04a;p=jalview.git JAL-2388 Unit test update --- diff --git a/test/jalview/viewmodel/OverviewDimensionsTest.java b/test/jalview/viewmodel/OverviewDimensionsTest.java index 1ea07ea..a1d9f31 100644 --- a/test/jalview/viewmodel/OverviewDimensionsTest.java +++ b/test/jalview/viewmodel/OverviewDimensionsTest.java @@ -677,13 +677,14 @@ public class OverviewDimensionsTest assertEquals(od.getBoxHeight(), boxHeight); // move viewport to hidden columns - moveViewport(102, 0); + // viewport can't actually extend into hidden cols, + // so move to the far right edge of the viewport + moveViewport(firstHidden - viewWidth, 0); assertEquals(od.getBoxX(), - Math.round((float) 102 * od.getWidth() / alwidth)); + Math.round((float) (firstHidden - viewWidth) + * od.getWidth() / alwidth)); assertEquals(od.getBoxY(), 0); - assertEquals(od.getBoxWidth(), boxWidth - + Math.round((float) (lastHidden - firstHidden + 1) - * od.getWidth() / alwidth)); + assertEquals(od.getBoxWidth(), boxWidth); assertEquals(od.getBoxHeight(), boxHeight); }