summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/ruby/test_rand.rb7
1 files changed, 7 insertions, 0 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb
index 93cf87e786..e2fd127f9c 100644
--- a/test/ruby/test_rand.rb
+++ b/test/ruby/test_rand.rb
@@ -50,6 +50,13 @@ class TestRand < Test::Unit::TestCase
}
end
+ def test_rand_0x100000000
+ srand(311702798)
+ %w(4119812344 3870378946 80324654 4294967296 410016213).each {|w|
+ assert_equal(w.to_i, rand(0x100000001))
+ }
+ end
+
def test_0x1000000000000
srand(0)
%w(11736396900911