From 14f0799d716b5c02783225266966fb48eb5bca4b Mon Sep 17 00:00:00 2001 From: Taylor R Campbell Date: Tue, 13 Nov 2018 07:26:05 +0000 Subject: [PATCH] Simplify enumerated tests here. --- tests/runtime/test-ieee754.scm | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) 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) -- 2.25.1