factor/core/growable/growable-tests.factor

27 lines
537 B
Factor
Raw Normal View History

2007-09-20 18:09:08 -04:00
USING: math sequences classes growable tools.test kernel
layouts ;
2008-03-01 17:00:45 -05:00
IN: growable.tests
2007-09-20 18:09:08 -04:00
! erg found this one
[ fixnum ] [
2 >bignum V{ } [ set-length ] keep length class-of
2007-09-20 18:09:08 -04:00
] unit-test
! overflow bugs
[ "hi" most-positive-fixnum 2 * 2 + V{ } clone set-nth ]
must-fail
2007-09-20 18:09:08 -04:00
[ most-positive-fixnum 2 * 2 + { 1 } clone nth ]
must-fail
2007-09-20 18:09:08 -04:00
[ most-positive-fixnum 2 * 2 + V{ } clone lengthen ]
must-fail
2007-09-20 18:09:08 -04:00
[ most-positive-fixnum 2 * 2 + V{ } clone set-length ]
must-fail
2007-09-20 18:09:08 -04:00
[ ] [
10 V{ } [ set-length ] keep
0.5 swap set-length
2007-09-20 18:09:08 -04:00
] unit-test