JAL-3563 more tests for Bamboo
authorBobHanson <hansonr@stolaf.edu>
Mon, 23 Mar 2020 00:31:57 +0000 (19:31 -0500)
committerBobHanson <hansonr@stolaf.edu>
Mon, 23 Mar 2020 00:31:57 +0000 (19:31 -0500)
src/jalview/viewmodel/ViewportRanges.java
test/jalview/gui/SeqCanvasTest.java

index f8decf6..af75b27 100644 (file)
@@ -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 + "]";
+  }
 }
index bb3bc05..ce4ff59 100644 (file)
@@ -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()));
   }
 }