From befa21cea76282f8cd3509e0a7da1bdffd353101 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 9 Oct 2020 23:11:38 -0400 Subject: Mandatory long names for JVM imports, instead of having "long" be optional and short be default. --- stdlib/source/test/aedifex/artifact.lux | 30 ++++++++++++++++++++++++++++++ stdlib/source/test/aedifex/profile.lux | 14 ++++---------- 2 files changed, 34 insertions(+), 10 deletions(-) create mode 100644 stdlib/source/test/aedifex/artifact.lux (limited to 'stdlib/source/test/aedifex') diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux new file mode 100644 index 000000000..1ba27d0b6 --- /dev/null +++ b/stdlib/source/test/aedifex/artifact.lux @@ -0,0 +1,30 @@ +(.module: + [lux #* + ["_" test (#+ Test)] + [abstract + [monad (#+ do)] + [hash (#+ Hash)] + {[0 #spec] + [/ + ["$." equivalence]]}] + [math + ["." random (#+ Random)]]] + {#program + ["." /]}) + +(def: #export random + (Random /.Artifact) + ($_ random.and + (random.ascii/alpha 1) + (random.ascii/alpha 1) + (random.ascii/alpha 1))) + +(def: #export test + Test + (<| (_.covering /._) + (_.with-cover [/.Group /.Name /.Version + /.Artifact] + ($_ _.and + (_.with-cover [/.equivalence] + ($equivalence.spec /.equivalence ..random)) + )))) diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux index 3f1e08cc7..94f695a9b 100644 --- a/stdlib/source/test/aedifex/profile.lux +++ b/stdlib/source/test/aedifex/profile.lux @@ -22,10 +22,11 @@ ["." dictionary (#+ Dictionary)]]] [math ["." random (#+ Random) ("#@." monad)]]] + [// + ["@." artifact]] {#program ["." / ["/#" // #_ - ["#." artifact (#+ Artifact)] ["#." dependency (#+ Repository Dependency)] ["#." format]]]}) @@ -100,13 +101,6 @@ (Random /.Name) (random.ascii/alpha 1)) -(def: artifact - (Random Artifact) - ($_ random.and - (random.ascii/alpha 1) - (random.ascii/alpha 1) - (random.ascii/alpha 1))) - (def: repository (Random Repository) (random.ascii/alpha 1)) @@ -114,7 +108,7 @@ (def: dependency (Random Dependency) ($_ random.and - ..artifact + @artifact.random (random.ascii/alpha 1))) (def: source @@ -129,7 +123,7 @@ (Random /.Profile) ($_ random.and (..list-of ..name) - (random.maybe ..artifact) + (random.maybe @artifact.random) (random.maybe ..info) (..set-of text.hash ..repository) (..set-of //dependency.hash ..dependency) -- cgit v1.2.3