Fix comment
[jscl.git] / tests / conditionals.lisp
1 ; Tests for conditional forms
2 ; Boolean operators
3 (test (eql (and nil 1) nil))
4 (test (=   (and 1   2)   2))
5
6 (test (= (or  nil 1)   1))
7 (test (= (or  1   2)   1))
8
9 ; COND
10 (test (eql nil (cond)))
11 (test (=   1   (cond (1))))
12 (test (= 1
13          (let ((x 0))
14            (cond ((incf x))))))
15 (test (=   2   (cond (1 2))))
16 (test (=   3   (cond (nil 1) (2 3))))
17 (test (eql nil (cond (nil 1) (nil 2))))
18
19 ; CASE
20
21 (test (= (case 1 (2 3) (otherwise 42)) 42))
22 (test (= (case 1 (2 3) (t 42)) 42))
23 (test (= (case 1 (2 3) (1 42)) 42))
24 (test (null (case 1 (2 3))))