test(rng-seam): reset IsRandomDraw in RandomDrawOracleTests teardown (avoid cross-fixture leak)
This commit is contained in:
@@ -16,6 +16,15 @@ namespace SVSim.BattleEngine.Tests
|
||||
[TestFixture]
|
||||
public class RandomDrawOracleTests
|
||||
{
|
||||
[TearDown]
|
||||
public void ResetRandomDrawGate()
|
||||
{
|
||||
// NewAuthoritativeBattle sets the process-global BattleManagerBase.IsRandomDraw = true; reset it
|
||||
// so this fixture doesn't leak that state into later-running fixtures (which expect the default
|
||||
// false / top-of-deck draw behavior). Prevents order-dependent flakes as more RNG oracles land.
|
||||
BattleManagerBase.IsRandomDraw = false;
|
||||
}
|
||||
|
||||
// Draw with a single scripted unit; return (drawnCardId, deckCountAfter). The deck is seeded with
|
||||
// three distinguishable cards at indices 2,3,4 -> Index-order positions 0,1,2 map to
|
||||
// RngDeckCardA/B/C. The draw makes one StableRandom(3) call -> index = floor(3*unit).
|
||||
|
||||
Reference in New Issue
Block a user