[funds-cvs] r89 - trunk/funds/tests/trees

abaine at common-lisp.net abaine at common-lisp.net
Wed Jul 11 20:42:03 UTC 2007


Author: abaine
Date: Wed Jul 11 16:42:03 2007
New Revision: 89

Modified:
   trunk/funds/tests/trees/avl-tree-test.lisp
Log:
Added test-tree-remove test.

Modified: trunk/funds/tests/trees/avl-tree-test.lisp
==============================================================================
--- trunk/funds/tests/trees/avl-tree-test.lisp	(original)
+++ trunk/funds/tests/trees/avl-tree-test.lisp	Wed Jul 11 16:42:03 2007
@@ -37,6 +37,11 @@
   (let ((tree (random-tree)))
     (assert-avl-valid tree)))
 
+(define-test test-tree-remove
+  (loop with tree = (random-tree)
+	until (tree-empty-p tree)
+	do (assert-avl-valid (setf tree (tree-remove tree (random 20))))))
+
 (defun random-tree (&key (test #'eql) (order #'<))
   (reduce #'(lambda (tr v)
 	      (tree-insert  tr v v :test test :order order))



More information about the Funds-cvs mailing list