From 1ce30d50abaa330ab2125b110e245de6deda27c7 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 8 Jan 2021 19:23:52 -0400 Subject: Moved "log!" function under "lux/debug". --- stdlib/source/test/aedifex/artifact.lux | 3 +- stdlib/source/test/aedifex/artifact/time_stamp.lux | 33 ++++++++++++++++++++++ 2 files changed, 35 insertions(+), 1 deletion(-) create mode 100644 stdlib/source/test/aedifex/artifact/time_stamp.lux (limited to 'stdlib/source/test/aedifex') diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux index 60619f78b..dc2de91f7 100644 --- a/stdlib/source/test/aedifex/artifact.lux +++ b/stdlib/source/test/aedifex/artifact.lux @@ -21,7 +21,7 @@ ["." / #_ ["#." type] ["#." extension] - ["#." time_stamp #_ + ["#." time_stamp ["#/." date] ["#/." time]]] {#program @@ -45,6 +45,7 @@ /type.test /extension.test + /time_stamp.test /time_stamp/date.test /time_stamp/time.test )))) diff --git a/stdlib/source/test/aedifex/artifact/time_stamp.lux b/stdlib/source/test/aedifex/artifact/time_stamp.lux new file mode 100644 index 000000000..7dea57392 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact/time_stamp.lux @@ -0,0 +1,33 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)]] + [control + ["." try ("#\." functor)] + [parser + ["<.>" text]]] + [math + ["." random (#+ Random)] + [number + ["n" nat] + ["i" int]]] + [time + ["." instant]]] + {#program + ["." /]}) + +(def: #export test + Test + (<| (_.covering /._) + (_.for [/.Time_Stamp]) + ($_ _.and + (do random.monad + [expected random.instant] + (_.cover [/.format /.parser] + (|> expected + /.format + (.run /.parser) + (try\map (\ instant.equivalence = expected)) + (try.default false)))) + ))) -- cgit v1.2.3