diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_rand.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/ruby/test_rand.rb b/test/ruby/test_rand.rb index 7bfd96f355..140851d5ba 100644 --- a/test/ruby/test_rand.rb +++ b/test/ruby/test_rand.rb @@ -164,4 +164,9 @@ class TestRand < Test::Unit::TestCase srand(0) assert_equal([1,4,2,5,3], [1,2,3,4,5].shuffle) end + + def test_big_seed + srand(2**1000000-1) + assert_equal(1143843490, rand(0x100000000)) + end end |