X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler-1.impure-cload.lisp;h=18df67c075cad5ae522729636f304fc677459b87;hb=17d48b6525fdd5f188961c863e1d1f1d44d29107;hp=2082d0f7b7b9bd10fe01db94fc1c2d2c53a613ec;hpb=3bd7a97d1b11a2b0aee086ef211cae807f3dfc35;p=sbcl.git diff --git a/tests/compiler-1.impure-cload.lisp b/tests/compiler-1.impure-cload.lisp index 2082d0f..18df67c 100644 --- a/tests/compiler-1.impure-cload.lisp +++ b/tests/compiler-1.impure-cload.lisp @@ -62,7 +62,7 @@ ;;; against DECLAIMed FTYPEs blew up when an FTYPE was DECLAIMed ;;; to be pure FUNCTION, because the internal representation of ;;; FUNCTION itself (as opposed to subtypes of FUNCTION, such as -;;; (FUNCTION () T)) is a BUILT-IN-CLASS object, not a FUNCTION-TYPE +;;; (FUNCTION () T)) is a BUILT-IN-CLASS object, not a FUN-TYPE ;;; object. (declaim (ftype function i-am-just-a-function)) (defun i-am-just-a-function (x y) (+ x y 1)) @@ -100,4 +100,16 @@ (assert (eql (bar "this is a test") :string)) (assert (eql (bar (make-hash-table)) :t)) +;;; bug reported by Brian Spilsbury sbcl-devel 2001-09-30, fixed by +;;; Alexey Dejneka patch sbcl-devel 2001-10-02 +(defun pixarray-element-size (pixarray) + (let ((eltype (array-element-type pixarray))) + (cond ((eq eltype 'bit) 1) + ((and (listp eltype) + (eq (first eltype) 'unsigned-byte)) + (second eltype)) + (t + (error "Invalid pixarray: ~S." pixarray))))) +(assert (eql 1 (pixarray-element-size #*110))) + (sb-ext:quit :unix-status 104) ; success