2005-03-28 23:45:13 -05:00
|
|
|
IN: temporary
|
2004-08-10 00:58:52 -04:00
|
|
|
|
2004-08-16 23:52:52 -04:00
|
|
|
! Various things that broke CFactor at various times.
|
2005-02-17 16:10:35 -05:00
|
|
|
USING: errors kernel lists math memory namespaces parser
|
|
|
|
prettyprint strings test vectors words ;
|
2004-08-10 00:58:52 -04:00
|
|
|
|
|
|
|
"20 <sbuf> \"foo\" set" eval
|
|
|
|
"garbage-collection" eval
|
2004-08-16 23:52:52 -04:00
|
|
|
|
2004-08-20 21:16:47 -04:00
|
|
|
[
|
|
|
|
[ drop ] [ drop ] catch
|
|
|
|
[ drop ] [ drop ] catch
|
|
|
|
] keep-datastack
|
2004-08-27 02:09:24 -04:00
|
|
|
|
|
|
|
10 <vector> "x" set
|
|
|
|
[ -2 "x" get set-vector-length ] [ drop ] catch
|
2005-01-28 23:55:22 -05:00
|
|
|
[ "x" get clone drop ] [ drop ] catch
|
2004-08-27 02:09:24 -04:00
|
|
|
|
|
|
|
10 [ [ -1000000 <vector> ] [ drop ] catch ] times
|
|
|
|
|
|
|
|
10 [ [ -1000000 <sbuf> ] [ drop ] catch ] times
|
2004-09-20 21:02:48 -04:00
|
|
|
|
|
|
|
! Make sure various type checks don't run into header untagging
|
|
|
|
! problems etc.
|
|
|
|
|
|
|
|
! Lotype -vs- lotype
|
|
|
|
[ ] [ [ 4 car ] [ drop ] catch ] unit-test
|
|
|
|
|
|
|
|
! Lotype -vs- hitype
|
|
|
|
[ ] [ [ 4 vector-length ] [ drop ] catch ] unit-test
|
|
|
|
[ ] [ [ [ 4 3 ] vector-length ] [ drop ] catch ] unit-test
|
|
|
|
|
|
|
|
! Hitype -vs- lotype
|
|
|
|
[ ] [ [ "hello" car ] [ drop ] catch ] unit-test
|
|
|
|
|
|
|
|
! Hitype -vs- hitype
|
|
|
|
[ ] [ [ "hello" vector-length ] [ drop ] catch ] unit-test
|
|
|
|
|
|
|
|
! f -vs- hitype
|
|
|
|
[ ] [ [ f vector-length ] [ drop ] catch ] unit-test
|
2004-11-08 22:36:51 -05:00
|
|
|
|
|
|
|
! See how well callstack overflow is handled
|
|
|
|
: callstack-overflow callstack-overflow f ;
|
|
|
|
[ callstack-overflow ] unit-test-fails
|
2004-12-17 19:27:42 -05:00
|
|
|
|
2005-01-28 23:55:22 -05:00
|
|
|
[ [ cdr cons ] word-props ] unit-test-fails
|
2004-12-23 16:37:16 -05:00
|
|
|
|
|
|
|
! Forgot to tag out of bounds index
|
|
|
|
[ 1 { } vector-nth ] [ garbage-collection drop ] catch
|
|
|
|
[ -1 { } set-vector-length ] [ garbage-collection drop ] catch
|
2005-03-05 16:33:40 -05:00
|
|
|
[ 1 "" string-nth ] [ garbage-collection drop ] catch
|
2005-01-03 02:55:54 -05:00
|
|
|
|
|
|
|
! ... and again
|
2005-03-05 16:33:40 -05:00
|
|
|
[ "" 10 string/ ] [ . ] catch
|
2005-03-17 23:29:08 -05:00
|
|
|
|
|
|
|
! Weird PowerPC bug.
|
|
|
|
[ "4" throw ] [ drop ] catch
|
|
|
|
garbage-collection
|
|
|
|
garbage-collection
|