class-name.lsp 778 Bytes
Newer Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
;-*- Mode:     Lisp -*-
;;;; Author:   Paul Dietz
;;;; Created:  Sun Jun 15 12:05:47 2003
;;;; Contains: Tests of CLASS-NAME

(in-package :cl-test)

;;; This is mostly tested elsewhere.

(deftest class-name.1
  (class-name (find-class 'symbol))
  symbol)

(defclass class-name-class-01 () (a b c))

pfdietz's avatar
pfdietz committed
16
17
(report-and-ignore-errors
 (eval '(defmethod class-name ((x class-name-class-01)) 'silly)))
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35

(deftest class-name.2
  (class-name (make-instance 'class-name-class-01))
  silly)

;; Tests of (setf class-name)

(deftest setf-class-name.1
  (typep* #'(setf class-name) 'standard-generic-function)
  t)

(deftest class-name.error.1
  (classify-error (class-name))
  program-error)

(deftest class-name.error.2
  (classify-error (class-name (find-class 'symbol) nil))
  program-error)