namespace SomhairlesDream.Shared.Tests open Xunit open SomhairlesDream.Shared module ReplayTests = [] let ``reconstruction contains three visibly different geometry frames`` () = let frames = Replay.frames () Assert.Equal(3, frames.Length) Assert.True([| 1; 2; 3 |] = (frames |> Array.map (fun frame -> frame.Version))) Assert.Equal("重建起点", frames[0].Label) Assert.Equal("主承力骨架", frames[1].Label) Assert.Equal("舱段重构", frames[2].Label) Assert.False(frames[0].Mesh.Vertices = frames[1].Mesh.Vertices) Assert.False(frames[1].Mesh.Vertices = frames[2].Mesh.Vertices) [] let ``mesh snapshots expose indexed triangle buffers`` () = let mesh = (Replay.frames ()).[2].Mesh let positions = MeshData.positionData mesh let indices = MeshData.triangleIndices mesh Assert.Equal(mesh.Vertices.Length * 3, positions.Length) Assert.Equal(45, indices.Length)