Add an optional comparator argument to test.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
parent
1455c7d4a5
commit
f345832b44
|
@ -36,10 +36,12 @@
|
||||||
(define-syntax test
|
(define-syntax test
|
||||||
(syntax-rules ()
|
(syntax-rules ()
|
||||||
((test expected expr)
|
((test expected expr)
|
||||||
|
(test expected expr equal?))
|
||||||
|
((test expected expr =)
|
||||||
(let ((res expr))
|
(let ((res expr))
|
||||||
(display "case ")
|
(display "case ")
|
||||||
(write counter)
|
(write counter)
|
||||||
(if (equal? res expected)
|
(if (= res expected)
|
||||||
(begin
|
(begin
|
||||||
(display "[0;32m PASS: ")
|
(display "[0;32m PASS: ")
|
||||||
(write 'expr)
|
(write 'expr)
|
||||||
|
|
Loading…
Reference in New Issue