import java.awt.Font;
import java.awt.FontMetrics;
+import org.testng.Assert;
import org.testng.annotations.BeforeClass;
import org.testng.annotations.Test;
av.setFont(new Font("SansSerif", Font.PLAIN, 14), true);
int charHeight = av.getCharHeight();
int charWidth = av.getCharWidth();
- assertEquals(charHeight, Platform.isMac() ? 17 : 19);
- assertEquals(charWidth, Platform.isMac() ? 12 : 11);
+ Assert.assertTrue(charHeight == 17 && charWidth == 12
+ || charHeight == 19 && charWidth == 11,
+ "char height/width " + charHeight + "/" + charWidth);
+ //
+ // assertEquals(charHeight, Platform.isMac() ? 17 : 19);
+ // assertEquals(charWidth, Platform.isMac() ? 12 : 11);
/*
* first with scales above, left, right
int charHeight = av.getCharHeight();
int charWidth = av.getCharWidth();
- assertEquals(charHeight, Platform.isMac() ? 17 : 19);
- assertEquals(charWidth, Platform.isMac() ? 12 : 11);
+ Assert.assertTrue(
+ charHeight == 17 && charWidth == 12
+ || charHeight == 19 && charWidth == 11,
+ "char height/width " + charHeight + "/" + charWidth);
+ // assertEquals(charHeight, Platform.isMac() ? 17 : 19);
+ // assertEquals(charWidth, Platform.isMac() ? 12 : 11);
SeqCanvas testee = af.alignPanel.getSeqPanel().seqCanvas;
av.setFont(new Font("SansSerif", Font.PLAIN, 14), true);
int charHeight = av.getCharHeight();
int charWidth = av.getCharWidth();
- // Windows h=19, w=11.
- assertEquals(charHeight, Platform.isMac() ? 17 : 19);
- assertEquals(charWidth, Platform.isMac() ? 12 : 11);
-
+ // Windows h=19, w=11; Mac (and Linux?) 17,11
+ Assert.assertTrue(charHeight == 17 && charWidth == 12
+ || charHeight == 19 && charWidth == 11,
+ "char height/width " + charHeight + "/" + charWidth);
int canvasWidth = 400;
int canvasHeight = 300;
testee.calculateWrappedGeometry(canvasWidth, canvasHeight);