mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-05-15 10:10:21 +02:00
Changes from arch/CVS synchronization
This commit is contained in:
parent
25ee3008f7
commit
51785a23a8
4 changed files with 20 additions and 8 deletions
|
@ -1,4 +1,4 @@
|
|||
2006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
|
||||
2006-11-29 Ludovic Courtès <ludovic.courtes@laas.fr>
|
||||
|
||||
* test-suite/tests/vectors.test: Use `define-module'.
|
||||
(vector->list): New test prefix. "Shared array" test contributed
|
||||
|
|
|
@ -17,6 +17,8 @@
|
|||
;;;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
|
||||
;;;; Boston, MA 02110-1301 USA
|
||||
|
||||
(define-module (test-suite vectors)
|
||||
:use-module (test-suite lib))
|
||||
|
||||
;; FIXME: As soon as guile supports immutable vectors, this has to be
|
||||
;; replaced with the appropriate error type and message.
|
||||
|
@ -29,3 +31,13 @@
|
|||
(expect-fail-exception "vector constant"
|
||||
exception:immutable-vector
|
||||
(vector-set! '#(1 2 3) 0 4)))
|
||||
|
||||
(with-test-prefix "vector->list"
|
||||
|
||||
(pass-if "simple vector"
|
||||
(equal? '(1 2 3) (vector->list #(1 2 3))))
|
||||
|
||||
(pass-if "shared array"
|
||||
(let ((b (make-shared-array #(1) (lambda (x) '(0)) 2)))
|
||||
(equal? b (list->vector (vector->list b))))))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue