X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fseq.impure.lisp;h=33f128a819f24d138a961afdeba2a3b278ec59f1;hb=079ef9dad558ca07cb8178ef428bf738112174fa;hp=7517a31ee15d8da2d9c159187b67e85b8e267250;hpb=771b864c8f32af7734bc0550aeaf1539fc4df194;p=sbcl.git diff --git a/tests/seq.impure.lisp b/tests/seq.impure.lisp index 7517a31..33f128a 100644 --- a/tests/seq.impure.lisp +++ b/tests/seq.impure.lisp @@ -362,24 +362,45 @@ ;;; KLUDGE: not all in one big form because that causes SBCL to spend ;;; an absolute age trying to compile it. (defmacro sequence-bounding-indices-test (&body body) - `(locally + `(progn + (locally ;; See Issues 332 [and 333(!)] in the CLHS (declare (optimize (safety 3))) (let ((string (make-array 10 :fill-pointer 5 :initial-element #\a :element-type 'base-char))) + ,(car body) + (format t "... BASE-CHAR") + (finish-output) + (flet ((reset () + (setf (fill-pointer string) 10) + (fill string #\a) + (setf (fill-pointer string) 5))) + (declare (ignorable #'reset)) + ,@(cdr body)))) + (locally + ;; See Issues 332 [and 333(!)] in the CLHS + (declare (optimize (safety 3))) + (let ((string (make-array 10 + :fill-pointer 5 + :initial-element #\a + :element-type 'character))) + ,(car body) + (format t "... CHARACTER") + (finish-output) (flet ((reset () (setf (fill-pointer string) 10) (fill string #\a) (setf (fill-pointer string) 5))) (declare (ignorable #'reset)) - ,@body)))) + ,@(cdr body)))))) + (declaim (notinline opaque-identity)) (defun opaque-identity (x) x) ;;; Accessor SUBSEQ (sequence-bounding-indices-test - (format t "~&/Accessor SUBSEQ~%") + (format t "~&/Accessor SUBSEQ") (assert (string= (subseq string 0 5) "aaaaa")) (assert (raises-error? (subseq string 0 6))) (assert (raises-error? (subseq string (opaque-identity -1) 5)))