factor/basis/compiler/tests/tuples.factor

17 lines
342 B
Factor
Raw Normal View History

USING: kernel tools.test compiler.units compiler.test ;
IN: compiler.tests.tuples
2007-09-20 18:09:08 -04:00
TUPLE: color red green blue ;
[ T{ color f 1 2 3 } ]
[ 1 2 3 [ color boa ] compile-call ] unit-test
2007-09-20 18:09:08 -04:00
[ T{ color f f f f } ]
[ [ color new ] compile-call ] unit-test
SYMBOL: foo
[ [ foo new ] compile-call ] must-fail
[ [ foo boa ] compile-call ] must-fail