X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftype.pure.lisp;h=593e45e1bcf0783b35edee3de00a00f8fa351753;hb=daba25be05dd7b4089ed382368f9ff666d16c6fb;hp=3bddb5b99b65de85cdae25370a828f1cb6d13217;hpb=1cf230d59a80f5fba3b90b929e6ab61e9a6fbe84;p=sbcl.git diff --git a/tests/type.pure.lisp b/tests/type.pure.lisp index 3bddb5b..593e45e 100644 --- a/tests/type.pure.lisp +++ b/tests/type.pure.lisp @@ -289,3 +289,47 @@ ACTUAL ~D DERIVED ~D~%" '(cons (satisfies bar) t)) (assert (null cyes)) (assert (null cwin)))) + +(multiple-value-bind (yes win) + (subtypep 'generic-function 'function) + (assert yes) + (assert win)) +;;; this would be in some internal test suite like type.before-xc.lisp +;;; except that generic functions don't exist at that stage. +(multiple-value-bind (yes win) + (subtypep 'generic-function 'sb-kernel:funcallable-instance) + (assert yes) + (assert win)) + +;;; all sorts of answers are right for this one, but it used to +;;; trigger an AVER instead. +(subtypep '(function ()) '(and (function ()) (satisfies identity))) + +(assert (sb-kernel:unknown-type-p (sb-kernel:specifier-type 'an-unkown-type))) + +(assert + (sb-kernel:type= + (sb-kernel:specifier-type '(or (simple-array an-unkown-type (*)) + (simple-array an-unkown-type))) + (sb-kernel:specifier-type '(or (simple-array an-unkown-type (*)) + (simple-array an-unkown-type))))) + +(assert + (sb-kernel:type= + (sb-kernel:specifier-type '(simple-array an-unkown-type (*))) + (sb-kernel:specifier-type '(simple-array an-unkown-type (*))))) + +(assert + (not + (sb-kernel:type= + (sb-kernel:specifier-type '(simple-array an-unkown-type (*))) + (sb-kernel:specifier-type '(array an-unkown-type (*)))))) + +(assert + (not + (sb-kernel:type= + (sb-kernel:specifier-type '(simple-array an-unkown-type (7))) + (sb-kernel:specifier-type '(simple-array an-unkown-type (8)))))) + +(assert (typep #p"" 'sb-kernel:instance)) +(assert (subtypep '(member #p"") 'sb-kernel:instance))