summaryrefslogtreecommitdiff
path: root/test-suite
diff options
context:
space:
mode:
authorDaniel Llorens <daniel.llorens@bluewin.ch>2017-02-13 13:49:35 +0100
committerDaniel Llorens <daniel.llorens@bluewin.ch>2017-10-31 13:23:17 +0100
commitf52fc0566feabe4f1d3ba630287a418606ac30f9 (patch)
tree3f96b38a8d2c02c798bd404c240bd0010018864e /test-suite
parent3bfd4aaa6e080dc5b33875921b74d733ac16feb2 (diff)
Support non-zero lower bounds in array-slice-for-each
* libguile/array-handle.c (scm_array_handle_writable_elements): Fix error message. * libguile/array-map.c (scm_array_slice_for_each): Support non-zero lower bounds. Fix error messages. * test-suite/tests/array-map.test: Test scm_array_slice_for_each with non-zero lower bound argument.
Diffstat (limited to 'test-suite')
-rw-r--r--test-suite/tests/array-map.test8
1 files changed, 8 insertions, 0 deletions
diff --git a/test-suite/tests/array-map.test b/test-suite/tests/array-map.test
index 129469d4f..25b4aaa9d 100644
--- a/test-suite/tests/array-map.test
+++ b/test-suite/tests/array-map.test
@@ -524,6 +524,14 @@
(array-slice-for-each 1 (lambda (a) (sort! a <)) a)
a))
+ (pass-if-equal "1 argument frame rank 1, non-zero base indices"
+ #2@1@1((1 3 9) (2 7 8))
+ (let* ((a (make-array *unspecified* '(1 2) '(1 3)))
+ (b #2@1@1((9 1 3) (7 8 2))))
+ (array-copy! b a)
+ (array-slice-for-each 1 (lambda (a) (sort! a <)) a)
+ a))
+
(pass-if-equal "2 arguments frame rank 1"
#f64(8 -1)
(let* ((x (list->typed-array 'f64 2 '((9 1) (7 8))))