summaryrefslogtreecommitdiff
path: root/tests/decode-tests.lisp
diff options
context:
space:
mode:
authorPiotr Szarmanski2022-09-25 19:54:42 +0200
committerPiotr Szarmanski2022-09-25 19:54:42 +0200
commit8db501749d47964b436bc63cafb80a17bfd42396 (patch)
treed6982ac6eff1aeed514f7c11ee5df46a1930805d /tests/decode-tests.lisp
parent67d00dc4ce131d5cc46f4041dbf40391697e281d (diff)
Add parallel decoder.
Diffstat (limited to 'tests/decode-tests.lisp')
-rw-r--r--tests/decode-tests.lisp12
1 files changed, 6 insertions, 6 deletions
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)))))