aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact/time.lux8
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux16
2 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux
index b14032a8c..b9b0ab4e0 100644
--- a/stdlib/source/test/aedifex/artifact/time.lux
+++ b/stdlib/source/test/aedifex/artifact/time.lux
@@ -13,9 +13,7 @@
[math
["." random (#+ Random)]
[number
- ["i" int]]]
- [time
- ["." instant]]]
+ ["i" int]]]]
{#program
["." /]}
["." / #_
@@ -27,7 +25,7 @@
(do random.monad
[date /date.random
time /time.random]
- (wrap (instant.from_date_time date time))))
+ (wrap [date time])))
(def: #export test
Test
@@ -43,7 +41,7 @@
(|> expected
/.format
(<text>.run /.parser)
- (try\map (\ instant.equivalence = expected))
+ (try\map (\ /.equivalence = expected))
(try.default false))))
/date.test
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index 932d1698e..a68a60a56 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -13,25 +13,27 @@
["n" nat]
["i" int]]]
[time
- ["." date (#+ Date)]
+ ["." date]
["." year]]]
{#program
["." /]})
(def: #export random
- (Random Date)
+ (Random /.Date)
(random.one (function (_ raw)
(try.to_maybe
(do try.monad
- [year (|> raw date.year year.value i.abs (i.% +9,000) (i.+ +1,000) year.year)]
- (date.date year
- (date.month raw)
- (date.day_of_month raw)))))
+ [year (|> raw date.year year.value i.abs (i.% +9,000) (i.+ +1,000) year.year)
+ raw (date.date year
+ (date.month raw)
+ (date.day_of_month raw))]
+ (/.date raw))))
random.date))
(def: #export test
Test
(<| (_.covering /._)
+ (_.for [/.Date])
($_ _.and
(do random.monad
[expected ..random]
@@ -39,6 +41,6 @@
(|> expected
/.format
(<text>.run /.parser)
- (try\map (\ date.equivalence = expected))
+ (try\map (\ /.equivalence = expected))
(try.default false))))
)))