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
e771f310
Commit
e771f310
authored
Jun 12, 2003
by
pfdietz
Browse files
Added tests for UNBOUND-SLOT condition and its accessors.
parent
6b3a2f25
Changes
2
Hide whitespace changes
Inline
Side-by-side
ansi-tests/load-objects.lsp
View file @
e771f310
...
...
@@ -48,3 +48,4 @@
(load "compute-applicable-methods.lsp")
(load "find-method.lsp")
(load "add-method.lsp")
(load "unbound-slot.lsp")
ansi-tests/unbound-slot.lsp
0 → 100644
View file @
e771f310
;-*- Mode: Lisp -*-
;;;; Author: Paul Dietz
;;;; Created: Wed Jun 4 20:14:26 2003
;;;; Contains: Tests for UNBOUND-SLOT, UNBOUND-SLOT-INSTANCE
(in-package :cl-test)
(defclass ubs-class-01 ()
((a :initarg :a)))
(deftest unbound-slot.1
(let ((obj (make-instance 'ubs-class-01)))
(handler-case
(slot-value obj 'a)
(unbound-slot (c)
(values
(typep* c 'cell-error)
(eqt (unbound-slot-instance c) obj)
(cell-error-name c)))))
t t a)
(defclass ubs-class-02 ()
((b :allocation :class)))
(deftest unbound-slot.2
(let ((obj (make-instance 'ubs-class-02)))
(handler-case
(slot-value obj 'b)
(unbound-slot (c)
(values
(typep* c 'cell-error)
(eqt (unbound-slot-instance c) obj)
(cell-error-name c)))))
t t b)
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