2005-08-12 18:02:03 -04:00
|
|
|
IN: scratchpad
|
2006-11-02 18:29:11 -05:00
|
|
|
USING: arrays kernel kernel-internals math memory namespaces
|
|
|
|
sequences test errors math-internals ;
|
2005-08-12 18:02:03 -04:00
|
|
|
|
|
|
|
[ 0 ] [ f size ] unit-test
|
2005-09-18 01:37:28 -04:00
|
|
|
[ t ] [ [ \ = \ = ] all-equal? ] unit-test
|
2005-12-12 20:53:55 -05:00
|
|
|
|
2006-10-29 21:21:48 -05:00
|
|
|
! some primitives are missing GC checks
|
2005-12-12 20:53:55 -05:00
|
|
|
[ ] [ 1000000 [ drop H{ } clone >n n> drop ] each ] unit-test
|
2006-11-08 22:05:06 -05:00
|
|
|
[ ] [ 1.0 10000000 [ 1.0 * ] times drop ] unit-test
|
2006-11-02 18:29:11 -05:00
|
|
|
[ ] [ 268435455 >fixnum 10000000 [ dup dup + drop ] times drop ] unit-test
|
|
|
|
[ ] [ 268435455 >fixnum 10000000 [ dup dup fixnum+ drop ] times drop ] unit-test
|
2006-10-29 21:21:48 -05:00
|
|
|
[ ] [ 10000000 [ drop 1/3 >fixnum drop ] each ] unit-test
|
|
|
|
[ ] [ 10000000 [ drop 1/3 >bignum drop ] each ] unit-test
|
2006-11-08 22:05:06 -05:00
|
|
|
[ ] [ 10000000 [ drop 1/3 >float drop ] each ] unit-test
|
2005-12-14 20:29:32 -05:00
|
|
|
|
2006-11-01 00:25:01 -05:00
|
|
|
! Don't leak extra roots if error is thrown
|
|
|
|
[ ] [ 10000 [ [ -1 f <array> ] catch drop ] times ] unit-test
|
|
|
|
|
2006-01-26 23:01:14 -05:00
|
|
|
[ t ] [ cell integer? ] unit-test
|
|
|
|
[ t ] [ bootstrap-cell integer? ] unit-test
|
2006-08-30 03:50:02 -04:00
|
|
|
|
|
|
|
[ [ 3 ] ] [ 3 f curry ] unit-test
|
|
|
|
[ [ \ + ] ] [ \ + f curry ] unit-test
|
|
|
|
[ [ \ + = ] ] [ \ + [ = ] curry ] unit-test
|
2006-10-06 20:27:40 -04:00
|
|
|
|
|
|
|
! Make sure we report the correct error on stack underflow
|
2006-12-14 02:35:22 -05:00
|
|
|
[ { kernel-error 12 f f } ]
|
2006-10-06 20:27:40 -04:00
|
|
|
[ [ clear drop ] catch ] unit-test
|
2006-11-22 00:19:19 -05:00
|
|
|
|
|
|
|
[ -7 <byte-array> ] unit-test-fails
|