Verify that non-remotely controlled lights are on if they have power
This commit is contained in:
parent
d57ca23822
commit
d7fac9c3d0
3 changed files with 21 additions and 6 deletions
|
|
@ -19,14 +19,14 @@ let private genHumanInteraction biasTowardsLight =
|
|||
let private genInteraction biasTowardsLight =
|
||||
Gen.oneof [ genTimeChanged; genHumanInteraction biasTowardsLight ]
|
||||
|
||||
let private genInteractionsListThatStartsWithTimeChanged biasTowardsLight =
|
||||
let genInitialInteractions biasTowardsLight =
|
||||
[ genTimeChanged |> Gen.map List.singleton
|
||||
Gen.listOf <| genInteraction biasTowardsLight ]
|
||||
|> concatGens
|
||||
|
||||
let genInitialInteractionsAndEndWith biasTowardsLight (endsWith: Interaction) =
|
||||
let genNonTrivialList =
|
||||
genInteractionsListThatStartsWithTimeChanged biasTowardsLight
|
||||
genInitialInteractions biasTowardsLight
|
||||
|> Gen.map (fun lst -> lst @ [ endsWith ])
|
||||
|
||||
match endsWith with
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue