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