diff options
author | antirez <antirez@gmail.com> | 2013-06-25 15:32:37 +0200 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2013-06-25 15:32:37 +0200 |
commit | d1f2d0733c8b893811938c60bf110a2a7e19f208 (patch) | |
tree | fad3e399ebaec4b8b1ea8d3507f0fcbb17871706 | |
parent | 7e5be50cbf8a03d3bd2e45d72f0e6b1d7c31bf06 (diff) | |
download | redis-d1f2d0733c8b893811938c60bf110a2a7e19f208.tar.gz |
Test: randomInt() behavior commented.
-rw-r--r-- | tests/support/util.tcl | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/support/util.tcl b/tests/support/util.tcl index 48d06b741..c5a6853b3 100644 --- a/tests/support/util.tcl +++ b/tests/support/util.tcl @@ -91,10 +91,12 @@ proc wait_for_sync r { } } +# Random integer between 0 and max (excluded). proc randomInt {max} { expr {int(rand()*$max)} } +# Random signed integer between -max and max (both extremes excluded). proc randomSignedInt {max} { set i [randomInt $max] if {rand() > 0.5} { |