Skip to content

A Civilization-style strategy game about governing Israel from 15 May 1948. Real ministers, real map, every fact sourced. Unity + deterministic C# sim.

Tests: the KitTests trees-toggle assert can fail (Fixes #2026) (#2038)

Berifd44f536e37d
diff --git a/changelog.d/laneNT-2026.md b/changelog.d/laneNT-2026.md
new file mode 100644
index 000000000..3cdd70bb4
--- /dev/null
+++ b/changelog.d/laneNT-2026.md
@@ -0,0 +1,3 @@
+### Fixed
+- The KitTests trees-toggle check can fail now (#2026): with the trees off it moves the camera to the gameplay pose,
+ where a layer that still drew would report the near count, instead of rendering the same overview pose again.
diff --git a/unity/Assets/Tests/EditMode/KitTests.cs b/unity/Assets/Tests/EditMode/KitTests.cs
index 6c18dac0d..5dce6bafe 100644
--- a/unity/Assets/Tests/EditMode/KitTests.cs
+++ b/unity/Assets/Tests/EditMode/KitTests.cs
@@ -1347,7 +1347,9 @@ public class KitTests
int far = veg.LastDrawn;
TestContext.WriteLine($"trees {veg.Count}: drawn at gameplay03 {near}, at diorama02 {far}");
Assert.Greater(near, 1000); Assert.Less(far, veg.Count * 0.6f, "the overview thins the far tiles");
- VisualToggles.Set("trees", false); RenderSample.Render(cam, 320, 180);
+ // Move to the near pose with the trees off: a layer that still drew would report `near` there, not `far` (#2026).
+ Assert.AreNotEqual(near, far);
+ VisualToggles.Set("trees", false); PromoPose.Gameplay03.Apply(rig, map.Frame); RenderSample.Render(cam, 320, 180);
Assert.AreEqual(far, veg.LastDrawn, "the trees toggle stops the draws (no new submission)");
}