Compare expected value and the result only once.
Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
parent
24b4cafe65
commit
1455c7d4a5
|
@ -39,16 +39,15 @@
|
|||
(let ((res expr))
|
||||
(display "case ")
|
||||
(write counter)
|
||||
(cond
|
||||
((equal? res expected)
|
||||
(if (equal? res expected)
|
||||
(begin
|
||||
(display "[0;32m PASS: ")
|
||||
(write 'expr)
|
||||
(display " equals ")
|
||||
(write expected)
|
||||
(display "[0;39m")
|
||||
(newline)
|
||||
)
|
||||
((not (equal? res expected))
|
||||
(newline))
|
||||
(begin
|
||||
(set! failure-counter (+ failure-counter 1))
|
||||
(let ((out (open-output-string)))
|
||||
(display " [0;31mFAIL: " out)
|
||||
|
|
Loading…
Reference in New Issue