diff options
author | Eduardo Julian | 2022-04-09 03:03:46 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-09 03:03:46 -0400 |
commit | 04c7f49a732380a2b9f72b1b937171b341c24323 (patch) | |
tree | d54c92bf10665bba0ec4643746becce569604fb2 /stdlib/source/test/lux/control/concurrency/async.lux | |
parent | f11afb9d2dfe2d59b41e8056eb8c4ae65268415f (diff) |
Better names for testing macros (plus better indentation).
Diffstat (limited to 'stdlib/source/test/lux/control/concurrency/async.lux')
-rw-r--r-- | stdlib/source/test/lux/control/concurrency/async.lux | 96 |
1 files changed, 48 insertions, 48 deletions
diff --git a/stdlib/source/test/lux/control/concurrency/async.lux b/stdlib/source/test/lux/control/concurrency/async.lux index e43619f2c..0e59faf3d 100644 --- a/stdlib/source/test/lux/control/concurrency/async.lux +++ b/stdlib/source/test/lux/control/concurrency/async.lux @@ -71,97 +71,97 @@ (/.async []))] resolved? (/.future (resolver expected)) actual async] - (_.cover' [/.Async /.Resolver /.async] - (and resolved? - (n.= expected actual))))) + (_.coverage' [/.Async /.Resolver /.async] + (and resolved? + (n.= expected actual))))) (in (do /.monad [actual (/.resolved expected)] - (_.cover' [/.resolved] - (n.= expected actual)))) + (_.coverage' [/.resolved] + (n.= expected actual)))) (in (do /.monad [actual (/.future (io.io expected))] - (_.cover' [/.future] - (n.= expected actual)))) + (_.coverage' [/.future] + (n.= expected actual)))) (in (do /.monad [pre (/.future instant.now) actual (/.schedule! waiting_time (io.io expected)) post (/.future instant.now)] - (_.cover' [/.schedule!] - (and (n.= expected actual) - (i.>= (.int waiting_time) - (duration.millis (instant.span pre post))))))) + (_.coverage' [/.schedule!] + (and (n.= expected actual) + (i.>= (.int waiting_time) + (duration.millis (instant.span pre post))))))) (in (do /.monad [pre (/.future instant.now) _ (/.delay waiting_time) post (/.future instant.now)] - (_.cover' [/.delay] - (i.>= (.int waiting_time) - (duration.millis (instant.span pre post)))))) + (_.coverage' [/.delay] + (i.>= (.int waiting_time) + (duration.millis (instant.span pre post)))))) (in (do /.monad [[leftA rightA] (/.and (/.future (io.io leftE)) (/.future (io.io rightE)))] - (_.cover' [/.and] - (n.= (n.+ leftE rightE) - (n.+ leftA rightA))))) + (_.coverage' [/.and] + (n.= (n.+ leftE rightE) + (n.+ leftA rightA))))) (in (do /.monad [pre (/.future instant.now) actual (/.after waiting_time expected) post (/.future instant.now)] - (_.cover' [/.after] - (and (n.= expected actual) - (i.>= (.int waiting_time) - (duration.millis (instant.span pre post))))))) + (_.coverage' [/.after] + (and (n.= expected actual) + (i.>= (.int waiting_time) + (duration.millis (instant.span pre post))))))) (in (do /.monad [?left (/.or (in leftE) (/.after waiting_time dummy)) ?right (/.or (/.after waiting_time dummy) (in rightE))] - (_.cover' [/.or] - (case [?left ?right] - [{.#Left leftA} {.#Right rightA}] - (n.= (n.+ leftE rightE) - (n.+ leftA rightA)) + (_.coverage' [/.or] + (case [?left ?right] + [{.#Left leftA} {.#Right rightA}] + (n.= (n.+ leftE rightE) + (n.+ leftA rightA)) - _ - false)))) + _ + false)))) (in (do /.monad [leftA (/.either (in leftE) (/.after waiting_time dummy)) rightA (/.either (/.after waiting_time dummy) (in rightE))] - (_.cover' [/.either] - (n.= (n.+ leftE rightE) - (n.+ leftA rightA))))) + (_.coverage' [/.either] + (n.= (n.+ leftE rightE) + (n.+ leftA rightA))))) (in (do /.monad [?actual (/.future (/.value (/.resolved expected))) .let [[async resolver] (is [(/.Async Nat) (/.Resolver Nat)] (/.async []))] ?never (/.future (/.value async))] - (_.cover' [/.value] - (case [?actual ?never] - [{.#Some actual} {.#None}] - (n.= expected actual) + (_.coverage' [/.value] + (case [?actual ?never] + [{.#Some actual} {.#None}] + (n.= expected actual) - _ - false)))) + _ + false)))) (in (do /.monad [yep (/.future (/.resolved? (/.resolved expected))) .let [[async resolver] (is [(/.Async Nat) (/.Resolver Nat)] (/.async []))] nope (/.future (/.resolved? async))] - (_.cover' [/.resolved?] - (and yep - (not nope))))) + (_.coverage' [/.resolved?] + (and yep + (not nope))))) (in (do /.monad [?none (/.within 0 (/.after waiting_time dummy)) ?actual (/.within waiting_time (in expected))] - (_.cover' [/.within] - (case [?none ?actual] - [{.#None} {.#Some actual}] - (n.= expected actual) + (_.coverage' [/.within] + (case [?none ?actual] + [{.#None} {.#Some actual}] + (n.= expected actual) - _ - false)))) + _ + false)))) (in (do /.monad [.let [box (is (Atom Nat) (atom.atom dummy))] @@ -169,6 +169,6 @@ (atom.write! value box)) (/.resolved expected))) actual (/.future (atom.read! box))] - (_.cover' [/.upon!] - (n.= expected actual)))) + (_.coverage' [/.upon!] + (n.= expected actual)))) )))) |