aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/region.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/region.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/test/lux/control/region.lux b/stdlib/source/test/lux/control/region.lux
index eec4e6903..d911c15d5 100644
--- a/stdlib/source/test/lux/control/region.lux
+++ b/stdlib/source/test/lux/control/region.lux
@@ -66,7 +66,7 @@
(def: #export test
Test
(<| (_.context (name.module (name-of /._)))
- (do r.monad
+ (do {@ r.monad}
[expected-clean-ups (|> r.nat (:: @ map (|>> (n.% 100) (n.max 1))))]
($_ _.and
($functor.spec ..injection ..comparison (: (All [! r]
@@ -81,7 +81,7 @@
(_.test (%.name (name-of /.run))
(thread.run
- (do thread.monad
+ (do {@ thread.monad}
[clean-up-counter (thread.box 0)
#let [//@ @
count-clean-up (function (_ value)
@@ -89,7 +89,7 @@
[_ (thread.update inc clean-up-counter)]
(wrap (#try.Success []))))]
outcome (/.run @
- (do (/.monad @)
+ (do {@ (/.monad @)}
[_ (monad.map @ (/.acquire //@ count-clean-up)
(list.n/range 1 expected-clean-ups))]
(wrap [])))
@@ -99,7 +99,7 @@
actual-clean-ups))))))
(_.test (%.name (name-of /.fail))
(thread.run
- (do thread.monad
+ (do {@ thread.monad}
[clean-up-counter (thread.box 0)
#let [//@ @
count-clean-up (function (_ value)
@@ -107,7 +107,7 @@
[_ (thread.update inc clean-up-counter)]
(wrap (#try.Success []))))]
outcome (/.run @
- (do (/.monad @)
+ (do {@ (/.monad @)}
[_ (monad.map @ (/.acquire //@ count-clean-up)
(list.n/range 1 expected-clean-ups))
_ (/.fail //@ (exception.construct ..oops []))]
@@ -118,7 +118,7 @@
actual-clean-ups))))))
(_.test (%.name (name-of /.throw))
(thread.run
- (do thread.monad
+ (do {@ thread.monad}
[clean-up-counter (thread.box 0)
#let [//@ @
count-clean-up (function (_ value)
@@ -126,7 +126,7 @@
[_ (thread.update inc clean-up-counter)]
(wrap (#try.Success []))))]
outcome (/.run @
- (do (/.monad @)
+ (do {@ (/.monad @)}
[_ (monad.map @ (/.acquire //@ count-clean-up)
(list.n/range 1 expected-clean-ups))
_ (/.throw //@ ..oops [])]
@@ -137,7 +137,7 @@
actual-clean-ups))))))
(_.test (%.name (name-of /.acquire))
(thread.run
- (do thread.monad
+ (do {@ thread.monad}
[clean-up-counter (thread.box 0)
#let [//@ @
count-clean-up (function (_ value)
@@ -146,7 +146,7 @@
(wrap (: (Try Any)
(exception.throw ..oops [])))))]
outcome (/.run @
- (do (/.monad @)
+ (do {@ (/.monad @)}
[_ (monad.map @ (/.acquire //@ count-clean-up)
(list.n/range 1 expected-clean-ups))]
(wrap [])))
@@ -157,7 +157,7 @@
actual-clean-ups))))))
(_.test (%.name (name-of /.lift))
(thread.run
- (do thread.monad
+ (do {@ thread.monad}
[clean-up-counter (thread.box 0)
#let [//@ @]
outcome (/.run @