From 80fbfc0050c934ccdab11ccbd5f87d517ff4c04a Mon Sep 17 00:00:00 2001 From: kiramt Date: Thu, 16 Mar 2017 12:13:05 +0000 Subject: [PATCH] JAL-2388 Unit test update --- test/jalview/viewmodel/OverviewDimensionsTest.java | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) 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); } -- 1.7.10.2