diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/artifact/time.lux | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/stdlib/source/test/aedifex/artifact/time.lux b/stdlib/source/test/aedifex/artifact/time.lux new file mode 100644 index 000000000..880bc1f83 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/time.lux @@ -0,0 +1,42 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [control + ["." try ("#\." functor)] + [parser + ["<.>" text]]] + [math + ["." random]] + [time + ["." instant]]] + {#program + ["." /]} + ["." / #_ + ["#." date] + ["#." time]]) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Time]) + ($_ _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence random.instant)) + + (do random.monad + [expected random.instant] + (_.cover [/.format /.parser] + (|> expected + /.format + (<text>.run /.parser) + (try\map (\ instant.equivalence = expected)) + (try.default false)))) + + /date.test + /time.test + ))) |