X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fclos.impure.lisp;h=cf876d9249dccffee1de3fa7a0b0e9affa9cc8c6;hb=219cc40793f9c82fb943b29a1846f898f4f9de1e;hp=56fb8c374a5370f9c7dcc4ce650799528535b67b;hpb=b5cb7e8676a8bb88e647ceaf5f2571943b960c05;p=sbcl.git diff --git a/tests/clos.impure.lisp b/tests/clos.impure.lisp index 56fb8c3..cf876d9 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) @@ -1886,6 +1890,15 @@ (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