mirror of
https://git.savannah.gnu.org/git/guile.git
synced 2025-06-29 22:40:34 +02:00
* 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...
This commit is contained in:
parent
1b0549522b
commit
efd59562ee
1 changed files with 15 additions and 14 deletions
|
@ -110,23 +110,24 @@
|
||||||
(list boolean? char? null? number? pair? procedure? string? symbol? vector?))
|
(list boolean? char? null? number? pair? procedure? string? symbol? vector?))
|
||||||
(define type-examples
|
(define type-examples
|
||||||
(list
|
(list
|
||||||
#t #f #\a '() 9739 '(test) record-error "test" "" 'test '#() '#(a b c) ))
|
#t #f #\a '() 9739 '(test) (lambda () #f) car "test" "" 'test
|
||||||
(define i 1)
|
'#() '#(a b c)))
|
||||||
(define type-matrix
|
(define type-matrix
|
||||||
(map (lambda (x)
|
(map (lambda (x)
|
||||||
(let ((t (map (lambda (f) (f x)) disjoint-type-functions)))
|
(let ((t (map (lambda (f) (f x)) disjoint-type-functions)))
|
||||||
t))
|
t))
|
||||||
type-examples))
|
type-examples))
|
||||||
(for-each (lambda (predicate row)
|
(for-each (lambda (object row)
|
||||||
(let ((count (apply + (map (lambda (elt) (if elt 1 0))
|
(let ((count (apply + (map (lambda (elt) (if elt 1 0))
|
||||||
row))))
|
row))))
|
||||||
(pass-if (call-with-output-string
|
(pass-if (call-with-output-string
|
||||||
(lambda (port)
|
(lambda (port)
|
||||||
(display "predicate is disjoint: " port)
|
(display "object recognized by only one predicate: "
|
||||||
(display predicate port)))
|
port)
|
||||||
(= count 1))))
|
(display object port)))
|
||||||
disjoint-type-functions
|
(= count 1))))
|
||||||
type-matrix)
|
type-examples
|
||||||
|
type-matrix)
|
||||||
|
|
||||||
(SECTION 4 1 2)
|
(SECTION 4 1 2)
|
||||||
(test '(quote a) 'quote (quote 'a))
|
(test '(quote a) 'quote (quote 'a))
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue