From: Taylor R Campbell Date: Tue, 13 Nov 2018 07:26:05 +0000 (+0000) Subject: Simplify enumerated tests here. X-Git-Tag: mit-scheme-pucked-10.1.2~16^2~100 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=14f0799d716b5c02783225266966fb48eb5bca4b;p=mit-scheme.git Simplify enumerated tests here. --- diff --git a/tests/runtime/test-ieee754.scm b/tests/runtime/test-ieee754.scm index b04ba5405..fd36178ac 100644 --- a/tests/runtime/test-ieee754.scm +++ b/tests/runtime/test-ieee754.scm @@ -26,14 +26,11 @@ USA. ;;;; Test of IEEE 754 utilities -(define (define-enumerated-test prefix elements procedure) - (do ((i 0 (+ i 1)) - (elements elements (cdr elements))) - ((not (pair? elements))) - (let ((element (car elements))) - (define-test (symbol prefix '/ element) - (lambda () - (procedure element)))))) +(define (define-enumerated-test name elements procedure) + (define-test name + (map (lambda (element) + (lambda () (procedure element))) + elements))) (define ((test-ieee754-roundtrip w t bexp-inf/nan compose exact? decompose) bits)