aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/aedifex/artifact/time')
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux16
1 files changed, 9 insertions, 7 deletions
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))))
)))