diff options
author | antirez <antirez@gmail.com> | 2012-09-05 17:46:06 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2012-09-05 17:50:24 +0200 |
commit | 58889867bb3230c8837b919f675b0d80dd85454a (patch) | |
tree | dd49490ed6bcc9b3117317d825886cf18f7c5c4b | |
parent | 4c3d419013e28c417a51f650f16b96807590c1e7 (diff) | |
download | redis-58889867bb3230c8837b919f675b0d80dd85454a.tar.gz |
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.
-rw-r--r-- | tests/unit/bitops.tcl | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/unit/bitops.tcl b/tests/unit/bitops.tcl index 5945d32d7..127a0e680 100644 --- a/tests/unit/bitops.tcl +++ b/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)} { |