[ascii] Test graphics backend, first unit test
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
package asciilib.backends.test;
|
||||
|
||||
import asciilib.GraphicsBackend;
|
||||
import asciilib.Graphics;
|
||||
|
||||
@:build(kiss.Kiss.build())
|
||||
class TestGraphicsBackend implements GraphicsBackend {}
|
@@ -0,0 +1,12 @@
|
||||
(defprop &mut :Int letterWidth 0)
|
||||
(defprop &mut :Int letterHeight 0)
|
||||
(defprop &mut :Int drawCalled 0)
|
||||
|
||||
(defmethod new [] 0)
|
||||
|
||||
(defmethod :Void initialize [:String title :Int width :Int height :Int _letterWidth :Int _letterHeight]
|
||||
(set letterWidth _letterWidth)
|
||||
(set letterHeight _letterHeight))
|
||||
|
||||
(defmethod :Void draw [:Graphics graphics]
|
||||
(+= drawCalled 1))
|
Reference in New Issue
Block a user