aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/macro/template.lux
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux/macro/template.lux116
1 files changed, 58 insertions, 58 deletions
diff --git a/stdlib/source/test/lux/macro/template.lux b/stdlib/source/test/lux/macro/template.lux
index 4d4424428..403266486 100644
--- a/stdlib/source/test/lux/macro/template.lux
+++ b/stdlib/source/test/lux/macro/template.lux
@@ -49,68 +49,68 @@
<short> (these ["a" b c #0 #1 2 +3 -4 .5])
<short>' "abc#0#12+3-4.5"]
(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)))))
+ (_.coverage [/.spliced]
+ (# (list.equivalence nat.equivalence) =
+ (list left mid right)
+ (`` (list (~~ (/.spliced [left mid right]))))))
+ (_.coverage [/.amount]
+ (case (/.amount [left mid right])
+ 3 true
+ _ false))
+ (_.coverage [/.text]
+ (case (/.text <short>)
+ <short>' true
+ _ false))
+ (_.coverage [/.symbol]
+ (and (case (`` (symbol (~~ (/.symbol <short>))))
+ ["" <short>'] true
+ _ false)
+ (case (`` (symbol (~~ (/.symbol <module> <short>))))
+ [<module>' <short>'] true
+ _ false)
+ ))
+ (_.coverage [/.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>)]
+ (_.coverage [/.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.= (all 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.= (all nat.*
- scalar scalar scalar
- scalar scalar scalar
- scalar scalar scalar)
- (pow/9 scalar))
+ can_refer!
+ (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")))))
+ 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!)))
+ ))))
+ (_.coverage [/.irregular_arguments]
+ (/.let [(arity/3 <0> <1> <2>)
+ [""]]
+ (exception.match? /.irregular_arguments
+ (macro_error (arity/3 "a" "b")))))
)))
))