X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=a00da1df408af4d23ed7d709bef654e7b91f90ca;hb=86d50ba6266c823eedd444c4e1c5a55e9dc7f46a;hp=ec9dffcb10006840dd63b2d5904cac567ff635d1;hpb=71b57577217f8efce2077b8840cca6612c2777f8;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index ec9dffc..a00da1d 100644 --- a/tests/clos.impure.lisp +++ b/tests/clos.impure.lisp @@ -1872,4 +1872,29 @@ (symbol-name s))) (assert (equal "FOO" (funcall 'lp-618387 :foo))))) +(with-test (:name :pcl-spurious-ignore-warnings) + (defgeneric no-spurious-ignore-warnings (req &key key)) + (handler-bind ((warning (lambda (x) (error "~A" x)))) + (eval + '(defmethod no-spurious-ignore-warnings ((req number) &key key) + (declare (ignore key)) + (check-type req integer)))) + (defgeneric should-get-an-ignore-warning (req &key key)) + (let ((warnings 0)) + (handler-bind ((warning (lambda (c) (setq warnings 1) (muffle-warning c)))) + (eval '(defmethod should-get-an-ignore-warning ((req integer) &key key) + (check-type req integer)))) + (assert (= warnings 1)))) + +(defgeneric generic-function-pretty-arglist-optional-and-key (req &optional opt &key key) + (:method (req &optional opt &key key) + (list req opt key))) + +(with-test (:name :generic-function-pretty-arglist-optional-and-key) + (handler-bind ((warning #'error)) + ;; Used to signal a style-warning + (assert (equal '(req &optional opt &key key) + (sb-pcl::generic-function-pretty-arglist + #'generic-function-pretty-arglist-optional-and-key))))) + ;;;; success