[elephant-cvs] CVS elephant/tests

ieslick ieslick at common-lisp.net
Wed Feb 21 06:29:32 UTC 2007


Update of /project/elephant/cvsroot/elephant/tests
In directory clnet:/tmp/cvs-serv26319/tests

Modified Files:
	testindexing.lisp 
Log Message:
Fix to slot-makunbound handling for indexed slots and a regression test to validate

--- /project/elephant/cvsroot/elephant/tests/testindexing.lisp	2007/02/20 19:12:59	1.27
+++ /project/elephant/cvsroot/elephant/tests/testindexing.lisp	2007/02/21 06:29:32	1.28
@@ -186,6 +186,28 @@
       )
   t t t)
 
+(deftest indexing-slot-makunbound
+    (progn
+      (when (class-indexedp-by-name 'idx-unbound-del)
+	(disable-class-indexing 'idx-unbound-del :errorp nil)
+	(setf (find-class 'idx-five-del) nil))
+
+      (defclass idx-unbound-del ()
+	((slot1 :initarg :slot1 :initform 1 :accessor slot1 :index t))
+	(:metaclass persistent-metaclass))
+
+      (with-transaction (:store-controller *store-controller*)
+	(make-instance 'idx-unbound-del :slot1 10))
+
+      (let ((orig-len (length (get-instances-by-class 'idx-unbound-del)))
+	    (orig-obj (get-instance-by-value 'idx-unbound-del 'slot1 10)))
+	(slot-makunbound orig-obj 'name)
+	(let ((new-len (length (get-instances-by-class 'idx-unbound-del))) 
+	      (index-obj (get-instance-by-value 'idx-unbound-del 'slot1 10)))
+	  (values orig-len new-len index-obj))))
+  1 1 nil)
+      
+
 (deftest indexing-wipe-index
     (progn 
       (when (class-indexedp-by-name 'idx-five-del )




More information about the Elephant-cvs mailing list