test(app): freeze GameWindow lifecycle boundaries

Pin the accepted startup, input, frame, resize, shutdown, and native-window order before Slice 8 moves those edges, while deleting only unread duplicate state and test-only GameWindow facades.

Co-authored-by: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-22 09:27:55 +02:00
parent 20ebf217e2
commit 476c2e6de1
7 changed files with 380 additions and 56 deletions

View file

@ -1,6 +1,5 @@
using System.Buffers.Binary;
using AcDream.App.Input;
using AcDream.App.Rendering;
using AcDream.Core.Net.Messages;
using AcDream.Core.Net.Packets;
using AcDream.Core.Physics;
@ -21,7 +20,7 @@ public sealed class LocalPlayerOutboundCombatStyleTests
MovementResult movement = controller.CaptureMovementResult(
mouseLookEvent: false);
RawMotionState outbound = GameWindow.BuildOutboundRawMotionState(
RawMotionState outbound = LocalPlayerOutboundController.BuildRawMotionState(
movement);
Assert.Equal(combatStyle, movement.CurrentStyle);
@ -43,7 +42,7 @@ public sealed class LocalPlayerOutboundCombatStyleTests
{
var controller = new PlayerMovementController(new PhysicsEngine());
RawMotionState outbound = GameWindow.BuildOutboundRawMotionState(
RawMotionState outbound = LocalPlayerOutboundController.BuildRawMotionState(
controller.CaptureMovementResult(mouseLookEvent: false));
Assert.Equal(RawMotionState.Default.CurrentStyle, outbound.CurrentStyle);

View file

@ -1,6 +1,5 @@
using System.Numerics;
using AcDream.App.Input;
using AcDream.App.Rendering;
using AcDream.Core.Physics;
using AcDream.Core.Physics.Motion;
using Xunit;
@ -259,7 +258,7 @@ public sealed class PlayerMouseLookMovementTests
controller.BeginMouseLook(new MovementInput(Run: true));
MovementResult press = controller.CaptureMovementResult(mouseLookEvent: false);
RawMotionState wire = GameWindow.BuildOutboundRawMotionState(press);
RawMotionState wire = LocalPlayerOutboundController.BuildRawMotionState(press);
Assert.Equal(HoldKey.Run, controller.Motion.RawState.CurrentHoldKey);
Assert.True(press.IsRunning);
@ -325,7 +324,7 @@ public sealed class PlayerMouseLookMovementTests
controller.BeginMouseLook(held);
MovementResult press = controller.CaptureMovementResult(mouseLookEvent: false);
RawMotionState wire = GameWindow.BuildOutboundRawMotionState(press);
RawMotionState wire = LocalPlayerOutboundController.BuildRawMotionState(press);
Assert.Equal(MotionCommand.SideStepRight, press.SidestepCommand);
Assert.True(press.SidestepUsesRunHold);