Add a new deploy test to test callbacks

db4
Slava Pestov 2008-12-12 19:48:51 -06:00
parent 8433a9954a
commit 2182bd6422
4 changed files with 40 additions and 9 deletions

View File

@ -107,3 +107,8 @@ M: quit-responder call-responder*
"tools.deploy.test.8" shake-and-bake
run-temp-image
] unit-test
[ ] [
"tools.deploy.test.9" shake-and-bake
run-temp-image
] unit-test

View File

@ -1,14 +1,15 @@
USING: tools.deploy.config ;
H{
{ deploy-threads? t }
{ deploy-c-types? f }
{ deploy-ui? f }
{ deploy-word-props? f }
{ deploy-word-defs? f }
{ deploy-math? t }
{ deploy-io 3 }
{ deploy-unicode? f }
{ deploy-name "tools.deploy.test.3" }
{ deploy-compiler? t }
{ deploy-reflection 1 }
{ deploy-ui? f }
{ "stop-after-last-window?" t }
{ deploy-word-defs? f }
{ deploy-reflection 2 }
{ deploy-compiler? t }
{ deploy-threads? t }
{ deploy-io 3 }
{ deploy-math? t }
{ deploy-word-props? f }
{ deploy-c-types? f }
}

View File

@ -0,0 +1,10 @@
USING: alien kernel math ;
IN: tools.deploy.test.9
: callback-test ( -- callback )
"int" { "int" } "cdecl" [ 1 + ] alien-callback ;
: indirect-test ( -- )
10 callback-test "int" { "int" } "cdecl" alien-indirect 11 assert= ;
MAIN: indirect-test

View File

@ -0,0 +1,15 @@
USING: tools.deploy.config ;
H{
{ deploy-unicode? f }
{ deploy-name "tools.deploy.test.9" }
{ deploy-ui? f }
{ "stop-after-last-window?" t }
{ deploy-word-defs? f }
{ deploy-reflection 1 }
{ deploy-compiler? t }
{ deploy-threads? f }
{ deploy-io 1 }
{ deploy-math? t }
{ deploy-word-props? f }
{ deploy-c-types? f }
}