factor/library/test/crashes.factor

59 lines
1.3 KiB
Factor
Raw Normal View History

2004-08-10 00:58:52 -04:00
IN: scratchpad
USE: errors
2004-08-10 00:58:52 -04:00
USE: kernel
2004-08-27 02:09:24 -04:00
USE: math
2004-08-10 00:58:52 -04:00
USE: namespaces
USE: parser
USE: strings
USE: test
2004-08-27 02:09:24 -04:00
USE: vectors
2004-09-20 21:02:48 -04:00
USE: lists
2004-08-10 00:58:52 -04:00
! Various things that broke CFactor at various times.
2004-08-10 00:58:52 -04:00
! This should run without issue (and tests nothing useful)
! in Java Factor
"20 <sbuf> \"foo\" set" eval
"garbage-collection" eval
[
[ 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
[ "x" get vector-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- lotype
[ ] [ [ f car ] [ 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
[ [ cdr cons ] word-plist ] unit-test-fails