Fix clos.impure.lisp DOCUMENTATION test on #-sb-doc.
authorStas Boukarev <stassats@gmail.com>
Thu, 1 Dec 2011 14:34:37 +0000 (18:34 +0400)
committerStas Boukarev <stassats@gmail.com>
Thu, 1 Dec 2011 14:34:37 +0000 (18:34 +0400)
Don't rely on docstrings being present on standard functions
when testing DOCUMENTATION.

tests/clos.impure.lisp

index a00da1d..cf876d9 100644 (file)
 ;;; 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))))
 \f
 ;;; only certain declarations are permitted in DEFGENERIC
 (macrolet ((assert-program-error (form)