X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Ftype.before-xc.lisp;h=1b1f0e2c5f30ca0bfb4b6e9d48d226c26162de9b;hb=HEAD;hp=380f930c6a11d003904e229214cf240df0fc8594;hpb=5ee902ed6ceef841efee4a50459ff545293a1d95;p=sbcl.git diff --git a/tests/type.before-xc.lisp b/tests/type.before-xc.lisp index 380f930..1b1f0e2 100644 --- a/tests/type.before-xc.lisp +++ b/tests/type.before-xc.lisp @@ -54,6 +54,12 @@ (assert (type= (specifier-type 'cons) (type-intersection (specifier-type 'sequence) (specifier-type '(or cons number))))) +(assert (type= (specifier-type '(simple-array character (*))) + (type-intersection (specifier-type 'sequence) + (specifier-type '(simple-array character))))) +(assert (type= (specifier-type 'list) + (type-intersection (specifier-type 'sequence) + (specifier-type 'list)))) (assert (eql *empty-type* (type-intersection (specifier-type '(satisfies keywordp)) *empty-type*))) @@ -62,8 +68,10 @@ (type-union (specifier-type 'cons) (specifier-type 'null)))) (assert (type= (specifier-type 'list) (type-union (specifier-type 'null) (specifier-type 'cons)))) +#+nil ; not any more (assert (type= (specifier-type 'sequence) (type-union (specifier-type 'list) (specifier-type 'vector)))) +#+nil ; not any more (assert (type= (specifier-type 'sequence) (type-union (specifier-type 'vector) (specifier-type 'list)))) (assert (type= (specifier-type 'list) @@ -283,6 +291,11 @@ (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) @@ -324,5 +337,7 @@ (assert yes) (assert win)) +(assert (type= (specifier-type 'nil) + (specifier-type '(and symbol funcallable-instance)))) (/show "done with tests/type.before-xc.lisp")