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 ;
9 ! Just ensure that various CFGs build correctly.
18 [ fixnum< [ 1 ] [ 2 ] if ]
19 [ float+ [ 2.0 float* ] [ 3.0 float* ] bi float/f ]
20 [ { [ 1 ] [ 2 ] [ 3 ] } dispatch ]
23 [ [ 2 ] [ 3 throw ] if 4 ]
24 [ "int" f "malloc" { "int" } alien-invoke ]
25 [ "int" { "int" } "cdecl" alien-indirect ]
26 [ "int" { "int" } "cdecl" [ ] alien-callback ]
28 '[ _ test-cfg drop ] [ ] swap unit-test
31 : test-1 ( -- ) test-1 ;
32 : test-2 ( -- ) 3 . test-2 ;
33 : test-3 ( a -- b ) dup [ test-3 ] when ;
40 '[ _ test-cfg drop ] [ ] swap unit-test