aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/semaphore.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/concurrency/semaphore.lux10
1 files changed, 5 insertions, 5 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/semaphore.lux b/stdlib/source/test/lux/control/concurrency/semaphore.lux
index 19a99f55d..54143c345 100644
--- a/stdlib/source/test/lux/control/concurrency/semaphore.lux
+++ b/stdlib/source/test/lux/control/concurrency/semaphore.lux
@@ -46,7 +46,7 @@
(in (do async.monad
[result (async.within ..delay (/.wait! semaphore))]
(unit.coverage [/.semaphore]
- (case result
+ (when result
{.#Some _}
true
@@ -59,7 +59,7 @@
[_ (monad.each ! /.wait! (list.repeated initial_open_positions semaphore))
result (async.within ..delay (/.wait! semaphore))]
(unit.coverage [/.wait!]
- (case result
+ (when result
{.#Some _}
false
@@ -75,7 +75,7 @@
open_positions (/.signal! semaphore)
result/1 (async.within ..delay block)]
(unit.coverage [/.signal!]
- (case [result/0 result/1 open_positions]
+ (when [result/0 result/1 open_positions]
[{.#None} {.#Some _} {try.#Success +0}]
true
@@ -87,7 +87,7 @@
(in (do async.monad
[outcome (/.signal! semaphore)]
(unit.coverage [/.semaphore_is_maxed_out]
- (case outcome
+ (when outcome
{try.#Failure error}
(exception.match? /.semaphore_is_maxed_out error)
@@ -146,7 +146,7 @@
(do random.monad
[raw random.nat]
(_.coverage [/.Limit /.limit]
- (case [raw (/.limit raw)]
+ (when [raw (/.limit raw)]
[0 {.#None}]
true