Last change
on this file since 8991 was
8991,
checked in by gz, 13 years ago
|
Check in the gcl ansi test suite (original, in preparation for making local changes)
|
File size:
797 bytes
|
Line | |
---|
1 | ;-*- Mode: Lisp -*- |
---|
2 | ;;;; Author: Paul Dietz |
---|
3 | ;;;; Created: Wed Jun 4 20:14:26 2003 |
---|
4 | ;;;; Contains: Tests for UNBOUND-SLOT, UNBOUND-SLOT-INSTANCE |
---|
5 | |
---|
6 | (in-package :cl-test) |
---|
7 | |
---|
8 | (defclass ubs-class-01 () |
---|
9 | ((a :initarg :a))) |
---|
10 | |
---|
11 | (deftest unbound-slot.1 |
---|
12 | (let ((obj (make-instance 'ubs-class-01))) |
---|
13 | (handler-case |
---|
14 | (slot-value obj 'a) |
---|
15 | (unbound-slot (c) |
---|
16 | (values |
---|
17 | (typep* c 'cell-error) |
---|
18 | (eqt (unbound-slot-instance c) obj) |
---|
19 | (cell-error-name c))))) |
---|
20 | t t a) |
---|
21 | |
---|
22 | (defclass ubs-class-02 () |
---|
23 | ((b :allocation :class))) |
---|
24 | |
---|
25 | (deftest unbound-slot.2 |
---|
26 | (let ((obj (make-instance 'ubs-class-02))) |
---|
27 | (handler-case |
---|
28 | (slot-value obj 'b) |
---|
29 | (unbound-slot (c) |
---|
30 | (values |
---|
31 | (typep* c 'cell-error) |
---|
32 | (eqt (unbound-slot-instance c) obj) |
---|
33 | (cell-error-name c))))) |
---|
34 | t t b) |
---|
35 | |
---|
36 | |
---|
Note: See
TracBrowser
for help on using the repository browser.