Update of /project/cells/cvsroot/cells/cells-test In directory clnet:/tmp/cvs-serv10324/cells-test
Modified Files: test-lazy.lisp Log Message:
--- /project/cells/cvsroot/cells/cells-test/test-lazy.lisp 2006/03/16 05:22:08 1.3 +++ /project/cells/cvsroot/cells/cells-test/test-lazy.lisp 2006/07/06 22:10:02 1.4 @@ -118,3 +118,24 @@
#+(or) (cv-test-lazy) + +(defparameter *lz1-count* 0) + +(defmd lz-simple () + (lz1 (c?_ (incf *lz1-count*) + (* 2 (^lz2)))) + (lz2 (c-in 0))) + +(defun lz-test () + (cells-reset) + (let ((*lz1-count* 0) + (lz (make-instance 'lz-simple))) + (assert (zerop *lz1-count*)) + (incf (lz2 lz)) + (assert (zerop *lz1-count*)) + (assert (= (lz1 lz) 2)) + (assert (= 1 *lz1-count*)) + lz)) + +#+test +(lz-test)