summaryrefslogtreecommitdiff
path: root/test-suite/tests/arrays.test
diff options
context:
space:
mode:
authorAndy Wingo <wingo@pobox.com>2010-04-07 21:04:37 +0200
committerAndy Wingo <wingo@pobox.com>2010-04-07 21:04:37 +0200
commite48a2f8705623e23c21dca5bb38ab437d82b39e4 (patch)
tree25377995969e7d8c3ce05172676078c75169967a /test-suite/tests/arrays.test
parentf5318d8b188c6636d1f593bb1d2690ba1b0a42e4 (diff)
downloadguile-e48a2f8705623e23c21dca5bb38ab437d82b39e4.tar.gz
add docs and tests for array->list
* libguile/generalized-arrays.c (scm_array_to_list): Add docs. * test-suite/tests/arrays.test ("array->list"): Add tests.
Diffstat (limited to 'test-suite/tests/arrays.test')
-rw-r--r--test-suite/tests/arrays.test11
1 files changed, 11 insertions, 0 deletions
diff --git a/test-suite/tests/arrays.test b/test-suite/tests/arrays.test
index 2ce961b14..b762f2014 100644
--- a/test-suite/tests/arrays.test
+++ b/test-suite/tests/arrays.test
@@ -207,6 +207,17 @@
(array-equal? #s16(1 2 3) #s16(1 2 3))))
;;;
+;;; array->list
+;;;
+
+(with-test-prefix "array->list"
+ (pass-if (equal? (array->list #s16(1 2 3)) '(1 2 3)))
+ (pass-if (equal? (array->list #(1 2 3)) '(1 2 3)))
+ (pass-if (equal? (array->list #2((1 2) (3 4) (5 6))) '((1 2) (3 4) (5 6))))
+ (pass-if (equal? (array->list #()) '())))
+
+
+;;;
;;; array-fill!
;;;