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
3b78b935
Commit
3b78b935
authored
22 years ago
by
pfdietz
Browse files
Options
Downloads
Patches
Plain Diff
Moved more of the define-condition tests into the macro.
parent
dc08fd54
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
ansi-tests/define-condition-aux.lsp
+18
-0
18 additions, 0 deletions
ansi-tests/define-condition-aux.lsp
ansi-tests/define-condition.lsp
+3
-27
3 additions, 27 deletions
ansi-tests/define-condition.lsp
with
21 additions
and
27 deletions
ansi-tests/define-condition-aux.lsp
+
18
−
0
View file @
3b78b935
...
...
@@ -63,5 +63,23 @@
(let ((c (make-condition ',name-symbol)))
(notnot-mv (typep c (find-class ',parent))))
t))
(deftest ,(make-def-cond-name name "HANDLER-CASE-1")
(let ((c (make-condition ',name-symbol)))
(handler-case (signal c)
(,name-symbol (c1) (eqt c c1))))
t)
(deftest ,(make-def-cond-name name "HANDLER-CASE-2")
(let ((c (make-condition ',name-symbol)))
(handler-case (signal c)
(condition (c1) (eqt c c1))))
t)
,@(unless (some #'(lambda (ct) (subtypep ct 'error)) parents)
`((deftest ,(make-def-cond-name name "HANDLER-CASE-3")
(let ((c (make-condition ',name-symbol)))
(handler-case (signal c)
(error () nil)
(,name-symbol (c2) (eqt c c2))))
t)))
)))
This diff is collapsed.
Click to expand it.
ansi-tests/define-condition.lsp
+
3
−
27
View file @
3b78b935
...
...
@@ -5,33 +5,9 @@
(in-package :cl-test)
(define-condition-with-tests cond-1 nil nil)
(deftest cond-1.1
(let ((c (make-condition 'cond-1)))
(handler-case (signal c)
(cond-1 (c1) (eqt c c1))))
t)
(deftest cond-1.2
(let ((c (make-condition 'cond-1)))
(handler-case (signal c)
(condition (c1) (eqt c c1))))
t)
(deftest cond-1.3
(let ((c (make-condition 'cond-1)))
(handler-case (signal c)
(error () nil)
(cond-1 () t)))
t)
(deftest cond-1.4
(let ((c (make-condition 'cond-1)))
(and (typep c 'cond-1)
(notnot-mv (typep c (find-class 'cond-1)))))
t)
;;;
(define-condition-with-tests cond-1 nil nil)
(define-condition-with-tests cond-2 (condition) nil)
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