| 1 |
|
| 2 |
(add-tests-with-string-output "if" |
| 3 |
[(if #t 12 13) => "12\n"] |
| 4 |
[(if #f 12 13) => "13\n"] |
| 5 |
[(if 0 12 13) => "12\n"] |
| 6 |
[(if () 43 ()) => "43\n"] |
| 7 |
[(if #t (if 12 13 4) 17) => "13\n"] |
| 8 |
[(if #f 12 (if #f 13 4)) => "4\n"] |
| 9 |
[(if #\X (if 1 2 3) (if 4 5 6)) => "2\n"] |
| 10 |
[(if (not (boolean? #t)) 15 (boolean? #f)) => "#t\n"] |
| 11 |
[(if (if (char? #\a) (boolean? #\b) (fixnum? #\c)) 119 -23) => "-23\n"] |
| 12 |
[(if (if (if (not 1) (not 2) (not 3)) 4 5) 6 7) => "6\n"] |
| 13 |
[(if (not (if (if (not 1) (not 2) (not 3)) 4 5)) 6 7) => "7\n"] |
| 14 |
[(not (if (not (if (if (not 1) (not 2) (not 3)) 4 5)) 6 7)) => "#f\n"] |
| 15 |
[(if (char? 12) 13 14) => "14\n"] |
| 16 |
[(if (char? #\a) 13 14) => "13\n"] |
| 17 |
[(fxadd1 (if (fxsub1 1) (fxsub1 13) 14)) => "13\n"] |
| 18 |
) |