From: BobHanson Date: Mon, 23 Mar 2020 00:31:57 +0000 (-0500) Subject: JAL-3563 more tests for Bamboo X-Git-Url: http://source.jalview.org/gitweb/?a=commitdiff_plain;h=6c03e40dd457a521bc73c6d5d6bd45688f7db3c7;p=jalview.git JAL-3563 more tests for Bamboo --- 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())); } }