1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-20 02:30:23 +02:00

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.
This commit is contained in:
Andy Wingo 2010-04-07 21:04:37 +02:00
parent f5318d8b18
commit e48a2f8705
2 changed files with 19 additions and 2 deletions

View file

@ -206,6 +206,17 @@
(pass-if "#s16(...)"
(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!
;;;