1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-23 21:10:29 +02:00

(exception:wrong-num-indices): New, use it for array-set! tests with

wrong number of indices.
This commit is contained in:
Marius Vollmer 2005-01-10 01:44:34 +00:00
parent afaf9d0b01
commit 34ea161776

View file

@ -23,6 +23,9 @@
;;; array? ;;; array?
;;; ;;;
(define exception:wrong-num-indices
(cons 'misc-error "^wrong number of indices.*"))
(with-test-prefix "array?" (with-test-prefix "array?"
(let ((bool (make-typed-array 'b #t '(5 6))) (let ((bool (make-typed-array 'b #t '(5 6)))
@ -385,9 +388,9 @@
(array-set! a 'y 2 7)) (array-set! a 'y 2 7))
(pass-if-exception "end i+1" exception:out-of-range (pass-if-exception "end i+1" exception:out-of-range
(array-set! a 'y 6 9)) (array-set! a 'y 6 9))
(pass-if-exception "one index" exception:wrong-num-args (pass-if-exception "one index" exception:wrong-num-indices
(array-set! a 'y 4)) (array-set! a 'y 4))
(pass-if-exception "three indexes" exception:wrong-num-args (pass-if-exception "three indexes" exception:wrong-num-indices
(array-set! a 'y 4 8 0))))) (array-set! a 'y 4 8 0)))))
;;; ;;;