diff options
Diffstat (limited to 'tests/bitwise.lisp')
| -rw-r--r-- | tests/bitwise.lisp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/bitwise.lisp b/tests/bitwise.lisp index 7371058..4c1ad73 100644 --- a/tests/bitwise.lisp +++ b/tests/bitwise.lisp @@ -1,2 +1,18 @@ (assert (= 16 (logand 31 16))) (assert (= 24 (logand 31 25 24))) + +(assert (= 25 (logior 24 16 1))) +(assert (= 25 (logior 8 16 1))) + +(assert (= 678 (logxor 123 456 789))) + +(assert (= -124 (lognot 123))) + +(assert (= 246 (lsh 123 1))) + +(assert (= 30 (ash 123 2))) +(assert (= -31 (ash -123 2))) + +(assert (= 30 (ash 123 2))) +(assert (= -31 (ash -123 2))) + |
