diff --git a/ansi-tests/types-and-class.lsp b/ansi-tests/types-and-class.lsp index 42220357fc33eb5a927dea8934e81ae6bae877d6..7fa8fc01a0d5fe1316f5150dfdfeef8a8e5e3889 100644 --- a/ansi-tests/types-and-class.lsp +++ b/ansi-tests/types-and-class.lsp @@ -164,6 +164,14 @@ append (check-equivalence sym class)) nil) +(deftest all-classes-are-type-equivalent-to-their-names.2 + (loop for x in *universe* + for cl = (class-of x) + for name = (class-name cl) + when name + append (check-equivalence name cl)) + nil) + ;;; Check that all class names in CL that name standard-classes or ;;; structure-classes are subtypes of standard-object and structure-object, ;;; respectively @@ -178,6 +186,14 @@ collect sym) nil) +(deftest all-standard-classes-are-subtypes-of-standard-object.2 + (loop for x in *universe* + for class = (class-of x) + when (and (typep class 'standard-class) + (not (subtypep class 'standard-object))) + collect x) + nil) + (deftest all-structure-classes-are-subtypes-of-structure-object (loop for sym being the external-symbols of "COMMON-LISP" for class = (find-class sym nil) @@ -187,6 +203,14 @@ (not (subtypep class 'structure-object)))) collect sym) nil) + +(deftest all-structure-classes-are-subtypes-of-structure-object.2 + (loop for x in *universe* + for cl = (class-of x) + when (and (typep cl 'structure-class) + (not (subtypep cl 'structure-object))) + collect x) + nil) ;;; Confirm that only the symbols exported from CL that are supposed ;;; to be types are actually classes (see section 11.1.2.1.1)