1.0.14.28: small FGEN improvements
[sbcl/jsnell.git] / contrib / sb-introspect / test.lisp
blob064e26265f2ace83fd041d6a14b9210a7a629105
2 ;;;
3 ;;; The order of the forms must not change, as the order is checked in
4 ;;; `test-driver.lisp'. Thus do not alter this file unless you edit
5 ;;; test-driver.lisp to match.
6 ;;;
8 (declaim (optimize (debug 3)))
9 (in-package :cl-user)
11 (defun one (a b c) (+ a b c))
13 (defgeneric two (a b))
14 (defmethod two ((a number) b)
15 (* 2 a))
17 (defstruct three four five)
19 (with-compilation-unit (:source-plist (list :test-inner "IN"))
20 (eval '(defun four () 4)))
22 "oops-off-by-one"
24 (defparameter *a* 1)
26 (defvar *b* 2)
28 (defclass a ()
29 (a))
31 (define-condition b (warning) (a))
33 (defstruct c e f)
35 (defstruct (d (:type list)) e f)
37 (defpackage e (:use :cl))
39 (define-symbol-macro f 'e)
41 (deftype g () 'fixnum)
43 (defconstant +h+ 1)
45 (defmethod j ((a t))
48 (defmethod j ((b null))
51 (defmacro l (a)
54 (define-compiler-macro m (a)
55 (declare (ignore a))
56 'b)
58 (defsetf n (a) (store)
59 (format t "~a ~a~%" a store))
61 (defun (setf o) (x)
62 (print x))
64 (defmethod (setf p) (x y)
65 (format t "~a ~a~%" x y))
67 (define-modify-macro q (x) logand)
69 (define-method-combination r nil)
71 (define-setf-expander s (a b)
72 (format t "~a ~a~%" a b))