https://github.com/JuliaLang/julia
Revision bf8d60bd3860d48696ad6891c91a6b5f34dae1a3 authored by Rafael Fourquet on 23 November 2021, 15:41:12 UTC, committed by Kristoffer on 26 November 2021, 20:22:14 UTC
A `@testset` is supposed to restore the "global RNG state" as
it was before execution (so that they can be re-ordered easily, etc.)
Also, before a testset starts, the default RNG is re-seeded with the
"global seed" (to help reproduce test failures).

Before `Xoshiro` as the default RNG, the "global seed" was stored
within a `MersenneTwister` object. It was enough for a testset to
copy the default RNG at the start, and copy it back at the end.
But now the global seed is stored outside of the RNG, so it should
also be restored separately.

(cherry picked from commit 08ea2d8f27c312fd9ce15cd2d7639bdde51a233c)
1 parent 72d6569
History
Tip revision: bf8d60bd3860d48696ad6891c91a6b5f34dae1a3 authored by Rafael Fourquet on 23 November 2021, 15:41:12 UTC
`@testset`: with Xoshiro, restore Random.GLOBAL_SEED (#43188)
Tip revision: bf8d60b
File Mode Size
.buildkite
.devcontainer
.github
base
cli
contrib
deps
doc
etc
src
stdlib
test
.clang-format -rw-r--r-- 3.3 KB
.codecov.yml -rw-r--r-- 52 bytes
.gitattributes -rw-r--r-- 65 bytes
.gitignore -rw-r--r-- 425 bytes
.mailmap -rw-r--r-- 11.0 KB
CITATION.bib -rw-r--r-- 513 bytes
CONTRIBUTING.md -rw-r--r-- 19.3 KB
HISTORY.md -rw-r--r-- 313.4 KB
LICENSE.md -rw-r--r-- 1.3 KB
Make.inc -rw-r--r-- 49.2 KB
Makefile -rw-r--r-- 25.8 KB
NEWS.md -rw-r--r-- 20.5 KB
README.md -rw-r--r-- 7.5 KB
THIRDPARTY.md -rw-r--r-- 3.7 KB
VERSION -rw-r--r-- 10 bytes
sysimage.mk -rw-r--r-- 4.0 KB

README.md

back to top