X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=contrib%2Fsb-rotate-byte%2Frotate-byte-tests.lisp;fp=contrib%2Fsb-rotate-byte%2Frotate-byte-tests.lisp;h=6e6b7f6059f816ae65885f3259ab0b6408967c87;hb=6a71280af32d6bb02ed07d1a576df2cd9c5dfb79;hp=11f9b63d0037779b45baf58dc8a5724cc0d5ef65;hpb=b85af7079579401b458fecd2a7bb5fe85a963b2c;p=sbcl.git diff --git a/contrib/sb-rotate-byte/rotate-byte-tests.lisp b/contrib/sb-rotate-byte/rotate-byte-tests.lisp index 11f9b63..6e6b7f6 100644 --- a/contrib/sb-rotate-byte/rotate-byte-tests.lisp +++ b/contrib/sb-rotate-byte/rotate-byte-tests.lisp @@ -73,10 +73,14 @@ (declare (type (unsigned-byte 64) integer)) (rotate-byte 6 (byte 64 0) integer)) -(assert (= (ub64/c 5) 320)) -(assert (= (ub64/c 1) 64)) -(assert (= (ub64/c (ash 1 57)) (ash 1 63))) -(assert (= (ub64/c (ash 1 58)) 1)) +(defun ub64/-c (integer) + (declare (type (unsigned-byte 64) integer)) + (rotate-byte -6 (byte 64 0) integer)) + +(assert (= (ub64/-c 320) 5)) +(assert (= (ub64/-c 64) 1)) +(assert (= (ub64/-c (ash 1 63)) (ash 1 57))) +(assert (= (ub64/-c 1) (ash 1 58))) (defun ub64 (count integer) (declare (type (unsigned-byte 64) integer)