From cd71a864ad5be13ed6ec6d046e0a2cb1087bdf94 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 10 Sep 2021 01:21:23 -0400 Subject: Migrated variants to the new syntax. --- .../source/test/aedifex/dependency/resolution.lux | 108 ++++++++++----------- 1 file changed, 54 insertions(+), 54 deletions(-) (limited to 'stdlib/source/test/aedifex/dependency/resolution.lux') 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 [ ] [(in (do async.monad @@ -278,10 +278,10 @@ #///dependency.type ///artifact/type.lux_library])] (_.cover' [] (case actual_package - (#try.Failure error) + {#try.Failure error} (exception.match? 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) -- cgit v1.2.3