X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=24b24d9432532ad7eb0137aa7d55878dae009832;hb=722a3f7ec83e075a483161ffff76e1392c66cc22;hp=a00da1df408af4d23ed7d709bef654e7b91f90ca;hpb=d013d00f48df21109627e5ad255c8acb9afef35b;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index a00da1d..24b24d9 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -356,10 +356,14 @@ ;;; DOCUMENTATION's argument-precedence-order wasn't being faithfully ;;; preserved through the bootstrap process until sbcl-0.7.8.39. ;;; (thanks to Gerd Moellmann) -(let ((answer (documentation '+ 'function))) - (assert (stringp answer)) - (defmethod documentation ((x (eql '+)) y) "WRONG") - (assert (string= (documentation '+ 'function) answer))) +(with-test (:name :documentation-argument-precedence-order) + (defun foo022 () + "Documentation" + t) + (let ((answer (documentation 'foo022 'function))) + (assert (stringp answer)) + (defmethod documentation ((x (eql 'foo022)) y) "WRONG") + (assert (string= (documentation 'foo022 'function) answer)))) ;;; only certain declarations are permitted in DEFGENERIC (macrolet ((assert-program-error (form) @@ -1897,4 +1901,23 @@ (sb-pcl::generic-function-pretty-arglist #'generic-function-pretty-arglist-optional-and-key))))) +(with-test (:name :bug-894202) + (assert (eq :good + (handler-case + (let ((name (gensym "FOO")) + (decl (gensym "BAR"))) + (eval `(defgeneric ,name () + (declare (,decl))))) + (warning () + :good))))) + +(with-test (:name :bug-898331) + (handler-bind ((warning #'error)) + (eval `(defgeneric bug-898331 (request type remaining-segment-requests all-requests))) + (eval `(defmethod bug-898331 ((request cons) (type (eql :cancel)) + remaining-segment-requests + all-segment-requests) + (declare (ignore all-segment-requests)) + (check-type request t))))) + ;;;; success