Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
ansi-test
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Michał Herda
ansi-test
Commits
bed17857
Commit
bed17857
authored
20 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Add free declaration scope tests for iteration forms
parent
4a093636
No related branches found
No related tags found
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
ansi-tests/do.lsp
+40
-0
40 additions, 0 deletions
ansi-tests/do.lsp
ansi-tests/dolist.lsp
+19
-0
19 additions, 0 deletions
ansi-tests/dolist.lsp
ansi-tests/dostar.lsp
+40
-0
40 additions, 0 deletions
ansi-tests/dostar.lsp
ansi-tests/dotimes.lsp
+19
-0
19 additions, 0 deletions
ansi-tests/dotimes.lsp
with
118 additions
and
0 deletions
ansi-tests/do.lsp
+
40
−
0
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)))
This diff is collapsed.
Click to expand it.
ansi-tests/dolist.lsp
+
19
−
0
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)))
This diff is collapsed.
Click to expand it.
ansi-tests/dostar.lsp
+
40
−
0
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)))
This diff is collapsed.
Click to expand it.
ansi-tests/dotimes.lsp
+
19
−
0
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)))
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment