diff --git a/test/Project.toml b/test/Project.toml index fd3c3ad2..ff29fc78 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -3,5 +3,6 @@ CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" Meshes = "eacbb407-ea5a-433e-ab97-5258b1ca43fa" OrdinaryDiffEq = "1dea7af3-3e70-54e6-95c3-0bf5283fa5ed" Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" +StableRNGs = "860ef19b-820b-49d6-a774-d7a799459cd3" StaticArrays = "90137ffa-7385-5640-81b9-e52037218182" Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" \ No newline at end of file diff --git a/test/runtests.jl b/test/runtests.jl index fe73ab9a..9b9560fb 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,11 +1,12 @@ -using TestParticle, OrdinaryDiffEq, StaticArrays, Random +using TestParticle, OrdinaryDiffEq, StaticArrays using TestParticle: Field, qᵢ, mᵢ, qₑ, mₑ, c, guiding_center using Meshes: CartesianGrid +using Random, StableRNGs using Test "Initial state perturbation for EnsembleProblem." function prob_func(prob, i, repeat) - remake(prob, u0=rand(MersenneTwister(i))*prob.u0) + remake(prob, u0=rand(StableRNG(i))*prob.u0) end function prob_func_boris_mutable(prob, i, repeat) @@ -127,7 +128,7 @@ end x = getindex.(sol.u[10].u, 1) - @test x[7] ≈ 0.09615629718624641 rtol=1e-6 + @test x[7] ≈ 0.08230289216655486 rtol=1e-6 stateinit = SA[x0..., u0...] tspan = (0.0, 1.0)