зеркало из https://github.com/github/ruby.git
Used a fixed seed in Random#rand spec
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59248 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
f2d1848441
Коммит
aa7f2592d8
|
@ -172,13 +172,13 @@ describe "Random#rand with Range" do
|
|||
end
|
||||
|
||||
it "works with inclusive ranges" do
|
||||
prng = Random.new
|
||||
prng = Random.new 33
|
||||
r = 3..5
|
||||
40.times.map { prng.rand(r) }.uniq.sort.should == [3,4,5]
|
||||
end
|
||||
|
||||
it "works with exclusive ranges" do
|
||||
prng = Random.new
|
||||
prng = Random.new 33
|
||||
r = 3...5
|
||||
20.times.map { prng.rand(r) }.uniq.sort.should == [3,4]
|
||||
end
|
||||
|
|
Загрузка…
Ссылка в новой задаче