From d1f2d0733c8b893811938c60bf110a2a7e19f208 Mon Sep 17 00:00:00 2001 From: antirez Date: Tue, 25 Jun 2013 15:32:37 +0200 Subject: [PATCH] Test: randomInt() behavior commented. --- tests/support/util.tcl | 2 ++ 1 file changed, 2 insertions(+) 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} {