From 8f575da5095e3b259d4eb6b6f13d3e37ef1d38e4 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 11 Jun 2021 02:48:13 -0400 Subject: Added import name formatting to "import:" macros for other backends. --- stdlib/source/test/aedifex/artifact/time/date.lux | 2 +- stdlib/source/test/aedifex/artifact/time/time.lux | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) (limited to 'stdlib/source/test/aedifex/artifact/time') diff --git a/stdlib/source/test/aedifex/artifact/time/date.lux b/stdlib/source/test/aedifex/artifact/time/date.lux index 0f4b5b7d3..932d1698e 100644 --- a/stdlib/source/test/aedifex/artifact/time/date.lux +++ b/stdlib/source/test/aedifex/artifact/time/date.lux @@ -23,7 +23,7 @@ (random.one (function (_ raw) (try.to_maybe (do try.monad - [year (|> raw date.year year.value i.abs (i.% +10,000) year.year)] + [year (|> raw date.year year.value i.abs (i.% +9,000) (i.+ +1,000) year.year)] (date.date year (date.month raw) (date.day_of_month raw))))) diff --git a/stdlib/source/test/aedifex/artifact/time/time.lux b/stdlib/source/test/aedifex/artifact/time/time.lux index bd9bbe071..cd70d1c83 100644 --- a/stdlib/source/test/aedifex/artifact/time/time.lux +++ b/stdlib/source/test/aedifex/artifact/time/time.lux @@ -1,7 +1,7 @@ (.module: [lux #* ["_" test (#+ Test)] - ["." time (#+ Time)] + ["." time] [abstract [monad (#+ do)]] [control @@ -16,12 +16,18 @@ {#program ["." /]}) +(def: #export random + (Random /.Time) + (random.one (|>> time.clock (set@ #time.milli_second 0) time.time) + random.time)) + (def: #export test Test (<| (_.covering /._) + (_.for [/.Time]) ($_ _.and (do random.monad - [expected random.time] + [expected ..random] (_.cover [/.format /.parser] (|> expected /.format -- cgit v1.2.3