diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-21 15:07:43 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-21 15:07:43 +0800 |
| commit | fa88b4bc2651dd4592fff2efa2d00e88d5118f25 (patch) | |
| tree | 4d0987031b0ce4ab23d8e4fdea2a36fe6a2437ed /src/LivingVillage.Desktop.Tests | |
| parent | 87aa4594ffe395318364feae9fd157d52b60a082 (diff) | |
| download | living-village-fa88b4bc2651dd4592fff2efa2d00e88d5118f25.tar.gz | |
test(desktop): 澄清生成器逐字节快照断言
AreEqual 波及重载解析 (int,int,string) — 改用 mutable diverged 检查等价断言;清洁全绿。
Diffstat (limited to 'src/LivingVillage.Desktop.Tests')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/PrototypeTests.fs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs index ece7b23..dc1414a 100644 --- a/src/LivingVillage.Desktop.Tests/PrototypeTests.fs +++ b/src/LivingVillage.Desktop.Tests/PrototypeTests.fs @@ -742,8 +742,10 @@ type PrototypeTests () = let second = ProceduralMap.generate (uint64 4242) Assert.AreEqual<int>(first.Tiles.Length, second.Tiles.Length) let snapshot = Array.copy first.Tiles + let mutable diverged = -1 for i in 0 .. snapshot.Length - 1 do - Assert.AreEqual<int>(snapshot.[i], second.Tiles.[i], (sprintf "tile %d diverged" i)) + if snapshot.[i] <> second.Tiles.[i] then diverged <- i + Assert.AreEqual<int>(-1, diverged) // Different seed must produce different terrain (sanity). let other = ProceduralMap.generate (uint64 777) |
