Update of /cvsroot/sbcl/sbcl/tests
In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv15036/tests
Modified Files:
print.impure.lisp
Log Message:
1.0.17.33: fix PRINT-OBJECT cache
We mustn't compute the cached cache too early, otherwise we'll
cache effective methods before the actual methods (on RESTART
and the two storage-condition classes) are defined.
Index: print.impure.lisp
===================================================================
RCS file: /cvsroot/sbcl/sbcl/tests/print.impure.lisp,v
retrieving revision 1.40
retrieving revision 1.41
diff -u -d -r1.40 -r1.41
--- print.impure.lisp 13 Mar 2008 13:18:49 -0000 1.40
+++ print.impure.lisp 11 Jun 2008 20:04:23 -0000 1.41
@@ -433,4 +433,17 @@
(assert (string= (format nil "~R" (expt 10 63)) "one vigintillion"))
(assert (string= (format nil "~:R" (expt 10 63)) "one vigintillionth"))
+;;; too-clever cacheing for PRINT-OBJECT resulted in a bogus method
+;;; for printing RESTART objects. Check also CONTROL-STACK-EXHAUSTED
+;;; and HEAP-EXHAUSTED-ERROR.
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (find-restart 'abort)))))
+ (assert (string/= result "#<" :end1 2)))
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (make-condition 'sb-kernel::control-stack-exhausted)))))
+ (assert (string/= result "#<" :end1 2)))
+(let ((result (with-output-to-string (*standard-output*)
+ (princ (make-condition 'sb-kernel::heap-exhausted-error)))))
+ (assert (string/= result "#<" :end1 2)))
+
;;; success
|