aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEduardo Julian2018-12-10 00:37:44 -0400
committerEduardo Julian2018-12-10 00:37:44 -0400
commit1b01d30a77bf45afa53f9dbd41ae6b2aa8ddead7 (patch)
tree6203bdda0b144883e35e98d54f46676ae8d83683
parent9cde0397cc7520409853293fd18d8935d2294df9 (diff)
Slight improvement to tests.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/concurrency/session.lux30
1 files changed, 15 insertions, 15 deletions
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<Promise>
@@ -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)]]