X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Farith.pure.lisp;h=d257edca253595c0aae4d9bfa346af9e0ccaa52c;hb=1cba0af01f5107ab384d0d8b94b1f6330b3d0ef4;hp=32cff239e38d544a2004eb0bd9616409f95b1179;hpb=69018386b391f17fb722a4ded00474be182db355;p=sbcl.git diff --git a/tests/arith.pure.lisp b/tests/arith.pure.lisp index 32cff23..d257edc 100644 --- a/tests/arith.pure.lisp +++ b/tests/arith.pure.lisp @@ -628,3 +628,29 @@ (logior x ,k))))) (loop for x from min upto max do (assert (eql (logior x k) (funcall f x))))))))) + +(with-test (:name :ldb-negative-index-no-error) + (assert + (raises-error? + (funcall (compile nil + `(lambda (x y) + (ldb (byte x y) 100))) + -1 -2))) + (assert + (raises-error? + (funcall (compile nil + `(lambda (x y) + (mask-field (byte x y) 100))) + -1 -2))) + (assert + (raises-error? + (funcall (compile nil + `(lambda (x y) + (dpb 0 (byte x y) 100))) + -1 -2))) + (assert + (raises-error? + (funcall (compile nil + `(lambda (x y) + (deposit-field 0 (byte x y) 100))) + -1 -2))))