Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
ansi-test
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
Operations
Operations
Incidents
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Karsten Poeck
ansi-test
Commits
4a093636
Commit
4a093636
authored
Jan 08, 2005
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Free declaration scope tests
parent
91478b77
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
109 additions
and
1 deletion
+109
-1
ansi-tests/defun.lsp
ansi-tests/defun.lsp
+30
-0
ansi-tests/destructuring-bind.lsp
ansi-tests/destructuring-bind.lsp
+24
-0
ansi-tests/flet.lsp
ansi-tests/flet.lsp
+18
-1
ansi-tests/labels.lsp
ansi-tests/labels.lsp
+19
-0
ansi-tests/prog.lsp
ansi-tests/prog.lsp
+18
-0
No files found.
ansi-tests/defun.lsp
View file @
4a093636
...
...
@@ -43,6 +43,36 @@
(defun (setf defun-test-fun-4) (newval x)
(return-from defun-test-fun-4 (setf (car x) newval))))
(deftest defun.5
(let ((x 1))
(declare (special x))
(let ((x 2))
(defun defun-test-fun-5 (&aux (y x))
(declare (special x))
(values y x))
(defun-test-fun-5)))
2 1)
(deftest defun.6
(let ((x 1))
(declare (special x))
(let ((x 2))
(defun defun-test-fun-5 (&optional (y x))
(declare (special x))
(values y x))
(defun-test-fun-5)))
2 1)
(deftest defun.7
(let ((x 1))
(declare (special x))
(let ((x 2))
(defun defun-test-fun-5 (&key (y x))
(declare (special x))
(values y x))
(defun-test-fun-5)))
2 1)
;;; Error tests
(deftest defun.error.1
...
...
ansi-tests/destructuring-bind.lsp
View file @
4a093636
...
...
@@ -112,6 +112,30 @@
(destructuring-bind (&rest x &key) nil x)
nil)
(deftest destructuring-bind.25
(let ((x :bad))
(declare (special x))
(let ((x :good))
(destructuring-bind (y) (list x)
(declare (special x))
y)))
:good)
(deftest destructuring-bind.26
(destructuring-bind (x) (list 1))
nil)
(deftest destructuring-bind.27
(destructuring-bind (x) (list 1)
(declare (optimize)))
nil)
(deftest destructuring-bind.28
(destructuring-bind (x) (list 1)
(declare (optimize))
(declare))
nil)
;;; Error cases
#|
...
...
ansi-tests/flet.lsp
View file @
4a093636
...
...
@@ -503,4 +503,21 @@
x)))
:good)
\ No newline at end of file
(deftest flet.67
(let ((x :bad))
(declare (special x))
(let ((x :good))
(flet ((%f (&aux (y x))
(declare (special x))
y))
(%f))))
:good)
(deftest flet.68
(let ((x :bad))
(declare (special x))
(let ((x :good))
(flet ((%f () x))
(declare (special x))
(%f))))
:good)
ansi-tests/labels.lsp
View file @
4a093636
...
...
@@ -343,3 +343,22 @@
(labels ((%f () (declare (special x))))
x)))
:good)
(deftest labels.46
(let ((x :bad))
(declare (special x))
(let ((x :good))
(labels ((%f (&aux (y x))
(declare (special x))
y))
(%f))))
:good)
(deftest labels.47
(let ((x :bad))
(declare (special x))
(let ((x :good))
(labels ((%f () x))
(declare (special x))
(%f))))
:good)
\ No newline at end of file
ansi-tests/prog.lsp
View file @
4a093636
...
...
@@ -71,6 +71,15 @@
(return 'bad))
2)
(deftest prog.11
(let ((x :bad))
(declare (special x))
(let ((x :good))
(prog ((y x))
(declare (special x))
(return y))))
:good)
(def-macro-test prog.error.1 (prog nil))
;;; Tests of PROG*
...
...
@@ -141,4 +150,13 @@
(return 'bad))
2)
(deftest prog*.11
(let ((x :bad))
(declare (special x))
(let ((x :good))
(prog* ((y x))
(declare (special x))
(return y))))
:good)
(def-macro-test prog*.error.1 (prog* nil))
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