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
480c5efd
Commit
480c5efd
authored
Mar 13, 2003
by
pfdietz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More define-condition tests, and begin including them in the default load.
parent
3b78b935
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
91 additions
and
0 deletions
+91
-0
ansi-tests/define-condition.lsp
ansi-tests/define-condition.lsp
+88
-0
ansi-tests/load-conditions.lsp
ansi-tests/load-conditions.lsp
+3
-0
No files found.
ansi-tests/define-condition.lsp
View file @
480c5efd
...
...
@@ -11,3 +11,91 @@
(define-condition-with-tests cond-2 (condition) nil)
(define-condition-with-tests #:cond-3 nil nil)
(define-condition-with-tests cond-4 nil
((slot1 :initarg :slot1 :reader cond-4/slot-1)
(slot2 :initarg :slot2 :reader cond-4/slot-2)))
(deftest cond-4-slots.1
(let ((c (make-condition 'cond-4 :slot1 'a :slot2 'b)))
(and (typep c 'cond-4)
(eqt (cond-4/slot-1 c) 'a)
(eqt (cond-4/slot-2 c) 'b)))
t)
(define-condition-with-tests cond-5 nil
((slot1 :initarg :slot1 :initform 'x :reader cond-5/slot-1)
(slot2 :initarg :slot2 :initform 'y :reader cond-5/slot-2)))
(deftest cond-5-slots.1
(let ((c (make-condition 'cond-5 :slot1 'a :slot2 'b)))
(and (typep c 'cond-5)
(eqt (cond-5/slot-1 c) 'a)
(eqt (cond-5/slot-2 c) 'b)))
t)
(deftest cond-5-slots.2
(let ((c (make-condition 'cond-5 :slot1 'a)))
(and (typep c 'cond-5)
(eqt (cond-5/slot-1 c) 'a)
(eqt (cond-5/slot-2 c) 'y)))
t)
(deftest cond-5-slots.3
(let ((c (make-condition 'cond-5 :slot2 'b)))
(and (typep c 'cond-5)
(eqt (cond-5/slot-1 c) 'x)
(eqt (cond-5/slot-2 c) 'b)))
t)
(deftest cond-5-slots.4
(let ((c (make-condition 'cond-5)))
(and (typep c 'cond-5)
(eqt (cond-5/slot-1 c) 'x)
(eqt (cond-5/slot-2 c) 'y)))
t)
(define-condition-with-tests cond-6 nil
((slot1 :initarg :slot1 :initarg :both-slots
:initform 'x :reader cond-6/slot-1)
(slot2 :initarg :slot2 :initarg :both-slots
:initform 'y :reader cond-6/slot-2)))
(deftest cond-6-slots.1
(let ((c (make-condition 'cond-6 :both-slots 'a)))
(and (typep c 'cond-6)
(eqt (cond-6/slot-1 c) 'a)
(eqt (cond-6/slot-2 c) 'a)))
t)
(deftest cond-6-slots.2
(let ((c (make-condition 'cond-6)))
(and (typep c 'cond-6)
(eqt (cond-6/slot-1 c) 'x)
(eqt (cond-6/slot-2 c) 'y)))
t)
(deftest cond-6-slots.3
(let ((c (make-condition 'cond-6 :slot1 'a :both-slots 'b)))
(and (typep c 'cond-6)
(eqt (cond-6/slot-1 c) 'a)
(eqt (cond-6/slot-2 c) 'b)))
t)
(deftest cond-6-slots.4
(let ((c (make-condition 'cond-6 :slot2 'b :both-slots 'a)))
(and (typep c 'cond-6)
(eqt (cond-6/slot-1 c) 'a)
(eqt (cond-6/slot-2 c) 'b)))
t)
(deftest cond-6-slots.5
(let ((c (make-condition 'cond-6 :both-slots 'a :slot1 'c :slot2 'd)))
(and (typep c 'cond-6)
(eqt (cond-6/slot-1 c) 'a)
(eqt (cond-6/slot-2 c) 'a)))
t)
ansi-tests/load-conditions.lsp
View file @
480c5efd
...
...
@@ -10,4 +10,7 @@
(load "handler-bind.lsp")
(load "handler-case.lsp")
(load "ignore-errors.lsp")
(compile-and-load "define-condition-aux.lsp")
(load "define-condition.lsp")
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