X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fsetf.impure.lisp;h=cd13d8d7996a9227e7cb20d04e3c0123a0198064;hb=f16e93459cd73b1884e3d576c95e422f8e8a000e;hp=086702981e739e923192e7e70d1aef37b7b6ddb7;hpb=6ecf5b74d7bc31f534fb784ad2c380e62976ac11;p=sbcl.git diff --git a/tests/setf.impure.lisp b/tests/setf.impure.lisp index 0867029..cd13d8d 100644 --- a/tests/setf.impure.lisp +++ b/tests/setf.impure.lisp @@ -81,4 +81,23 @@ (error () :error)))) +(handler-bind ((style-warning #'error)) + (compile nil '(lambda () + (defsetf test-defsetf-no-env (foo) (new) + `(set-foo ,foo ,new)))) + (compile nil '(lambda () + (defsetf test-defsetf-ignore-env (foo &environment env) (new) + (declare (ignore env)) + `(set-foo ,foo ,new))))) + +;;; Not required by the spec, but allowes compiler-macros for SETF-functiosn +;;; to see their constant argument forms. +(with-test (:name constantp-aware-get-setf-expansion) + (multiple-value-bind (temps values stores set get) + (get-setf-expansion '(foo 1 2 3)) + (assert (not temps)) + (assert (not values)) + (assert (equal `(funcall #'(setf foo) ,@stores 1 2 3) set)) + (assert (equal '(foo 1 2 3) get)))) + ;;; success