Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Karsten Poeck
ansi-test
Commits
df5485c3
Commit
df5485c3
authored
Jun 15, 2003
by
pfdietz
Browse files
Added tests for SLOT-UNBOUND.
parent
64702b24
Changes
2
Hide whitespace changes
Inline
Side-by-side
ansi-tests/load-objects.lsp
View file @
df5485c3
...
...
@@ -20,6 +20,7 @@
(load "slot-exists-p.lsp")
(load "slot-makunbound.lsp")
(load "slot-missing.lsp")
(load "slot-unbound.lsp")
(load "slot-value.lsp")
(load "method-qualifiers.lsp")
(load "no-applicable-method.lsp")
...
...
ansi-tests/slot-unbound.lsp
0 → 100644
View file @
df5485c3
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Sun Jun 15 06:57:23 2003
;;;; Contains: Tests for SLOT-UNBOUND
(in-package :cl-test)
(defclass slot-unbound-class-01 ()
((a :reader sunb-a)
(b :accessor sunb-b)
(c :writer sunb-c)
(e :reader sunb-e)
(f :reader sunb-f)))
(defmethod slot-unbound ((class t) (obj slot-unbound-class-01) (slot-name t))
(list (class-name class) slot-name))
(deftest slot-unbound.1
(let ((obj (make-instance 'slot-unbound-class-01)))
(values
(slot-value obj 'a)
(slot-value obj 'b)
(slot-value obj 'c)))
(slot-unbound-class-01 a)
(slot-unbound-class-01 b)
(slot-unbound-class-01 c))
(deftest slot-unbound.2
(let ((obj (make-instance 'slot-unbound-class-01)))
(values
(sunb-a obj)
(sunb-b obj)))
(slot-unbound-class-01 a)
(slot-unbound-class-01 b))
(defmethod slot-unbound ((class t) (obj slot-unbound-class-01)
(slot-nake (eql 'e)))
(values))
(defmethod slot-unbound ((class t) (obj slot-unbound-class-01)
(slot-nake (eql 'f)))
(values 1 2 3))
(deftest slot-unbound.3
(slot-value (make-instance 'slot-unbound-class-01) 'e)
nil)
(deftest slot-unbound.4
(slot-value (make-instance 'slot-unbound-class-01) 'f)
1)
(deftest slot-unbound.5
(sunb-e (make-instance 'slot-unbound-class-01))
nil)
(deftest slot-unbound.6
(sunb-f (make-instance 'slot-unbound-class-01))
1)
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment