Fix comment
[jscl.git] / tests / conditionals.lisp
index 9a73dc5..af71104 100644 (file)
@@ -8,6 +8,17 @@
 
 ; COND
 (test (eql nil (cond)))
+(test (=   1   (cond (1))))
+(test (= 1
+         (let ((x 0))
+           (cond ((incf x))))))
 (test (=   2   (cond (1 2))))
 (test (=   3   (cond (nil 1) (2 3))))
 (test (eql nil (cond (nil 1) (nil 2))))
+
+; CASE
+
+(test (= (case 1 (2 3) (otherwise 42)) 42))
+(test (= (case 1 (2 3) (t 42)) 42))
+(test (= (case 1 (2 3) (1 42)) 42))
+(test (null (case 1 (2 3))))