From c6f08ac3a23dbad1e4a4766f1c0b4b66fdd32f43 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20B=C3=A4renz?= Date: Sun, 27 Oct 2024 13:14:48 +0100 Subject: [PATCH] Extend Schedule test --- rhine/test/Schedule.hs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/rhine/test/Schedule.hs b/rhine/test/Schedule.hs index bd13f00e..e4c923df 100644 --- a/rhine/test/Schedule.hs +++ b/rhine/test/Schedule.hs @@ -6,6 +6,7 @@ module Schedule where import Control.Arrow ((>>>)) import Data.Functor (($>)) import Data.Functor.Identity +import Data.List (sort) -- tasty import Test.Tasty @@ -59,8 +60,8 @@ tests = [ testCase "chronological ticks" $ do let (runningClock, _time) = runSchedule (initClock $ ParallelClock (FixedStep @5) (FixedStep @3) :: RunningClockInit (Schedule Integer) Integer (Either () ())) - output = runSchedule $ embed runningClock $ replicate 6 () - output + output = runSchedule $ embed runningClock $ replicate 1000 () + take 6 output @?= [ (3, Right ()) , (5, Left ()) , (6, Right ()) @@ -68,5 +69,7 @@ tests = , (10, Left ()) , (12, Right ()) ] + let timestamps = fst <$> output + timestamps @?= sort timestamps ] ]