aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2020-12-02 20:37:13 -0400
committerEduardo Julian2020-12-02 20:37:13 -0400
commit28c724857d76afdc40b5b036f415cc151eb66263 (patch)
tree3e970ca2a10dd7bb5c7ddd405349762945464d39 /stdlib/source/test/aedifex
parent34e310622bdeb1d0588c0664c0e78cbaa84f837c (diff)
Replaced "contains?" function with "key?" function.
Diffstat (limited to 'stdlib/source/test/aedifex')
-rw-r--r--stdlib/source/test/aedifex/cli.lux3
-rw-r--r--stdlib/source/test/aedifex/command/deps.lux4
-rw-r--r--stdlib/source/test/aedifex/command/version.lux27
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux6
4 files changed, 35 insertions, 5 deletions
diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux
index 805ccee03..c4c76f32f 100644
--- a/stdlib/source/test/aedifex/cli.lux
+++ b/stdlib/source/test/aedifex/cli.lux
@@ -29,6 +29,8 @@
(def: command
(Random /.Command)
($_ random.or
+ ## #Version
+ (random\wrap [])
## #Clean
(random\wrap [])
## #POM
@@ -56,6 +58,7 @@
(def: (format value)
(-> /.Command (List Text))
(case value
+ #/.Version (list "version")
#/.Clean (list "clean")
#/.POM (list "pom")
#/.Dependencies (list "deps")
diff --git a/stdlib/source/test/aedifex/command/deps.lux b/stdlib/source/test/aedifex/command/deps.lux
index 42739a5ff..2f221a7ce 100644
--- a/stdlib/source/test/aedifex/command/deps.lux
+++ b/stdlib/source/test/aedifex/command/deps.lux
@@ -82,7 +82,7 @@
(/.do! fs (list (///repository.mock ($///dependency/resolution.single depender-artifact depender-package) []))))]
(wrap (and (and (set.member? pre dependee-artifact)
(not (set.member? pre depender-artifact)))
- (and (dictionary.contains? dependee post)
- (dictionary.contains? depender post)))))]
+ (and (dictionary.key? post dependee)
+ (dictionary.key? post depender)))))]
(_.cover' [/.do!]
(try.default false verdict)))))))
diff --git a/stdlib/source/test/aedifex/command/version.lux b/stdlib/source/test/aedifex/command/version.lux
new file mode 100644
index 000000000..f6196556d
--- /dev/null
+++ b/stdlib/source/test/aedifex/command/version.lux
@@ -0,0 +1,27 @@
+(.module:
+ [lux #*
+ ["_" test (#+ Test)]
+ [abstract
+ [monad (#+ do)]]
+ [control
+ ["." try]
+ [concurrency
+ ["." promise]]]
+ [math
+ ["." random]]]
+ [///
+ ["@." profile]]
+ {#program
+ ["." /]})
+
+(def: #export test
+ Test
+ (<| (_.covering /._)
+ (do random.monad
+ [profile @profile.random]
+ (wrap (do promise.monad
+ [verdict (do (try.with promise.monad)
+ [_ (/.do! profile)]
+ (wrap true))]
+ (_.cover' [/.do!]
+ (try.default false verdict)))))))
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index b426a100d..0b3bf1634 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -346,9 +346,9 @@
(_.cover' [/.all]
(case resolution
(#try.Success resolution)
- (and (dictionary.contains? depender resolution)
- (dictionary.contains? dependee resolution)
- (not (dictionary.contains? ignored resolution)))
+ (and (dictionary.key? resolution depender)
+ (dictionary.key? resolution dependee)
+ (not (dictionary.key? resolution ignored)))
(#try.Failure error)
false))))