From 91ed4ef91b6674dc501bbfd571ab7b550bb70105 Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Tue, 29 Sep 2026 13:50:41 +0200 Subject: [PATCH] Assert on the shot target and outcome identity without formatting entities Assert.Null(shot.Target) and Assert.Same(committed, resolved) format the entity graph when they fail, which overflows the xunit stack and crashes the host instead of reporting a red. Use Assert.True with a message. Co-Authored-By: Claude Sonnet 5 --- tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs b/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs index d25718137..943475789 100644 --- a/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs +++ b/tests/Aetheria.Shared.Tests/FireControlCut124Tests.cs @@ -1299,7 +1299,7 @@ public sealed class FireControlCut124Tests : IDisposable FireControl.Fire(e.Weapon, e.WeaponItem, e.Shooter); var shot = Assert.Single(e.Zone.PendingShots); - Assert.Null(shot.Target); + Assert.True(shot.Target == null, "an invalid target must not ride with the round"); // not Assert.Null: a failure would format the entity graph and overflow the stack Assert.Equal(burst.x, shot.BurstPosition.x, 3); Assert.Equal(burst.z, shot.BurstPosition.z, 3); e.Zone.Update(.01f); @@ -1478,7 +1478,7 @@ public sealed class FireControlCut124Tests : IDisposable var burst = PointAlong(e, normalize(float2(2, 1)), NoLockRange); Assert.Equal(burst.x, committed.BurstPoint.x, 3); Assert.Equal(burst.z, committed.BurstPoint.y, 3); - Assert.Same(committed, resolved); + Assert.True(ReferenceEquals(committed, resolved), "the resolution republishes the commit unchanged"); } // ToWorldPoint and ToSchematicPoint are inverses, and ToWorldPoint puts one cell to starboard of the centre