code: added equiv predicate

This commit is contained in:
Matthias Felleisen 2014-01-26 11:33:46 -08:00
parent b020b8aee7
commit 6da7f382fc

View File

@ -2394,9 +2394,11 @@
(define-syntax (test-equal stx) (define-syntax (test-equal stx)
(syntax-case stx () (syntax-case stx ()
[(_ e1 e2) [(_ e1 e2)
#`(test-equal/proc e1 e2 #,(get-srcloc stx))])) #`(test-equal/proc e1 e2 #,(get-srcloc stx) equal?)]
[(_ e1 e2 #:equiv ~equal?)
#`(test-equal/proc e1 e2 #,(get-srcloc stx) ~equal?)]))
(define (test-equal/proc v1 v2 srcinfo) (define (test-equal/proc v1 v2 srcinfo equal?)
(inc-tests) (inc-tests)
(unless (equal? v1 v2) (unless (equal? v1 v2)
(inc-failures) (inc-failures)