factor/library/test/compiler/simple.factor

41 lines
637 B
Factor
Raw Normal View History

IN: temporary
2004-10-01 22:02:54 -04:00
USE: compiler
USE: test
USE: math
USE: kernel
USE: words
USE: kernel
USE: math-internals
2005-02-17 19:01:11 -05:00
USE: memory
2004-10-01 22:02:54 -04:00
: no-op ; compiled
[ ] [ no-op ] unit-test
: literals 3 5 ; compiled
: tail-call fixnum+ ; compiled
[ 4 ] [ 1 3 tail-call ] unit-test
[ 3 5 ] [ literals ] unit-test
: literals&tail-call 3 5 fixnum+ ; compiled
[ 8 ] [ literals&tail-call ] unit-test
: two-calls dup fixnum* ; compiled
[ 25 ] [ 5 two-calls ] unit-test
: mix-test 3 5 fixnum+ 6 fixnum* ; compiled
[ 48 ] [ mix-test ] unit-test
: indexed-literal-test "hello world" ; compiled
2005-05-12 01:02:39 -04:00
full-gc
full-gc
2004-10-01 22:02:54 -04:00
[ "hello world" ] [ indexed-literal-test ] unit-test