Commit 924c252b authored by pfdietz's avatar pfdietz
Browse files

More SUBTYPEP tests.

parent 88f52bb0
......@@ -622,7 +622,7 @@ the condition to go uncaught if it cannot be classified."
(pathname logical-pathname (eql #p""))
(stream broadcast-stream concatenated-stream echo-stream
file-stream string-stream synonym-stream two-way-stream)
(number real complex float integer rational ratio
(number real complex float integer rational ratio fixnum
bit (integer 0 100) (float 0.0 100.0) (integer 0 *)
(rational 0 *) (mod 10)
(eql 0)
......@@ -102,6 +102,18 @@
(subtypep* 'simple-bit-vector 'simple-vector)
nil t)
(deftest subtypep.extended-char.1
(if (subtypep* 'character 'base-char)
(subtypep* 'extended-char nil)
(values t t))
t t)
(deftest subtypep.bignum.1
(if (subtypep* 'integer 'fixnum)
(subtypep* 'bignum nil)
(values t t))
t t)
;;; SUBTYPEP on CONS types
(defvar *cons-types*
......@@ -173,6 +173,17 @@
collect (list e types))
;;; Union of a type with its complement is universal
(deftest type-or-not-type-is-everything
(loop for l in *disjoint-types-list2*
for type in l
append (check-subtypep t `(or ,type (not ,type)) t)
append (check-subtypep t `(or (not ,type) ,type) t)))
(deftest integer-and-ratio-are-disjoint
(classes-are-disjoint 'integer 'ratio)
......@@ -268,7 +279,6 @@
collect (list sym fun))
;;; Canonical metaobjects are in the right classes
(deftest structure-object-is-in-structure-class
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