X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Floop.pure.lisp;h=cae55c590c19b4101dde84f6d4cd569e5114ddef;hb=353d8da16686b5cd1d75f95017c185b50f75cfda;hp=917731a9a7cc11886440b930ea983d22032b6929;hpb=4898ef32c639b1c7f4ee13a5ba566ce6debd03e6;p=sbcl.git diff --git a/tests/loop.pure.lisp b/tests/loop.pure.lisp index 917731a..cae55c5 100644 --- a/tests/loop.pure.lisp +++ b/tests/loop.pure.lisp @@ -33,7 +33,8 @@ ;;; a bug reported and fixed by Alexey Dejneka sbcl-devel 2001-10-05: ;;; The type declarations should apply, hence under Python's ;;; declarations-are-assertions rule, the code should signal a type -;;; error. +;;; error. (Except when running interpreted code) +#+#.(cl:if (cl:eq sb-ext:*evaluator-mode* :compile) '(and) '(or)) (assert (typep (nth-value 1 (ignore-errors (funcall (lambda () @@ -177,6 +178,7 @@ (setf (gethash 7 ht) 15) (assert (= (loop for v fixnum being each hash-key in ht sum v) 8)) (assert (= (loop for v fixnum being each hash-value in ht sum v) 18)) + #+#.(cl:if (cl:eq sb-ext:*evaluator-mode* :compile) '(and) '(or)) (assert (raises-error? (loop for v float being each hash-value in ht sum v) type-error))) @@ -236,3 +238,7 @@ (macroexpand '(LOOP WITH A = 0 FOR A DOWNFROM 10 TO 0 DO (PRINT A)))) (declare (ignore _)) (assert (typep condition 'program-error))) + +;;; Loop variable with a range excluding 0, reported by Andras Simon. +;;; (Used to signal an error during macroexpansion.) +(assert (not (loop with foo of-type (single-float 1.0 2.0) = 1.5 do (return))))