X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=tests%2Fbit-vector.impure-cload.lisp;h=65f075adb361c4291fedcd41d3554449dbc7ddfd;hb=a189a69454ef7635149319ae213b337f17c50d20;hp=3a92a34be6be97c16322e1ca71bd3b79e3f13f48;hpb=6f9469ddc38dc4d25b0fcc3988d55a9dbef6e2b8;p=sbcl.git diff --git a/tests/bit-vector.impure-cload.lisp b/tests/bit-vector.impure-cload.lisp index 3a92a34..65f075a 100644 --- a/tests/bit-vector.impure-cload.lisp +++ b/tests/bit-vector.impure-cload.lisp @@ -85,3 +85,25 @@ '(and) '(or)) (test-big-bit-vectors) + +(with-test (:name :find-non-bit-from-bit-vector) + (assert (not (find #\a #*0101))) + (assert (not (position #\a #*0101))) + (let ((f1 (compile nil + `(lambda (b) + (find b #*0101)))) + (f2 (compile nil + `(lambda (b) + (position b #*0101))))) + (assert (not (funcall f1 t))) + (assert (not (funcall f2 t)))) + (let ((f1 (compile nil + `(lambda (b) + (declare (bit-vector b)) + (find t b)))) + (f2 (compile nil + `(lambda (b) + (declare (bit-vector b)) + (position t b))))) + (assert (not (funcall f1 #*010101))) + (assert (not (funcall f2 #*101010)))))