mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
add a test.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27325 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
db9119bedf
commit
9afaef347c
1 changed files with 7 additions and 0 deletions
|
@ -404,5 +404,12 @@ END
|
|||
rand_1 = Random.new(-1).rand
|
||||
assert_not_equal(rand_1, Random.new((1 << 31) -1).rand, "#{bug3104} (2)")
|
||||
assert_not_equal(rand_1, Random.new((1 << 63) -1).rand, "#{bug3104} (2)")
|
||||
|
||||
[-1, -2**10, -2**40].each {|n|
|
||||
b = (2**64).coerce(n)[0]
|
||||
r1 = Random.new(n).rand
|
||||
r2 = Random.new(b).rand
|
||||
assert_equal(r1, r2)
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue