Commit 104e79b7 authored by pfdietz's avatar pfdietz

Added annotation for type-of.1, and added a relaxed version of the test with...

Added annotation for type-of.1, and added a relaxed version of the test with the other interpretation of the requirement.
parent 811de4aa
......@@ -16,3 +16,6 @@
(defnote :standardized-package-nicknames
"The standardized package nicknames specified in section 11 of ANSI CL are exclusive (disputed).")
(defnote :type-of/strict-builtins
"Interpret requirement 1.a on the TYPE-OF page to apply to all built-in types that contain the object, not just to some builtin type that contains the object.")
......@@ -10,6 +10,7 @@
;;; of which x is a member.
(deftest type-of.1
:notes :type-of/strict-builtins
(loop for x in *universe*
for tp = (type-of x)
for failures = (loop for tp2 in *cl-all-type-symbols*
......@@ -19,6 +20,22 @@
when failures collect (list x failures))
nil)
;;; Some have objected to that (in type-of.1) interpretation
;;; of req. 1.a in the TYPE-OF page, saying that it need hold
;;; for only *one* builtin type that the object is an element of.
;;; This test tests the relaxed requirement.
(deftest type-of.1-relaxed
(loop for x in *universe*
for builtins = (remove x *cl-all-type-symbols*
:test (complement #'typep))
for tp = (type-of x)
when (and builtins
(not (loop for tp2 in builtins
thereis (subtypep tp tp2))))
collect x)
nil)
;;; 1. For any object that is an element of some built-in type:
;;; b. the type returned does not involve and, eql, member, not,
;;; or, satisfies, or values.
......@@ -81,7 +98,6 @@
(eqt (type-of (make-instance class)) class))
t)
;;; Error tests
(deftest type-of.error.1
......
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