1 ! Copyright (C) 2009 Daniel Ehrenberg
2 ! See http://factorcode.org/license.txt for BSD license.
3 USING: tools.test math math.bits sequences arrays ;
6 [ t ] [ 0b111111 3 <bits> second ] unit-test
7 [ { t t t } ] [ 0b111111 3 <bits> >array ] unit-test
8 [ f ] [ 0b111101 3 <bits> second ] unit-test
9 [ { f f t } ] [ 0b111100 3 <bits> >array ] unit-test
10 [ 3 ] [ 0b111111 3 <bits> length ] unit-test
11 [ 6 ] [ 0b111111 make-bits length ] unit-test
12 [ 0 ] [ 0 make-bits length ] unit-test
13 [ 2 ] [ 3 make-bits length ] unit-test
14 [ 2 ] [ -3 make-bits length ] unit-test
15 [ 1 ] [ 1 make-bits length ] unit-test
16 [ 1 ] [ -1 make-bits length ] unit-test
20 1067811677921310779 make-bits
21 1067811677921310779 >bignum make-bits
26 1067811677921310779 make-bits last
30 1067811677921310779 >bignum make-bits last
33 [ 6 ] [ 6 make-bits unbits ] unit-test
34 [ 6 ] [ 6 3 <bits> >array unbits ] unit-test