Skip to content

Commit

Permalink
Seed RNG to a fixed value at start of the test suite
Browse files Browse the repository at this point in the history
  • Loading branch information
fingolfin committed Sep 29, 2023
1 parent d82760d commit bd92d69
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/rand.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
using AbstractAlgebra.Random: Random, AbstractRNG, MersenneTwister, randsubseq, shuffle
using AbstractAlgebra.RandomExtensions: RandomExtensions, make

const rng = MersenneTwister()
# initialize RNGs to a fixed initial state, to improve reproducibility
# of this test suite.
Random.seed!(42)
const rng = MersenneTwister(42)


# test if rand(rng, R, args...) gives reproducible results
# also check that the Random API works as expected
Expand Down

0 comments on commit bd92d69

Please sign in to comment.