I broke random-bytevector for large inputs.
authorTaylor R Campbell <campbell@mumble.net>
Thu, 8 Nov 2018 02:11:54 +0000 (02:11 +0000)
committerTaylor R Campbell <campbell@mumble.net>
Thu, 8 Nov 2018 02:11:54 +0000 (02:11 +0000)
tests/runtime/test-random.scm

index bd12ab2b51238011c7170343fd8c7a68a9d11a09..19dedf16cba25e8138f6584e7b70dfe4bbf1d644 100644 (file)
@@ -57,6 +57,12 @@ USA.
       (random-source-randomize! s0)
       (assert-!= ((random-source-make-integers s0) (expt 2 32))
                 ((random-source-make-integers s1) (expt 2 32))))))
+
+(define-test 'random-bytevector-large
+  (lambda ()
+    (assert-error
+     (lambda ()
+       (assert-= (bytevector-length (random-bytevector 1088)) 1088)))))
 \f
 (define (define-random-test name procedure)
   (define-test name