aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-07-24 23:23:13 -0400
committerEduardo Julian2019-07-24 23:23:13 -0400
commit30c19b40f5fd583d19aa7cf495a19c1b91f86320 (patch)
tree77cda2c601e7975b665a358b96b7ae00882d3ed9 /stdlib/source/test/lux.lux
parent68b37de7281d31470263d0e06bc72b1c5b6c2e32 (diff)
No more "f/"-prefixed functions.
+ No more "m/"-prefixed functions.
Diffstat (limited to 'stdlib/source/test/lux.lux')
-rw-r--r--stdlib/source/test/lux.lux36
1 files changed, 21 insertions, 15 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index 945fd9c54..e1039d506 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -1,10 +1,10 @@
(.with-expansions [<host-modules> (.as-is [runtime (#+)]
[primitive (#+)]
[structure (#+)]
+ [function (#+)]
[reference (#+)]
[case (#+)]
[loop (#+)]
- [function (#+)]
[extension (#+)])]
(.module:
["/" lux #*
@@ -19,7 +19,10 @@
[data
["." name]
[number
- ["." i64]]]
+ ["." i64]
+ ["." int]
+ ["." rev]
+ ["f" frac]]]
["." math]
["_" test (#+ Test)]
## These modules do not need to be tested.
@@ -35,7 +38,7 @@
[format
[css (#+)]
[markdown (#+)]]]
- [target
+ ["@" target
[js (#+)]
[python (#+)]
[lua (#+)]
@@ -47,6 +50,8 @@
[compiler
[phase
[generation
+ [jvm (#+)
+ <host-modules>]
[js (#+)
<host-modules>]
[python (#+)
@@ -291,9 +296,10 @@
on-default)))
(_.test "Can pick code depending on the host/platform being targeted."
(n/= on-valid-host
- (for {"JVM" on-valid-host
- "JS" on-valid-host}
- on-default))))))
+ (`` (for {(~~ (static @.old)) on-valid-host
+ (~~ (static @.jvm)) on-valid-host
+ (~~ (static @.js)) on-valid-host}
+ on-default)))))))
(def: test
(<| (_.context (name.module (name-of /._)))
@@ -314,10 +320,10 @@
[(<| (_.context <context>)
(..minimum-and-maximum <gen> <=> [<lt> <min>] [<gt> <max>]))]
- [i/= i/< i/min i/> i/max r.int "Integers."]
- [n/= n/< n/min n/> n/max r.nat "Natural numbers."]
- [r/= r/< r/min r/> r/max r.rev "Revolutions."]
- [f/= f/< f/min f/> f/max r.frac "Fractions."]
+ [i/= i/< i/min i/> i/max r.int "Integers."]
+ [n/= n/< n/min n/> n/max r.nat "Natural numbers."]
+ [r/= r/< r/min r/> r/max r.rev "Revolutions."]
+ [f.= f.< f.min f.> f.max r.safe-frac "Fractions."]
)))))
(<| (_.context "Conversion.")
(`` ($_ _.and
@@ -326,11 +332,11 @@
" " (%.name (name-of <backward>))))
(..conversion <gen> <forward> <backward> <=>))]
- [i/= .nat .int (r@map (i/% +1,000,000) r.int)]
- [n/= .int .nat (r@map (n/% 1,000,000) r.nat)]
- [i/= .int-to-frac .frac-to-int (r@map (i/% +1,000,000) r.int)]
- [f/= .frac-to-int .int-to-frac (r@map (|>> (i/% +1,000,000) .int-to-frac) r.int)]
- [r/= .rev-to-frac .frac-to-rev frac-rev]
+ [i/= .nat .int (r@map (i/% +1,000,000) r.int)]
+ [n/= .int .nat (r@map (n/% 1,000,000) r.nat)]
+ [i/= int.frac f.int (r@map (i/% +1,000,000) r.int)]
+ [f.= f.int int.frac (r@map (|>> (i/% +1,000,000) int.frac) r.int)]
+ [r/= rev.frac f.rev frac-rev]
)))))
(<| (_.context "Prelude macros.")
..prelude-macros)