Commit 23202d54 authored by pfdietz's avatar pfdietz

Added tests for env arguments to subtypep, typep, and upgraded-array-element-type.

parent 196d027e
......@@ -430,3 +430,63 @@
(type-error-expected-type c nil)))
program-error)
;;; Tests of env arguments to typep, subtypep
(deftest typep.env.1
(notnot-mv (typep 0 'bit nil))
t)
(deftest typep.env.2
(macrolet ((%foo (&environment env)
(notnot (typep 0 'bit env))))
(%foo))
t)
(deftest typep.env.3
(macrolet ((%foo (&environment env)
(notnot (typep env (type-of env)))))
(%foo))
t)
(deftest subtype.env.1
(mapcar #'notnot
(multiple-value-list (subtypep 'bit 'integer nil)))
(t t))
(deftest subtype.env.2
(macrolet
((%foo (&environment env)
(list 'quote
(mapcar #'notnot
(multiple-value-list
(subtypep 'bit 'integer env))))))
(%foo))
(t t))
(deftest subtype.env.3
(macrolet
((%foo (&environment env)
(multiple-value-bind (sub good)
(subtypep nil (type-of env))
(or (not good) (notnot sub)))))
(%foo))
t)
(deftest subtype.env.4
(macrolet
((%foo (&environment env)
(multiple-value-bind (sub good)
(subtypep (type-of env) (type-of env))
(or (not good) (notnot sub)))))
(%foo))
t)
(deftest subtype.env.5
(macrolet
((%foo (&environment env)
(multiple-value-bind (sub good)
(subtypep (type-of env) t)
(or (not good) (notnot sub)))))
(%foo))
t)
......@@ -62,6 +62,16 @@
for upgraded-type = (upgraded-array-element-type type nil)
always (empirical-subtypep type upgraded-type))
t)
(deftest upgraded-array-element-type.6
(macrolet
((%foo (&environment env)
(empirical-subtypep
'bit
(upgraded-array-element-type 'bit env))))
(%foo))
t)
;;; Error tests
......
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