aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/library/lux/test
diff options
context:
space:
mode:
authorEduardo Julian2022-08-11 04:15:07 -0400
committerEduardo Julian2022-08-11 04:15:07 -0400
commit065e8a4d8122d4616b570496915d2c0e2c78cd6b (patch)
treef2bbdc3e40b796b34026ab04c9a478d8a3f082d5 /stdlib/source/library/lux/test
parent68d78235694c633c956bb9e8a007cad7d65370bc (diff)
Re-named the "case" macro to "when".
Diffstat (limited to 'stdlib/source/library/lux/test')
-rw-r--r--stdlib/source/library/lux/test/property.lux14
1 files changed, 7 insertions, 7 deletions
diff --git a/stdlib/source/library/lux/test/property.lux b/stdlib/source/library/lux/test/property.lux
index ff61d64d5..e18d7b36b 100644
--- a/stdlib/source/library/lux/test/property.lux
+++ b/stdlib/source/library/lux/test/property.lux
@@ -110,7 +110,7 @@
(def .public (times amount test)
(-> Nat Test Test)
- (case amount
+ (when amount
0 (..failure (exception.error ..must_try_test_at_least_once []))
_ (do random.monad
[seed random.nat]
@@ -120,7 +120,7 @@
[[tally documentation] instance]
(if (..failed? tally)
(in [tally (times_failure seed documentation)])
- (case amount
+ (when amount
1 instance
_ (|> test
(times (-- amount))
@@ -143,7 +143,7 @@
unexpected_coverage (set.size unexpected)
actual_coverage (n.- unexpected_coverage
(set.size (the tally.#actual tally)))
- coverage (case expected_coverage
+ coverage (when expected_coverage
0 "N/A"
expected (let [missing_ratio (f./ (n.frac expected)
(n.frac (set.size missing)))
@@ -197,7 +197,7 @@
(..description duration tally)
text.new_line)]
_ (with_expansions [<else> (in {try.#Success (debug.log! report)})]
- (.for @.js (case console.default
+ (.for @.js (when console.default
{.#None}
<else>
@@ -205,7 +205,7 @@
(console.write_line report console))
<else>))]
(async.future (at environment.default exit
- (case (the tally.#failures tally)
+ (when (the tally.#failures tally)
0 ..success_exit_code
_ ..failure_exit_code)))))
@@ -236,7 +236,7 @@
(def .public (in_parallel tests)
(-> (List Test) Test)
- (case (list.size tests)
+ (when (list.size tests)
0
(random#in (async#in [tally.empty ""]))
@@ -249,7 +249,7 @@
product.right
(function (_ _))
"lux try"
- (pipe.case
+ (pipe.when
{try.#Success output}
output