diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/macro/template.lux | 124 |
1 files changed, 62 insertions, 62 deletions
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index 6bdbc04fd..4d4424428 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -48,69 +48,69 @@ <module>' ".5-4+32#1#0cba" <short> (these ["a" b c #0 #1 2 +3 -4 .5]) <short>' "abc#0#12+3-4.5"] - ($_ _.and - (_.cover [/.spliced] - (# (list.equivalence nat.equivalence) = - (list left mid right) - (`` (list (~~ (/.spliced [left mid right])))))) - (_.cover [/.amount] - (case (/.amount [left mid right]) - 3 true - _ false)) - (_.cover [/.text] - (case (/.text <short>) - <short>' true - _ false)) - (_.cover [/.symbol] - (and (case (`` (symbol (~~ (/.symbol <short>)))) - ["" <short>'] true - _ false) - (case (`` (symbol (~~ (/.symbol <module> <short>)))) - [<module>' <short>'] true - _ false) - )) - (_.cover [/.with_locals] - (/.with_locals [var0 var1] - (let [var0 left - var1 right] - (and (nat.= left var0) - (nat.= right var1))))) - (do ! - [scalar random.nat] - (_.cover [/.let] - (let [can_use_with_statements! - (nat.= ($_ nat.* scalar scalar) - (..pow/2 scalar))] - (and can_use_with_statements! - (/.let [(pow/3 <scalar>) - [($_ nat.* <scalar> <scalar> <scalar>)] + (all _.and + (_.cover [/.spliced] + (# (list.equivalence nat.equivalence) = + (list left mid right) + (`` (list (~~ (/.spliced [left mid right])))))) + (_.cover [/.amount] + (case (/.amount [left mid right]) + 3 true + _ false)) + (_.cover [/.text] + (case (/.text <short>) + <short>' true + _ false)) + (_.cover [/.symbol] + (and (case (`` (symbol (~~ (/.symbol <short>)))) + ["" <short>'] true + _ false) + (case (`` (symbol (~~ (/.symbol <module> <short>)))) + [<module>' <short>'] true + _ false) + )) + (_.cover [/.with_locals] + (/.with_locals [var0 var1] + (let [var0 left + var1 right] + (and (nat.= left var0) + (nat.= right var1))))) + (do ! + [scalar random.nat] + (_.cover [/.let] + (let [can_use_with_statements! + (nat.= (all nat.* scalar scalar) + (..pow/2 scalar))] + (and can_use_with_statements! + (/.let [(pow/3 <scalar>) + [(all nat.* <scalar> <scalar> <scalar>)] - (pow/9 <scalar>) - [(pow/3 (pow/3 <scalar>))]] - (let [can_use_with_expressions! - (nat.= ($_ nat.* scalar scalar scalar) - (pow/3 scalar)) + (pow/9 <scalar>) + [(pow/3 (pow/3 <scalar>))]] + (let [can_use_with_expressions! + (nat.= (all nat.* scalar scalar scalar) + (pow/3 scalar)) - can_refer! - (nat.= ($_ nat.* - scalar scalar scalar - scalar scalar scalar - scalar scalar scalar) - (pow/9 scalar)) - - can_shadow! - (let [pow/3 (function (_ scalar) - ($_ nat.+ scalar scalar scalar))] - (nat.= ($_ nat.+ scalar scalar scalar) - (pow/3 scalar)))] - (and can_use_with_expressions! can_refer! - can_shadow!))) - )))) - (_.cover [/.irregular_arguments] - (/.let [(arity/3 <0> <1> <2>) - [""]] - (exception.match? /.irregular_arguments - (macro_error (arity/3 "a" "b"))))) - ))) + (nat.= (all nat.* + scalar scalar scalar + scalar scalar scalar + scalar scalar scalar) + (pow/9 scalar)) + + can_shadow! + (let [pow/3 (function (_ scalar) + (all nat.+ scalar scalar scalar))] + (nat.= (all nat.+ scalar scalar scalar) + (pow/3 scalar)))] + (and can_use_with_expressions! + can_refer! + can_shadow!))) + )))) + (_.cover [/.irregular_arguments] + (/.let [(arity/3 <0> <1> <2>) + [""]] + (exception.match? /.irregular_arguments + (macro_error (arity/3 "a" "b"))))) + ))) )) |