X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=tests%2Ftype.before-xc.lisp;fp=tests%2Ftype.before-xc.lisp;h=380f930c6a11d003904e229214cf240df0fc8594;hb=5ee902ed6ceef841efee4a50459ff545293a1d95;hp=3f8639e16716d5974e754705c209b5c4a676dfc8;hpb=b729639ed79f74e60d2c359eefa638198a9f6e6a;p=sbcl.git diff --git a/tests/type.before-xc.lisp b/tests/type.before-xc.lisp index 3f8639e..380f930 100644 --- a/tests/type.before-xc.lisp +++ b/tests/type.before-xc.lisp @@ -284,4 +284,45 @@ (assert (not yes)) (assert 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")