Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
bed17857
Commit
bed17857
authored
Jan 08, 2005
by
pfdietz
Browse files
Add free declaration scope tests for iteration forms
parent
4a093636
Changes
4
Hide whitespace changes
Inline
Side-by-side
ansi-tests/do.lsp
View file @
bed17857
...
...
@@ -121,5 +121,45 @@
(push #'(lambda () i) x))))
(5 5 5 5 5))
;;; Scope of free declarations
(deftest do.16
(block done
(let ((x :bad))
(declare (special x))
(let ((x :good))
(do ((i (return-from done x) 0))
(t nil)
(declare (special x))))))
:good)
(deftest do.17
(block done
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do ((i 0 (return-from done x)))
(nil nil)
(declare (special x))))))
:good)
(deftest do.18
(block done
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do ((i 0 0))
((return-from done x) nil)
(declare (special x))))))
:good)
(deftest do.19
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do () (t x)
(declare (special x)))))
:good)
(def-macro-test do.error.1
(do ((i 0 (1+ i))) ((= i 5) 'a)))
ansi-tests/dolist.lsp
View file @
bed17857
...
...
@@ -112,6 +112,25 @@
(when (eq e 'c) (return x))))
(c b a))
;;; Scope of free declarations
(deftest dolist.16
(block done
(let ((x :bad))
(declare (special x))
(let ((x :good))
(dolist (e (return-from done x))
(declare (special x))))))
:good)
(deftest dolist.17
(let ((x :good))
(declare (special x))
(let ((x :bad))
(dolist (e nil x)
(declare (special x)))))
:good)
(def-macro-test dolist.error.1
(dolist (x nil)))
ansi-tests/dostar.lsp
View file @
bed17857
...
...
@@ -121,5 +121,45 @@
(push #'(lambda () i) x))))
(5 5 5 5 5))
;;; Scope of free declarations
(deftest do*.16
(block done
(let ((x :bad))
(declare (special x))
(let ((x :good))
(do* ((i (return-from done x) 0))
(t nil)
(declare (special x))))))
:good)
(deftest do*.17
(block done
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do* ((i 0 (return-from done x)))
(nil nil)
(declare (special x))))))
:good)
(deftest do*.18
(block done
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do* ((i 0 0))
((return-from done x) nil)
(declare (special x))))))
:good)
(deftest do*.19
(let ((x :good))
(declare (special x))
(let ((x :bad))
(do* () (t x)
(declare (special x)))))
:good)
(def-macro-test do*.error.1
(do* ((i 0 (1+ i))) ((= i 5) 'a)))
ansi-tests/dotimes.lsp
View file @
bed17857
...
...
@@ -147,5 +147,24 @@
(incf x)))
0 0)
;;; Scope of free declarations
(deftest dotimes.22
(block done
(let ((x :bad))
(declare (special x))
(let ((x :good))
(dotimes (i (return-from done x))
(declare (special x))))))
:good)
(deftest dotimes.23
(let ((x :good))
(declare (special x))
(let ((x :bad))
(dotimes (i 10 x)
(declare (special x)))))
:good)
(def-macro-test dotimes.error.1
(dotimes (i 10)))
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment