Skip to content

Commit

Permalink
stab
Browse files Browse the repository at this point in the history
  • Loading branch information
LebedevRI committed Sep 19, 2024
1 parent 2ff7b90 commit 366459a
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ using Random
using SpecialFunctions
using StatsBase
using LinearAlgebra
using StableRNGs

import JSON
import ForwardDiff
Expand Down Expand Up @@ -167,7 +168,7 @@ printstyled("Running tests:\n", color=:blue)

Random.seed!(345679)

rng = MersenneTwister(123456)
rng = StableRNG(345679)

function Random.seed!(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
Expand All @@ -180,44 +181,44 @@ end
function rand(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.rand(rng, args...)
rand(rng, args...)
end
Random.rand(args...)
end
function rand!(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.rand!(rng, args...)
rand!(rng, args...)
end
Random.rand!(args...)
end

function randn(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.randn(rng, args...)
randn(rng, args...)
end
Random.randn(args...)
end
function randn!(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.randn!(rng, args...)
randn!(rng, args...)
end
Random.randn!(args...)
end

function randexp(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.randexp(rng, args...)
randexp(rng, args...)
end
Random.randexp(args...)
end
function randexp!(args...)
if length(args) > 0 && !(args[1] isa AbstractRNG)
# @assert false && "RNG must be explicitly provided"
Random.randexp!(rng, args...)
randexp!(rng, args...)
end
Random.randexp!(args...)
end
Expand Down

0 comments on commit 366459a

Please sign in to comment.