From 85090f402a57b99774606fc55018373517dc9ae4 Mon Sep 17 00:00:00 2001 From: Marco Castelluccio Date: Thu, 22 Jan 2015 00:30:08 +0100 Subject: [PATCH] Add test with (C) and (R) emoji --- tests/automation.js | 1 + ...ringWithCopyrightAndRegisteredSymbols.java | 39 ++++++++++++++++++ ...tringWithCopyrightAndRegisteredSymbols.png | Bin 0 -> 1646 bytes 3 files changed, 40 insertions(+) create mode 100644 tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.java create mode 100644 tests/gfx/DrawStringWithCopyrightAndRegisteredSymbols.png 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 0000000000000000000000000000000000000000..253b91cb7b6ece230d09e97da2df40664faf3ee9 GIT binary patch literal 1646 zcmeAS@N?(olHy`uVBq!ia0vp^9~c-I9XQy4tfm(qgBcjuOg&v3Ln`LHy>&2aO1Q-F zhmprp9v^G<3MhGfsCW7TZu2Jb0Hc#0*1;1_=5~lra1~dZERw0j(kO*LwQrV{_NV?y<%cwt8V68`}3z} zYt-7P`1ti7D`Mhn=Vot>x|(CQ8Ypw<(4mWWrXTiaoipdyyY|1YO02f-+7-pl&TcBf z^Xlp8>07sN4`01{_0^XpSvGRlD{Sm$Rsa5$`}WP7EAQUr$;!xttiQh6Z+YUBHJyESSH;Jqx%Tz@^6u;iJp6D&SXkJq`|rc|-(MfMKD_zh zf^{)FgEnv8T>A3T(p|N`%XrzEUwy6G`th^>^1X6DmYImv?TBA|afO^sMS!uf@zwX= zUw?gl{p*{Xo2B}Xn@aU&6&7w36Bo}mk-B>AT9~iD|MgFwifn6tZCSQ#SypoLVz$n|xxt9O^b zzxMCnK3$VJO~*dnZ;yC?fB*XG@9(a@d6N^nqhR5>`2BIWZ{NQ9`fHzT(%#C?%htv1 zjna?Xv*PU8v%6}37TMPSyQ3%u)C-KNtnIhmuX_MPb=&ssuOA=p-@0vE*xRz-FQi_+ zzEfba=KOs7>kl6$f?{g1d;hAtdAr@3gs=U0?%Wr)I`s4B&;MU49^Zeqc4oy1M)j42 sx8xcA)HAgujH1yH7!85J83Of8$BGZVt7MMR1=b@Bp00i_>zopr0PvQfV*mgE literal 0 HcmV?d00001