aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/region.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/region.lux')
-rw-r--r--stdlib/source/test/lux/control/region.lux68
1 files changed, 34 insertions, 34 deletions
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index 477f42a47..4fbb71916 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -63,13 +63,13 @@
==
(Try a)
- (thread.run (:assume (/.run thread.monad left))))
+ (thread.result (:assume (/.run! thread.monad left))))
(:sharing [a]
(Equivalence a)
==
(Try a)
- (thread.run (:assume (/.run thread.monad right))))]
+ (thread.result (:assume (/.run! thread.monad right))))]
[(#try.Success left) (#try.Success right)]
(== left right)
@@ -96,8 +96,8 @@
(Monad (Region r (thread.Thread !))))
(/.monad thread.monad))))
- (_.cover [/.run]
- (thread.run
+ (_.cover [/.run!]
+ (thread.result
(do {! thread.monad}
[clean_up_counter (thread.box 0)
.let [//@ !
@@ -105,17 +105,17 @@
(do !
[_ (thread.update inc clean_up_counter)]
(in (#try.Success []))))]
- outcome (/.run !
- (do {! (/.monad !)}
- [_ (monad.map ! (/.acquire //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))]
- (in [])))
+ outcome (/.run! !
+ (do {! (/.monad !)}
+ [_ (monad.map ! (/.acquire //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))]
+ (in [])))
actual_clean_ups (thread.read clean_up_counter)]
(in (and (..success? outcome)
(n.= expected_clean_ups
actual_clean_ups))))))
(_.cover [/.failure]
- (thread.run
+ (thread.result
(do {! thread.monad}
[clean_up_counter (thread.box 0)
.let [//@ !
@@ -123,18 +123,18 @@
(do !
[_ (thread.update inc clean_up_counter)]
(in (#try.Success []))))]
- outcome (/.run !
- (do {! (/.monad !)}
- [_ (monad.map ! (/.acquire //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))
- _ (/.failure //@ (exception.error ..oops []))]
- (in [])))
+ outcome (/.run! !
+ (do {! (/.monad !)}
+ [_ (monad.map ! (/.acquire //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))
+ _ (/.failure //@ (exception.error ..oops []))]
+ (in [])))
actual_clean_ups (thread.read clean_up_counter)]
(in (and (..throws? ..oops outcome)
(n.= expected_clean_ups
actual_clean_ups))))))
(_.cover [/.except]
- (thread.run
+ (thread.result
(do {! thread.monad}
[clean_up_counter (thread.box 0)
.let [//@ !
@@ -142,18 +142,18 @@
(do !
[_ (thread.update inc clean_up_counter)]
(in (#try.Success []))))]
- outcome (/.run !
- (do {! (/.monad !)}
- [_ (monad.map ! (/.acquire //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))
- _ (/.except //@ ..oops [])]
- (in [])))
+ outcome (/.run! !
+ (do {! (/.monad !)}
+ [_ (monad.map ! (/.acquire //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))
+ _ (/.except //@ ..oops [])]
+ (in [])))
actual_clean_ups (thread.read clean_up_counter)]
(in (and (..throws? ..oops outcome)
(n.= expected_clean_ups
actual_clean_ups))))))
(_.cover [/.acquire /.clean_up_error]
- (thread.run
+ (thread.result
(do {! thread.monad}
[clean_up_counter (thread.box 0)
.let [//@ !
@@ -162,25 +162,25 @@
[_ (thread.update inc clean_up_counter)]
(in (: (Try Any)
(exception.except ..oops [])))))]
- outcome (/.run !
- (do {! (/.monad !)}
- [_ (monad.map ! (/.acquire //@ count_clean_up)
- (enum.range n.enum 1 expected_clean_ups))]
- (in [])))
+ outcome (/.run! !
+ (do {! (/.monad !)}
+ [_ (monad.map ! (/.acquire //@ count_clean_up)
+ (enum.range n.enum 1 expected_clean_ups))]
+ (in [])))
actual_clean_ups (thread.read clean_up_counter)]
(in (and (or (n.= 0 expected_clean_ups)
(..throws? /.clean_up_error outcome))
(n.= expected_clean_ups
actual_clean_ups))))))
(_.cover [/.lift]
- (thread.run
+ (thread.result
(do {! thread.monad}
[clean_up_counter (thread.box 0)
.let [//@ !]
- outcome (/.run !
- (do (/.monad !)
- [_ (/.lift //@ (thread.write expected_clean_ups clean_up_counter))]
- (in [])))
+ outcome (/.run! !
+ (do (/.monad !)
+ [_ (/.lift //@ (thread.write expected_clean_ups clean_up_counter))]
+ (in [])))
actual_clean_ups (thread.read clean_up_counter)]
(in (and (..success? outcome)
(n.= expected_clean_ups