factor/core/growable/growable-tests.factor

26 lines
524 B
Factor
Raw Normal View History

USING: classes kernel layouts math sequences tools.test ;
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
[
2007-09-20 18:09:08 -04:00
10 V{ } [ set-length ] keep
0.5 swap set-length
] must-fail