mirror of
https://github.com/fluencelabs/redis
synced 2025-03-31 14:51:04 +00:00
Added two more BITCOUNT tests stressing misaligned access.
This commit is contained in:
parent
2a7847a3b5
commit
8d95a47408
@ -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
|
||||||
|
Loading…
x
Reference in New Issue
Block a user