Hygiene B6b: convert leaky-world tests + HudSystem cosmetics
- 10 EditMode files: every bare trailing world.Dispose() now inside using(world){} (single-world) or a [TearDown]+List<World> (the multi-world reject-matrix tests in BoonApplyTests/RouteSelectSystemTests) — an assertion failure can no longer leak the World and mask the true first failure. No test logic changed.
- HudSystem: collapse the blank-line run before the class close; trim the extracted route-map clause from the READY-panel comment.
466/466 EditMode tests pass.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -67,6 +67,8 @@ namespace ProjectM.Tests
|
||||
public void Spawn_SeedsClassTiers_SkipsOthers_ClampsOverMax()
|
||||
{
|
||||
var (world, group) = MakeWorld();
|
||||
using (world)
|
||||
{
|
||||
var em = world.EntityManager;
|
||||
var prefab = MakePlayerPrefab(em);
|
||||
var spawnerE = em.CreateEntity(typeof(PlayerSpawner));
|
||||
@@ -104,13 +106,15 @@ namespace ProjectM.Tests
|
||||
Assert.AreEqual(2, metaRows, "exactly the two legal Warrior tiers seeded (unknown/other-class/other-mask skipped)");
|
||||
Assert.AreEqual(30f, frameValue, 1e-3f, "Reinforced Frame tier 2 = 15 * 2");
|
||||
Assert.AreEqual(0.40f, mightValue, 1e-3f, "Warrior's Might CLAMPED to MaxTier 4 = 0.10 * 4 (D-F5)");
|
||||
world.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void MissingCatalog_BlocksSpawn_PreservesRequest()
|
||||
{
|
||||
var (world, group) = MakeWorld();
|
||||
using (world)
|
||||
{
|
||||
var em = world.EntityManager;
|
||||
var prefab = MakePlayerPrefab(em);
|
||||
var spawnerE = em.CreateEntity(typeof(PlayerSpawner));
|
||||
@@ -125,7 +129,7 @@ namespace ProjectM.Tests
|
||||
var rq = em.CreateEntityQuery(typeof(GoInGameRequest));
|
||||
Assert.AreEqual(1, rq.CalculateEntityCount(), "request PRESERVED — the spawn retries when the catalog streams in");
|
||||
pq.Dispose(); rq.Dispose(); // BEFORE the world (a using-var here would outlive it)in");
|
||||
world.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user