aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/concurrency/frp.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/control/concurrency/frp.lux')
-rw-r--r--stdlib/source/test/lux/control/concurrency/frp.lux25
1 files changed, 13 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/frp.lux b/stdlib/source/test/lux/control/concurrency/frp.lux
index 05fd6360c..147b8d2cb 100644
--- a/stdlib/source/test/lux/control/concurrency/frp.lux
+++ b/stdlib/source/test/lux/control/concurrency/frp.lux
@@ -1,7 +1,6 @@
(.require
[library
[lux (.except)
- ["_" test (.only Test)]
[abstract
[monad (.only do)]
[\\specification
@@ -19,7 +18,9 @@
[math
["[0]" random]
[number
- ["n" nat]]]]]
+ ["n" nat]]]
+ ["_" test (.only Test)
+ ["[0]" unit]]]]
[\\library
["[0]" / (.only)
[//
@@ -121,14 +122,14 @@
async.resolved
/.of_async
/.list)]
- (_.coverage' [/.of_async /.list]
+ (unit.coverage [/.of_async /.list]
(list#= (list sample)
output))))
(in (do async.monad
[output (|> inputs
(/.sequential 0)
/.list)]
- (_.coverage' [/.sequential]
+ (unit.coverage [/.sequential]
(list#= inputs
output))))
(in (do async.monad
@@ -136,7 +137,7 @@
(/.sequential 0)
(/.only n.even?)
/.list)]
- (_.coverage' [/.only]
+ (unit.coverage [/.only]
(list#= (list.only n.even? inputs)
output))))
(in (do [! async.monad]
@@ -160,14 +161,14 @@
atom.read!
async.future
(at ! each sequence.list))]
- (_.coverage' [/.Subscriber /.subscribe!]
+ (unit.coverage [/.Subscriber /.subscribe!]
(list#= inputs listened))))
(in (do async.monad
[actual (/.mix (function (_ input total)
(async.resolved (n.+ input total)))
0
(/.sequential 0 inputs))]
- (_.coverage' [/.mix]
+ (unit.coverage [/.mix]
(n.= (list#mix n.+ 0 inputs)
actual))))
(in (do async.monad
@@ -177,7 +178,7 @@
(async.resolved (n.+ input total)))
0)
/.list)]
- (_.coverage' [/.mixes]
+ (unit.coverage [/.mixes]
(list#= (list.mixes n.+ 0 inputs)
actual))))
(in (do async.monad
@@ -187,7 +188,7 @@
(/.sequential 0)
(/.distinct n.equivalence)
/.list)]
- (_.coverage' [/.distinct]
+ (unit.coverage [/.distinct]
(list#= (list distinct/0 distinct/1 distinct/2)
actual))))
(do !
@@ -201,12 +202,12 @@
enough_polls!
(n.= amount_of_polls (list.size actual))]]
- (_.coverage' [/.poll]
+ (unit.coverage [/.poll]
(and correct_values!
enough_polls!))))
(in (do [! async.monad]
[actual (..take_amount amount_of_polls (/.periodic polling_delay))]
- (_.coverage' [/.periodic]
+ (unit.coverage [/.periodic]
(n.= amount_of_polls (list.size actual)))))))
(in (do async.monad
[.let [max_iterations 10]
@@ -218,7 +219,7 @@
current]}
{.#None}))))
/.list)]
- (_.coverage' [/.iterations]
+ (unit.coverage [/.iterations]
(and (n.= max_iterations (list.size actual))
(list#= (list.mixes n.+ sample (list.repeated (-- max_iterations) shift))
actual)))))