]> gitweb.factorcode.org Git - factor.git/commitdiff
Add deploy test to ensure game-input works
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 11 May 2009 22:04:14 +0000 (17:04 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Mon, 11 May 2009 22:04:14 +0000 (17:04 -0500)
basis/tools/deploy/deploy-tests.factor
basis/tools/deploy/test/8/8.factor [new file with mode: 0644]
basis/tools/deploy/test/8/deploy.factor [new file with mode: 0644]

index 842faba6402af1345b35e5d560d1a947a745d01e..9cf21d1716b1e9a4084c36c0c6a4402362d1d05f 100644 (file)
@@ -97,4 +97,8 @@ M: quit-responder call-responder*
         shake-and-bake\r
         run-temp-image\r
     ] curry unit-test\r
-] each
\ No newline at end of file
+] each\r
+\r
+os windows? os macosx? or [\r
+    [ ] [ "tools.deploy.test.8" shake-and-bake run-temp-image ] unit-test\r
+] when
\ No newline at end of file
diff --git a/basis/tools/deploy/test/8/8.factor b/basis/tools/deploy/test/8/8.factor
new file mode 100644 (file)
index 0000000..ddf08d3
--- /dev/null
@@ -0,0 +1,21 @@
+USING: calendar game-input threads ui ui.gadgets.worlds kernel
+method-chains system ;
+IN: tools.deploy.test.8
+
+TUPLE: my-world < world ;
+
+BEFORE: my-world begin-world drop open-game-input ;
+
+AFTER: my-world end-world drop close-game-input ;
+
+: test-game-input ( -- )
+    [
+        f T{ world-attributes
+             { world-class my-world }
+             { title "Test" }
+        } open-window
+        1 seconds sleep
+        0 exit
+    ] with-ui ;
+
+MAIN: test-game-input
\ No newline at end of file
diff --git a/basis/tools/deploy/test/8/deploy.factor b/basis/tools/deploy/test/8/deploy.factor
new file mode 100644 (file)
index 0000000..1f7fb4d
--- /dev/null
@@ -0,0 +1,14 @@
+USING: tools.deploy.config ;
+H{
+    { deploy-c-types? f }
+    { deploy-unicode? f }
+    { deploy-word-defs? f }
+    { deploy-name "tools.deploy.test.8" }
+    { "stop-after-last-window?" t }
+    { deploy-reflection 1 }
+    { deploy-ui? t }
+    { deploy-math? t }
+    { deploy-io 2 }
+    { deploy-word-props? f }
+    { deploy-threads? t }
+}