From: Taylor R Campbell Date: Wed, 7 Nov 2018 05:10:18 +0000 (+0000) Subject: Make some of my stupid old randomized tests a little less slow. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~116^2~36 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=dd4a821cec445d90567c12bc3ceffd0e0f979777;p=mit-scheme.git Make some of my stupid old randomized tests a little less slow. Would be better to rewrite these so they're not as stupid. --- diff --git a/tests/runtime/test-integer-bits.scm b/tests/runtime/test-integer-bits.scm index ef2bcbd15..575c7a5a8 100644 --- a/tests/runtime/test-integer-bits.scm +++ b/tests/runtime/test-integer-bits.scm @@ -51,19 +51,19 @@ USA. (random-integer-of-weight (random-integer (+ n 1)) n))) (define (randomly-generate-integers procedure) - (do ((i 0 (+ i 1))) ((= i #x100)) + (do ((i 0 (+ i 1))) ((= i (if keep-it-fast!? 8 #x100))) (procedure (random-large-integer)))) (define (randomly-generate-fixnums procedure) - (do ((i 0 (+ i 1))) ((= i #x1000)) + (do ((i 0 (+ i 1))) ((= i (if keep-it-fast!? #x10 #x1000))) (procedure (random-fixnum)))) (define (randomly-generate-integer-pairs procedure) - (do ((i 0 (+ i 1))) ((= i #x100)) + (do ((i 0 (+ i 1))) ((= i (if keep-it-fast!? 8 #x100))) (procedure (random-large-integer) (random-large-integer)))) (define (randomly-generate-fixnum-pairs procedure) - (do ((i 0 (+ i 1))) ((= i #x1000)) + (do ((i 0 (+ i 1))) ((= i (if keep-it-fast!? #x10 #x1000))) (procedure (random-fixnum) (random-fixnum)))) (define (define-random-unary-fixnum-test name procedure) @@ -377,7 +377,7 @@ USA. (define-test 'BIT-MASK (lambda () - (do ((i 0 (+ i 1))) ((>= i #x1000)) + (do ((i 0 (+ i 1))) ((>= i (if keep-it-fast!? #x10 #x1000))) (let ((size (random-integer #x1000)) (position (random-integer #x1000))) (assert-eqv (bit-mask size position) @@ -387,7 +387,7 @@ USA. (define-test 'BIT-ANTIMASK (lambda () - (do ((i 0 (+ i 1))) ((>= i #x1000)) + (do ((i 0 (+ i 1))) ((>= i (if keep-it-fast!? #x10 #x1000))) (let ((size (random-integer #x1000)) (position (random-integer #x1000))) (assert-eqv (bit-antimask size position) @@ -398,7 +398,7 @@ USA. (define (define-per-bit-test name procedure) (define-test name (lambda () - (do ((i 0 (+ i 1))) ((>= i #x100)) + (do ((i 0 (+ i 1))) ((>= i (if keep-it-fast!? 8 #x100))) (procedure (random-integer-of-weight (random-integer #x1000) #x1000) (random-integer #x1000))))))