(declare (extended-bindings) (not constant-fold) (not safe))

(define v1 (##s16vector -32768 -111 0 111 32767))
(define v2 (##make-s16vector 10 -32768))
(define v3 (##make-s16vector 10 -111))
(define v4 (##make-s16vector 10))
(define v5 (##make-s16vector 10 111))
(define v6 (##make-s16vector 10 32767))
(define v7 '#s16(-32768 -111 0 111 32767))

(define (test v i expected)
  (let ((val (##s16vector-ref v i))) 
    (println (if (##fx= val expected) "good" "bad"))))

(test v1 0 -32768)
(test v1 1 -111)
(test v1 2 0)
(test v1 3 111)
(test v1 4 32767)

(test v2 9 -32768)
(test v3 9 -111)
(test v4 9 0)
(test v5 9 111)
(test v6 9 32767)

(test v7 0 -32768)
(test v7 1 -111)
(test v7 2 0)
(test v7 3 111)
(test v7 4 32767)
