From: <de...@us...> - 2008-10-03 18:28:55
|
Update of /cvsroot/sbcl/sbcl/tests In directory fdv4jf1.ch3.sourceforge.com:/tmp/cvs-serv12967/tests Modified Files: array.pure.lisp Log Message: 1.0.21.2: ADJUST-ARRAY should not make multidimensional arrays have fill-pointers * ADJUST-ARRAY used to give multidimensional arrays a bogus fill-pointer unless :INITIAL-CONTENTS or :DISPLACED-TO were given. Reported by Cedric St-Jean on sbcl-devel. Index: array.pure.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/tests/array.pure.lisp,v retrieving revision 1.25 retrieving revision 1.26 diff -u -d -r1.25 -r1.26 --- array.pure.lisp 15 Jul 2007 22:28:13 -0000 1.25 +++ array.pure.lisp 3 Oct 2008 18:28:49 -0000 1.26 @@ -210,14 +210,19 @@ 'bit-vector) do (assert (bit-vector-equal r1 r2))))) -;;; CLHS, ADJUST-ARRAY: An error of type error is signaled if -;;; fill-pointer is supplied and non-nil but array has no fill pointer. -(assert (eq :good - (handler-case - (let ((array (make-array 12))) - (assert (not (array-has-fill-pointer-p array))) - (adjust-array array 12 :fill-pointer t) - array) - (type-error () - :good)))) +(with-test (:name (adjust-array fill-pointer)) + ;; CLHS, ADJUST-ARRAY: An error of type error is signaled if + ;; fill-pointer is supplied and non-nil but array has no fill pointer. + (assert (eq :good + (handler-case + (let ((array (make-array 12))) + (assert (not (array-has-fill-pointer-p array))) + (adjust-array array 12 :fill-pointer t) + array) + (type-error () + :good))))) +(with-test (:name (adjust-array multidimensional)) + (let ((ary (make-array '(2 2)))) + ;; SBCL used to give multidimensional arrays a bogus fill-pointer + (assert (not (array-has-fill-pointer-p (adjust-array ary '(2 2))))))) |