aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/meta/compiler/target.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/meta/compiler/target.lux')
-rw-r--r--stdlib/source/test/lux/meta/compiler/target.lux47
1 files changed, 47 insertions, 0 deletions
diff --git a/stdlib/source/test/lux/meta/compiler/target.lux b/stdlib/source/test/lux/meta/compiler/target.lux
new file mode 100644
index 000000000..322f270e9
--- /dev/null
+++ b/stdlib/source/test/lux/meta/compiler/target.lux
@@ -0,0 +1,47 @@
+(.require
+ [library
+ [lux (.except all)
+ [data
+ ["[0]" text]
+ [collection
+ ["[0]" list]
+ ["[0]" set (.only Set)]]]
+ [math
+ [number
+ ["n" nat]]]
+ [test
+ ["_" property (.only Test)]]]]
+ [\\library
+ ["[0]" /]])
+
+(with_expansions [<targets> (these /.old
+ /.js
+ /.jvm
+ /.lua
+ /.python
+ /.ruby
+ /.common_lisp
+ /.php
+ /.r
+ /.scheme)]
+ (def all
+ (List /.Target)
+ (list <targets>))
+
+ (def unique
+ (Set /.Target)
+ (set.of_list text.hash ..all))
+
+ (def verdict
+ (n.= (list.size ..all)
+ (set.size ..unique)))
+
+ (def .public test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Target])
+ (.all _.and
+ (_.coverage [<targets>]
+ ..verdict)
+ )))
+ )