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:
@@ -55,6 +55,8 @@ namespace ProjectM.Tests
|
||||
public void StalePendingAtBase_DoesNotHoldGate_AndIsStrippedOnExit()
|
||||
{
|
||||
var (world, group, dir) = MakeWorld(out var map);
|
||||
using (world)
|
||||
{
|
||||
var em = world.EntityManager;
|
||||
em.SetComponentData(dir, new RunInfo
|
||||
{
|
||||
@@ -86,13 +88,15 @@ namespace ProjectM.Tests
|
||||
Assert.AreEqual(0, em.GetComponentData<BoonOffer>(alive).Pending,
|
||||
"no offer survives the gate");
|
||||
|
||||
world.Dispose();
|
||||
}
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void Advance_TeleportsOnlyParticipants_LateJoinerStaysAtBase()
|
||||
{
|
||||
var (world, group, dir) = MakeWorld(out var map);
|
||||
using (world)
|
||||
{
|
||||
var em = world.EntityManager;
|
||||
em.SetComponentData(dir, new RunInfo
|
||||
{
|
||||
@@ -130,7 +134,7 @@ namespace ProjectM.Tests
|
||||
Assert.AreEqual(RegionId.Base, em.GetComponentData<RegionTag>(lateJoiner).Region,
|
||||
"the late joiner stays in the Base relevancy bucket");
|
||||
|
||||
world.Dispose();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user