From b80f79ae6b2e240949ebd709a253e21f7caf7ed3 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 26 Jun 2021 00:56:43 -0400 Subject: Delegate text (lower|upper)-casing to the host-platform implementations. --- stdlib/source/test/aedifex/metadata/snapshot.lux | 31 +++++++++++++++--------- 1 file changed, 20 insertions(+), 11 deletions(-) (limited to 'stdlib/source/test/aedifex/metadata/snapshot.lux') diff --git a/stdlib/source/test/aedifex/metadata/snapshot.lux b/stdlib/source/test/aedifex/metadata/snapshot.lux index a2f0b65db..1858cae25 100644 --- a/stdlib/source/test/aedifex/metadata/snapshot.lux +++ b/stdlib/source/test/aedifex/metadata/snapshot.lux @@ -20,21 +20,28 @@ ["." instant (#+ Instant)] ["." duration]] [math - ["." random (#+ Random)]] + ["." random (#+ Random) ("#\." monad)]] [macro ["." code]]] ["$." /// #_ ["#." artifact - ["#/." type]]] + ["#/." type] + ["#/." time] + ["#/." snapshot #_ + ["#/." version]]]] {#program - ["." /]}) + ["." / + [/// + [artifact + [versioning (#+ Versioning)] + ["#." snapshot]]]]}) (def: random_instant (Random Instant) (do {! random.monad} - [year (\ ! map (|>> (n.% 10,000) .int) random.nat) - month (\ ! map (n.% 13) random.nat) - day_of_month (\ ! map (n.% 29) random.nat) + [year (\ ! map (|>> (n.% 9,000) (n.+ 1,000) .int) random.nat) + month (\ ! map (|>> (n.% 12) (n.+ 1)) random.nat) + day_of_month (\ ! map (|>> (n.% 28) (n.+ 1)) random.nat) hour (\ ! map (n.% 24) random.nat) minute (\ ! map (n.% 60) random.nat) second (\ ! map (n.% 60) random.nat)] @@ -51,18 +58,19 @@ (wrap (instant.from_date_time date time))))))) (def: random_versioning - (Random /.Versioning) + (Random Versioning) ($_ random.and - ..random_instant - random.nat - (random.list 5 $///artifact/type.random) + (random\wrap #/snapshot.Local) + $///artifact/time.random + (random.list 5 $///artifact/snapshot/version.random) )) (def: #export random (Random /.Metadata) ($_ random.and $///artifact.random - ..random_versioning)) + ..random_versioning + )) (def: #export test Test @@ -76,6 +84,7 @@ (_.cover [/.format /.parser] (|> expected /.format + list (.run /.parser) (try\map (\ /.equivalence = expected)) (try.default false)))) -- cgit v1.2.3