From e42590240f4f61659b8326006d4ad4b6c72ce9c3 Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Thu, 8 Nov 2018 17:59:19 +0000 Subject: [PATCH] Use multiple tests rather than an iterated test to get all results. --- tests/runtime/test-floenv.scm | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) 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 -- 2.25.1