Allow Timeline fuzzers to simulate /sync

pull/17/head
Bram 2024-03-29 11:18:01 +01:00
parent 792e60761a
commit d41c31e8c1
1 changed files with 28 additions and 0 deletions

View File

@ -44,6 +44,34 @@ fuzzer =
) )
Fuzz.string Fuzz.string
(Fuzz.listOfLengthBetween 0 4 fuzzerBatch) (Fuzz.listOfLengthBetween 0 4 fuzzerBatch)
, Fuzz.map2
(\start batches ->
List.foldl
(\b ( s, f ) ->
( b.end
, f >> Timeline.addSync { b | start = Just s, filter = globalFilter }
)
)
( start, identity )
batches
|> Tuple.second
)
Fuzz.string
(Fuzz.listOfLengthBetween 0 10 fuzzerBatch)
, Fuzz.map2
(\start batches ->
List.foldl
(\b ( s, f ) ->
( b.end
, f >> Timeline.addSync { b | start = Just s, filter = Filter.and globalFilter b.filter }
)
)
( start, identity )
batches
|> Tuple.second
)
Fuzz.string
(Fuzz.listOfLengthBetween 0 4 fuzzerBatch)
] ]
|> Fuzz.listOfLengthBetween 0 10 |> Fuzz.listOfLengthBetween 0 10
|> Fuzz.map (List.foldl (<|) Timeline.empty) |> Fuzz.map (List.foldl (<|) Timeline.empty)