bork
[clean-tests.git] / test.icl
index e437b71..8a75a61 100644 (file)
--- 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}