factor/core/byte-arrays/byte-arrays-tests.factor

13 lines
335 B
Factor
Raw Normal View History

2008-03-01 17:00:45 -05:00
IN: byte-arrays.tests
2008-12-09 22:07:28 -05:00
USING: tools.test byte-arrays sequences kernel ;
2008-01-29 16:04:26 -05:00
2008-12-09 22:07:28 -05:00
[ 6 B{ 1 2 3 } ] [
6 B{ 1 2 3 } resize-byte-array
[ length ] [ 3 head ] bi
] unit-test
2008-01-29 16:04:26 -05:00
[ B{ 1 2 } ] [ 2 B{ 1 2 3 4 5 6 7 8 9 } resize-byte-array ] unit-test
[ -10 B{ } resize-byte-array ] must-fail
[ B{ 123 } ] [ 123 1byte-array ] unit-test