test: remove known tautologies and scaffolds

This commit is contained in:
Erik 2026-08-18 10:40:20 +02:00
parent 8e884679e0
commit 52015f5052
9 changed files with 156 additions and 61 deletions

View file

@ -2,6 +2,7 @@ using System.Numerics;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
using AcDream.App.Rendering.Gpu;
using AcDream.App.Rendering.Gpu.Vk;
namespace AcDream.App.Tests.Rendering.Gpu;
@ -242,19 +243,28 @@ public sealed class GpuContractTests
}
[Fact]
public void TheDepthStencilAttachmentFormatCarriesAStencilAspect()
public void BackbufferClear_ClearsDepthAndStencil()
{
// The punch has nowhere to mark without one. The V5 capability gate
// prefers D32_SFLOAT_S8_UINT and falls back to D24_UNORM_S8_UINT rather
// than taking a depth-only format for exactly this reason, and the
// backbuffer pass clears both aspects through one ClearDepthStencil.
GpuPassDescription pass = GpuPassDescription.BackbufferClear(
"world",
Vector4.Zero,
sampleCount: 4);
Assert.Equal(0u, pass.Depth!.Value.ClearStencil);
Assert.Equal(1f, pass.Depth.Value.ClearDepth);
Assert.Equal(GpuLoadOp.Clear, pass.Depth!.Value.Load);
Assert.Equal(GpuTextureFormat.Depth24Stencil8, GpuTextureFormat.Depth24Stencil8);
}
[Fact]
public void DepthStencilTextureFormat_MapsToDepthAndStencilAspects()
{
// The punch has nowhere to mark without a stencil aspect. The V5
// capability gate prefers D32_SFLOAT_S8_UINT and falls back to
// D24_UNORM_S8_UINT rather than accepting a depth-only format.
Silk.NET.Vulkan.ImageAspectFlags aspects =
VulkanTextureFormatMapping.AspectOf(GpuTextureFormat.Depth24Stencil8);
Assert.True(aspects.HasFlag(Silk.NET.Vulkan.ImageAspectFlags.DepthBit));
Assert.True(aspects.HasFlag(Silk.NET.Vulkan.ImageAspectFlags.StencilBit));
}
[Fact]

View file

@ -1,24 +0,0 @@
using Xunit;
namespace AcDream.Core.Tests.Conformance;
/// <summary>
/// PVS (portal-visibility) conformance — P0 scaffold. The render visible-set
/// golden. Retail oracle: PView::ConstructView(CEnvCell*) @ 0x005a57b0
/// (pc:433750) produces the ordered cell_draw_list for a given (viewer_cell,
/// eye); see docs/research/2026-06-02-retail-render-pipeline-full-reference.md §3.
///
/// FILLED IN P4, not P0: a retail cell_draw_list trace is a P3/P4-coupled
/// capture (a new cdb script breakpointing PView::DrawCells / cell_draw_list,
/// sibling to find-cell-list-capture.cdb), and the PVS code itself
/// (PortalVisibilityBuilder) is REPLACED by the ConstructView port in P4. The
/// scaffold exists now so the structure + retail anchor are in place; P4 adds
/// the capture + the golden assertion (PVS root id == physics CurrCell.Id;
/// a cell seen through two portals appears once per slice; dungeon
/// outside_view==0).
/// </summary>
public class PvsConformanceTests
{
[Fact(Skip = "P0 scaffold — filled in P4 with a captured retail cell_draw_list trace")]
public void Pvs_CottageInterior_MatchesRetailCellDrawList() { }
}

View file

@ -917,7 +917,9 @@ public class Issue265SteepSlopeCaptureBisectTests
// HandleAllCollisions's OWN decision (captured before the toggle can
// touch it) must be identical regardless of the #265/#166 fix -- the
// fix does not change the reflection math or its inputs.
Assert.Equal(newModelVelocityBeforeToggle.Z > 0.01f, newModelVelocityBeforeToggle.Z > 0.01f);
Assert.Equal(
oldModelVelocity.Z > 0.01f,
newModelVelocityBeforeToggle.Z > 0.01f);
// Document (not silently assert away) whether retail's OWN ported
// logic reflects this synthetic case. This is evidence for the

View file

@ -488,16 +488,12 @@ public sealed class MotionInterpreterTests
// links). Verified against the live retail-observer trace
// (RetailObserverTraceConformanceTests, 183/183 dispatch conformant).
// R3 owns removal of the known redundant row. Keep this one historical
// input unchanged during R2 while ensuring any new duplicate still fails.
#pragma warning disable xUnit1025
[Theory]
[InlineData(MotionCommand.Fallen)]
[InlineData(MotionCommand.Dead)]
[InlineData(MotionCommand.Crouch)]
[InlineData(MotionCommand.Sitting)]
[InlineData(MotionCommand.Sleeping)]
[InlineData(0x41000012u)] // inside the crouch range (0x41000011, 0x41000015)
public void ContactAllowsMove_GroundedPosture_StillAllowsMove(uint postureCommand)
{
var body = MakeGrounded();
@ -508,7 +504,6 @@ public sealed class MotionInterpreterTests
Assert.True(allowed);
}
#pragma warning restore xUnit1025
[Fact]
public void ContactAllowsMove_AirborneCreature_AcceptsFallingAndTurns_BlocksWalk()

View file

@ -54,11 +54,4 @@ public class ChaseCameraTests
Assert.True(z2 > z1, "Increasing pitch should raise the camera");
}
[Fact]
public void ImplementsICamera()
{
ICamera camera = new ChaseCamera { Aspect = 16f / 9f };
camera.ToString(); // just proves interface is implemented
}
}

View file

@ -1,11 +0,0 @@
// tests/AcDream.Core.Tests/SmokeTest.cs
namespace AcDream.Core.Tests;
public class SmokeTest
{
[Fact]
public void TestProject_IsWired()
{
Assert.True(true);
}
}

View file

@ -425,6 +425,7 @@ public sealed class RuntimeLocalPlayerFirstEntryStateTests
{
using var fixture = new Fixture(residentWorld: false);
PhysicsBody? body = null;
PlayerMovementController? controller = null;
for (int i = 0; i < 3; i++)
{
@ -435,7 +436,10 @@ public sealed class RuntimeLocalPlayerFirstEntryStateTests
Assert.Equal(1, fixture.Publication.CaptureOwnership().PendingActivationCount);
body ??= fixture.Record.PhysicsBody;
Assert.Same(body, fixture.Record.PhysicsBody);
Assert.Same(fixture.Movement.Controller, fixture.Movement.Controller);
PlayerMovementController currentController =
Assert.IsType<PlayerMovementController>(fixture.Movement.Controller);
controller ??= currentController;
Assert.Same(controller, currentController);
}
}