diff options
author | Eduardo Julian | 2022-04-08 21:59:08 -0400 |
---|---|---|
committer | Eduardo Julian | 2022-04-08 21:59:08 -0400 |
commit | ab99de20a3d0566a71bf0ef607d9d6e291d7f62a (patch) | |
tree | 3755ede88eebb40e76291b45d0e3be4fdfb68621 /stdlib/source/test/aedifex | |
parent | 120ebb44dbb1a20fc150e5e58099f90be2e61d49 (diff) |
Removed (mostly useless) pattern-matching macro for abstract types.
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/aedifex/dependency/resolution.lux | 190 |
1 files changed, 95 insertions, 95 deletions
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux index bb2411590..1233cd1cb 100644 --- a/stdlib/source/test/aedifex/dependency/resolution.lux +++ b/stdlib/source/test/aedifex/dependency/resolution.lux @@ -1,6 +1,6 @@ (.using [library - [lux "*" + [lux {"-" all} ["_" test {"+" Test}] [abstract [monad {"+" do}] @@ -257,37 +257,37 @@ .let [good (..single expected_artifact expected_package) bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package) bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]] - (`` (all _.and - (in (do async.monad - [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)))) - (~~ (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) - - {try.#Success _} - false))))] - - [/.sha-1_does_not_match bad_sha-1] - [/.md5_does_not_match bad_md5] - )) - )))) + (`` (.all _.and + (in (do async.monad + [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)))) + (~~ (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) + + {try.#Success _} + false))))] + + [/.sha-1_does_not_match bad_sha-1] + [/.md5_does_not_match bad_md5] + )) + )))) (def: any Test @@ -302,39 +302,39 @@ .let [good (..single expected_artifact expected_package) bad_sha-1 (..bad_sha-1 expected_artifact expected_package dummy_package) bad_md5 (..bad_md5 expected_artifact expected_package dummy_package)]] - (all _.and - (in (do async.monad - [.let [console ($///version.echo "")] - actual_package (/.any console - (list (///repository.mock bad_sha-1 []) - (///repository.mock bad_md5 []) - (///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)))) - (in (do async.monad - [.let [console ($///version.echo "")] - actual_package (/.any console - (list (///repository.mock bad_sha-1 []) - (///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) - - {try.#Success _} - false)))) - ))) + (.all _.and + (in (do async.monad + [.let [console ($///version.echo "")] + actual_package (/.any console + (list (///repository.mock bad_sha-1 []) + (///repository.mock bad_md5 []) + (///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)))) + (in (do async.monad + [.let [console ($///version.echo "")] + actual_package (/.any console + (list (///repository.mock bad_sha-1 []) + (///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) + + {try.#Success _} + false)))) + ))) (def: artifacts (Random [Artifact Artifact Artifact]) @@ -405,40 +405,40 @@ [[dependee depender ignored] [dependee_package depender_package ignored_package]] (..packages [dependee_artifact depender_artifact ignored_artifact])] - (all _.and - (in (do async.monad - [.let [console ($///version.echo "")] - [successes failures resolution] (/.all console - (list (///repository.mock (..single dependee_artifact dependee_package) []) - (///repository.mock (..single depender_artifact depender_package) []) - (///repository.mock (..single ignored_artifact ignored_package) [])) - (function (_ url) - (///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)))))) - ))) + (.all _.and + (in (do async.monad + [.let [console ($///version.echo "")] + [successes failures resolution] (/.all console + (list (///repository.mock (..single dependee_artifact dependee_package) []) + (///repository.mock (..single depender_artifact depender_package) []) + (///repository.mock (..single ignored_artifact ignored_package) [])) + (function (_ url) + (///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)))))) + ))) (def: .public test Test (<| (_.covering /._) (_.for [/.Resolution]) - (all _.and - (_.for [/.equivalence] - ($equivalence.spec /.equivalence ..random)) + (.all _.and + (_.for [/.equivalence] + ($equivalence.spec /.equivalence ..random)) - (_.cover [/.empty] - (dictionary.empty? /.empty)) + (_.cover [/.empty] + (dictionary.empty? /.empty)) - ..one - ..any - ..all - ))) + ..one + ..any + ..all + ))) |