From 8db501749d47964b436bc63cafb80a17bfd42396 Mon Sep 17 00:00:00 2001 From: Piotr Szarmanski Date: Sun, 25 Sep 2022 19:54:42 +0200 Subject: Add parallel decoder. --- tests/decode-tests.lisp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'tests/decode-tests.lisp') diff --git a/tests/decode-tests.lisp b/tests/decode-tests.lisp index af3edb0..ab9b56a 100644 --- a/tests/decode-tests.lisp +++ b/tests/decode-tests.lisp @@ -33,9 +33,9 @@ (read-capability (eris-encode array ,block-size #'hashtable-encode)) (decoded-array (make-array (length array) :element-type '(unsigned-byte 8))) (stream (eris-decode read-capability #'hashtable-decode))) - (stream-read-sequence stream decoded-array) + (stream-read-sequence stream decoded-array 0 (length decoded-array)) (is (equalp decoded-array array)) - (file-position stream 0) + (setf (stream-file-position stream) 0) (is (equalp array (alexandria:read-stream-content-into-byte-vector stream))))) @@ -124,8 +124,8 @@ (read-capability (eris-encode array ,block-size #'hashtable-encode)) (buf (make-array 24 :element-type '(unsigned-byte 8))) (stream (eris-decode read-capability #'hashtable-decode))) - (stream-file-position stream ,pos) - (stream-read-sequence stream buf) + (setf (stream-file-position stream) ,pos) + (stream-read-sequence stream buf 0 (length buf)) ;; (print (pos (buffer stream))) ;; (print (+ 24 ,buffer-pos)) ;; (print (pos stream)) @@ -146,7 +146,7 @@ (read-capability (eris-encode array ,block-size #'hashtable-encode)) (stream (eris-decode read-capability #'hashtable-decode))) (signals ,condition - (stream-file-position stream ,pos)))) + (setf (stream-file-position stream) ,pos)))) (test random-access-eof-1kib (assert-random-access-condition (make-octets 512 :element 1) 1024 512 eof) @@ -189,7 +189,7 @@ (read-capability (eris-encode array ,block-size #'hashtable-encode)) (decoded-array (make-array (length array) :element-type '(unsigned-byte 8))) (stream (eris-decode read-capability #'hashtable-decode))) - (stream-read-sequence stream decoded-array) + (stream-read-sequence stream decoded-array 0 (length decoded-array)) (is (equalp (length array) (eof stream))))) -- cgit v1.2.3