aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-12-10 14:14:08 -0400
committerEduardo Julian2017-12-10 14:14:08 -0400
commit6352437a8403b09fa0c83843984323ce1e67e980 (patch)
tree34ac78ee4a88c7ce3485f856a330df3a3cf63a37 /stdlib/test
parent2e86fefe6f15877e8c46a45411a9cbd04b26e2e3 (diff)
- Some minor refactoring.
- Eliminated the dependency of actors upon FRP and STM. - Fixed some bugs.
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/concurrency/actor.lux21
1 files changed, 3 insertions, 18 deletions
diff --git a/stdlib/test/test/lux/concurrency/actor.lux b/stdlib/test/test/lux/concurrency/actor.lux
index f041ebe54..a5403d7d8 100644
--- a/stdlib/test/test/lux/concurrency/actor.lux
+++ b/stdlib/test/test/lux/concurrency/actor.lux
@@ -22,8 +22,8 @@
(wrap output)))
((stop cause state)
- (P/wrap (log! (if (ex.match? &.Killed cause)
- (format "Counter was killed: " (%n state))
+ (P/wrap (log! (if (ex.match? &.Poisoned cause)
+ (format "Counter was poisoned: " (%n state))
cause)))))
(message: #export Counter
@@ -37,13 +37,6 @@
(io.run (do io.Monad<IO>
[counter (new@Counter +0)]
(wrap (&.alive? counter)))))
-
- (test "Can kill actors."
- (io.run (do io.Monad<IO>
- [counter (new@Counter +0)
- killed? (&.kill counter)]
- (wrap (and killed?
- (not (&.alive? counter)))))))
(test "Can poison actors."
(io.run (do io.Monad<IO>
@@ -52,18 +45,10 @@
(wrap (and poisoned?
(not (&.alive? counter)))))))
- (test "Cannot kill an already dead actor."
- (io.run (do io.Monad<IO>
- [counter (new@Counter +0)
- first-time (&.kill counter)
- second-time (&.kill counter)]
- (wrap (and first-time
- (not second-time))))))
-
(test "Cannot poison an already dead actor."
(io.run (do io.Monad<IO>
[counter (new@Counter +0)
- first-time (&.kill counter)
+ first-time (&.poison counter)
second-time (&.poison counter)]
(wrap (and first-time
(not second-time))))))