summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 16:11:14 +0000
committerakr <akr@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2005-02-07 16:11:14 +0000
commit9c3d2282e0b65c34b9c3b5622bf84bbd89e975dc (patch)
treeaae58d466b20229111439c3300a314001fceea44
parent0ef0ae6fdbb5d5d8bf434ec329a282b8e8fc6255 (diff)
downloadruby-9c3d2282e0b65c34b9c3b5622bf84bbd89e975dc.tar.gz
ruby-9c3d2282e0b65c34b9c3b5622bf84bbd89e975dc.tar.xz
ruby-9c3d2282e0b65c34b9c3b5622bf84bbd89e975dc.zip
add test_rand_0x100000000.
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@7917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-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 93cf87e78..e2fd127f9 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