aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/dependency/resolution.lux
diff options
context:
space:
mode:
authorEduardo Julian2022-04-08 05:42:36 -0400
committerEduardo Julian2022-04-08 05:42:36 -0400
commit0d909187d5b9effcd08f533d50af7d29c0d6bfd8 (patch)
treec50f12c5e47e3db90c3a701b54ee9953da942210 /stdlib/source/test/aedifex/dependency/resolution.lux
parente5e4c2aff562e5c01fefb808d1d68a40f29c9cc5 (diff)
De-sigil-ification: $
Diffstat (limited to 'stdlib/source/test/aedifex/dependency/resolution.lux')
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux188
1 files changed, 94 insertions, 94 deletions
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index c7f81d3c3..bb2411590 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -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)]]
- (`` ($_ _.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)]]
- ($_ _.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])]
- ($_ _.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])
- ($_ _.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
+ )))