]> gitweb.factorcode.org Git - factor.git/blob - core/byte-arrays/byte-arrays-tests.factor
1c3e4d3bdfdc4ca3755f0b1402e66e04a0e19cd4
[factor.git] / core / byte-arrays / byte-arrays-tests.factor
1 IN: byte-arrays.tests\r
2 USING: tools.test byte-arrays sequences kernel ;\r
3 \r
4 [ 6 B{ 1 2 3 } ] [\r
5     6 B{ 1 2 3 } resize-byte-array\r
6     [ length ] [ 3 head ] bi\r
7 ] unit-test\r
8 \r
9 [ B{ 1 2 } ] [ 2 B{ 1 2 3 4 5 6 7 8 9 } resize-byte-array ] unit-test\r
10 \r
11 [ -10 B{ } resize-byte-array ] must-fail\r
12 \r
13 [ B{ 123 } ] [ 123 1byte-array ] unit-test