tools.deploy: add unit test to ensure Cocoa binding works in deployed apps
parent
a1ae209f81
commit
ed60c89e94
|
@ -101,4 +101,8 @@ M: quit-responder call-responder*
|
|||
|
||||
os windows? os macosx? or [
|
||||
[ ] [ "tools.deploy.test.8" shake-and-bake run-temp-image ] unit-test
|
||||
] when
|
||||
|
||||
os macsx? [
|
||||
[ ] [ "tools.deploy.test.14" shake-and-bake run-temp-image ] unit-test
|
||||
] when
|
|
@ -0,0 +1,26 @@
|
|||
! Copyright (C) 2009 Slava Pestov.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors classes.struct cocoa cocoa.classes
|
||||
cocoa.subclassing core-graphics.types kernel math ;
|
||||
IN: tools.deploy.test.14
|
||||
|
||||
CLASS: {
|
||||
{ +superclass+ "NSObject" }
|
||||
{ +name+ "Foo" }
|
||||
} {
|
||||
"foo:"
|
||||
"float"
|
||||
{ "id" "SEL" "NSRect" }
|
||||
[
|
||||
[ origin>> [ x>> ] [ y>> ] bi + ]
|
||||
[ size>> [ w>> ] [ h>> ] bi + ]
|
||||
bi +
|
||||
]
|
||||
} ;
|
||||
|
||||
: main ( -- )
|
||||
Foo -> alloc -> init
|
||||
S{ CGRect f S{ CGPoint f 1.0 2.0 } S{ CGSize f 3.0 4.0 } } -> foo:
|
||||
10.0 assert= ;
|
||||
|
||||
MAIN: main
|
|
@ -0,0 +1 @@
|
|||
Slava Pestov
|
|
@ -0,0 +1,14 @@
|
|||
USING: tools.deploy.config ;
|
||||
H{
|
||||
{ deploy-math? t }
|
||||
{ deploy-io 2 }
|
||||
{ deploy-c-types? f }
|
||||
{ deploy-reflection 1 }
|
||||
{ deploy-word-defs? f }
|
||||
{ "stop-after-last-window?" t }
|
||||
{ deploy-word-props? f }
|
||||
{ deploy-threads? t }
|
||||
{ deploy-ui? f }
|
||||
{ deploy-unicode? f }
|
||||
{ deploy-name "tools.deploy.test.14" }
|
||||
}
|
Loading…
Reference in New Issue