aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/extension.lux32
1 files changed, 19 insertions, 13 deletions
diff --git a/stdlib/source/test/lux/extension.lux b/stdlib/source/test/lux/extension.lux
index 645558d5f..7b2d9ffd5 100644
--- a/stdlib/source/test/lux/extension.lux
+++ b/stdlib/source/test/lux/extension.lux
@@ -1,5 +1,6 @@
(.module:
[lux #*
+ ["@" target]
[abstract
[monad (#+ do)]]
[control
@@ -23,24 +24,29 @@
(def: my-extension "example YOLO")
-(analysis: (..my-extension self phase {parameters (<>.some <c>.any)})
- (do @
- [_ (type.infer .Text)]
- (wrap (#analysis.Extension self (list)))))
+(`` (for {(~~ (static @.old))
+ (as-is)}
+ (as-is (analysis: (..my-extension self phase {parameters (<>.some <c>.any)})
+ (do @
+ [_ (type.infer .Text)]
+ (wrap (#analysis.Extension self (list)))))
-(synthesis: (..my-extension self phase {parameters (<>.some <a>.any)})
- (wrap (synthesis.text self)))
+ (synthesis: (..my-extension self phase {parameters (<>.some <a>.any)})
+ (wrap (synthesis.text self)))
-(directive: (..my-extension self phase {parameters (<>.some <c>.any)})
- (do @
- [#let [_ (log! (format "directive: " (%.text self)))]]
- (wrap directive.no-requirements)))
+ (directive: (..my-extension self phase {parameters (<>.some <c>.any)})
+ (do @
+ [#let [_ (log! (format "directive: " (%.text self)))]]
+ (wrap directive.no-requirements)))
-("example YOLO")
+ ("example YOLO")
+ )))
(def: #export test
Test
(<| (_.context (%.name (name-of /._)))
(_.test "Can define and use analysis & synthesis extensions."
- (text@= ("example YOLO")
- "example YOLO"))))
+ (`` (for {(~~ (static @.old))
+ false}
+ (text@= ("example YOLO")
+ "example YOLO"))))))