aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test')
-rw-r--r--stdlib/source/test/lux/meta.lux4
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux10
-rw-r--r--stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/constant/arity.lux38
-rw-r--r--stdlib/source/test/lux/meta/compiler/target.lux3
-rw-r--r--stdlib/source/test/lux/meta/type/nominal.lux3
5 files changed, 53 insertions, 5 deletions
diff --git a/stdlib/source/test/lux/meta.lux b/stdlib/source/test/lux/meta.lux
index 1b037cb8a..b13f9097c 100644
--- a/stdlib/source/test/lux/meta.lux
+++ b/stdlib/source/test/lux/meta.lux
@@ -828,8 +828,8 @@
(random.and (in head))))))]
tags_0 (random_labels 5)
tags_1 (random_labels 6)
- .let [type_0 {.#Nominal name_0 (list)}
- type_1 {.#Nominal name_1 (list)}
+ .let [type_0 {.#Named [label_module name_1] {.#Nominal name_0 (list)}}
+ type_1 {.#Named [label_module name_1] {.#Nominal name_1 (list)}}
expected_lux
(is Lux
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
index a2bdb6ce2..4571d75d3 100644
--- a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function.lux
@@ -37,8 +37,12 @@
["[0]" phase]
["[0]" synthesis]
["[0]" translation]]]]]]
- [//
- ["[0]T" complex]])
+ [/
+ [field
+ [constant
+ ["[0]T" arity]]]
+ [//
+ ["[0]T" complex]]])
(def .public test
Test
@@ -137,4 +141,6 @@
(try.else false))]
(and exact_arity!
multiple_applications!)))
+
+ arityT.test
)))
diff --git a/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/constant/arity.lux b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/constant/arity.lux
new file mode 100644
index 000000000..35dfd07e6
--- /dev/null
+++ b/stdlib/source/test/lux/meta/compiler/language/lux/phase/translation/jvm/function/field/constant/arity.lux
@@ -0,0 +1,38 @@
+... This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
+... If a copy of the MPL was not distributed with this file, You can obtain one at https://mozilla.org/MPL/2.0/.
+
+(.require
+ [library
+ [lux (.except)
+ [abstract
+ [monad (.only do)]]
+ [math
+ ["[0]" random (.only Random)]
+ [number
+ ["n" nat]]]
+ [meta
+ [compiler
+ [target
+ [jvm
+ [type
+ ["[0]" parser]]]]]]
+ [test
+ ["_" property (.only Test)]]]]
+ [\\library
+ ["[0]" /]])
+
+(def .public test
+ Test
+ (<| (_.covering /._)
+ (do [! random.monad]
+ [])
+ (all _.and
+ (_.coverage [/.minimum /.maximum]
+ (and (n.< /.maximum /.minimum)
+ (n.> 0 /.maximum)
+ (n.> 0 /.minimum)))
+ (_.coverage [/.type]
+ (when (parser.primitive? /.type)
+ {.#Some _} true
+ {.#None} false))
+ )))
diff --git a/stdlib/source/test/lux/meta/compiler/target.lux b/stdlib/source/test/lux/meta/compiler/target.lux
index 6f0987b9f..3c4a88281 100644
--- a/stdlib/source/test/lux/meta/compiler/target.lux
+++ b/stdlib/source/test/lux/meta/compiler/target.lux
@@ -18,11 +18,14 @@
["[0]" /]])
(with_expansions [<targets> (these /.old
+
+ /.c++
/.js
/.jvm
/.lua
/.python
/.ruby
+
/.common_lisp
/.php
/.r
diff --git a/stdlib/source/test/lux/meta/type/nominal.lux b/stdlib/source/test/lux/meta/type/nominal.lux
index beea5c495..d2b0a14fa 100644
--- a/stdlib/source/test/lux/meta/type/nominal.lux
+++ b/stdlib/source/test/lux/meta/type/nominal.lux
@@ -81,7 +81,8 @@
/.transmutation
(is (g!Bar .Lux)))
true)))
- (_.for [/.Frame]
+ (_.for [/.Frame
+ /.#name /.#type_vars /.#abstraction /.#representation]
(all _.and
(_.coverage [/.current]
(text#= (template.text [g!Bar])