diff options
Diffstat (limited to 'src/LivingVillage.Desktop.Tests')
| -rw-r--r-- | src/LivingVillage.Desktop.Tests/DesktopTests.fs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/LivingVillage.Desktop.Tests/DesktopTests.fs b/src/LivingVillage.Desktop.Tests/DesktopTests.fs index 20cbbe9..667ab69 100644 --- a/src/LivingVillage.Desktop.Tests/DesktopTests.fs +++ b/src/LivingVillage.Desktop.Tests/DesktopTests.fs @@ -124,3 +124,18 @@ type DesktopTests () = Assert.IsTrue(day.WorldTint.R > day.WorldTint.G) Assert.IsTrue(day.WorldTint.G > day.WorldTint.B) + + [<TestMethod>] + member _.DaylightAutoplayBootstrapStartsAtDawnAndPreservesDefaultStart () = + let dawnTick = 6L * Sim.ticksPerDay / 24L + let daylightWorld = WorldBootstrap.initialWorldForDaylight true 42UL Sim.npcCount + let defaultWorld = WorldBootstrap.initialWorldForDaylight false 42UL Sim.npcCount + let daylightProfile = M6Presentation.profileAtTick daylightWorld.Tick + let defaultProfile = M6Presentation.profileAtTick defaultWorld.Tick + + Assert.AreEqual<int64>(dawnTick, daylightWorld.Tick) + Assert.IsTrue(abs (daylightWorld.Time - float dawnTick * Sim.dtSeconds) < 1e-9) + Assert.AreEqual<M6DayNight>(Day, daylightProfile.Mode) + Assert.AreEqual<int64>(0L, defaultWorld.Tick) + Assert.AreEqual<float>(0.0, defaultWorld.Time) + Assert.AreEqual<M6DayNight>(Night, defaultProfile.Mode) |
