Skip to content

Commit fe99c4a

Browse files
authored
Merge pull request #26961 from JuliaLang/mb/randomerrandom
Make random test less likely to fail
2 parents fa9b575 + cdb5893 commit fe99c4a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

stdlib/Random/test/runtests.jl

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,9 @@ end
120120
for T in [UInt32, UInt64, UInt128, Int128]
121121
local r, s
122122
s = big(typemax(T)-1000) : big(typemax(T)) + 10000
123-
@test rand(s) != rand(s)
123+
# s is a 11001-length array
124+
@test rand(s) isa BigInt
125+
@test sum(rand(s, 1000) .== rand(s, 1000)) <= 20
124126
@test big(typemax(T)-1000) <= rand(s) <= big(typemax(T)) + 10000
125127
r = rand(s, 1, 2)
126128
@test size(r) == (1, 2)

0 commit comments

Comments
 (0)