зеркало из https://github.com/mozilla/pluotsorbet.git
Add DrawSubstring test
This commit is contained in:
Родитель
9b972134ca
Коммит
ce6ae23d60
|
@ -37,6 +37,7 @@ var gfxTests = [
|
|||
{ name: "gfx/ClippingTest", maxDifferent: 0 },
|
||||
{ name: "gfx/ImageProcessingTest", maxDifferent: 6184 },
|
||||
{ name: "gfx/CreateImageWithRegionTest", maxDifferent: 0 },
|
||||
{ name: "gfx/DrawSubstringTest", maxDifferent: 0 },
|
||||
];
|
||||
|
||||
casper.test.begin("unit tests", 7 + gfxTests.length, function(test) {
|
||||
|
|
|
@ -0,0 +1,36 @@
|
|||
package gfx;
|
||||
|
||||
import javax.microedition.lcdui.*;
|
||||
import javax.microedition.midlet.*;
|
||||
|
||||
public class DrawSubstringTest extends MIDlet {
|
||||
private Command quitCommand;
|
||||
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);
|
||||
g.drawSubstring("Faber est suae quisque fortunae", 23, 7, 0, 0, Graphics.TOP | Graphics.LEFT);
|
||||
System.out.println("PAINTED");
|
||||
}
|
||||
}
|
||||
|
||||
public DrawSubstringTest() {
|
||||
display = Display.getDisplay(this);
|
||||
}
|
||||
|
||||
public void startApp() {
|
||||
TestCanvas test = new TestCanvas();
|
||||
display.setCurrent(test);
|
||||
}
|
||||
|
||||
public void pauseApp() {
|
||||
}
|
||||
|
||||
public void destroyApp(boolean unconditional) {
|
||||
}
|
||||
}
|
||||
|
Двоичный файл не отображается.
После Ширина: | Высота: | Размер: 4.5 KiB |
Загрузка…
Ссылка в новой задаче