Skip to content
Browse files

BITCOUNT regression test for #582 fixed for 32 bit target.

Bug #582 was not present in 32 bit builds of Redis as
getObjectFromLong() will return an error for overflow.

This commit makes sure that the test does not fail because of the error
returned when running against 32 bit builds.
  • Loading branch information...
1 parent 4c3d419 commit 58889867bb3230c8837b919f675b0d80dd85454a @antirez committed Sep 5, 2012
Showing with 6 additions and 1 deletion.
  1. +6 −1 tests/unit/bitops.tcl
View
7 tests/unit/bitops.tcl
@@ -76,7 +76,12 @@ start_server {tags {"bitops"}} {
test {BITCOUNT regression test for github issue #582} {
r del str
r setbit foo 0 1
- r bitcount foo 0 4294967296
+ if {[catch {r bitcount foo 0 4294967296} e]} {
+ assert_match {*ERR*out of range*} $e
+ set _ 1
+ } else {
+ set e
+ }
} {1}
test {BITOP NOT (empty string)} {

0 comments on commit 5888986

Please sign in to comment.
Something went wrong with that request. Please try again.