0.9.5.53:
[sbcl.git] / tests / condition.impure.lisp
index b454b4b..07b41e0 100644 (file)
 (defmethod frob-counted-condition ((x counted-condition)) x)
 (assert (= 0 *condition-count*))
 (assert (typep (sb-mop:class-prototype (find-class 'counted-condition))
-              '(and condition counted-condition)))
+               '(and condition counted-condition)))
+
+(define-condition picky-condition () ())
+(restart-case
+    (handler-case
+        (error 'picky-condition)
+      (picky-condition (c)
+        (assert (eq (car (compute-restarts)) (car (compute-restarts c))))))
+  (picky-restart ()
+    :report "Do nothing."
+    :test (lambda (c) (typep c 'picky-condition))
+    'ok))
 
 ;;; success
-(sb-ext:quit :unix-status 104)