diff options
Diffstat (limited to 'stdlib/source/test/lux/macro/template.lux')
-rw-r--r-- | stdlib/source/test/lux/macro/template.lux | 38 |
1 files changed, 38 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux index 5733f40ad..53d7d114e 100644 --- a/stdlib/source/test/lux/macro/template.lux +++ b/stdlib/source/test/lux/macro/template.lux @@ -13,6 +13,12 @@ {1 ["." /]}) +(/.with [(!pow/2 <scalar>) + (nat.* <scalar> <scalar>)] + (def: pow/2 + (-> Nat Nat) + (|>> !pow/2))) + (def: #export test Test (<| (_.covering /._) @@ -59,5 +65,37 @@ var1 right] (and (nat.= left var0) (nat.= right var1))))) + (do ! + [scalar random.nat] + (_.cover [/.with] + (let [can_use_with_statements! + (nat.= ($_ nat.* scalar scalar) + (..pow/2 scalar))] + (and can_use_with_statements! + (/.with [(pow/3 <scalar>) + ($_ 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)) + + 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!))) + )))) ))) )) |