test: added equiv predicate

This commit is contained in:
Matthias Felleisen 2014-01-26 16:21:55 -05:00
parent 22681c5639
commit 25537f7daf

View File

@ -3212,6 +3212,13 @@
(test (capture-output (test-equal (term (f 1)) (term ((1))))
(test-results))
"One test passed.\n"))
(let ()
(define-metafunction empty-language [(f any) ((any))])
(define (my-equal? x y) (and (memq x '(a b c)) (memq y '(a b c))))
(test (capture-output (test-equal (term a) (term b) #:equiv my-equal?)
(test-results))
"One test passed.\n"))
(let ()
(test (capture-output (test-predicate odd? 1)