Commit 8d95a474 authored by antirez's avatar antirez
Browse files

Added two more BITCOUNT tests stressing misaligned access.

parent 2a7847a3
...@@ -98,6 +98,18 @@ start_server {tags {"bitops"}} { ...@@ -98,6 +98,18 @@ start_server {tags {"bitops"}} {
} }
} {1} } {1}
test {BITCOUNT misaligned prefix} {
r del str
r set str ab
r bitcount str 1 -1
} {3}
test {BITCOUNT misaligned prefix + full words + remainder} {
r del str
r set str __PPxxxxxxxxxxxxxxxxRR__
r bitcount str 2 -3
} {74}
test {BITOP NOT (empty string)} { test {BITOP NOT (empty string)} {
r set s "" r set s ""
r bitop not dest s r bitop not dest s
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment