diff --git a/tests/automation.js b/tests/automation.js index b94b9717..653bf3fc 100644 --- a/tests/automation.js +++ b/tests/automation.js @@ -65,6 +65,7 @@ var gfxTests = [ { name: "gfx/LauncherTest", maxDifferent: 0 }, { name: "gfx/MediaImageTest", maxDifferent: 0 }, { name: "gfx/TextEditorGfxTest", maxDifferent: 953 }, + { name: "gfx/DrawStringWithCopyrightAndRegisteredSymbols", maxDifferent: 0 }, ]; var expectedUnitTestResults = [ diff --git a/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.java b/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.java new file mode 100644 index 00000000..c7e51f71 --- /dev/null +++ b/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.java @@ -0,0 +1,39 @@ +package gfx; + +import javax.microedition.lcdui.*; +import javax.microedition.midlet.*; + +import gnu.testlet.TestUtils; + +public class DrawStringWithCopyrightAndRegisteredSymbols extends MIDlet { + private Display display; + + class TestCanvas extends Canvas { + protected void paint(Graphics g) { + g.setColor(0x00FFFFFF); + g.fillRect(0, 0, getWidth(), getHeight()); + g.setColor(0); + g.setStrokeStyle(Graphics.SOLID); + String str = TestUtils.getEmojiString("a9") + TestUtils.getEmojiString("ae"); + g.drawString(str, 0, 0, Graphics.TOP | Graphics.LEFT); + System.out.println("PAINTED"); + } + } + + public DrawStringWithCopyrightAndRegisteredSymbols() { + display = Display.getDisplay(this); + } + + public void startApp() { + TestCanvas test = new TestCanvas(); + test.setFullScreenMode(true); + display.setCurrent(test); + } + + public void pauseApp() { + } + + public void destroyApp(boolean unconditional) { + } +} + diff --git a/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.png b/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.png new file mode 100644 index 00000000..253b91cb Binary files /dev/null and b/tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.png differ