From ae56acf791c2ed9bd5865f85fffa00b025d310fe Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Wed, 13 Jan 2021 17:42:20 -0400 Subject: Removed the (ultimately redundant) on_stop function for actors. --- .../source/test/aedifex/artifact/snapshot/time.lux | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 stdlib/source/test/aedifex/artifact/snapshot/time.lux (limited to 'stdlib/source/test/aedifex/artifact/snapshot/time.lux') diff --git a/stdlib/source/test/aedifex/artifact/snapshot/time.lux b/stdlib/source/test/aedifex/artifact/snapshot/time.lux new file mode 100644 index 000000000..567c70ce4 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/snapshot/time.lux @@ -0,0 +1,42 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [control + ["." try ("#\." functor)] + [parser + ["<.>" text]]] + [math + ["." random (#+ Random)]] + [time + ["." instant]]] + {#program + ["." /]}) + +(def: #export random + (Random /.Time) + random.instant) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Time]) + ($_ _.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))) + )) + ))) -- cgit v1.2.3