aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux.lux
diff options
context:
space:
mode:
authorEduardo Julian2019-03-23 00:56:55 -0400
committerEduardo Julian2019-03-23 00:56:55 -0400
commit90dbb19a8e826fe3ab367fa73b36ce932610b330 (patch)
treeac1de354cc8c2f36f68f82712e06cb968f558700 /stdlib/source/test/lux.lux
parentf28169f3ab674651fceff0c4c9989f5cc62b616b (diff)
Ported tests for time-related modules.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/lux.lux24
1 files changed, 10 insertions, 14 deletions
diff --git a/stdlib/source/test/lux.lux b/stdlib/source/test/lux.lux
index c61891996..3855f350f 100644
--- a/stdlib/source/test/lux.lux
+++ b/stdlib/source/test/lux.lux
@@ -20,7 +20,7 @@
["." i64]]]
["." function]
["." math
- ["r" random (#+ Random) ("#;." functor)]]
+ ["r" random (#+ Random) ("#@." functor)]]
["_" test (#+ Test)]
## These modules do not need to be tested.
[type
@@ -113,6 +113,7 @@
["#." io]
["#." control]
["#." data]
+ ["#." time]
["#." host
["#/." jvm]]]
## [control
@@ -120,9 +121,6 @@
## ## [semaphore (#+)]
## ]]
## [data
- ## [format
- ## ## [json (#+)]
- ## [xml (#+)]]
## ## [collection
## ## [array (#+)]
## ## [bits (#+)]
@@ -157,10 +155,6 @@
## ## [implicit (#+)] ## TODO: FIX Specially troublesome...
## ## [resource (#+)]
## [dynamic (#+)]]
- ## [time
- ## [instant (#+)]
- ## [duration (#+)]
- ## [date (#+)]]
## [compiler
## [default
## ["_default/." syntax]
@@ -280,8 +274,8 @@
Test
($_ _.and
(do r.monad
- [factor (r;map (|>> (n/% 10) (n/max 1)) r.nat)
- iterations (r;map (n/% 100) r.nat)
+ [factor (r@map (|>> (n/% 10) (n/max 1)) r.nat)
+ iterations (r@map (n/% 100) r.nat)
#let [expected (n/* factor iterations)]]
(_.test "Can write loops."
(n/= expected
@@ -381,13 +375,13 @@
(..conversion <gen> <forward> <backward> <=>))]
["Int -> Nat"
- i/= .nat .int (r;map (i/% +1,000,000) r.int)]
+ i/= .nat .int (r@map (i/% +1,000,000) r.int)]
["Nat -> Int"
- n/= .int .nat (r;map (n/% 1,000,000) r.nat)]
+ n/= .int .nat (r@map (n/% 1,000,000) r.nat)]
["Int -> Frac"
- i/= int-to-frac frac-to-int (r;map (i/% +1,000,000) r.int)]
+ i/= int-to-frac frac-to-int (r@map (i/% +1,000,000) r.int)]
["Frac -> Int"
- f/= frac-to-int int-to-frac (r;map math.floor r.frac)]
+ f/= frac-to-int int-to-frac (r@map math.floor r.frac)]
["Rev -> Frac"
r/= rev-to-frac frac-to-rev frac-rev]
)))))
@@ -405,6 +399,8 @@
/control.test)
(<| (_.context "/data")
/data.test)
+ (<| (_.context "/time")
+ /time.test)
(<| (_.context "/host Host-platform interoperation")
($_ _.and
/host.test