From efd59562eea237834ecdd81b5f7749222623d704 Mon Sep 17 00:00:00 2001 From: Jim Blandy Date: Sun, 1 Aug 1999 08:06:15 +0000 Subject: [PATCH] * tests/r4rs.test (SECTION 3 4): Each element of type-matrix corresponds to an example object, not a predicate. Aubrey probably never noticed this because SCM doesn't check the lengths of the arguments to for-each and map... --- test-suite/tests/r4rs.test | 29 +++++++++++++++-------------- 1 file changed, 15 insertions(+), 14 deletions(-) diff --git a/test-suite/tests/r4rs.test b/test-suite/tests/r4rs.test index 8bcd2bbb1..c915b515c 100644 --- a/test-suite/tests/r4rs.test +++ b/test-suite/tests/r4rs.test @@ -110,23 +110,24 @@ (list boolean? char? null? number? pair? procedure? string? symbol? vector?)) (define type-examples (list - #t #f #\a '() 9739 '(test) record-error "test" "" 'test '#() '#(a b c) )) -(define i 1) + #t #f #\a '() 9739 '(test) (lambda () #f) car "test" "" 'test + '#() '#(a b c))) (define type-matrix (map (lambda (x) - (let ((t (map (lambda (f) (f x)) disjoint-type-functions))) - t)) + (let ((t (map (lambda (f) (f x)) disjoint-type-functions))) + t)) type-examples)) -(for-each (lambda (predicate row) - (let ((count (apply + (map (lambda (elt) (if elt 1 0)) - row)))) - (pass-if (call-with-output-string - (lambda (port) - (display "predicate is disjoint: " port) - (display predicate port))) - (= count 1)))) - disjoint-type-functions - type-matrix) +(for-each (lambda (object row) + (let ((count (apply + (map (lambda (elt) (if elt 1 0)) + row)))) + (pass-if (call-with-output-string + (lambda (port) + (display "object recognized by only one predicate: " + port) + (display object port))) + (= count 1)))) + type-examples + type-matrix) (SECTION 4 1 2) (test '(quote a) 'quote (quote 'a))