Skip to content

Commit

Permalink
yampa-test: Organize module Delays following Yampa's order. Refs #217.
Browse files Browse the repository at this point in the history
Understanding which parts of Yampa are tested and which ones are not is
generally hard. To facilitate keeping track of which elements are tested
and which ones are not, this commit organizes the elements of Delays in
the same order and with the same haddock section separators as they have
in Yampa's counterpart.
  • Loading branch information
ivanperez-keera committed May 22, 2022
1 parent 21db6a9 commit b39dabb
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions yampa-test/tests/Test/FRP/Yampa/Delays.hs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ tests = testGroup "Regression tests for FRP.Yampa.Delays"
, testProperty "delay (small delay, qc)" prop_delay_2
]

-- * Test cases for pre and related combinators
-- * Delays

pre_t0 = testSF1 (iPre 17)
pre_t0r =
Expand Down Expand Up @@ -212,6 +212,8 @@ pre_t8r = [ 0,1,1,1 -- 0s
, 10,10 -- 12s
]

-- * Timed delays

delay_t0 = testSF1 (delay 0.0 undefined)
delay_t0r =
[ 0.0,1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0,13.0,14.0
Expand Down Expand Up @@ -268,8 +270,6 @@ delay_t5r = take 100 (drop 6 (embed sf (deltaEncode 0.1 (repeat ()))))
where
sf = time >>> arr (\t -> sin (2*pi*(t-0.6)))

-- Delaying

-- | Delaying by 0.0 has no effect
prop_delay_1 =
forAll myStream $ evalT $ prop_always_equal sfDelayed sf
Expand All @@ -292,6 +292,8 @@ prop_delay_2 =

initialValue = 17

-- * Auxiliary

-- prop :: SF a b -> (a -> b ->
prop (a,b) = SP ((identity &&& a) >>^ uncurry b)

Expand Down

0 comments on commit b39dabb

Please sign in to comment.