Commit 924c252b authored by pfdietz's avatar pfdietz

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))
nil)
;;; Union of a type with its complement is universal
(deftest type-or-not-type-is-everything
(loop for l in *disjoint-types-list2*
append
(loop
for type in l
append (check-subtypep t `(or ,type (not ,type)) t)
append (check-subtypep t `(or (not ,type) ,type) t)))
nil)
(deftest integer-and-ratio-are-disjoint
(classes-are-disjoint 'integer 'ratio)
......@@ -268,7 +279,6 @@
collect (list sym fun))
nil)
;;; 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