Update of /project/elephant/cvsroot/elephant/tests In directory common-lisp.net:/tmp/cvs-serv4404/tests
Modified Files: mop-tests.lisp elephant-tests.lisp Log Message: mop updates : update-class, change-class, new slot allocation type...
Date: Thu Feb 24 02:07:51 2005 Author: blee
Index: elephant/tests/mop-tests.lisp diff -u elephant/tests/mop-tests.lisp:1.6 elephant/tests/mop-tests.lisp:1.7 --- elephant/tests/mop-tests.lisp:1.6 Tue Sep 21 21:36:34 2004 +++ elephant/tests/mop-tests.lisp Thu Feb 24 02:07:51 2005 @@ -154,7 +154,8 @@ (defclass no-eval-initform () ((slot1 :initarg :slot1 :initform (error "Shouldn't be called"))) (:metaclass persistent-metaclass)) - (make-instance 'no-eval-initform :slot1 "something") + (let ((*auto-commit* t)) + (make-instance 'no-eval-initform :slot1 "something")) t) t)
@@ -218,4 +219,26 @@ (let ((foo (make-instance 'btree))) (change-class foo (find-class 'indexed-btree)) (is-not-null (indices foo)))) - t) \ No newline at end of file + t) + +(deftest change-class3 + (progn + (defclass class-one () + ((slot1 :accessor slot1)) + (:metaclass persistent-metaclass)) + + (defclass class-two () + ((slot1 :initform 0 :accessor slot1) + (slot2 :initform 2 :accessor slot2)) + (:metaclass persistent-metaclass)) + + (let* ((*auto-commit* t) + (foo (make-instance 'class-one))) + (change-class foo (find-class 'class-two)) + (values + (slot1 foo) + (slot2 foo)))) + 0 2) + + +
Index: elephant/tests/elephant-tests.lisp diff -u elephant/tests/elephant-tests.lisp:1.4 elephant/tests/elephant-tests.lisp:1.5 --- elephant/tests/elephant-tests.lisp:1.4 Tue Sep 21 03:38:12 2004 +++ elephant/tests/elephant-tests.lisp Thu Feb 24 02:07:51 2005 @@ -89,6 +89,13 @@ #p"tests/testdb/" (asdf:component-pathname (asdf:find-system 'elephant-tests)))))
+(defvar *sleepycatdb-path* + ;;"/usr/local/share/common-lisp/elephant-0.2/tests/testdb" + (namestring + (merge-pathnames + #p"tests/sleepycatdb/" + (asdf:component-pathname (asdf:find-system 'elephant-tests))))) + (defun do-all-tests() (with-open-store (*testdb-path*) (let ((*auto-commit* nil))