(with-test-prefix "array-set!"
+ (with-test-prefix "byte"
+
+ (let ((a (make-uniform-array #\nul 1)))
+
+ (pass-if "-128"
+ (begin (array-set! a -128 0) #t))
+ (pass-if "0"
+ (begin (array-set! a 0 0) #t))
+ (pass-if "127"
+ (begin (array-set! a 127 0) #t))
+ (pass-if-exception "-129" exception:out-of-range
+ (begin (array-set! a -129 0) #t))
+ (pass-if-exception "128" exception:out-of-range
+ (begin (array-set! a 128 0) #t))
+
+ (pass-if "#\\nul"
+ (begin (array-set! a #\nul 0) #t))
+ (pass-if "#\\del"
+ (begin (array-set! a #\del 0) #t))
+ (pass-if "char 255"
+ (begin (array-set! a (integer->char 255) 0) #t))))
+
(with-test-prefix "short"
(let ((a (make-uniform-array 's 1)))