0.9.6.25:
[sbcl.git] / contrib / sb-introspect / test.lisp
1 ;; Do not alter this file unless you edit test-driver.lisp to match
2 (declaim (optimize (debug 3)))
3 (in-package :cl-user)
4
5 (defun one (a b c) (+ a b c))
6
7 (defgeneric two (a b))
8 (defmethod two ((a number) b)
9   (* 2 a))
10
11 (defstruct three four five)
12
13 (with-compilation-unit (:source-plist (list :test-inner "IN"))
14   (eval '(defun four () 4)))
15
16 "oops-off-by-one"
17
18 (defparameter *a* 1)
19
20 (defvar *b* 2)
21
22 (defclass a ()
23   (a))
24
25 (define-condition b (warning) (a))
26
27 (defstruct c e f)
28
29 (defstruct (d (:type list)) e f)
30
31 (defpackage e (:use :cl))
32
33 (define-symbol-macro f 'e)
34
35 (deftype g () 'fixnum)
36
37 (defconstant +h+ 1)
38
39 (defmethod j ((a t))
40   2)
41
42 (defmethod j ((b null))
43   2)
44
45 (defmacro l (a)
46   a)
47
48 (define-compiler-macro m (a)
49   (declare (ignore a))
50   'b)
51
52 (defsetf n (a) (store)
53   (format t "~a ~a~%" a store))
54
55 (defun (setf o) (x)
56   (print x))
57
58 (defmethod (setf p) (x y)
59   (format t "~a ~a~%" x y))
60
61 (define-modify-macro q (x) logand)
62
63 (define-method-combination r nil)
64
65 (define-setf-expander s (a b)
66   (format t "~a ~a~%" a b))
67