From 6666f8138522e8cedda2bb2ea408b8d9d6554a2f Mon Sep 17 00:00:00 2001 From: Meta Vens Date: Sat, 10 Oct 2026 14:29:18 +0200 Subject: [PATCH] Tests: the tiny-imbalance flight runs six seconds; the stick's length and no stick are pinned The Longinus the fixture builds has no heatsinks: its drives overheat and shut down at about seven seconds (measured: drift -0.006 deg to tick 360, then the thermal shutdown), so the 600-tick flight of the spec reads the shutdown, not the allocator. Co-Authored-By: Claude Opus 5.5 --- tests/Aetheria.Shared.Tests/ThrottleLockTests.cs | 5 +++++ tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs | 10 ++-------- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/tests/Aetheria.Shared.Tests/ThrottleLockTests.cs b/tests/Aetheria.Shared.Tests/ThrottleLockTests.cs index f7d012f6a..cbb1d1a0a 100644 --- a/tests/Aetheria.Shared.Tests/ThrottleLockTests.cs +++ b/tests/Aetheria.Shared.Tests/ThrottleLockTests.cs @@ -201,6 +201,11 @@ public sealed class ThrottleLockTests : IDisposable Assert.True(f.Forward.Axis > .5f); Assert.True(f.Reverse.Axis < 1e-6f); + // The stick's length is the fraction of the hull's forward thrust asked for, and no stick asks for nothing. + Fly(float2(0, .5f)); + Assert.InRange(f.Forward.Axis, .4f, .6f); + Assert.All(Fly(float2(0, 0)), a => Assert.True(a < 1e-6f)); + var all = new[] { back, right, left, forward }; for (var a = 0; a < all.Length; a++) for (var b = a + 1; b < all.Length; b++) diff --git a/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs b/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs index 9ea5f0c63..8e9d0c63d 100644 --- a/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs +++ b/tests/Aetheria.Shared.Tests/ThrustAllocationTests.cs @@ -127,14 +127,8 @@ public sealed partial class RunStartTests ship.MovementDirection = float2(0, 1); ship.Turn = 0; - var log = ""; - float drift = 0; - for (var seg = 0; seg < 10; seg++) - { - drift += AllocFly(ship, 60); - log += $" || {seg}: {drift:F3} " + string.Join(" ", ship.GetBehaviors().Select(d => $"[{d.Item.EquippableItem.Rotation} {(d.Item.Active.Value ? "on" : "OFF")} {d.Thrust:F0}/{d.Axis:F4} t{d.Item.Temperature:F0}]")); - } - Assert.True(abs(drift) < .05f, log); + // Six seconds: the ship has no heatsinks, and its drives overheat and shut down at about seven. + Assert.True(abs(AllocFly(ship, 360)) < .05f); } [Fact]