(make-shared-array): Add failing case shared of shared.
authorKevin Ryde <user42@zip.com.au>
Wed, 4 May 2005 00:30:04 +0000 (00:30 +0000)
committerKevin Ryde <user42@zip.com.au>
Wed, 4 May 2005 00:30:04 +0000 (00:30 +0000)
test-suite/tests/unif.test

index a843203..2048029 100644 (file)
       (pass-if-exception "three indexes" exception:wrong-num-indices
        (array-set! a 'y 4 8 0)))))
 
+;;;
+;;; make-shared-array
+;;;
+
+(with-test-prefix "make-shared-array"
+
+  (pass-if "shared of shared"
+    (let* ((a  #2((1 2 3) (4 5 6) (7 8 9)))
+          (s1 (make-shared-array a (lambda (i) (list i 1)) 3))
+          (s2 (make-shared-array s1 list '(1 2))))
+      (and (eqv? 5 (array-ref s2 1))
+          (eqv? 8 (array-ref s2 2))))))
+
 ;;;
 ;;; uniform-vector-ref
 ;;;