From: Christophe R. <cr...@us...> - 2004-05-03 23:01:40
|
Update of /cvsroot/sbcl/sbcl/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26644/tests Modified Files: type.pure.lisp Log Message: 0.8.10.9: Fix bugs in COMPLEX type specifier and UPGRADED-COMPLEX-PART-TYPE ... make them more tightly coupled; ... rearrange COMPLEX type translator so that it can use CTYPE-OF (and thus remove logic duplication) ... implement U-C-P-T in terms of (specifier-type `(complex ,x)) ... fix MEMBER type specifier not to use CTYPE-OF on complex members; ... add tests. Index: type.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/type.pure.lisp,v retrieving revision 1.18 retrieving revision 1.19 diff -u -d -r1.18 -r1.19 --- type.pure.lisp 2 Feb 2004 16:58:37 -0000 1.18 +++ type.pure.lisp 3 May 2004 23:01:29 -0000 1.19 @@ -201,3 +201,21 @@ (dotimes (i 100) (let ((x (make-array 0 :element-type `(unsigned-byte ,(1+ i))))) (eval `(typep ,x (class-of ,x))))) + +(assert (not (typep #c(1 2) '(member #c(2 1))))) +(assert (typep #c(1 2) '(member #c(1 2)))) +(assert (subtypep 'nil '(complex nil))) +(assert (subtypep '(complex nil) 'nil)) +(assert (subtypep 'nil '(complex (eql 0)))) +(assert (subtypep '(complex (eql 0)) 'nil)) +(assert (subtypep 'nil '(complex (integer 0 0)))) +(assert (subtypep '(complex (integer 0 0)) 'nil)) +(assert (subtypep 'nil '(complex (rational 0 0)))) +(assert (subtypep '(complex (rational 0 0)) 'nil)) +(assert (subtypep 'complex '(complex real))) +(assert (subtypep '(complex real) 'complex)) +(assert (subtypep '(complex (eql 1)) '(complex (member 1 2)))) +(assert (equal (multiple-value-list + (subtypep '(complex (integer 1 2)) + '(member #c(1 1) #c(1 2) #c(2 1) #c(2 2)))) + '(nil t))) |