From 1b01d30a77bf45afa53f9dbd41ae6b2aa8ddead7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Mon, 10 Dec 2018 00:37:44 -0400 Subject: Slight improvement to tests. --- stdlib/test/test/lux/concurrency/session.lux | 30 ++++++++++++++-------------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'stdlib') diff --git a/stdlib/test/test/lux/concurrency/session.lux b/stdlib/test/test/lux/concurrency/session.lux index 192421f02..ed538372c 100644 --- a/stdlib/test/test/lux/concurrency/session.lux +++ b/stdlib/test/test/lux/concurrency/session.lux @@ -18,12 +18,12 @@ (def: $transfer (<| << (!! Int) >>)) (def: transfer - (Lazy (:~ $transfer)) - (<| $.send $.end)) + (IO (:~ $transfer)) + (io.io (lazy.thaw (<| $.send $.end)))) (context: "Transfer." (do @ - [#let [[$me $you] (lazy.thaw ..transfer)] + [#let [[$me $you] (io.run ..transfer)] expectation r.int] ($_ seq (wrap (do promise.Monad @@ -41,13 +41,13 @@ (<| (!! Int) $recur))))) (def: endless - (Lazy (:~ $endless)) - ($.rec (function (_ recur) - (<| $.send recur)))) + (IO (:~ $endless)) + (io.io (lazy.thaw ($.rec (function (_ recur) + (<| $.send recur)))))) (context: "Endless." (do @ - [#let [[$me $you] (lazy.thaw ..endless)] + [#let [[$me $you] (io.run ..endless)] expectation0 r.int expectation1 r.int expectation2 r.int] @@ -78,19 +78,19 @@ >>)))) (def: calculation - (Lazy (:~ (<< $calculation))) - ($.rec - (function (_ recur) - ($_ $.fork - (<| $.send $.send $.receive recur) - (<| $.send $.receive recur) - $.end)))) + (IO (:~ (<< $calculation))) + (io.io (lazy.thaw ($.rec + (function (_ recur) + ($_ $.fork + (<| $.send $.send $.receive recur) + (<| $.send $.receive recur) + $.end)))))) (def: negate (i/* -1)) (context: "Complex session." (do @ - [#let [[$me $you] (lazy.thaw calculation)] + [#let [[$me $you] (io.run calculation)] param r.int subject r.int #let [expectation (i/+ param subject)]] -- cgit v1.2.3