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.lux11
1 files changed, 9 insertions, 2 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/promise.lux b/stdlib/source/test/lux/control/concurrency/promise.lux
index 7fc3196cd..ee6ad2b43 100644
--- a/stdlib/source/test/lux/control/concurrency/promise.lux
+++ b/stdlib/source/test/lux/control/concurrency/promise.lux
@@ -1,6 +1,7 @@
(.module:
[lux #*
["_" test (#+ Test)]
+ ["@" target]
[abstract
[monad (#+ do)]
{[0 #spec]
@@ -18,7 +19,8 @@
["." random]
[number
["n" nat]
- ["i" int]]]]
+ ["i" int]
+ ["." i64]]]]
{1
["." /
[//
@@ -43,11 +45,16 @@
_
false))))))
+(def: delay
+ (for {@.js
+ (i64.left_shift 4 1)}
+ (i64.left_shift 3 1)))
+
(def: #export test
Test
(<| (_.covering /._)
(do {! random.monad}
- [to_wait (|> random.nat (\ ! map (|>> (n.% 10) (n.+ 10))))
+ [to_wait (|> random.nat (\ ! map (|>> (n.% ..delay) (n.+ ..delay))))
expected random.nat
dummy random.nat
#let [not_dummy (|> random.nat (random.filter (|>> (n.= dummy) not)))]