2008-01-29 16:04:26 -05:00
|
|
|
USING: tools.test bit-vectors vectors sequences kernel math ;
|
2009-08-13 20:21:44 -04:00
|
|
|
IN: bit-vectors.tests
|
2008-01-29 16:04:26 -05:00
|
|
|
|
|
|
|
[ 0 ] [ 123 <bit-vector> length ] unit-test
|
|
|
|
|
2009-03-23 01:34:02 -04:00
|
|
|
: do-it ( seq -- )
|
2010-01-14 10:10:13 -05:00
|
|
|
1234 swap [ [ even? ] dip push ] curry each-integer ;
|
2008-01-29 16:04:26 -05:00
|
|
|
|
|
|
|
[ t ] [
|
|
|
|
3 <bit-vector> dup do-it
|
|
|
|
3 <vector> dup do-it sequence=
|
|
|
|
] unit-test
|
2008-01-30 02:10:58 -05:00
|
|
|
|
|
|
|
[ t ] [ ?V{ } bit-vector? ] unit-test
|