From 6352437a8403b09fa0c83843984323ce1e67e980 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sun, 10 Dec 2017 14:14:08 -0400 Subject: - Some minor refactoring. - Eliminated the dependency of actors upon FRP and STM. - Fixed some bugs. --- stdlib/test/test/lux/concurrency/actor.lux | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'stdlib/test') 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 [counter (new@Counter +0)] (wrap (&.alive? counter))))) - - (test "Can kill actors." - (io.run (do io.Monad - [counter (new@Counter +0) - killed? (&.kill counter)] - (wrap (and killed? - (not (&.alive? counter))))))) (test "Can poison actors." (io.run (do io.Monad @@ -52,18 +45,10 @@ (wrap (and poisoned? (not (&.alive? counter))))))) - (test "Cannot kill an already dead actor." - (io.run (do io.Monad - [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 [counter (new@Counter +0) - first-time (&.kill counter) + first-time (&.poison counter) second-time (&.poison counter)] (wrap (and first-time (not second-time)))))) -- cgit v1.2.3