diff --git a/ansi-tests/every.lsp b/ansi-tests/every.lsp index 65cf645f8117de3a2641ed5055a693d2146142a9..7d516071d34cb7b0a1493a8b174ba7405d3acb45 100644 --- a/ansi-tests/every.lsp +++ b/ansi-tests/every.lsp @@ -78,6 +78,73 @@ (notnot-mv (every 'null '(nil nil nil nil))) t) +;;; Other specialized sequences + +(deftest every.17 + (let ((v (make-array '(10) :initial-contents '(0 0 0 0 1 2 3 4 5 6) + :fill-pointer 4))) + (loop for j from 0 to 9 + do (setf (fill-pointer v) j) + collect (notnot (every #'zerop v)))) + (t t t t t nil nil nil nil nil)) + +(deftest every.18 + (loop for i from 1 to 40 + for type = `(unsigned-byte ,i) + unless + (let ((v (make-array '(10) :initial-contents '(0 0 0 0 1 1 1 1 1 1) + :element-type type + :fill-pointer 4))) + (equal (loop for j from 0 to 9 + do (setf (fill-pointer v) j) + collect (notnot (every #'zerop v))) + '(t t t t t nil nil nil nil nil))) + collect i) + nil) + +(deftest every.19 + (loop for i from 1 to 40 + for type = `(signed-byte ,i) + unless + (let ((v (make-array '(10) :initial-contents '(0 0 0 0 -1 -1 -1 -1 -1 -1) + :element-type type + :fill-pointer 4))) + (equal (loop for j from 0 to 9 + do (setf (fill-pointer v) j) + collect (notnot (every #'zerop v))) + '(t t t t t nil nil nil nil nil))) + collect i) + nil) + +(deftest every.20 + (let ((v (make-array '(10) :initial-contents "abcd012345" + :element-type 'character + :fill-pointer 4))) + (loop for j from 0 to 9 + do (setf (fill-pointer v) j) + collect (notnot (every #'alpha-char-p v)))) + (t t t t t nil nil nil nil nil)) + +(deftest every.21 + (let ((v (make-array '(10) :initial-contents "abcd012345" + :element-type 'base-char + :fill-pointer 4))) + (loop for j from 0 to 9 + do (setf (fill-pointer v) j) + collect (notnot (every #'alpha-char-p v)))) + (t t t t t nil nil nil nil nil)) + +(deftest every.22 + (let ((v (make-array '(5) :initial-contents "abcde" + :element-type 'base-char))) + (values + (notnot (every #'alpha-char-p v)) + (setf (aref v 2) #\0) + (every #'alpha-char-p v))) + t #\0 nil) + +;;; Order of arguments + (deftest every.order.1 (let ((i 0) x y) (values