diff options
author | Eduardo Julian | 2021-07-25 03:12:17 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-07-25 03:12:17 -0400 |
commit | 62b3abfcc014ca1c19d62aacdd497f6a250b372c (patch) | |
tree | c23155ecef6018b78b349f0ba6cd238872b24da7 /stdlib/source/test/lux/macro | |
parent | 0f545b7e57d2564e351d907befd2ce26900c5521 (diff) |
Better syntax for "library/lux.^multi".
Diffstat (limited to 'stdlib/source/test/lux/macro')
-rw-r--r-- | stdlib/source/test/lux/macro/code.lux | 32 | ||||
-rw-r--r-- | stdlib/source/test/lux/macro/template.lux | 8 |
2 files changed, 20 insertions, 20 deletions
diff --git a/stdlib/source/test/lux/macro/code.lux b/stdlib/source/test/lux/macro/code.lux index f0764fda7..2ce231e61 100644 --- a/stdlib/source/test/lux/macro/code.lux +++ b/stdlib/source/test/lux/macro/code.lux @@ -92,16 +92,16 @@ ($_ random.either (random\wrap [original substitute]) (do {! random.monad} - [sample (random.filter (|>> (\ /.equivalence = original) not) - ($_ random.either - (random\map /.bit random.bit) - (random\map /.nat random.nat) - (random\map /.int random.int) - (random\map /.rev random.rev) - (random\map /.frac random.safe_frac) - (random\map /.text ..random_text) - (random\map /.identifier ..random_name) - (random\map /.tag ..random_name)))] + [sample (random.only (|>> (\ /.equivalence = original) not) + ($_ random.either + (random\map /.bit random.bit) + (random\map /.nat random.nat) + (random\map /.int random.int) + (random\map /.rev random.rev) + (random\map /.frac random.safe_frac) + (random\map /.text ..random_text) + (random\map /.identifier ..random_name) + (random\map /.tag ..random_name)))] (wrap [sample sample])) (for_sequence /.form) (for_sequence /.tuple) @@ -175,12 +175,12 @@ ..for_format) (do {! random.monad} - [[original substitute] (random.filter (function (_ [original substitute]) - (not (\ /.equivalence = original substitute))) - (random.and ..random ..random)) - [sample expected] (random.filter (function (_ [sample expected]) - (not (\ /.equivalence = sample expected))) - (..replace_simulation [original substitute]))] + [[original substitute] (random.only (function (_ [original substitute]) + (not (\ /.equivalence = original substitute))) + (random.and ..random ..random)) + [sample expected] (random.only (function (_ [sample expected]) + (not (\ /.equivalence = sample expected))) + (..replace_simulation [original substitute]))] (_.cover [/.replace] (\ /.equivalence = expected diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index fc1d62f11..c46bb5b8c 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -47,12 +47,12 @@ <short> (as_is ["a" b #c #0 #1 2 +3 -4 .5]) <short>' "abc#0#12+3-4.5"] ($_ _.and - (_.cover [/.splice] + (_.cover [/.spliced] (\ (list.equivalence nat.equivalence) = (list left mid right) - (`` (list (~~ (/.splice [left mid right])))))) - (_.cover [/.count] - (case (/.count [left mid right]) + (`` (list (~~ (/.spliced [left mid right])))))) + (_.cover [/.amount] + (case (/.amount [left mid right]) 3 true _ false)) (_.cover [/.text] |