diff --git a/ansi-tests/load-types-and-class.lsp b/ansi-tests/load-types-and-class.lsp index dff3e01caef0e6822036a666769d1c863937620f..404b4fb8e5fcede1cea1d8c8bef9ce564aa716db 100644 --- a/ansi-tests/load-types-and-class.lsp +++ b/ansi-tests/load-types-and-class.lsp @@ -15,4 +15,6 @@ (load "deftype.lsp") (load "standard-generic-function.lsp") +(load "type-of.lsp") + diff --git a/ansi-tests/type-of.lsp b/ansi-tests/type-of.lsp new file mode 100644 index 0000000000000000000000000000000000000000..f112d4323cd16935bf25e3514e3ca856afd6dd28 --- /dev/null +++ b/ansi-tests/type-of.lsp @@ -0,0 +1,22 @@ +;-*- Mode: Lisp -*- +;;;; Author: Paul Dietz +;;;; Created: Wed Jun 4 21:15:05 2003 +;;;; Contains: Tests of TYPE-OF + +(in-package :cl-test) + +;;; It turns out I left out an important test of type-of: +;;; (type-of x) must be a recognizable subtype of every builtin type +;;; of which x is a member. + +(deftest type-of.1 + (loop for x in *universe* + for tp = (type-of x) + for failures = (loop for tp2 in *cl-all-type-symbols* + when (and (typep x tp2) + (not (subtypep tp tp2))) + collect tp2) + when failures collect (list x failures)) + nil) + +