diff options
author | Eduardo Julian | 2022-04-09 03:03:46 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-09 03:03:46 -0400 |
commit | 04c7f49a732380a2b9f72b1b937171b341c24323 (patch) | |
tree | d54c92bf10665bba0ec4643746becce569604fb2 /stdlib/source/test/aedifex/dependency | |
parent | f11afb9d2dfe2d59b41e8056eb8c4ae65268415f (diff) |
Better names for testing macros (plus better indentation).
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/dependency/deployment.lux | 42 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/dependency/resolution.lux | 82 | ||||
-rw-r--r-- | stdlib/source/test/aedifex/dependency/status.lux | 12 |
3 files changed, 68 insertions, 68 deletions
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux index 12b175534..f9f5e6763 100644 --- a/stdlib/source/test/aedifex/dependency/deployment.lux +++ b/stdlib/source/test/aedifex/dependency/deployment.lux @@ -159,10 +159,10 @@ (in (do async.monad [?outcome (/.one repository dependency package) cache (async.future (atom.read! cache))] - (_.cover' [/.one] - (|> ?outcome - (try#each (verify_one 1 address package cache expected_artifact)) - (try.else false)))))) + (_.coverage' [/.one] + (|> ?outcome + (try#each (verify_one 1 address package cache expected_artifact)) + (try.else false)))))) (do [! random.monad] [.let [hash (is (Hash [Dependency Artifact Package]) (# hash.functor each (|>> product.right product.left product.left) @@ -182,23 +182,23 @@ (in (do async.monad [?outcome (/.all repository resolution) cache (async.future (atom.read! cache))] - (_.cover' [/.all] - (|> ?outcome - (try#each (function (_ actual_artifacts) - (let [expected_deployments! - (n.= num_bundles (set.size actual_artifacts)) + (_.coverage' [/.all] + (|> ?outcome + (try#each (function (_ actual_artifacts) + (let [expected_deployments! + (n.= num_bundles (set.size actual_artifacts)) - every_deployment_was_correct! - (list.every? (function (_ [dependency expected_artifact package]) - (let [deployed! - (set.member? actual_artifacts expected_artifact) + every_deployment_was_correct! + (list.every? (function (_ [dependency expected_artifact package]) + (let [deployed! + (set.member? actual_artifacts expected_artifact) - deployed_correctly! - (verify_one num_bundles address package cache expected_artifact expected_artifact)] - (and deployed! - deployed_correctly!))) - bundles)] - (and expected_deployments! - every_deployment_was_correct!)))) - (try.else false)))))) + deployed_correctly! + (verify_one num_bundles address package cache expected_artifact expected_artifact)] + (and deployed! + deployed_correctly!))) + bundles)] + (and expected_deployments! + every_deployment_was_correct!)))) + (try.else false)))))) )))) diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index 1233cd1cb..e5db7fe3c 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -262,27 +262,27 @@ [actual_package (/.one (///repository.mock good []) [///dependency.#artifact expected_artifact ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.one] - (case actual_package - {try.#Success actual_package} - (# ///package.equivalence = - (has ///package.#origin {///repository/origin.#Remote ""} expected_package) - actual_package) - - {try.#Failure _} - false)))) + (_.coverage' [/.one] + (case actual_package + {try.#Success actual_package} + (# ///package.equivalence = + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) + actual_package) + + {try.#Failure _} + false)))) (~~ (template [<exception> <bad>] [(in (do async.monad [actual_package (/.one (///repository.mock <bad> []) [///dependency.#artifact expected_artifact ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [<exception>] - (case actual_package - {try.#Failure error} - (exception.match? <exception> error) + (_.coverage' [<exception>] + (case actual_package + {try.#Failure error} + (exception.match? <exception> error) - {try.#Success _} - false))))] + {try.#Success _} + false))))] [/.sha-1_does_not_match bad_sha-1] [/.md5_does_not_match bad_md5] @@ -311,15 +311,15 @@ (///repository.mock good [])) [///dependency.#artifact expected_artifact ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.any] - (case actual_package - {try.#Success actual_package} - (# ///package.equivalence = - (has ///package.#origin {///repository/origin.#Remote ""} expected_package) - actual_package) - - {try.#Failure _} - false)))) + (_.coverage' [/.any] + (case actual_package + {try.#Success actual_package} + (# ///package.equivalence = + (has ///package.#origin {///repository/origin.#Remote ""} expected_package) + actual_package) + + {try.#Failure _} + false)))) (in (do async.monad [.let [console ($///version.echo "")] actual_package (/.any console @@ -327,13 +327,13 @@ (///repository.mock bad_md5 [])) [///dependency.#artifact expected_artifact ///dependency.#type ///artifact/type.lux_library])] - (_.cover' [/.cannot_resolve] - (case actual_package - {try.#Failure error} - (exception.match? /.cannot_resolve error) + (_.coverage' [/.cannot_resolve] + (case actual_package + {try.#Failure error} + (exception.match? /.cannot_resolve error) - {try.#Success _} - false)))) + {try.#Success _} + false)))) ))) (def: artifacts @@ -416,15 +416,15 @@ (///repository.mock ..nope [])) (list depender) /.empty)] - (_.cover' [/.all] - (and (dictionary.key? resolution depender) - (list.any? (///dependency#= depender) successes) - - (dictionary.key? resolution dependee) - (list.any? (///dependency#= dependee) successes) - - (list.empty? failures) - (not (dictionary.key? resolution ignored)))))) + (_.coverage' [/.all] + (and (dictionary.key? resolution depender) + (list.any? (///dependency#= depender) successes) + + (dictionary.key? resolution dependee) + (list.any? (///dependency#= dependee) successes) + + (list.empty? failures) + (not (dictionary.key? resolution ignored)))))) ))) (def: .public test @@ -435,8 +435,8 @@ (_.for [/.equivalence] ($equivalence.spec /.equivalence ..random)) - (_.cover [/.empty] - (dictionary.empty? /.empty)) + (_.coverage [/.empty] + (dictionary.empty? /.empty)) ..one ..any diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux index 948de489f..5f221b4e4 100644 --- a/stdlib/source/test/aedifex/dependency/status.lux +++ b/stdlib/source/test/aedifex/dependency/status.lux @@ -38,11 +38,11 @@ (do random.monad [payload (binaryT.random 1)] - (_.cover [/.verified] - (case (/.verified payload) - {/.#Verified sha1 md5} - true + (_.coverage [/.verified] + (case (/.verified payload) + {/.#Verified sha1 md5} + true - _ - false))) + _ + false))) )))) |