0.9.7.10:
[sbcl.git] / tests / interface.impure.lisp
1 ;;;; tests for problems in the interface presented to the user/programmer
2
3 ;;;; This software is part of the SBCL system. See the README file for
4 ;;;; more information.
5 ;;;;
6 ;;;; While most of SBCL is derived from the CMU CL system, the test
7 ;;;; files (like this one) were written from scratch after the fork
8 ;;;; from CMU CL.
9 ;;;;
10 ;;;; This software is in the public domain and is provided with
11 ;;;; absolutely no warranty. See the COPYING and CREDITS files for
12 ;;;; more information.
13
14 (load "assertoid.lisp")
15 (use-package "ASSERTOID")
16
17 (defun (setf foo) (x)
18   "(setf foo) documentation"
19   x)
20
21 (assert (string= (documentation '(setf foo) 'function)
22                  "(setf foo) documentation"))
23 (assert (string= (documentation #'(setf foo) 'function)
24                  "(setf foo) documentation"))
25
26 (assert (string= (documentation '(setf foo) 'function)
27                  "(setf foo) documentation"))
28 (assert (string= (documentation #'(setf foo) 'function)
29                  "(setf foo) documentation"))
30 \f
31 ;;; DISASSEMBLE shouldn't fail on closures or unpurified functions
32 (defun disassemble-fun (x) x)
33 (disassemble 'disassemble-fun)
34
35 (let ((x 1)) (defun disassemble-closure (y) (if y (setq x y) x)))
36 (disassemble 'disassemble-closure)
37 \f
38 ;;;; success