3 ;;; We should be able to output X readably (at least when *READ-EVAL*).
4 (defun assert-readable-output (x)
7 (read-from-string (with-output-to-string (s)
8 (write x :stream s :readably t)))))))
10 ;;; Even when *READ-EVAL* is NIL, we should be able to output some
11 ;;; (not necessarily readable) representation without signalling an
13 (defun assert-unreadable-output (x)
14 (let ((*read-eval* nil))
15 (with-output-to-string (s) (write x :stream s :readably nil))))
17 (defun assert-output (x)
18 (assert-readable-output x)
19 (assert-unreadable-output x))
21 ;;; Nathan Froyd reported that sbcl-0.6.11.34 screwed up output of
22 ;;; floating point infinities.
23 (dolist (x (list short-float-positive-infinity short-float-negative-infinity
24 single-float-positive-infinity single-float-negative-infinity
25 double-float-positive-infinity double-float-negative-infinity
26 long-float-positive-infinity long-float-negative-infinity))
30 (quit :unix-status 104)