[elephant-cvs] CVS elephant/tests
ieslick
ieslick at common-lisp.net
Sat Apr 28 02:31:41 UTC 2007
Update of /project/elephant/cvsroot/elephant/tests
In directory clnet:/tmp/cvs-serv16753/tests
Modified Files:
elephant-tests.lisp testconditions.lisp
Log Message:
Cleaning up root directory files; map-index performance enhancement, index api cleanup, ensure transaction fix, alpha quality documentation draft
--- /project/elephant/cvsroot/elephant/tests/elephant-tests.lisp 2007/03/30 14:34:35 1.31
+++ /project/elephant/cvsroot/elephant/tests/elephant-tests.lisp 2007/04/28 02:31:31 1.32
@@ -300,9 +300,15 @@
(defmacro signals-condition (&body body)
`(handler-case
- (progn , at body)
- (condition () t)
- (:no-error (&rest rest) (declare (ignore rest)) nil)))
+ (progn , at body)
+ (condition () t)
+ (:no-error (&rest rest) (declare (ignore rest)) nil)))
+
+(defmacro signals-specific-condition ((condition) &body body)
+ `(handler-case
+ (progn , at body)
+ (,condition () t)
+ (:no-error (&rest rest) (declare (ignore rest)) nil)))
(defmacro signals-error (&body body)
`(handler-case
--- /project/elephant/cvsroot/elephant/tests/testconditions.lisp 2007/04/22 03:02:35 1.2
+++ /project/elephant/cvsroot/elephant/tests/testconditions.lisp 2007/04/28 02:31:31 1.3
@@ -28,8 +28,17 @@
(values
(is-not-null (add-to-root 'inst1 inst1 :sc sc1))
(is-not-null (add-to-root 'inst2 inst2 :sc sc2))
- (signals-condition (add-to-root 'inst1 inst1 :sc2))
- (signals-condition (add-to-root 'inst2 inst2 :sc1))))
+ (signals-specific-condition (cross-reference-error)
+ (add-to-root 'inst1 inst1 :sc sc2))
+ (signals-specific-condition (cross-reference-error)
+ (add-to-root 'inst2 inst2 :sc sc1))))
(close-store sc1)
(close-store sc2))))
- t t t t)
\ No newline at end of file
+ t t t t)
+
+(deftest unindexed-class-condition
+ (let* ((sc (open-store *test-spec-primary* :recover t :deadlock-detect nil))
+ (inst (make-instance 'pfoo :slot1 1 :sc sc)))
+ (signals-specific-condition (persistent-class-not-indexed)
+ (find-class-index 'pfoo :sc sc)))
+ t)
\ No newline at end of file
More information about the Elephant-cvs
mailing list