aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/promise.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/concurrency/promise.lux')
-rw-r--r--stdlib/source/test/lux/control/concurrency/promise.lux17
1 files changed, 8 insertions, 9 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index bd980cd55..04dd1c220 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -49,19 +49,18 @@
(<| (_.covering /._)
(do {! random.monad}
[to-wait (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
- #let [extra-time (n.* 2 to-wait)]
expected random.nat
dummy random.nat
#let [not-dummy (|> random.nat (random.filter (|>> (n.= dummy) not)))]
leftE not-dummy
rightE not-dummy]
($_ _.and
- (_.with-cover [/.functor]
- ($functor.spec ..injection ..comparison /.functor))
- (_.with-cover [/.apply]
- ($apply.spec ..injection ..comparison /.apply))
- (_.with-cover [/.monad]
- ($monad.spec ..injection ..comparison /.monad))
+ (_.for [/.functor]
+ ($functor.spec ..injection ..comparison /.functor))
+ (_.for [/.apply]
+ ($apply.spec ..injection ..comparison /.apply))
+ (_.for [/.monad]
+ ($monad.spec ..injection ..comparison /.monad))
(wrap (do /.monad
[#let [[promise resolver] (: [(/.Promise Nat) (/.Resolver Nat)]
@@ -150,8 +149,8 @@
(and yep
(not nope)))))
(wrap (do /.monad
- [?none (/.time-out to-wait (/.delay extra-time dummy))
- ?actual (/.time-out extra-time (/.delay to-wait expected))]
+ [?none (/.time-out 0 (/.delay to-wait dummy))
+ ?actual (/.time-out to-wait (wrap expected))]
(_.cover' [/.time-out]
(case [?none ?actual]
[#.None (#.Some actual)]