aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex/dependency
diff options
context:
space:
mode:
authorEduardo Julian2021-09-10 01:21:23 -0400
committerEduardo Julian2021-09-10 01:21:23 -0400
commitcd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 (patch)
treeaf6366578f98f1a8e551f4da9f3ad230fd63a4dd /stdlib/source/test/aedifex/dependency
parentef77466323f85a3d1b65b46a3deb93652ef22085 (diff)
Migrated variants to the new syntax.
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux4
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux108
-rw-r--r--stdlib/source/test/aedifex/dependency/status.lux2
3 files changed, 57 insertions, 57 deletions
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index 5b7869eab..7e137443b 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -68,12 +68,12 @@
(do io.monad
[_ (: (IO Any)
(case [method input]
- [#@http.Put (#.Some input)]
+ [#@http.Put {#.Some input}]
(atom.update! (dictionary.has url input) cache)
_
(in [])))]
- (in (#try.Success ..good_upload))))))
+ (in {#try.Success ..good_upload})))))
(def: (verify_one expected_deployments address package cache expected_artifact actual_artifact)
(-> Nat URL Package (Dictionary URL Binary) Artifact Artifact Bit)
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 2fe39286d..69867d5f8 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -92,9 +92,9 @@
(def: the_description
"[0]")
(def: (on_download uri state)
- (#try.Failure "NOPE"))
+ {#try.Failure "NOPE"})
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: .public (single artifact package)
(-> Artifact Package (Mock Any))
@@ -115,28 +115,28 @@
(\ xml.codec encoded)
(\ utf8.codec encoded)))]
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state library])
+ {#try.Success [state library]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (..sha-1 library)])
+ {#try.Success [state (..sha-1 library)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (..md5 library)])
+ {#try.Success [state (..md5 library)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state pom])
+ {#try.Success [state pom]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (..sha-1 pom)])
+ {#try.Success [state (..sha-1 pom)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (..md5 pom)])
+ {#try.Success [state (..md5 pom)]}
... else
- (#try.Failure "NOPE")))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"}))
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE")))))
+ {#try.Failure "NOPE"}))))
(def: (bad_sha-1 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -146,50 +146,50 @@
(def: (on_download uri state)
(if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
- product.left)])
+ product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..md5)])
+ ..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
- (\ utf8.codec encoded))])
+ (\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..md5)])
+ ..md5)]}
... else
- (#try.Failure "NOPE"))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"})
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: (bad_md5 expected_artifact expected_package dummy_package)
(-> Artifact Package Package (Mock Any))
@@ -199,50 +199,50 @@
(def: (on_download uri state)
(if (text.contains? (///artifact.uri (value@ #///artifact.version expected_artifact) expected_artifact) uri)
(cond (text.ends_with? ///artifact/extension.lux_library uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
- product.left)])
+ product.left)]}
(text.ends_with? ..lux_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.library)
product.left
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..lux_md5 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.library)
product.left
- ..md5)])
+ ..md5)]}
(text.ends_with? ///artifact/extension.pom uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
- (\ utf8.codec encoded))])
+ (\ utf8.codec encoded))]}
(text.ends_with? ..pom_sha-1 uri)
- (#try.Success [state (|> expected_package
+ {#try.Success [state (|> expected_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..sha-1)])
+ ..sha-1)]}
(text.ends_with? ..pom_md5 uri)
- (#try.Success [state (|> dummy_package
+ {#try.Success [state (|> dummy_package
(value@ #///package.pom)
product.left
(\ xml.codec encoded)
(\ utf8.codec encoded)
- ..md5)])
+ ..md5)]}
... else
- (#try.Failure "NOPE"))
- (#try.Failure "NOPE")))
+ {#try.Failure "NOPE"})
+ {#try.Failure "NOPE"}))
(def: (on_upload uri binary state)
- (#try.Failure "NOPE"))))
+ {#try.Failure "NOPE"})))
(def: one
Test
@@ -264,12 +264,12 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.one]
(case actual_package
- (#try.Success actual_package)
+ {#try.Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
actual_package)
- (#try.Failure _)
+ {#try.Failure _}
false))))
(~~ (template [<exception> <bad>]
[(in (do async.monad
@@ -278,10 +278,10 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [<exception>]
(case actual_package
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? <exception> error)
- (#try.Success _)
+ {#try.Success _}
false))))]
[/.sha-1_does_not_match bad_sha-1]
@@ -313,12 +313,12 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.any]
(case actual_package
- (#try.Success actual_package)
+ {#try.Success actual_package}
(\ ///package.equivalence =
- (with@ #///package.origin (#///repository/origin.Remote "") expected_package)
+ (with@ #///package.origin {#///repository/origin.Remote ""} expected_package)
actual_package)
- (#try.Failure _)
+ {#try.Failure _}
false))))
(in (do async.monad
[.let [console ($///version.echo "")]
@@ -329,10 +329,10 @@
#///dependency.type ///artifact/type.lux_library])]
(_.cover' [/.cannot_resolve]
(case actual_package
- (#try.Failure error)
+ {#try.Failure error}
(exception.match? /.cannot_resolve error)
- (#try.Success _)
+ {#try.Success _}
false))))
)))
@@ -366,16 +366,16 @@
#///dependency.type ///artifact/type.lux_library]
dependee_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some dependee_artifact))
+ (with@ #///.identity {#.Some dependee_artifact})
///pom.write
try.trusted)
depender_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some depender_artifact))
+ (with@ #///.identity {#.Some depender_artifact})
(with@ #///.dependencies (set.of_list ///dependency.hash (list dependee)))
///pom.write
try.trusted)
ignored_pom (|> (\ ///.monoid identity)
- (with@ #///.identity (#.Some ignored_artifact))
+ (with@ #///.identity {#.Some ignored_artifact})
///pom.write
try.trusted)
diff --git a/stdlib/source/test/aedifex/dependency/status.lux b/stdlib/source/test/aedifex/dependency/status.lux
index 981f18b0e..79e59460f 100644
--- a/stdlib/source/test/aedifex/dependency/status.lux
+++ b/stdlib/source/test/aedifex/dependency/status.lux
@@ -40,7 +40,7 @@
[payload (binaryT.random 1)]
(_.cover [/.verified]
(case (/.verified payload)
- (#/.Verified sha1 md5)
+ {#/.Verified sha1 md5}
true
_