aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/artifact/time/date.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/aedifex/artifact/time/date.lux')
-rw-r--r--stdlib/source/test/aedifex/artifact/time/date.lux94
1 files changed, 47 insertions, 47 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux
index dfca44e0d..9f5169d78 100644
--- a/stdlib/source/test/aedifex/artifact/time/date.lux
+++ b/stdlib/source/test/aedifex/artifact/time/date.lux
@@ -1,26 +1,26 @@
(.using
- [library
- [lux "*"
- ["_" test {"+" Test}]
- [abstract
- [monad {"+" do}]
- [\\specification
- ["$[0]" equivalence]]]
- [control
- ["[0]" try ("[1]#[0]" functor)]
- ["[0]" exception]
- [parser
- ["<[0]>" text]]]
- [math
- ["[0]" random {"+" Random}]
- [number
- ["n" nat]
- ["i" int]]]
- [time
- ["[0]" date ("[1]#[0]" equivalence)]
- ["[0]" year]]]]
- [\\program
- ["[0]" /]])
+ [library
+ [lux "*"
+ ["_" test {"+" Test}]
+ [abstract
+ [monad {"+" do}]
+ [\\specification
+ ["$[0]" equivalence]]]
+ [control
+ ["[0]" try ("[1]#[0]" functor)]
+ ["[0]" exception]
+ [parser
+ ["<[0]>" text]]]
+ [math
+ ["[0]" random {"+" Random}]
+ [number
+ ["n" nat]
+ ["i" int]]]
+ [time
+ ["[0]" date ("[1]#[0]" equivalence)]
+ ["[0]" year]]]]
+ [\\program
+ ["[0]" /]])
(def: .public random
(Random /.Date)
@@ -41,29 +41,29 @@
(do random.monad
[expected ..random
candidate random.date]
- ($_ _.and
- (_.for [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
+ (all _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
- (_.cover [/.format /.parser]
- (|> expected
- /.format
- (<text>.result /.parser)
- (try#each (# /.equivalence = expected))
- (try.else false)))
- (_.cover [/.value /.date]
- (|> expected
- /.value
- /.date
- (try#each (# /.equivalence = expected))
- (try.else false)))
- (_.cover [/.year_is_out_of_range]
- (case (/.date candidate)
- {try.#Success date}
- (same? candidate (/.value date))
-
- {try.#Failure error}
- (exception.match? /.year_is_out_of_range error)))
- (_.cover [/.epoch]
- (date#= date.epoch (/.value /.epoch)))
- ))))
+ (_.cover [/.format /.parser]
+ (|> expected
+ /.format
+ (<text>.result /.parser)
+ (try#each (# /.equivalence = expected))
+ (try.else false)))
+ (_.cover [/.value /.date]
+ (|> expected
+ /.value
+ /.date
+ (try#each (# /.equivalence = expected))
+ (try.else false)))
+ (_.cover [/.year_is_out_of_range]
+ (case (/.date candidate)
+ {try.#Success date}
+ (same? candidate (/.value date))
+
+ {try.#Failure error}
+ (exception.match? /.year_is_out_of_range error)))
+ (_.cover [/.epoch]
+ (date#= date.epoch (/.value /.epoch)))
+ ))))