From: Taylor R Campbell Date: Thu, 8 Nov 2018 17:59:19 +0000 (+0000) Subject: Use multiple tests rather than an iterated test to get all results. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~116^2~1 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e42590240f4f61659b8326006d4ad4b6c72ce9c3;p=mit-scheme.git Use multiple tests rather than an iterated test to get all results. --- diff --git a/tests/runtime/test-floenv.scm b/tests/runtime/test-floenv.scm index 58146a7fc..b60e582f0 100644 --- a/tests/runtime/test-floenv.scm +++ b/tests/runtime/test-floenv.scm @@ -78,17 +78,12 @@ USA. (define inputs '(-2.0 -1.5 -1.0 -0.5 -0.0 0.0 0.5 1.0 1.5 2.0)) (define (define-rounding-test name operator outputs) (define-test (symbol 'ROUNDING-MODE-INDEPENDENT ': mode '/ name) - (lambda () - (do ((inputs inputs (cdr inputs)) - (outputs outputs (cdr outputs)) - (i 0 (+ i 1))) - ((not (and (pair? inputs) (pair? outputs)))) - (let ((input (car inputs)) (output (car outputs))) - (with-test-properties - (lambda () + (map (lambda (input output) + (lambda () (assert-eqv (flo:with-rounding-mode mode (lambda () (operator input))) - output)))))))) + output))) + inputs outputs))) (define-rounding-test 'CEILING ceiling '(-2.0 -1.0 -1.0 -0.0 -0.0 0.0 1.0 1.0 2.0 2.0)) (define-rounding-test 'FLOOR floor