From 75102dcfa7c2c0afd32cb5bf5ac012df2db6a7a1 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 5 Jan 2021 07:55:22 -0400 Subject: Added lexically-scoped templates. --- .../test/aedifex/artifact/time_stamp/time.lux | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 stdlib/source/test/aedifex/artifact/time_stamp/time.lux (limited to 'stdlib/source/test/aedifex/artifact/time_stamp') diff --git a/stdlib/source/test/aedifex/artifact/time_stamp/time.lux b/stdlib/source/test/aedifex/artifact/time_stamp/time.lux new file mode 100644 index 000000000..bd9bbe071 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/time_stamp/time.lux @@ -0,0 +1,31 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + ["." time (#+ Time)] + [abstract + [monad (#+ do)]] + [control + ["." try ("#\." functor)] + [parser + ["<.>" text]]] + [math + ["." random (#+ Random)] + [number + ["n" nat] + ["i" int]]]] + {#program + ["." /]}) + +(def: #export test + Test + (<| (_.covering /._) + ($_ _.and + (do random.monad + [expected random.time] + (_.cover [/.format /.parser] + (|> expected + /.format + (.run /.parser) + (try\map (\ time.equivalence = expected)) + (try.default false)))) + ))) -- cgit v1.2.3