OSDN Git Service

[1] A test for macro 'aif' was added.
authorU-tackya-PC\tackya <yammouch@users.sourceforge.jp>
Fri, 31 Dec 2010 13:35:29 +0000 (22:35 +0900)
committerU-tackya-PC\tackya <yammouch@users.sourceforge.jp>
Fri, 31 Dec 2010 13:35:29 +0000 (22:35 +0900)
modified:   test-utils.lisp

test/test-utils.lisp

index 8711992..c7f7fb9 100755 (executable)
 (assert (eql 3
              (funcall (rcurry #'- 2) 5)))
 
+; tests for 'aif'
+(let ((exp '(let ((it pred))
+              (if it true false)))
+      (val (macroexpand-1 '(aif pred true false))))
+  (assert (not (eql (um:unify val exp)
+                    um:fail))
+          nil
+          "aif test  exp: ~A, val: ~A" exp val))
+
 ; tests for 'aif2'
 (assert
   (um:if-match '(mvbind (it ?win) pred