aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/dependency
diff options
context:
space:
mode:
authorEduardo Julian2022-07-28 17:39:01 -0400
committerEduardo Julian2022-07-28 17:39:01 -0400
commita4b64bf1cdf47160b6b615d2c6493039abfd7a94 (patch)
tree3fe8c149d9cad89bbf067c736d196260203d1a01 /stdlib/source/test/aedifex/dependency
parenta4847190df926d35f7ece97da50a2a8b1462a24f (diff)
Extracted unit-testing machinery into its own module.
Diffstat (limited to 'stdlib/source/test/aedifex/dependency')
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux9
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux15
2 files changed, 13 insertions, 11 deletions
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index fee8caf9d..2eeb0abb8 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -1,7 +1,6 @@
(.require
[library
[lux (.except)
- ["_" test (.only Test)]
[abstract
[monad (.only do)]
["[0]" hash (.only Hash)]]
@@ -31,7 +30,9 @@
["[0]" http
["[1]" client]
["[1]/[0]" status]
- ["@[1]" /]]]]]]
+ ["@[1]" /]]]]
+ ["_" test (.only Test)
+ ["[0]" unit]]]]
["$[0]" // (.only)
["[1]/" //
["[1][0]" package]]]
@@ -159,7 +160,7 @@
(in (do async.monad
[?outcome (/.one repository dependency package)
cache (async.future (atom.read! cache))]
- (_.coverage' [/.one]
+ (unit.coverage [/.one]
(|> ?outcome
(try#each (verify_one 1 address package cache expected_artifact))
(try.else false))))))
@@ -182,7 +183,7 @@
(in (do async.monad
[?outcome (/.all repository resolution)
cache (async.future (atom.read! cache))]
- (_.coverage' [/.all]
+ (unit.coverage [/.all]
(|> ?outcome
(try#each (function (_ actual_artifacts)
(let [expected_deployments!
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index e724392a5..153d4b4ac 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -1,7 +1,6 @@
(.require
[library
[lux (.except all)
- ["_" test (.only Test)]
[abstract
[monad (.only do)]
["[0]" predicate]
@@ -26,7 +25,9 @@
["[0]" set]
["[0]" list]]]
[math
- ["[0]" random (.only Random)]]]]
+ ["[0]" random (.only Random)]]
+ ["_" test (.only Test)
+ ["[0]" unit]]]]
["$[0]" ///
["[1][0]" package]
["[1][0]" repository]
@@ -262,7 +263,7 @@
[actual_package (/.one (///repository.mock good [])
[///dependency.#artifact expected_artifact
///dependency.#type ///artifact/type.lux_library])]
- (_.coverage' [/.one]
+ (unit.coverage [/.one]
(case actual_package
{try.#Success actual_package}
(at ///package.equivalence =
@@ -276,7 +277,7 @@
[actual_package (/.one (///repository.mock <bad> [])
[///dependency.#artifact expected_artifact
///dependency.#type ///artifact/type.lux_library])]
- (_.coverage' [<exception>]
+ (unit.coverage [<exception>]
(case actual_package
{try.#Failure error}
(exception.match? <exception> error)
@@ -311,7 +312,7 @@
(///repository.mock good []))
[///dependency.#artifact expected_artifact
///dependency.#type ///artifact/type.lux_library])]
- (_.coverage' [/.any]
+ (unit.coverage [/.any]
(case actual_package
{try.#Success actual_package}
(at ///package.equivalence =
@@ -327,7 +328,7 @@
(///repository.mock bad_md5 []))
[///dependency.#artifact expected_artifact
///dependency.#type ///artifact/type.lux_library])]
- (_.coverage' [/.cannot_resolve]
+ (unit.coverage [/.cannot_resolve]
(case actual_package
{try.#Failure error}
(exception.match? /.cannot_resolve error)
@@ -416,7 +417,7 @@
(///repository.mock ..nope []))
(list depender)
/.empty)]
- (_.coverage' [/.all]
+ (unit.coverage [/.all]
(and (dictionary.key? resolution depender)
(list.any? (///dependency#= depender) successes)