Added two more BITCOUNT tests stressing misaligned access.

This commit is contained in:
antirez 2014-02-27 10:07:29 +01:00
parent 2a7847a3b5
commit 8d95a47408

View File

@ -98,6 +98,18 @@ start_server {tags {"bitops"}} {
}
} {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)} {
r set s ""
r bitop not dest s