From 6c03e40dd457a521bc73c6d5d6bd45688f7db3c7 Mon Sep 17 00:00:00 2001 From: BobHanson Date: Sun, 22 Mar 2020 19:31:57 -0500 Subject: [PATCH] JAL-3563 more tests for Bamboo --- src/jalview/viewmodel/ViewportRanges.java | 7 +++++++ test/jalview/gui/SeqCanvasTest.java | 7 +++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/src/jalview/viewmodel/ViewportRanges.java b/src/jalview/viewmodel/ViewportRanges.java index f8decf6..af75b27 100644 --- a/src/jalview/viewmodel/ViewportRanges.java +++ b/src/jalview/viewmodel/ViewportRanges.java @@ -813,4 +813,11 @@ public class ViewportRanges extends ViewportProperties return maxScroll; } + + @Override + public String toString() + { + return "[ViewportRange startRes=" + startRes + " endRes=" + endRes + + " startSeq=" + startSeq + " endSeq=" + endSeq + "]"; + } } diff --git a/test/jalview/gui/SeqCanvasTest.java b/test/jalview/gui/SeqCanvasTest.java index bb3bc05..ce4ff59 100644 --- a/test/jalview/gui/SeqCanvasTest.java +++ b/test/jalview/gui/SeqCanvasTest.java @@ -23,6 +23,7 @@ package jalview.gui; import static org.testng.Assert.assertEquals; import jalview.bin.Cache; +import jalview.bin.Jalview; import jalview.datamodel.AlignmentI; import jalview.io.DataSourceType; import jalview.io.FileLoader; @@ -43,6 +44,7 @@ public class SeqCanvasTest public void setUp() { Cache.initLogger(); + Jalview.setSynchronous(true); } /** @@ -392,11 +394,8 @@ public class SeqCanvasTest testee.calculateWrappedGeometry(canvasWidth, canvasHeight); int repeatingHeight = (int) PA.getValue(testee, "wrappedRepeatHeightPx"); - assertEquals(av.getRanges().getEndSeq(), 3, - "av.getRanges endseq=" + av.getRanges().getEndSeq() + " repht " - + repeatingHeight + " x=" - + (charHeight * (2 + al.getHeight()))); // unchanged + "endSeq should be 3; av.getRanges=" + av.getRanges()); // unchanged assertEquals(repeatingHeight, charHeight * (2 + al.getHeight())); } } -- 1.7.10.2