From b4f51b41e2de7c6c6d4124af83064624749a36dd Mon Sep 17 00:00:00 2001 From: akr Date: Mon, 7 Feb 2005 16:11:14 +0000 Subject: add test_rand_0x100000000. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@7917 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- test/ruby/test_rand.rb | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test/ruby') 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 -- cgit v1.2.3