On some JVMs, the problem family dialog has a capital D - change the skips to also skip on Dialog (should hopefully fix gump errors)

git-svn-id: https://svn.apache.org/repos/asf/jakarta/poi/trunk@414848 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2006-06-16 15:21:30 +00:00
parent 51e12de65d
commit 866a84452a
1 changed files with 2 additions and 2 deletions

View File

@ -43,14 +43,14 @@ public class TestEscherGraphics extends TestCase
public void testGetFont() throws Exception public void testGetFont() throws Exception
{ {
Font f = graphics.getFont(); Font f = graphics.getFont();
if (f.toString().indexOf("dialog") == -1) if (f.toString().indexOf("dialog") == -1 && f.toString().indexOf("Dialog") == -1)
assertEquals("java.awt.Font[family=Arial,name=Arial,style=plain,size=10]", f.toString()); assertEquals("java.awt.Font[family=Arial,name=Arial,style=plain,size=10]", f.toString());
} }
public void testGetFontMetrics() throws Exception public void testGetFontMetrics() throws Exception
{ {
Font f = graphics.getFont(); Font f = graphics.getFont();
if (f.toString().indexOf("dialog") != -1) if (f.toString().indexOf("dialog") != -1 || f.toString().indexOf("Dialog") != -1)
return; return;
FontMetrics fontMetrics = graphics.getFontMetrics(graphics.getFont()); FontMetrics fontMetrics = graphics.getFontMetrics(graphics.getFont());
assertEquals(7, fontMetrics.charWidth('X')); assertEquals(7, fontMetrics.charWidth('X'));