add a way to get a seeded random source from test/run.bqn

This commit is contained in:
dzaima 2025-06-01 05:31:10 +03:00
parent 4296c42534
commit 7d55317ec4

View File

@ -167,6 +167,7 @@ Run ← { 𝕊 testname:
{𝕊: 1 •internal.Temp o.seed}_addPreEval o.randomizeHeuristics
Eval {
currTestState @
PreEval@
dir, testname,"_line_",•Repr currLn+1,".bqn", helpers,"arg0",1 •BQN 𝕩
}
@ -229,6 +230,13 @@ Run ← { 𝕊 testname:
}o.run @
}
currTestState @
GetTestState @{ 𝕊:
currTestState {
rand •MakeRand o.seed
}
} {𝕊: currTestState}
helpers {
TVVariation, CLRClearRefs, HasFill, EEqual, ListVariations •internal
indistinguishable {IIndistinguishable: I; EEqual} •internal
@ -263,6 +271,8 @@ helpers ← {
r
}
GetRand {𝕊: •MakeRand (GetTestState@).rand.Range 1e9}
_eqvar {𝔽 _eqvar0_ ListVariations}
_eqvarv_ {𝔽 _eqvar0_ (𝕘ListVariations)}
}