X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=tests%2Farray-2d.cl;h=5a9522098a9cba540ede849e73214dd7dff81d5e;hb=11f2368e2aa756f12f698ce3f2d5182d2299dafc;hp=9e344db55f2882182e20e89d0aea01b9a6c2cdd0;hpb=fc85b603152cea9b5fff03fa7085cce3536b17f7;p=uffi.git diff --git a/tests/array-2d.cl b/tests/array-2d.cl index 9e344db..5a95220 100644 --- a/tests/array-2d.cl +++ b/tests/array-2d.cl @@ -7,7 +7,7 @@ ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Mar 2002 ;;;; -;;;; $Id: array-2d.cl,v 1.1 2002/03/18 02:27:32 kevin Exp $ +;;;; $Id: array-2d.cl,v 1.2 2002/03/18 22:47:57 kevin Exp $ ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg ;;;; @@ -20,16 +20,15 @@ (uffi:def-constant +column-length+ 10) -(uffi:def-array long-array (:long 10)) - (defun test-array-2d () "Tests 2d array" - (let ((a (uffi:allocate-foreign-object long-array))) + (let ((a (uffi:allocate-foreign-object :long +column-length+))) (dotimes (i +column-length+) - (setf (uffi:deref-array a :long i) (* i i))) + (setf (uffi:deref-array a '(:array :long) i) (* i i))) (dotimes (i +column-length+) - (format "~&~D => ~D" i (uffi:deref-array a 'long-array i))) - (uffi:free-foreign-object a))) + (format t "~&~D => ~D" i (uffi:deref-array a '(:array :long) i))) + (uffi:free-foreign-object a)) + (values)) #+test-uffi (test-array-2d)