mirror of
https://github.com/fluencelabs/redis
synced 2025-04-26 19:12:14 +00:00
Test: randomInt() behavior commented.
This commit is contained in:
parent
7e5be50cbf
commit
d1f2d0733c
@ -91,10 +91,12 @@ proc wait_for_sync r {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Random integer between 0 and max (excluded).
|
||||||
proc randomInt {max} {
|
proc randomInt {max} {
|
||||||
expr {int(rand()*$max)}
|
expr {int(rand()*$max)}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Random signed integer between -max and max (both extremes excluded).
|
||||||
proc randomSignedInt {max} {
|
proc randomSignedInt {max} {
|
||||||
set i [randomInt $max]
|
set i [randomInt $max]
|
||||||
if {rand() > 0.5} {
|
if {rand() > 0.5} {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user