From 90dbb19a8e826fe3ab367fa73b36ce932610b330 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 23 Mar 2019 00:56:55 -0400 Subject: Ported tests for time-related modules. --- stdlib/source/test/lux.lux | 24 ++++++++++-------------- 1 file changed, 10 insertions(+), 14 deletions(-) (limited to 'stdlib/source/test/lux.lux') 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 <=>))] ["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 -- cgit v1.2.3