From b39dabbe3cc7110d66aac6295973c5b138fb8f9f Mon Sep 17 00:00:00 2001 From: Ivan Perez Date: Sat, 21 May 2022 20:36:13 -0400 Subject: [PATCH] yampa-test: Organize module Delays following Yampa's order. Refs #217. 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. --- yampa-test/tests/Test/FRP/Yampa/Delays.hs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/yampa-test/tests/Test/FRP/Yampa/Delays.hs b/yampa-test/tests/Test/FRP/Yampa/Delays.hs index 04634935..63b892f6 100644 --- a/yampa-test/tests/Test/FRP/Yampa/Delays.hs +++ b/yampa-test/tests/Test/FRP/Yampa/Delays.hs @@ -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 = @@ -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 @@ -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 @@ -292,6 +292,8 @@ prop_delay_2 = initialValue = 17 +-- * Auxiliary + -- prop :: SF a b -> (a -> b -> prop (a,b) = SP ((identity &&& a) >>^ uncurry b)