X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftype.before-xc.lisp;h=77f484f206bc688dbfba6768ec1e7bfec4be2d7f;hb=90a83478829f33b91f6300c183b374a968bc13c6;hp=3f8639e16716d5974e754705c209b5c4a676dfc8;hpb=0aecc2b20142e08068c3434273500131cb13fe2d;p=sbcl.git diff --git a/tests/type.before-xc.lisp b/tests/type.before-xc.lisp index 3f8639e..77f484f 100644 --- a/tests/type.before-xc.lisp +++ b/tests/type.before-xc.lisp @@ -283,5 +283,51 @@ (sb-xc:subtypep '(function) '(function (t &rest t))) (assert (not yes)) (assert win)) +;; Used to run out of stack. +(multiple-value-bind (yes win) + (sb-xc:subtypep 'null '(or unk0 unk1)) + (assert (not yes)) + (assert (not win))) + +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and function instance) nil) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep nil '(and function instance)) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and function funcallable-instance) 'funcallable-instance) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep 'funcallable-instance '(and function funcallable-instance)) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep 'stream 'instance) + (assert (not yes))) +(multiple-value-bind (yes win) + (sb-xc:subtypep 'stream 'funcallable-instance) + (assert (not yes)) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and stream instance) 'instance) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and stream funcallable-instance) 'funcallable-instance) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and stream instance) 'stream) + (assert yes) + (assert win)) +(multiple-value-bind (yes win) + (sb-xc:subtypep '(and stream funcallable-instance) 'stream) + (assert yes) + (assert win)) + (/show "done with tests/type.before-xc.lisp")