2 USING: kernel tools.test compiler ;
4 TUPLE: color red green blue ;
7 [ 1 2 3 [ color construct-boa ] compile-1 ] unit-test
10 1 2 3 color construct-boa
11 [ { color-red color-blue } get-slots ] compile-1
14 [ T{ color f 10 2 20 } ] [
16 1 2 3 color construct-boa [
18 { set-color-red set-color-blue } set-slots
23 [ T{ color f f f f } ]
24 [ [ color construct-empty ] compile-1 ] unit-test
26 [ T{ color "a" f "b" f } ] [
28 [ { set-delegate set-color-green } color construct ]
32 [ T{ color f f f f } ] [ [ { } color construct ] compile-1 ] unit-test