diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/time/year.lux | 74 |
1 files changed, 37 insertions, 37 deletions
diff --git a/stdlib/source/test/lux/time/year.lux b/stdlib/source/test/lux/time/year.lux index e7c316e65..3c47d811f 100644 --- a/stdlib/source/test/lux/time/year.lux +++ b/stdlib/source/test/lux/time/year.lux @@ -46,52 +46,52 @@ (do random.monad [expected random.int] (all _.and - (_.cover [/.year] - (bit#= (i.= +0 expected) - (case (/.year expected) - {try.#Success _} - false - - {try.#Failure _} - true))) - (_.cover [/.value] + (_.coverage [/.year] + (bit#= (i.= +0 expected) (case (/.year expected) - {try.#Success year} - (i.= expected (/.value year)) + {try.#Success _} + false {try.#Failure _} - (i.= +0 expected))) + true))) + (_.coverage [/.value] + (case (/.year expected) + {try.#Success year} + (i.= expected (/.value year)) + + {try.#Failure _} + (i.= +0 expected))) )) - (_.cover [/.there_is_no_year_0] - (case (/.year +0) - {try.#Success _} - false + (_.coverage [/.there_is_no_year_0] + (case (/.year +0) + {try.#Success _} + false - {try.#Failure error} - (exception.match? /.there_is_no_year_0 error))) - (_.cover [/.days] - (n.= (.nat (//duration.ticks //duration.day //duration.normal_year)) - /.days)) - (_.cover [/.epoch] - (# /.equivalence = - (//date.year (//instant.date //instant.epoch)) - /.epoch)) + {try.#Failure error} + (exception.match? /.there_is_no_year_0 error))) + (_.coverage [/.days] + (n.= (.nat (//duration.ticks //duration.day //duration.normal_year)) + /.days)) + (_.coverage [/.epoch] + (# /.equivalence = + (//date.year (//instant.date //instant.epoch)) + /.epoch)) (_.for [/.Period] - (_.cover [/.leap /.century /.era] - (n.= /.leap (n./ /.century /.era)))) + (_.coverage [/.leap /.century /.era] + (n.= /.leap (n./ /.century /.era)))) (let [leap (try.trusted (/.year (.int /.leap))) century (try.trusted (/.year (.int /.century))) era (try.trusted (/.year (.int /.era)))] (all _.and - (_.cover [/.leap?] - (and (/.leap? leap) - (not (/.leap? century)) - (/.leap? era))) - (_.cover [/.leaps] - (and (i.= +1 (/.leaps leap)) - (i.= (.int (n./ /.leap /.century)) - (/.leaps century)) - (i.= (++ (i.* +4 (-- (/.leaps century)))) - (/.leaps era)))) + (_.coverage [/.leap?] + (and (/.leap? leap) + (not (/.leap? century)) + (/.leap? era))) + (_.coverage [/.leaps] + (and (i.= +1 (/.leaps leap)) + (i.= (.int (n./ /.leap /.century)) + (/.leaps century)) + (i.= (++ (i.* +4 (-- (/.leaps century)))) + (/.leaps era)))) )) ))) |