aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/promise.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/control/concurrency/promise.lux40
1 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 51908a257..21633f293 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -48,12 +48,12 @@
Test
(<| (_.covering /._)
(do {! random.monad}
- [to-wait (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
+ [to_wait (|> random.nat (\ ! map (|>> (n.% 100) (n.max 10))))
expected random.nat
dummy random.nat
- #let [not-dummy (|> random.nat (random.filter (|>> (n.= dummy) not)))]
- leftE not-dummy
- rightE not-dummy]
+ #let [not_dummy (|> random.nat (random.filter (|>> (n.= dummy) not)))]
+ leftE not_dummy
+ rightE not_dummy]
($_ _.and
(_.for [/.functor]
($functor.spec ..injection ..comparison /.functor))
@@ -80,19 +80,19 @@
(n.= expected actual))))
(wrap (do /.monad
[pre (/.future instant.now)
- actual (/.schedule to-wait (io.io expected))
+ actual (/.schedule to_wait (io.io expected))
post (/.future instant.now)]
(_.cover' [/.schedule]
(and (n.= expected actual)
- (i.>= (.int to-wait)
- (duration.to-millis (instant.span pre post)))))))
+ (i.>= (.int to_wait)
+ (duration.to_millis (instant.span pre post)))))))
(wrap (do /.monad
[pre (/.future instant.now)
- _ (/.wait to-wait)
+ _ (/.wait to_wait)
post (/.future instant.now)]
(_.cover' [/.wait]
- (i.>= (.int to-wait)
- (duration.to-millis (instant.span pre post))))))
+ (i.>= (.int to_wait)
+ (duration.to_millis (instant.span pre post))))))
(wrap (do /.monad
[[leftA rightA] (/.and (/.future (io.io leftE))
(/.future (io.io rightE)))]
@@ -101,16 +101,16 @@
(n.+ leftA rightA)))))
(wrap (do /.monad
[pre (/.future instant.now)
- actual (/.delay to-wait expected)
+ actual (/.delay to_wait expected)
post (/.future instant.now)]
(_.cover' [/.delay]
(and (n.= expected actual)
- (i.>= (.int to-wait)
- (duration.to-millis (instant.span pre post)))))))
+ (i.>= (.int to_wait)
+ (duration.to_millis (instant.span pre post)))))))
(wrap (do /.monad
[?left (/.or (wrap leftE)
- (/.delay to-wait dummy))
- ?right (/.or (/.delay to-wait dummy)
+ (/.delay to_wait dummy))
+ ?right (/.or (/.delay to_wait dummy)
(wrap rightE))]
(_.cover' [/.or]
(case [?left ?right]
@@ -122,8 +122,8 @@
false))))
(wrap (do /.monad
[leftA (/.either (wrap leftE)
- (/.delay to-wait dummy))
- rightA (/.either (/.delay to-wait dummy)
+ (/.delay to_wait dummy))
+ rightA (/.either (/.delay to_wait dummy)
(wrap rightE))]
(_.cover' [/.either]
(n.= (n.+ leftE rightE)
@@ -149,9 +149,9 @@
(and yep
(not nope)))))
(wrap (do /.monad
- [?none (/.time-out 0 (/.delay to-wait dummy))
- ?actual (/.time-out to-wait (wrap expected))]
- (_.cover' [/.time-out]
+ [?none (/.time_out 0 (/.delay to_wait dummy))
+ ?actual (/.time_out to_wait (wrap expected))]
+ (_.cover' [/.time_out]
(case [?none ?actual]
[#.None (#.Some actual)]
(n.= expected actual)