aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2020-12-26 04:34:11 -0400
committerEduardo Julian2020-12-26 04:34:11 -0400
commit92dca9f487c625d27f6c291784ef709b0cc13a72 (patch)
tree6330635a19bb582d86f4402a9594dea4a1ab3fa0 /stdlib/source/test/aedifex
parent4ca397765805eda5ddee393901ed3a02001a960a (diff)
Some renamings.
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r--stdlib/source/test/aedifex/cache.lux12
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux9
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux9
-rw-r--r--stdlib/source/test/aedifex/repository.lux3
-rw-r--r--stdlib/source/test/aedifex/repository/identity.lux3
-rw-r--r--stdlib/source/test/aedifex/repository/origin.lux27
6 files changed, 47 insertions, 16 deletions
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index c4c2d044f..bc436733b 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -40,7 +40,9 @@
["#." dependency (#+ Dependency)
["#/." resolution (#+ Resolution)]]
["#." artifact (#+ Artifact)
- ["#/." type (#+ Type)]]]]})
+ ["#/." type (#+ Type)]]
+ ["#." repository #_
+ ["#/." origin]]]]})
(def: type
(Random Type)
@@ -72,7 +74,7 @@
content ..content]
(wrap [{#//dependency.artifact identity
#//dependency.type type}
- (set@ #//package.origin #//package.Remote (//package.local pom content))])))
+ (set@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))
(def: resolution
(Random Resolution)
@@ -92,7 +94,7 @@
..profile)
content ..content]
(wrap [dependency
- (set@ #//package.origin #//package.Remote (//package.local pom content))])))))]
+ (set@ #//package.origin (#//repository/origin.Remote "") (//package.local pom content))])))))]
(wrap (dictionary.from_list //dependency.hash (list& [main_dependency main_package] dependencies)))))
(def: singular
@@ -113,7 +115,7 @@
[_ wrote!
actual_package read!]
(wrap (\ //package.equivalence =
- (set@ #//package.origin #//package.Local expected_package)
+ (set@ #//package.origin (#//repository/origin.Local "") expected_package)
actual_package)))))))))
(def: plural
@@ -135,7 +137,7 @@
actual read!]
(wrap (\ //dependency/resolution.equivalence =
(\ dictionary.functor map
- (set@ #//package.origin #//package.Local)
+ (set@ #//package.origin (#//repository/origin.Local ""))
expected)
actual)))))))))
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 7002238e7..08345a0cb 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -40,12 +40,13 @@
["#." pom]
["#." package]
["#." cache]
- ["#." repository]
["#." artifact
["#/." type]]
["#." dependency
["#/." resolution]
- ["#/." status]]]]]})
+ ["#/." status]]
+ ["#." repository
+ ["#/." origin]]]]]})
(def: #export test
Test
@@ -78,10 +79,10 @@
try.assume)
dependee_package (|> dependee_package
- (set@ #///package.origin #///package.Remote)
+ (set@ #///package.origin (#///repository/origin.Remote ""))
(set@ #///package.pom [dependee_pom #///dependency/status.Unverified]))
depender_package (|> depender_package
- (set@ #///package.origin #///package.Remote)
+ (set@ #///package.origin (#///repository/origin.Remote ""))
(set@ #///package.pom [depender_pom #///dependency/status.Unverified]))
fs (file.mock (\ file.default separator))
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 5f262bce4..4404cb32f 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -38,13 +38,14 @@
["#" profile]
["#." package (#+ Package)]
["#." hash]
- ["#." repository (#+ Simulation)]
["#." dependency
["#/." status]]
["#." pom]
["#." artifact (#+ Artifact)
["#/." type]
- ["#/." extension]]]]})
+ ["#/." extension]]
+ ["#." repository (#+ Simulation)
+ ["#/." origin]]]]})
(def: random
(Random /.Resolution)
@@ -178,7 +179,7 @@
(case actual_package
(#try.Success actual_package)
(\ ///package.equivalence =
- (set@ #///package.origin #///package.Remote expected_package)
+ (set@ #///package.origin (#///repository/origin.Remote "") expected_package)
actual_package)
(#try.Failure _)
@@ -291,7 +292,7 @@
(case actual_package
(#try.Success actual_package)
(\ ///package.equivalence =
- (set@ #///package.origin #///package.Remote expected_package)
+ (set@ #///package.origin (#///repository/origin.Remote "") expected_package)
actual_package)
(#try.Failure _)
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux
index 7b99d080f..df8db3e88 100644
--- a/stdlib/source/test/aedifex/repository.lux
+++ b/stdlib/source/test/aedifex/repository.lux
@@ -23,6 +23,7 @@
["." uri (#+ URI)]]]]
["." / #_
["#." identity]
+ ["#." origin]
[//
["@." artifact]]]
{#spec
@@ -69,5 +70,7 @@
($/.spec (..artifact "1.2.3-YES")
(..artifact "4.5.6-NO")
(/.mock ..simulation ..empty)))
+
/identity.test
+ /origin.test
)))
diff --git a/stdlib/source/test/aedifex/repository/identity.lux b/stdlib/source/test/aedifex/repository/identity.lux
index 98d798cf7..d2a7ce185 100644
--- a/stdlib/source/test/aedifex/repository/identity.lux
+++ b/stdlib/source/test/aedifex/repository/identity.lux
@@ -5,9 +5,6 @@
{[0 #spec]
[/
["$." equivalence]]}]
- [data
- ["." product]
- ["." text]]
[math
["." random (#+ Random)]]]
{#program
diff --git a/stdlib/source/test/aedifex/repository/origin.lux b/stdlib/source/test/aedifex/repository/origin.lux
new file mode 100644
index 000000000..4242a318a
--- /dev/null
+++ b/stdlib/source/test/aedifex/repository/origin.lux
@@ -0,0 +1,27 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ {[0 #spec]
+ [/
+ ["$." equivalence]]}]
+ [math
+ ["." random (#+ Random)]]]
+ {#program
+ ["." /]})
+
+(def: #export random
+ (Random /.Origin)
+ ($_ random.or
+ (random.ascii/alpha 10)
+ (random.ascii/alpha 10)
+ ))
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (_.for [/.Origin]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+ ))))