(.module: [lux #* ["_" test (#+ Test)] [abstract [monad (#+ do)] {[0 #spec] [/ ["$." equivalence]]}] [control ["." try ("#\." functor)] [parser ["<.>" xml]]] [math ["." random (#+ Random)]] [time ["." instant]]] {#program ["." /]} ["$." // #_ ["#." time] ["#." build]]) (def: #export random (Random /.Stamp) ($_ random.and $//time.random $//build.random )) (def: #export test Test (<| (_.covering /._) (_.for [/.Stamp]) ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) (do random.monad [expected ..random] ($_ _.and (_.cover [/.format /.parser] (|> expected /.format (.run' /.parser) (try\map (\ instant.equivalence = expected)) (try.default false))) )) )))