diff options
| author | Somhairle H. Marisol <[email protected]> | 2026-09-20 15:14:23 +0800 |
|---|---|---|
| committer | Somhairle H. Marisol <[email protected]> | 2026-09-20 15:14:23 +0800 |
| commit | 9724663602b4b1eb755bf334c475dc2c80e4b386 (patch) | |
| tree | 681bfcc9f7bb6422ed80142702cfff1498f064b1 /src/LivingVillage.Desktop.Tests | |
| parent | 7e197babfbb68d7f7d1866d6a0ca47cf17d3af23 (diff) | |
| download | living-village-9724663602b4b1eb755bf334c475dc2c80e4b386.tar.gz | |
feat(m6a): add save speed and day-night controls
Diffstat (limited to 'src/LivingVillage.Desktop.Tests')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/DesktopTests.fs | 10 | ||||
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj | 1 | ||||
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/M6aTests.fs | 15 |
3 files changed, 26 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/DesktopTests.fs b/src/LivingVillage.Desktop.Tests/DesktopTests.fs index ffcc6c0..650f757 100644 --- a/src/LivingVillage.Desktop.Tests/DesktopTests.fs +++ b/src/LivingVillage.Desktop.Tests/DesktopTests.fs @@ -61,3 +61,13 @@ type DesktopTests () = Assert.IsTrue(result.Chronicle.Contains("dialogue")) Assert.IsTrue(result.RumorTrace.Contains("receiver=-1")) Assert.IsTrue(result.RumorTrace.Contains("depth=3")) + + [<TestMethod>] + member _.DayNightStateChangesTheRenderProfile () = + let day = M6Presentation.profileAtTick (6L * Sim.ticksPerDay / 24L) + let night = M6Presentation.profileAtTick (22L * Sim.ticksPerDay / 24L) + + Assert.AreEqual<M6DayNight>(Day, day.Mode) + Assert.AreEqual<M6DayNight>(Night, night.Mode) + Assert.AreNotEqual(day.Background, night.Background) + Assert.AreNotEqual(day.WorldTint, night.WorldTint) diff --git a/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj b/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj index a1cbe33..b8e2055 100644 --- a/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj +++ b/src/LivingVillage.Desktop.Tests/LivingVillage.Desktop.Tests.fsproj @@ -7,6 +7,7 @@ <ItemGroup> <Compile Include="DesktopTests.fs" /> + <Compile Include="M6aTests.fs" /> </ItemGroup> <ItemGroup> diff --git a/src/LivingVillage.Desktop.Tests/M6aTests.fs b/src/LivingVillage.Desktop.Tests/M6aTests.fs new file mode 100644 index 0000000..1cc29d4 --- /dev/null +++ b/src/LivingVillage.Desktop.Tests/M6aTests.fs @@ -0,0 +1,15 @@ +namespace LivingVillage.Desktop.Tests + +open Microsoft.VisualStudio.TestTools.UnitTesting +open LivingVillage.Kernel +open LivingVillage.Desktop + +[<TestClass>] +type M6aDesktopTests () = + + [<TestMethod>] + member _.SpeedLabelsExposePauseAndThreeRunningModes () = + Assert.AreEqual<string>("PAUSED", M6Presentation.clockLabel { Paused = true; Speed = OneX }) + Assert.AreEqual<string>("1X", M6Presentation.clockLabel { Paused = false; Speed = OneX }) + Assert.AreEqual<string>("2X", M6Presentation.clockLabel { Paused = false; Speed = TwoX }) + Assert.AreEqual<string>("5X", M6Presentation.clockLabel { Paused = false; Speed = FiveX }) |
