aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r--stdlib/source/test/lux.lux35
1 files changed, 34 insertions, 1 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index bfdc93f30..11e3b6c73 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -22,11 +22,13 @@
["%" format (#+ format)]]
[collection
["." list]]]
- [macro
+ ["." macro
["." code ("#\." equivalence)]]
["." math
["." random (#+ Random) ("#\." functor)]
[number
+ [i8 (#+)]
+ [i16 (#+)]
["n" nat]
["i" int]
["r" rev]
@@ -989,6 +991,36 @@
(and (is? expected (identity/constant expected))
(is? expected (identity/function expected))))))
+(.refer "library/lux/target" #*)
+(.refer "library/lux/macro" #all)
+(.refer "library/lux/math/number/nat" #_)
+(.refer "library/lux/math/number/int" #nothing)
+(.refer "library/lux/math/number/rev" (#+ /4096))
+(.refer "library/lux/math/number/frac" (#only positive_infinity))
+(.refer "library/lux/math/number/i8" (#- equivalence width i8 i64))
+(.refer "library/lux/math/number/i16" (#exclude equivalence width i16 i64))
+
+(def: for_import
+ Test
+ (let [can_access? (: (All [a] (-> a a Bit))
+ (function (_ global local)
+ (is? global local)))]
+ ($_ _.and
+ (_.cover [/.refer]
+ (and (can_access? library/lux/target.jvm
+ jvm)
+ (can_access? library/lux/macro.single_expansion
+ single_expansion)
+ (can_access? library/lux/math/number/rev./4096
+ /4096)
+ (can_access? library/lux/math/number/frac.positive_infinity
+ positive_infinity)
+ (can_access? library/lux/math/number/i8.I8
+ I8)
+ (can_access? library/lux/math/number/i16.I16
+ I16)))
+ )))
+
(def: test
Test
(<| (_.covering /._)
@@ -1013,6 +1045,7 @@
..for_case
..for_control_flow
..for_def:
+ ..for_import
..sub_tests
)))