RASSOC
[jscl.git] / tests / conditionals.lisp
index 693fbba..af71104 100644 (file)
@@ -9,6 +9,16 @@
 ; 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))))