diff options
author | Eduardo Julian | 2021-06-26 00:56:43 -0400 |
---|---|---|
committer | Eduardo Julian | 2021-06-26 00:56:43 -0400 |
commit | b80f79ae6b2e240949ebd709a253e21f7caf7ed3 (patch) | |
tree | 0347461baa5544b0afa65fe260d7f804ff238c97 /stdlib/source/test/aedifex/metadata | |
parent | ce1a7a131f7c4df8eae5c019eba2893b56f04d46 (diff) |
Delegate text (lower|upper)-casing to the host-platform implementations.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/metadata/artifact.lux | 7 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/metadata/snapshot.lux | 31 |
2 files changed, 24 insertions, 14 deletions
diff --git a/stdlib/source/test/aedifex/metadata/artifact.lux b/stdlib/source/test/aedifex/metadata/artifact.lux index 9977be8e1..6c3e509b1 100644 --- a/stdlib/source/test/aedifex/metadata/artifact.lux +++ b/stdlib/source/test/aedifex/metadata/artifact.lux @@ -33,9 +33,9 @@ (random.ascii/alpha 5) (random.list 5 (random.ascii/alpha 5)) (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)] @@ -63,6 +63,7 @@ (_.cover [/.format /.parser] (|> expected /.format + list (<xml>.run /.parser) (try\map (\ /.equivalence = expected)) (try.default false)))) 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 (<xml>.run /.parser) (try\map (\ /.equivalence = expected)) (try.default false)))) |