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
8412195b
Commit
8412195b
authored
Aug 19, 2015
by
Daniel Kochmański
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ctypecase: fix invalid tests (constant assignment)
Signed-off-by:
Daniel Kochmański
<
daniel@turtleware.eu
>
parent
1d1edbc1
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
3 deletions
+29
-3
ctypecase.lsp
ctypecase.lsp
+10
-3
typecase.lsp
typecase.lsp
+19
-0
No files found.
ctypecase.lsp
View file @
8412195b
...
...
@@ -99,9 +99,15 @@
(return-from done 'good)))
good)
;;; Test that explicit calls to macroexpand in subforms
;;; are done in the correct environment
;; Following tests (ctypecase.15 and ctypecase.16) are invalid, since
;; ctypecase provides restart, which evaluates to assignment to :foo,
;; which is constant. Both tests were transformed into valid ones and
;; moved to typecase.lsp (typecase.22 and typecase.23).
;;
;; Related discussion:
;; https://mailman.common-lisp.net/pipermail/ansi-test-devel/2012-January/000108.html
#+(or)
(deftest ctypecase.15
(macrolet
((%m (z) z))
...
...
@@ -112,6 +118,7 @@
(symbol :bad2)))
:good)
#+(or)
(deftest ctypecase.16
(macrolet
((%m (z) z))
...
...
typecase.lsp
View file @
8412195b
...
...
@@ -142,6 +142,25 @@
(t (expand-in-current-env (%m :bad2)))))
:good)
(deftest typecase.22
(macrolet
((%m (z) z))
(typecase
(expand-in-current-env (%m :foo))
(integer :bad1)
(keyword :good)
(symbol :bad2)))
:good)
(deftest typecase.23
(macrolet
((%m (z) z))
(typecase :foo
(integer (expand-in-current-env (%m :bad1)))
(keyword (expand-in-current-env (%m :good)))
(symbol (expand-in-current-env (%m :bad2)))))
:good)
;;; Error cases
(deftest typecase.error.1
...
...
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