1 IN: compiler.cfg.builder.tests
2 USING: tools.test kernel sequences
3 words sequences.private fry prettyprint alien
4 math.private compiler.tree.builder compiler.tree.optimizer
5 compiler.cfg.builder compiler.cfg.debugger ;
7 ! Just ensure that various CFGs build correctly.
16 [ fixnum< [ 1 ] [ 2 ] if ]
17 [ float+ [ 2.0 float* ] [ 3.0 float* ] bi float/f ]
18 [ { [ 1 ] [ 2 ] [ 3 ] } dispatch ]
21 [ [ 2 ] [ 3 throw ] if 4 ]
22 [ "int" f "malloc" { "int" } alien-invoke ]
23 [ "int" { "int" } "cdecl" alien-indirect ]
24 [ "int" { "int" } "cdecl" [ ] alien-callback ]
26 '[ _ test-cfg drop ] [ ] swap unit-test
29 : test-1 ( -- ) test-1 ;
30 : test-2 ( -- ) 3 . test-2 ;
31 : test-3 ( a -- b ) dup [ test-3 ] when ;
38 '[ _ test-cfg drop ] [ ] swap unit-test