]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/nibble-arrays/nibble-arrays-tests.factor
nibble-arrays: -1 <nibble-array> should throw an error
[factor.git] / basis / nibble-arrays / nibble-arrays-tests.factor
index 363f30678dadefff30c3522fda26915c563ce31d..92a38e509b87e67fbab630d9935ccf6d8659cb1c 100644 (file)
@@ -1,6 +1,8 @@
 USING: nibble-arrays tools.test sequences kernel math ;
 IN: nibble-arrays.tests
 
+[ -1 <nibble-array> ] [ T{ bad-array-length f -1 } = ] must-fail-with
+
 [ t ] [ 16 iota dup >nibble-array sequence= ] unit-test
 [ N{ 4 2 1 3 } ] [ N{ 3 1 2 4 } reverse ] unit-test
 [ N{ 1 4 9 0 9 4 } ] [ N{ 1 2 3 4 5 6 } [ sq ] map ] unit-test