Skip to content
Snippets Groups Projects
Commit 19fbbd5a authored by pfdietz's avatar pfdietz
Browse files

Some more dotimes tests, where the bound expr is not a constant

parent 2fd57a36
No related branches found
No related tags found
No related merge requests found
...@@ -122,6 +122,15 @@ ...@@ -122,6 +122,15 @@
y) y)
(0 0 0 0)) (0 0 0 0))
(deftest dotimes.17a
(let ((i 0) (y nil) (bound 4))
(declare (special i))
(flet ((%f () i))
(dotimes (i bound)
(push (%f) y)))
y)
(0 0 0 0))
(deftest dotimes.18 (deftest dotimes.18
(let ((i 0) (y nil)) (let ((i 0) (y nil))
(declare (special i)) (declare (special i))
...@@ -132,6 +141,16 @@ ...@@ -132,6 +141,16 @@
y) y)
(3 2 1 0)) (3 2 1 0))
(deftest dotimes.18a
(let ((i 0) (y nil) (bound 4))
(declare (special i))
(flet ((%f () i))
(dotimes (i bound)
(declare (special i))
(push (%f) y)))
y)
(3 2 1 0))
(deftest dotimes.19 (deftest dotimes.19
(dotimes (i 100 i)) (dotimes (i 100 i))
100) 100)
...@@ -166,5 +185,21 @@ ...@@ -166,5 +185,21 @@
(declare (special x))))) (declare (special x)))))
:good) :good)
(deftest dotimes.23a
(let ((x :good) (bound 10))
(declare (special x))
(let ((x :bad))
(dotimes (i bound x)
(declare (special x)))))
:good)
(deftest dotimes.24
(let ((bound 4) (j 0))
(values
(dotimes (i bound)
(incf j) (decf bound))
bound j))
nil 0 4)
(def-macro-test dotimes.error.1 (def-macro-test dotimes.error.1
(dotimes (i 10))) (dotimes (i 10)))
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment