summaryrefslogtreecommitdiff
path: root/tests/decode-tests.lisp
diff options
context:
space:
mode:
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)))))