From: Taylor R Campbell Date: Wed, 7 Nov 2018 03:08:28 +0000 (+0000) Subject: Confirm the primitive respects the bounds too. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~116^2~40 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=bf35ea027bf100dcf7d1a47ca5939c534ccefb03;p=mit-scheme.git Confirm the primitive respects the bounds too. --- diff --git a/tests/microcode/test-chacha.scm b/tests/microcode/test-chacha.scm index 411c41063..fad879361 100644 --- a/tests/microcode/test-chacha.scm +++ b/tests/microcode/test-chacha.scm @@ -76,8 +76,12 @@ USA. (constant (string->utf8 "expand 32-byte k")) (primitive (make-primitive-procedure name 5))) (define (zv n) (make-bytevector n 0)) + (bytevector-u8-set! output 64 #xff) (primitive output 0 input key constant) + (assert-= (bytevector-u8-ref output 64) #xff) + (bytevector-u8-set! output 0 #xff) (primitive output 1 input key constant) + (assert-= (bytevector-u8-ref output 0) #xff) (assert-error (lambda () (primitive output -1 input key constant))) (assert-error (lambda () (primitive output 2 input key constant))) (assert-error (lambda () (primitive output 3 input key constant)))