diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/data/text.lux | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux index dca84b015..97fe18d59 100644 --- a/stdlib/source/test/lux/data/text.lux +++ b/stdlib/source/test/lux/data/text.lux @@ -195,7 +195,7 @@ (do random.monad [sample (random.maybe random.nat)] (_.coverage [\\format.maybe] - (case sample + (when sample {.#None} true @@ -215,7 +215,7 @@ (def !expect (template (_ <pattern> <value>) - [(case <value> + [(when <value> <pattern> true @@ -224,7 +224,7 @@ (def (should_fail' sample parser exception) (All (_ a e) (-> Text (\\parser.Parser a) (Exception e) Bit)) - (case (\\parser.result parser sample) + (when (\\parser.result parser sample) {try.#Failure error} (exception.match? exception error) @@ -233,7 +233,7 @@ (def (should_fail sample parser) (All (_ a) (-> Text (\\parser.Parser a) Bit)) - (case (\\parser.result parser sample) + (when (\\parser.result parser sample) {try.#Failure _} true @@ -259,7 +259,7 @@ range (at ! each (|>> (nat.% 50) (nat.+ 10)) random.nat) .let [limit (nat.+ offset range)] expected (at ! each (|>> (nat.% range) (nat.+ offset) /.of_char) random.nat) - out_of_range (case offset + out_of_range (when offset 0 (at ! each (|>> (nat.% 10) ++ (nat.+ limit) /.of_char) random.nat) _ (at ! each (|>> (nat.% offset) /.of_char) random.nat))] (_.coverage [\\parser.range] @@ -745,9 +745,9 @@ .let [sample (|> characters set.list /.together)] expected (at ! each (nat.% size) random.nat)] (_.coverage [/.char] - (case (/.char expected sample) + (when (/.char expected sample) {.#Some char} - (case (/.index (/.of_char char) sample) + (when (/.index (/.of_char char) sample) {.#Some actual} (nat.= expected actual) @@ -803,7 +803,7 @@ (at /.monoid composite post static) (/.replaced_once pre post (at /.monoid composite pre static)))) (_.coverage [/.split_by] - (case (/.split_by static (all (at /.monoid composite) pre static post)) + (when (/.split_by static (all (at /.monoid composite) pre static post)) {.#Some [left right]} (and (at /.equivalence = pre left) (at /.equivalence = post right)) @@ -883,7 +883,7 @@ (all _.and (_.coverage [/.split_at] (|> (/.split_at sizeL sample) - (pipe.case + (pipe.when {.#Right [_l _r]} (and (/#= sampleL _l) (/#= sampleR _r) @@ -896,7 +896,7 @@ (/.clip sizeL (nat.- sizeL (/.size sample)) sample) (/.clip_since sizeL sample) (/.clip_since 0 sample)] - (pipe.case + (pipe.when [{.#Right _l} {.#Right _r} {.#Right _r'} {.#Right _f}] (and (/#= sampleL _l) (/#= sampleR _r) |