2009-04-30 22:08:29 -04:00
|
|
|
USING: tools.test combinators generic.single sequences kernel ;
|
2009-08-13 20:21:44 -04:00
|
|
|
IN: compiler.tests.call-effect
|
2009-04-30 22:08:29 -04:00
|
|
|
|
|
|
|
: execute-ic-test ( a b -- c ) execute( a -- c ) ;
|
|
|
|
|
|
|
|
! VM type check error
|
2009-04-30 23:56:15 -04:00
|
|
|
[ 1 f execute-ic-test ] [ second 3 = ] must-fail-with
|
|
|
|
|
|
|
|
: call-test ( q -- ) call( -- ) ;
|
|
|
|
|
|
|
|
[ ] [ [ ] call-test ] unit-test
|
|
|
|
[ ] [ f [ drop ] curry call-test ] unit-test
|
|
|
|
[ ] [ [ ] [ ] compose call-test ] unit-test
|
2009-08-13 20:21:44 -04:00
|
|
|
[ [ 1 2 3 ] call-test ] [ wrong-values? ] must-fail-with
|