1 USING: alien alien.syntax eval math tools.test ;
2 QUALIFIED: alien.c-types
3 IN: compiler.tests.redefine24
5 TYPEDEF: alien.c-types:int type-1
7 TYPEDEF: alien.c-types:int type-3
10 type-3 { type-1 type-1 } cdecl [ + >integer ] alien-callback ;
12 TYPEDEF: alien.c-types:float type-2
14 : indirect ( x y ptr -- z )
15 type-3 { type-2 type-2 } cdecl alien-indirect ;
18 "USING: alien.c-types alien.syntax ;
19 IN: compiler.tests.redefine24 TYPEDEF: int type-2" eval( -- )
22 { 3 } [ 1 2 callback indirect ] unit-test
25 "USING: alien.c-types alien.syntax ;
26 IN: compiler.tests.redefine24
28 TYPEDEF: float type-2" eval( -- )
31 { 3 } [ 1.0 2.0 callback indirect ] unit-test
34 "USING: alien.c-types alien.syntax ;
35 IN: compiler.tests.redefine24
36 TYPEDEF: float type-3" eval( -- )
39 { 3.0 } [ 1.0 2.0 callback indirect ] unit-test