X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-introspect%2Ftest.lisp;h=cd100c542fd09a6b1c5cd77e7b48ed0677f40358;hb=6548750bc1ca4d832afed1744cdc7133b232c6f2;hp=50e31619bbe109d3a2c71d7ba205812931afa031;hpb=9908313f6f76672cfc28c48b21c9aa88daeb8d10;p=sbcl.git diff --git a/contrib/sb-introspect/test.lisp b/contrib/sb-introspect/test.lisp index 50e3161..cd100c5 100644 --- a/contrib/sb-introspect/test.lisp +++ b/contrib/sb-introspect/test.lisp @@ -1,4 +1,10 @@ -;; Do not alter this file unless you edit test-driver.lisp to match + +;;; +;;; The order of the forms must not change, as the order is checked in +;;; `test-driver.lisp'. Thus do not alter this file unless you edit +;;; test-driver.lisp to match. +;;; + (declaim (optimize (debug 3))) (in-package :cl-user) @@ -10,5 +16,61 @@ (defstruct three four five) +(with-compilation-unit (:source-plist (list :test-inner "IN")) + (eval '(defun four () 4))) + +"oops-off-by-one" + +(defparameter *a* 1) + +(defvar *b* 2) + +(defclass a () + (a)) + +(define-condition b (warning) (a)) + +(defstruct c e f) + +(defstruct (d (:type list)) e f) + +(defpackage e (:use :cl)) + +(define-symbol-macro f 'e) + +(deftype g () 'fixnum) + +(defconstant +h+ 1) + +(defmethod j ((a t)) + 2) + +(defmethod j ((b null)) + 2) + +(defmacro l (a) + a) + +(define-compiler-macro m (a) + (declare (ignore a)) + 'b) + +(defsetf n (a) (store) + (format t "~a ~a~%" a store)) + +(defun (setf o) (x) + (print x)) + +(defmethod (setf p) (x y) + (format t "~a ~a~%" x y)) + +(define-modify-macro q (x) logand) + +(define-method-combination r nil) + +(define-setf-expander s (a b) + (format t "~a ~a~%" a b)) - \ No newline at end of file +(eval-when (:compile-toplevel) + (defun compile-time-too-fun () + :foo))