test: added equiv predicate
This commit is contained in:
parent
22681c5639
commit
25537f7daf
|
@ -3212,6 +3212,13 @@
|
||||||
(test (capture-output (test-equal (term (f 1)) (term ((1))))
|
(test (capture-output (test-equal (term (f 1)) (term ((1))))
|
||||||
(test-results))
|
(test-results))
|
||||||
"One test passed.\n"))
|
"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 ()
|
(let ()
|
||||||
(test (capture-output (test-predicate odd? 1)
|
(test (capture-output (test-predicate odd? 1)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user