Skip to content

Commit

Permalink
Ensure Xoshiro is defined before use
Browse files Browse the repository at this point in the history
On Julia versions <= v1.6, Xoshiro is not defined.
In this case, use MersenneTwister instead.
  • Loading branch information
GregPlowman authored Jan 16, 2025
1 parent b29b024 commit 88c3567
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,11 @@ end
pids = addprocs()
@everywhere using RNGTest
for T in (UInt32, UInt64, Float64)
rng = RNGTest.wrap(Xoshiro(), T)
if isdefined(Random, :Xoshiro)
rng = RNGTest.wrap(Xoshiro(), T)
else
rng = RNGTest.wrap(MersenneTwister(), T)
end
results = RNGTest.smallcrushJulia(rng)
@test all(ps -> all(>(pval), ps), results)
end
Expand Down

0 comments on commit 88c3567

Please sign in to comment.