1 (define-macro (test-cond condition name) ;; TODO watch out for name capture
2 `(let ((DUMMY-x ,condition))
5 (display " : PASSED\n")
6 (begin (display " : FAILED, got : ")
10 (test-cond (= (- 2 2) 0) "2 - 2 = 0")
11 (test-cond (= (- 5 3) 2) "5 - 3 = 0")
12 (test-cond (= (- 5 7) -2) "5 - 7 = -2")
13 (test-cond (= (- 4 0) 4) "4 - 0 = 4")
14 (test-cond (= (- 0 4) -4) "0 - 4 = -4")
15 (test-cond (= (- 2 -2) 4) "2 - -2 = 4")
16 (test-cond (= (- -2 -5) 3) "-2 - -5 = 3")
17 (test-cond (= (- -5 -2) -3) "-5 - -2 = -3")