Compare expected value and the result only once.

Signed-off-by: OGINO Masanori <masanori.ogino@gmail.com>
This commit is contained in:
OGINO Masanori 2015-07-21 15:12:43 +09:00
parent 24b4cafe65
commit 1455c7d4a5
1 changed files with 23 additions and 24 deletions

View File

@ -39,16 +39,15 @@
(let ((res expr)) (let ((res expr))
(display "case ") (display "case ")
(write counter) (write counter)
(cond (if (equal? res expected)
((equal? res expected) (begin
(display " PASS: ") (display " PASS: ")
(write 'expr) (write 'expr)
(display " equals ") (display " equals ")
(write expected) (write expected)
(display "") (display "")
(newline) (newline))
) (begin
((not (equal? res expected))
(set! failure-counter (+ failure-counter 1)) (set! failure-counter (+ failure-counter 1))
(let ((out (open-output-string))) (let ((out (open-output-string)))
(display " FAIL: " out) (display " FAIL: " out)