]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/serialize/serialize-tests.factor
Slices over specialized arrays can now be passed to C functions, written to binary...
[factor.git] / basis / serialize / serialize-tests.factor
index 036356e137975eeeec2fa147007450d2cacb2659..9213a54004973c236d4b88fbd357d0dcab46576d 100644 (file)
@@ -4,7 +4,8 @@
 USING: tools.test kernel serialize io io.streams.byte-array
 alien arrays byte-arrays bit-arrays specialized-arrays
 sequences math prettyprint parser classes math.constants
-io.encodings.binary random assocs serialize.private alien.c-types ;
+io.encodings.binary random assocs serialize.private alien.c-types
+combinators.short-circuit ;
 SPECIALIZED-ARRAY: double
 IN: serialize.tests
 
@@ -16,11 +17,12 @@ IN: serialize.tests
 [ t ] [
     100 [
         drop
-        40 [        test-serialize-cell ] all-integers?
-         4 [ 40 *   test-serialize-cell ] all-integers?
-         4 [ 400 *  test-serialize-cell ] all-integers?
-         4 [ 4000 * test-serialize-cell ] all-integers?
-        and and and
+        {
+            [ 40 [        test-serialize-cell ] all-integers? ]
+            [  4 [ 40 *   test-serialize-cell ] all-integers? ]
+            [  4 [ 400 *  test-serialize-cell ] all-integers? ]
+            [  4 [ 4000 * test-serialize-cell ] all-integers? ]
+        } 0&&
     ] all-integers?
 ] unit-test