Commit e59fbeb1 authored by pfdietz's avatar pfdietz

Added test that types in figure 4-8 of spec are also classes of the same proper name.

parent 67071bbe
......@@ -2035,3 +2035,84 @@
store-value
use-value
))
;;; Symbols that are names of types that are also classes
;;; See figure 4-8 in section 4.3.7
(defparameter *cl-types-that-are-classes-symbols*
'(
arithmetic-error
array
bit-vector
broadcast-stream
built-in-class
cell-error
character
class
complex
concatenated-stream
condition
cons
control-error
division-by-zero
echo-stream
end-of-file
error
file-error
file-stream
float
floating-point-inexact
floating-point-invalid-operation
floating-point-overflow
floating-point-underflow
function
generic-function
hash-table
integer
list
logical-pathname
method
method-combination
null
number
package
package-error
parse-error
pathname
print-not-readable
program-error
random-state
ratio
rational
reader-error
readtable
real
restart
sequence
serious-condition
simple-condition
simple-error
simple-type-error
simple-warning
standard-class
standard-generic-function
standard-method
standard-object
storage-condition
stream
stream-error
string
string-stream
structure-class
structure-object
style-warning
symbol
synonym-stream
t
two-way-stream
type-error
unbound-slot
unbound-variable
undefined-function
vector
warning
))
......@@ -1418,3 +1418,20 @@
nil)
;;; Check that all types that are classes name classes.
;;; "Many but not all of the predefined type specifiers have
;;; a corresponding class with the same proper name as the type.
;;; These type specifiers are listed in Figure 4-8." -- section 4.3.7
(deftest cl-types-that-are-classes-symbols.1
;; Collect class names that violate the condition in the
;; above quotation.
(loop
for s in *cl-types-that-are-classes-symbols*
for c = (find-class s nil)
unless (and c
(eq (class-name c) s)
(typep c 'class))
collect s)
nil)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment