Improve variable name

This commit is contained in:
Sven van Heugten 2026-03-16 19:24:37 +01:00
parent 8cde891ba2
commit 0c964719d9

View file

@ -93,7 +93,7 @@ type NightLightTests() =
let lastBedroomControllingRemoteInteraction =
tryGetLastBedroomControllingRemoteInteraction interactions
let newDayStartedSinceBedroomRemote =
let newDayStartedSinceLastBedroomControllingRemoteInteraction =
hasNewDayStartedSince interactions lastBedroomControllingRemoteInteraction
let livingRoomLightsToggledOn =
@ -113,7 +113,7 @@ type NightLightTests() =
match light with
| LeftBedroomLamp
| RightBedroomLamp ->
if newDayStartedSinceBedroomRemote then
if newDayStartedSinceLastBedroomControllingRemoteInteraction then
true
else
match lastBedroomControllingRemoteInteraction with
@ -131,6 +131,8 @@ type NightLightTests() =
$"last bedroom controlling remote interaction is {lastBedroomControllingRemoteInteraction |> Option.map snd}"
|> Prop.collect $"{lightsWithPower.Length} light(s) with power"
|> Prop.classify livingRoomLightsToggledOn "living room lights toggled on"
|> Prop.classify newDayStartedSinceBedroomRemote "new day since bedroom remote"
|> Prop.classify
newDayStartedSinceLastBedroomControllingRemoteInteraction
"new day started since last bedroom controlling remote interaction"
|> Prop.label fakeHome.Label
|> Prop.trivial (lightsWithPower.Length = 0)