import jalview.datamodel.SequenceI;
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
+import jalview.util.Platform;
import jalview.viewmodel.ViewportRanges;
public class AlignmentPanelTest
assertEquals(w, af.alignPanel.getIdPanel().getWidth());
// different scaling (1.0, 2.0) gives different results
- assertEquals(w, scaling == 1.0 ? 112 : 107);
+ int expectedWidth = scaling == 1.0 ? 112 : Platform.isMac() ? 115 : 107;
+ assertEquals(w, expectedWidth);
/*
* width for offscreen rendering is the same
// allow some leeway for different OS renderings
assertTrue(w > 105 && w < 120);
// different scaling (1.0, 2.0) gives different results
- assertEquals(w, scaling == 1.0 ? 112 : 107);
+ assertEquals(w, expectedWidth);
}
@Test(groups = { "Functional", "Not-bamboo" })
// allow some leeway for different OS renderings
assertTrue(w > 105 && w < 120);
// different scaling (1.0, 2.0) gives different results
- assertEquals(w, scaling == 1.0 ? 112 : 107);
+ int expectedWidth = scaling == 1.0 ? 112 : Platform.isMac() ? 115 : 107;
+ assertEquals(w, expectedWidth);
// manually adjust
af.viewport.setIdWidth(200);
// allow some leeway for different OS renderings
assertTrue(w > 105 && w < 120);
// different scaling (1.0, 2.0) gives different results
- assertEquals(w, scaling == 1.0 ? 112 : 107);
+ assertEquals(w, expectedWidth);
}
@Test(groups = "Functional")
import jalview.io.DataSourceType;
import jalview.io.FileLoader;
import jalview.structure.StructureImportSettings.TFType;
+import jalview.util.Platform;
public class AnnotationLabelsTest2
{
idWidth = av.getIdWidth();
assertTrue(idWidth > idWidth1min,
"idWidth (" + idWidth + ") is not greater than " + idWidth1min);
- assertTrue(idWidth < idWidth1max,
- "idWidth (" + idWidth + ") is not narrower than" + idWidth1max);
+ assertTrue(idWidth < idWidth1max, "idWidth (" + idWidth
+ + ") is not narrower than " + idWidth1max);
// set wrap
if (wrap)
idWidth = av.getIdWidth();
assertTrue(idWidth >= idWidth2min,
"idWidth (" + idWidth + ") is not greater than " + idWidth2min);
- assertTrue(idWidth <= idWidth2max,
- "idWidth (" + idWidth + ") is not narrower than" + idWidth2max);
+ assertTrue(idWidth <= idWidth2max, "idWidth (" + idWidth
+ + ") is not narrower than " + idWidth2max);
}
@Test(
*/
int idWidth2min = scaling == 1.0 ? 114 : 108;
int idWidth2max = scaling == 1.0 ? 114 : 114; // was 130
+ if (Platform.isMac())
+ {
+ idWidth2max = 122;
+ }
return new Object[][] {
//