X-Git-Url: https://git.martlubbers.net/?a=blobdiff_plain;f=test.icl;h=8a75a613f9a5a0e4e3eebbc7708613be17490c02;hb=4334ca7b15eb33a8106a0085297c579130a0a64b;hp=e437b71b5467242b2ceaba67ac76d6bdd2d99910;hpb=171db1fa253aaaad79fcbe19afaa277379ac9570;p=clean-tests.git diff --git a/test.icl b/test.icl index e437b71..8a75a61 100644 --- a/test.icl +++ b/test.icl @@ -1,11 +1,12 @@ module test +import Debug.Trace import iTasks import iTasks.Extensions.DateTime import iTasks.UI.Layout.Minimal -Start w = doTasksWithOptions opt p2 w +Start w = doTasksWithOptions opt w2 w where t :: Task DateTime t = waitForTimer 7 @@ -23,10 +24,23 @@ where t7 :: Int -> Task Int t7 i = viewInformation () [] i >>= \x->t7 (x + 1) + t8 = viewInformation () [] 1 + >>= \_->(viewInformation () [] 2 + >>= \_->viewInformation () [] 3 + >>= \_->viewInformation () [] 4) + p = parallel [(Embedded, \_->waitForTimer 5)] [] p1 = waitForTimer 5 -||- waitForTimer 10 p2 = withShared 3 \sh->watch sh + w1 = withShared 0 \sds -> (watch sds @? trace_stdout) -&&- updateInformation () [] 0 -&&- updateSharedInformation () [] sds + + w2 = withShared 0 \sds -> + updateSharedInformation () [] sds + -&&- (whileUnchanged sds (viewInformation () []) @? trace_stdout) + + w3 = forever (viewInformation () [] 32) @? trace_stdout + opt args eo = Ok eo // opt args eo = Ok {eo & autoLayout=False}