From d41c31e8c16e52e32c65f9c25ee48d11da6d152d Mon Sep 17 00:00:00 2001 From: Bram Date: Fri, 29 Mar 2024 11:18:01 +0100 Subject: [PATCH] Allow Timeline fuzzers to simulate /sync --- tests/Test/Values/Timeline.elm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/tests/Test/Values/Timeline.elm b/tests/Test/Values/Timeline.elm index f55453d..2dca2d0 100644 --- a/tests/Test/Values/Timeline.elm +++ b/tests/Test/Values/Timeline.elm @@ -44,6 +44,34 @@ fuzzer = ) Fuzz.string (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.map (List.foldl (<|) Timeline.empty)