aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2022-03-16 08:37:23 -0400
committerEduardo Julian2022-03-16 08:37:23 -0400
commitbf53ee92fc3c33a4885aa227e55d24f7ba3cb2c4 (patch)
tree49683a62ae8e110c62b42a9a6386bb2ddb3c47c6 /stdlib/source/test/aedifex
parentd710d9f4fc098e7c243c8a5f23cd42683f13e07f (diff)
De-sigil-ification: prefix :
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/cache.lux8
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux16
-rw-r--r--stdlib/source/test/aedifex/command/build.lux112
-rw-r--r--stdlib/source/test/aedifex/command/clean.lux12
-rw-r--r--stdlib/source/test/aedifex/command/install.lux8
-rw-r--r--stdlib/source/test/aedifex/command/test.lux40
-rw-r--r--stdlib/source/test/aedifex/dependency/deployment.lux38
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux20
-rw-r--r--stdlib/source/test/aedifex/input.lux8
-rw-r--r--stdlib/source/test/aedifex/parser.lux10
10 files changed, 136 insertions, 136 deletions
diff --git a/stdlib/source/test/aedifex/cache.lux b/stdlib/source/test/aedifex/cache.lux
index 9888e2f58..09e022c89 100644
--- a/stdlib/source/test/aedifex/cache.lux
+++ b/stdlib/source/test/aedifex/cache.lux
@@ -104,8 +104,8 @@
[[dependency expected_package] ..package
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- .let [fs (: (file.System Async)
- (file.mock (# file.default separator)))
+ .let [fs (is (file.System Async)
+ (file.mock (# file.default separator)))
program (program.async (program.mock environment.empty home working_directory))]]
(in (do async.monad
[wrote! (/.write_one program fs dependency expected_package)
@@ -125,8 +125,8 @@
[expected ..resolution
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- .let [fs (: (file.System Async)
- (file.mock (# file.default separator)))
+ .let [fs (is (file.System Async)
+ (file.mock (# file.default separator)))
program (program.async (program.mock environment.empty home working_directory))]]
(in (do async.monad
[wrote! (/.write_all program fs expected)
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index bfdbb789e..001bfcab3 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -48,8 +48,8 @@
(-> Nat Text (file.System Async) file.Path
[(Atom Nat)
(-> (Console Async) (Program Async) (file.System Async) (Shell Async) Resolution (Command [Exit Any]))])
- (let [@runs (: (Atom Nat)
- (atom.atom 0))]
+ (let [@runs (is (Atom Nat)
+ (atom.atom 0))]
[@runs
(function (_ console program fs shell resolution profile)
(do [! async.monad]
@@ -74,12 +74,12 @@
program (random.ascii/alpha 5)
target (random.ascii/alpha 5)
source (random.ascii/alpha 5)
- .let [empty_profile (: Profile
- (# ///.monoid identity))
- with_target (: (-> Profile Profile)
- (has ///.#target target))
- with_program (: (-> Profile Profile)
- (has ///.#program {.#Some program}))
+ .let [empty_profile (is Profile
+ (# ///.monoid identity))
+ with_target (is (-> Profile Profile)
+ (has ///.#target target))
+ with_program (is (-> Profile Profile)
+ (has ///.#program {.#Some program}))
profile (|> empty_profile
with_program
diff --git a/stdlib/source/test/aedifex/command/build.lux b/stdlib/source/test/aedifex/command/build.lux
index f8d2d46ec..987d35506 100644
--- a/stdlib/source/test/aedifex/command/build.lux
+++ b/stdlib/source/test/aedifex/command/build.lux
@@ -42,68 +42,68 @@
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
{try.#Success
- (: (shell.Mock [])
- (implementation
- (def: (on_read state)
- (exception.except shell.no_more_output []))
- (def: (on_fail state)
- (exception.except shell.no_more_output []))
- (def: (on_write input state)
- {try.#Failure "on_write"})
- (def: (on_destroy state)
- {try.#Failure "on_destroy"})
- (def: (on_await state)
- {try.#Success [state shell.normal]})))})))
+ (is (shell.Mock [])
+ (implementation
+ (def: (on_read state)
+ (exception.except shell.no_more_output []))
+ (def: (on_fail state)
+ (exception.except shell.no_more_output []))
+ (def: (on_write input state)
+ {try.#Failure "on_write"})
+ (def: (on_destroy state)
+ {try.#Failure "on_destroy"})
+ (def: (on_await state)
+ {try.#Success [state shell.normal]})))})))
(def: .public bad_shell
(-> Any (Shell IO))
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
{try.#Success
- (: (shell.Mock [])
- (implementation
- (def: (on_read state)
- (exception.except shell.no_more_output []))
- (def: (on_fail state)
- (exception.except shell.no_more_output []))
- (def: (on_write input state)
- {try.#Failure "on_write"})
- (def: (on_destroy state)
- {try.#Failure "on_destroy"})
- (def: (on_await state)
- {try.#Success [state shell.error]})))})))
+ (is (shell.Mock [])
+ (implementation
+ (def: (on_read state)
+ (exception.except shell.no_more_output []))
+ (def: (on_fail state)
+ (exception.except shell.no_more_output []))
+ (def: (on_write input state)
+ {try.#Failure "on_write"})
+ (def: (on_destroy state)
+ {try.#Failure "on_destroy"})
+ (def: (on_await state)
+ {try.#Success [state shell.error]})))})))
(def: .public (reader_shell error?)
(-> Bit (-> (List Text) (Shell IO)))
(shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
{try.#Success
- (: (shell.Mock (List Text))
- (implementation
- (def: (on_read state)
- (if error?
- (exception.except shell.no_more_output [])
- (case state
- {.#Item head tail}
- {try.#Success [tail head]}
-
- {.#End}
- (exception.except shell.no_more_output []))))
- (def: (on_error state)
- (if error?
- (case state
- {.#Item head tail}
- {try.#Success [tail head]}
-
- {.#End}
- (exception.except shell.no_more_output []))
- (exception.except shell.no_more_output [])))
- (def: (on_write input state)
- {try.#Failure "on_write"})
- (def: (on_destroy state)
- {try.#Failure "on_destroy"})
- (def: (on_await state)
- {try.#Success [state shell.error]})))})))
+ (is (shell.Mock (List Text))
+ (implementation
+ (def: (on_read state)
+ (if error?
+ (exception.except shell.no_more_output [])
+ (case state
+ {.#Item head tail}
+ {try.#Success [tail head]}
+
+ {.#End}
+ (exception.except shell.no_more_output []))))
+ (def: (on_error state)
+ (if error?
+ (case state
+ {.#Item head tail}
+ {try.#Success [tail head]}
+
+ {.#End}
+ (exception.except shell.no_more_output []))
+ (exception.except shell.no_more_output [])))
+ (def: (on_write input state)
+ {try.#Failure "on_write"})
+ (def: (on_destroy state)
+ {try.#Failure "on_destroy"})
+ (def: (on_await state)
+ {try.#Success [state shell.error]})))})))
(def: compiler
(Random Dependency)
@@ -148,12 +148,12 @@
target (random.ascii/alpha 5)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- .let [empty_profile (: Profile
- (# ///.monoid identity))
- with_target (: (-> Profile Profile)
- (has ///.#target target))
- with_program (: (-> Profile Profile)
- (has ///.#program {.#Some program}))
+ .let [empty_profile (is Profile
+ (# ///.monoid identity))
+ with_target (is (-> Profile Profile)
+ (has ///.#target target))
+ with_program (is (-> Profile Profile)
+ (has ///.#program {.#Some program}))
profile (|> empty_profile
with_program
diff --git a/stdlib/source/test/aedifex/command/clean.lux b/stdlib/source/test/aedifex/command/clean.lux
index 6a2210f1b..21372ef80 100644
--- a/stdlib/source/test/aedifex/command/clean.lux
+++ b/stdlib/source/test/aedifex/command/clean.lux
@@ -56,8 +56,8 @@
(def: (create_directory! fs path files)
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Any)))
(do [! (try.with async.monad)]
- [_ (: (Async (Try Any))
- (file.make_directories async.monad fs path))
+ [_ (is (Async (Try Any))
+ (file.make_directories async.monad fs path))
_ (monad.each ! (..create_file! fs) files)]
(in [])))
@@ -73,10 +73,10 @@
(-> (file.System Async) Path (List [Path Binary]) (Async (Try Bit)))
(do [! (try.with async.monad)]
[directory_exists? (..directory_exists? fs directory_path)
- files_exist? (: (Action (List Bit))
- (|> files
- (list#each product.left)
- (monad.each ///action.monad (..file_exists? fs))))]
+ files_exist? (is (Action (List Bit))
+ (|> files
+ (list#each product.left)
+ (monad.each ///action.monad (..file_exists? fs))))]
(in (and directory_exists?
(list.every? (|>>) files_exist?)))))
diff --git a/stdlib/source/test/aedifex/command/install.lux b/stdlib/source/test/aedifex/command/install.lux
index fd4780195..414d104d8 100644
--- a/stdlib/source/test/aedifex/command/install.lux
+++ b/stdlib/source/test/aedifex/command/install.lux
@@ -47,10 +47,10 @@
set.list
(monad.each ! (function (_ head)
(do !
- [_ (: (Async (Try Any))
- (file.make_directories async.monad fs head))]
- (: (Async (Try Any))
- (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
+ [_ (is (Async (Try Any))
+ (file.make_directories async.monad fs head))]
+ (is (Async (Try Any))
+ (file.make_file async.monad fs (binary.empty 0) (format head / head ".lux")))))))))
(def: (execute! program fs sample)
(-> (Program Async) (file.System Async) ///.Profile (Async (Try Text)))
diff --git a/stdlib/source/test/aedifex/command/test.lux b/stdlib/source/test/aedifex/command/test.lux
index e992f87bc..4f6cfcdc4 100644
--- a/stdlib/source/test/aedifex/command/test.lux
+++ b/stdlib/source/test/aedifex/command/test.lux
@@ -47,12 +47,12 @@
target (random.ascii/alpha 5)
home (random.ascii/alpha 5)
working_directory (random.ascii/alpha 5)
- .let [empty_profile (: Profile
- (# ///.monoid identity))
- with_target (: (-> Profile Profile)
- (has ///.#target target))
- with_test (: (-> Profile Profile)
- (has ///.#test {.#Some test}))
+ .let [empty_profile (is Profile
+ (# ///.monoid identity))
+ with_target (is (-> Profile Profile)
+ (has ///.#target target))
+ with_test (is (-> Profile Profile)
+ (has ///.#test {.#Some test}))
profile (|> empty_profile
with_test
@@ -84,20 +84,20 @@
[.let [bad_shell (shell.mock
(function (_ [actual_environment actual_working_directory actual_command actual_arguments])
{try.#Success
- (: (shell.Mock [])
- (implementation
- (def: (on_read state)
- (exception.except shell.no_more_output []))
- (def: (on_error state)
- (exception.except shell.no_more_output []))
- (def: (on_write input state)
- {try.#Failure "on_write"})
- (def: (on_destroy state)
- {try.#Failure "on_destroy"})
- (def: (on_await state)
- {try.#Success [state (if (list.any? (text#= "build") actual_arguments)
- shell.normal
- shell.error)]})))})
+ (is (shell.Mock [])
+ (implementation
+ (def: (on_read state)
+ (exception.except shell.no_more_output []))
+ (def: (on_error state)
+ (exception.except shell.no_more_output []))
+ (def: (on_write input state)
+ {try.#Failure "on_write"})
+ (def: (on_destroy state)
+ {try.#Failure "on_destroy"})
+ (def: (on_await state)
+ {try.#Success [state (if (list.any? (text#= "build") actual_arguments)
+ shell.normal
+ shell.error)]})))})
[])]
_ (/.do! console (program.async (program.mock environment.empty home working_directory))
fs (shell.async bad_shell) resolution
diff --git a/stdlib/source/test/aedifex/dependency/deployment.lux b/stdlib/source/test/aedifex/dependency/deployment.lux
index c22121755..ed834c759 100644
--- a/stdlib/source/test/aedifex/dependency/deployment.lux
+++ b/stdlib/source/test/aedifex/dependency/deployment.lux
@@ -66,19 +66,19 @@
(implementation
(def: (request method url headers input)
(do io.monad
- [_ (: (IO Any)
- (case [method input]
- [{@http.#Put} {.#Some input}]
- (atom.update! (dictionary.has url input) cache)
-
- _
- (in [])))]
+ [_ (is (IO Any)
+ (case [method input]
+ [{@http.#Put} {.#Some input}]
+ (atom.update! (dictionary.has url input) cache)
+
+ _
+ (in [])))]
(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)
- (let [url (: (-> URI URL)
- (|>> (format address)))
+ (let [url (is (-> URI URL)
+ (|>> (format address)))
library_url (url (format (artifact.uri (the artifact.#version expected_artifact)
expected_artifact)
artifact/extension.lux_library))
@@ -138,9 +138,9 @@
.let [artifact (|> profile
(the profile.#identity)
maybe.trusted)
- dependency (: Dependency
- [artifact
- artifact/type.lux_library])]]
+ dependency (is Dependency
+ [artifact
+ artifact/type.lux_library])]]
(in [dependency artifact package])))
(def: .public test
@@ -152,8 +152,8 @@
($_ _.and
(do [! random.monad]
[[dependency expected_artifact package] ..bundle
- .let [cache (: Cache
- (atom.atom (dictionary.empty text.hash)))
+ .let [cache (is Cache
+ (atom.atom (dictionary.empty text.hash)))
http (..http cache)
repository (repository.async (remote.repository http {.#None} address))]]
(in (do async.monad
@@ -164,9 +164,9 @@
(try#each (verify_one 1 address package cache expected_artifact))
(try.else false))))))
(do [! random.monad]
- [.let [hash (: (Hash [Dependency Artifact Package])
- (# hash.functor each (|>> product.right product.left product.left)
- text.hash))]
+ [.let [hash (is (Hash [Dependency Artifact Package])
+ (# hash.functor each (|>> product.right product.left product.left)
+ text.hash))]
num_bundles (# ! each (n.% 10) random.nat)
bundles (|> ..bundle
(random.set hash num_bundles)
@@ -175,8 +175,8 @@
(dictionary.has dependency package resolution))
resolution.empty
bundles)
- cache (: Cache
- (atom.atom (dictionary.empty text.hash)))
+ cache (is Cache
+ (atom.atom (dictionary.empty text.hash)))
http (..http cache)
repository (repository.async (remote.repository http {.#None} address))]]
(in (do async.monad
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 5ea995021..c7f81d3c3 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -104,16 +104,16 @@
"[1]")
(def: (on_download uri state)
(if (text.contains? expected uri)
- (let [library (: Binary
- (|> package
- (the ///package.#library)
- product.left))
- pom (: Binary
- (|> package
- (the ///package.#pom)
- product.left
- (# xml.codec encoded)
- (# utf8.codec encoded)))]
+ (let [library (is Binary
+ (|> package
+ (the ///package.#library)
+ product.left))
+ pom (is Binary
+ (|> package
+ (the ///package.#pom)
+ product.left
+ (# xml.codec encoded)
+ (# utf8.codec encoded)))]
(cond (text.ends_with? ///artifact/extension.lux_library uri)
{try.#Success [state library]}
diff --git a/stdlib/source/test/aedifex/input.lux b/stdlib/source/test/aedifex/input.lux
index dedb9b33c..4a7100296 100644
--- a/stdlib/source/test/aedifex/input.lux
+++ b/stdlib/source/test/aedifex/input.lux
@@ -46,8 +46,8 @@
(<| (_.covering /._)
(do [! random.monad]
[expected (# ! each (has //.#parents (list)) $profile.random)
- .let [fs (: (file.System Async)
- (file.mock (# file.default separator)))]]
+ .let [fs (is (file.System Async)
+ (file.mock (# file.default separator)))]]
(in (do async.monad
[verdict (do //action.monad
[.let [profile (|> expected
@@ -56,8 +56,8 @@
%.code
(# utf8.codec encoded))]
_ (# fs write profile //project.file)
- actual (: (Async (Try Profile))
- (/.read async.monad fs (list //.default)))]
+ actual (is (Async (Try Profile))
+ (/.read async.monad fs (list //.default)))]
(in (# //.equivalence =
(|> expected
(revised //.#sources ..with_default_source)
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index f529c2d0a..af642f65b 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -56,11 +56,11 @@
(def: with_default_sources
(-> //.Profile //.Profile)
(revised //.#sources
- (: (-> (Set //.Source) (Set //.Source))
- (function (_ sources)
- (if (set.empty? sources)
- (set.of_list text.hash (list //.default_source))
- sources)))))
+ (is (-> (Set //.Source) (Set //.Source))
+ (function (_ sources)
+ (if (set.empty? sources)
+ (set.of_list text.hash (list //.default_source))
+ sources)))))
(def: with_default_repository
(-> //.Profile //.Profile)