X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fcompiler.impure.lisp;h=e63e2d65413a5ed08ed38f4c7c09a9dd111363f0;hb=HEAD;hp=c0f5b0a2c1aec994bd9b6fbbe4ed12c4daca396f;hpb=b83353d9f998e5c0e34604b5593df70c66d2c510;p=sbcl.git diff --git a/tests/compiler.impure.lisp b/tests/compiler.impure.lisp index c0f5b0a..e63e2d6 100644 --- a/tests/compiler.impure.lisp +++ b/tests/compiler.impure.lisp @@ -1430,13 +1430,33 @@ (and (defun (setf test-984) ()) nil) - (style-warning () t)))) + (style-warning () t))) + (assert + (handler-case + (and + (compile nil `(lambda () #'(setf test-984))) + t) + (warning () nil)))) (with-test (:name :compile-setf-function) (defun (setf compile-setf) ()) (assert (equal (compile '(setf compile-setf)) '(setf compile-setf)))) +(declaim (inline cut-test)) +(defun cut-test (b) + (cond ((integerp b) b) + (b 469) + (t 2))) + +(with-test (:name :cut-to-width-bad-constant) + (assert (= (funcall (compile nil + `(lambda () + (multiple-value-bind (a b) (values t t) + (declare (ignore b)) + (mask-field (byte 10 0) (cut-test a)))))) + 469))) + ;;;; tests not in the problem domain, but of the consistency of the ;;;; compiler machinery itself