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:
parent
f5318d8b18
commit
e48a2f8705
2 changed files with 19 additions and 2 deletions
|
@ -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!
|
||||
;;;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue