From 3c829721c1f0944b4cb872c235f1891cc74f2029 Mon Sep 17 00:00:00 2001 From: pfdietz <pfdietz@localhost> Date: Thu, 5 Jun 2003 02:23:55 +0000 Subject: [PATCH] I left out some tests of type-of. Here's a doozy. --- ansi-tests/load-types-and-class.lsp | 2 ++ ansi-tests/type-of.lsp | 22 ++++++++++++++++++++++ 2 files changed, 24 insertions(+) create mode 100644 ansi-tests/type-of.lsp diff --git a/ansi-tests/load-types-and-class.lsp b/ansi-tests/load-types-and-class.lsp index dff3e01c..404b4fb8 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 00000000..f112d432 --- /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) + + -- GitLab