aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/aedifex
diff options
context:
space:
mode:
authorEduardo Julian2020-12-10 00:15:15 -0400
committerEduardo Julian2020-12-10 00:15:15 -0400
commit14287585025b2d8fff1991691def9e643b039ac8 (patch)
tree4fdbe2aafa907d1dd0f47150c545adf3eabeb124 /stdlib/source/test/aedifex
parent893c76ad530ca0e81cd84602543c3114407f4592 (diff)
Re-named "with-cover" to "for".
Diffstat (limited to '')
-rw-r--r--stdlib/source/test/aedifex/artifact.lux34
-rw-r--r--stdlib/source/test/aedifex/artifact/extension.lux34
-rw-r--r--stdlib/source/test/aedifex/artifact/type.lux20
-rw-r--r--stdlib/source/test/aedifex/cli.lux18
-rw-r--r--stdlib/source/test/aedifex/command/auto.lux3
-rw-r--r--stdlib/source/test/aedifex/dependency.lux10
-rw-r--r--stdlib/source/test/aedifex/dependency/resolution.lux6
-rw-r--r--stdlib/source/test/aedifex/hash.lux90
-rw-r--r--stdlib/source/test/aedifex/package.lux2
-rw-r--r--stdlib/source/test/aedifex/parser.lux12
-rw-r--r--stdlib/source/test/aedifex/profile.lux18
-rw-r--r--stdlib/source/test/aedifex/project.lux104
-rw-r--r--stdlib/source/test/aedifex/repository.lux8
13 files changed, 179 insertions, 180 deletions
diff --git a/stdlib/source/test/aedifex/artifact.lux b/stdlib/source/test/aedifex/artifact.lux
index 6ba31f9b7..a718d51f6 100644
--- a/stdlib/source/test/aedifex/artifact.lux
+++ b/stdlib/source/test/aedifex/artifact.lux
@@ -34,21 +34,21 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Group /.Name /.Version
- /.Artifact]
- ($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
+ (_.for [/.Group /.Name /.Version
+ /.Artifact]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
- (do random.monad
- [sample ..random
- #let [fs (: (file.System Promise)
- (file.mock (\ file.default separator)))]]
- (_.cover [/.uri /.path]
- (|> (/.path fs sample)
- (text.replace-all uri.separator (\ fs separator))
- (text\= (/.uri sample)))))
-
- /type.test
- /extension.test
- ))))
+ (do random.monad
+ [sample ..random
+ #let [fs (: (file.System Promise)
+ (file.mock (\ file.default separator)))]]
+ (_.cover [/.uri /.path]
+ (|> (/.path fs sample)
+ (text.replace-all uri.separator (\ fs separator))
+ (text\= (/.uri sample)))))
+
+ /type.test
+ /extension.test
+ ))))
diff --git a/stdlib/source/test/aedifex/artifact/extension.lux b/stdlib/source/test/aedifex/artifact/extension.lux
index e098b0f9c..cd695ae93 100644
--- a/stdlib/source/test/aedifex/artifact/extension.lux
+++ b/stdlib/source/test/aedifex/artifact/extension.lux
@@ -20,21 +20,21 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Extension]
- ($_ _.and
- (_.cover [/.lux-library /.jvm-library /.pom
- /.sha-1 /.md5]
- (let [options (list /.lux-library /.jvm-library /.pom /.sha-1 /.md5)
- uniques (set.from-list text.hash options)]
- (n.= (list.size options)
- (set.size uniques))))
- (_.cover [/.extension]
- (`` (and (~~ (template [<type> <extension>]
- [(text\= <extension>
- (/.extension <type>))]
+ (_.for [/.Extension]
+ ($_ _.and
+ (_.cover [/.lux-library /.jvm-library /.pom
+ /.sha-1 /.md5]
+ (let [options (list /.lux-library /.jvm-library /.pom /.sha-1 /.md5)
+ uniques (set.from-list text.hash options)]
+ (n.= (list.size options)
+ (set.size uniques))))
+ (_.cover [/.extension]
+ (`` (and (~~ (template [<type> <extension>]
+ [(text\= <extension>
+ (/.extension <type>))]
- [//.lux-library /.lux-library]
- [//.jvm-library /.jvm-library]
- [//.pom /.pom]
- )))))
- ))))
+ [//.lux-library /.lux-library]
+ [//.jvm-library /.jvm-library]
+ [//.pom /.pom]
+ )))))
+ ))))
diff --git a/stdlib/source/test/aedifex/artifact/type.lux b/stdlib/source/test/aedifex/artifact/type.lux
index 0d8284d7c..84807a8c6 100644
--- a/stdlib/source/test/aedifex/artifact/type.lux
+++ b/stdlib/source/test/aedifex/artifact/type.lux
@@ -18,13 +18,13 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Type]
- ($_ _.and
- (_.cover [/.lux-library /.jvm-library
- /.pom /.md5 /.sha-1]
- (let [options (list /.lux-library /.jvm-library
- /.pom /.md5 /.sha-1)
- uniques (set.from-list text.hash options)]
- (n.= (list.size options)
- (set.size uniques))))
- ))))
+ (_.for [/.Type]
+ ($_ _.and
+ (_.cover [/.lux-library /.jvm-library
+ /.pom /.md5 /.sha-1]
+ (let [options (list /.lux-library /.jvm-library
+ /.pom /.md5 /.sha-1)
+ uniques (set.from-list text.hash options)]
+ (n.= (list.size options)
+ (set.size uniques))))
+ ))))
diff --git a/stdlib/source/test/aedifex/cli.lux b/stdlib/source/test/aedifex/cli.lux
index c4c76f32f..9118132cd 100644
--- a/stdlib/source/test/aedifex/cli.lux
+++ b/stdlib/source/test/aedifex/cli.lux
@@ -102,13 +102,13 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Compilation /.Command]
- ($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..command))
+ (_.for [/.Compilation /.Command]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..command))
- (_.with-cover [/.command]
- ($_ _.and
- ..without-profile
- ..with-profile
- ))))))
+ (_.for [/.command]
+ ($_ _.and
+ ..without-profile
+ ..with-profile
+ ))))))
diff --git a/stdlib/source/test/aedifex/command/auto.lux b/stdlib/source/test/aedifex/command/auto.lux
index aa1b8ebe8..e8f6d17f1 100644
--- a/stdlib/source/test/aedifex/command/auto.lux
+++ b/stdlib/source/test/aedifex/command/auto.lux
@@ -6,7 +6,7 @@
[control
["." try]
[parser
- ["." environment]]
+ ["." environment (#+ Environment)]]
[concurrency
["." atom (#+ Atom)]
["." promise (#+ Promise)]]
@@ -24,7 +24,6 @@
[math
["." random]]
[world
- [environment (#+ Environment)]
[console (#+ Console)]
["." shell (#+ Shell)]
["." file (#+ Path)
diff --git a/stdlib/source/test/aedifex/dependency.lux b/stdlib/source/test/aedifex/dependency.lux
index e7388189c..95fec9800 100644
--- a/stdlib/source/test/aedifex/dependency.lux
+++ b/stdlib/source/test/aedifex/dependency.lux
@@ -22,8 +22,8 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Dependency]
- ($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
- ))))
+ (_.for [/.Dependency]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+ ))))
diff --git a/stdlib/source/test/aedifex/dependency/resolution.lux b/stdlib/source/test/aedifex/dependency/resolution.lux
index 0b3bf1634..08bbaa4a4 100644
--- a/stdlib/source/test/aedifex/dependency/resolution.lux
+++ b/stdlib/source/test/aedifex/dependency/resolution.lux
@@ -357,10 +357,10 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Resolution])
+ (_.for [/.Resolution])
($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
(_.cover [/.empty]
(dictionary.empty? /.empty))
diff --git a/stdlib/source/test/aedifex/hash.lux b/stdlib/source/test/aedifex/hash.lux
index 472342c70..8bc830801 100644
--- a/stdlib/source/test/aedifex/hash.lux
+++ b/stdlib/source/test/aedifex/hash.lux
@@ -36,60 +36,60 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Hash /.SHA-1 /.MD5])
+ (_.for [/.Hash /.SHA-1 /.MD5])
(`` ($_ _.and
- (_.with-cover [/.equivalence]
- ($_ _.and
- ($equivalence.spec /.equivalence (..random /.sha-1))
- ($equivalence.spec /.equivalence (..random /.md5))
- ))
- (_.with-cover [/.data]
- ($_ _.and
- (~~ (template [<hash> <constructor> <exception>]
- [(do random.monad
- [expected (..random <hash>)]
- (_.cover [<hash> <constructor> <exception>]
- (and (case (<constructor> (/.data expected))
- (#try.Success actual)
- (\ /.equivalence = expected actual)
+ (_.for [/.equivalence]
+ ($_ _.and
+ ($equivalence.spec /.equivalence (..random /.sha-1))
+ ($equivalence.spec /.equivalence (..random /.md5))
+ ))
+ (_.for [/.data]
+ ($_ _.and
+ (~~ (template [<hash> <constructor> <exception>]
+ [(do random.monad
+ [expected (..random <hash>)]
+ (_.cover [<hash> <constructor> <exception>]
+ (and (case (<constructor> (/.data expected))
+ (#try.Success actual)
+ (\ /.equivalence = expected actual)
- (#try.Failure error)
- false)
- (case (<constructor> (\ binary.monoid compose
- (/.data expected)
- (/.data expected)))
- (#try.Success actual)
- false
+ (#try.Failure error)
+ false)
+ (case (<constructor> (\ binary.monoid compose
+ (/.data expected)
+ (/.data expected)))
+ (#try.Success actual)
+ false
- (#try.Failure error)
- (exception.match? <exception> error)))))]
+ (#try.Failure error)
+ (exception.match? <exception> error)))))]
- [/.sha-1 /.as-sha-1 /.not-a-sha-1]
- [/.md5 /.as-md5 /.not-a-md5]
- ))))
+ [/.sha-1 /.as-sha-1 /.not-a-sha-1]
+ [/.md5 /.as-md5 /.not-a-md5]
+ ))))
(~~ (template [<codec> <hash>]
- [(_.with-cover [<codec>]
- ($codec.spec /.equivalence <codec> (..random <hash>)))]
+ [(_.for [<codec>]
+ ($codec.spec /.equivalence <codec> (..random <hash>)))]
[/.sha-1-codec /.sha-1]
[/.md5-codec /.md5]
))
- (_.with-cover [/.not-a-hash]
- ($_ _.and
- (~~ (template [<codec> <hash>]
- [(do random.monad
- [expected (..random <hash>)]
- (_.cover [<codec>]
- (case (\ <codec> decode
- (format (\ <codec> encode expected)
- "AABBCC"))
- (#try.Success actual)
- false
+ (_.for [/.not-a-hash]
+ ($_ _.and
+ (~~ (template [<codec> <hash>]
+ [(do random.monad
+ [expected (..random <hash>)]
+ (_.cover [<codec>]
+ (case (\ <codec> decode
+ (format (\ <codec> encode expected)
+ "AABBCC"))
+ (#try.Success actual)
+ false
- (#try.Failure error)
- (exception.match? /.not-a-hash error))))]
+ (#try.Failure error)
+ (exception.match? /.not-a-hash error))))]
- [/.sha-1-codec /.sha-1]
- [/.md5-codec /.md5]
- ))))
+ [/.sha-1-codec /.sha-1]
+ [/.md5-codec /.md5]
+ ))))
))))
diff --git a/stdlib/source/test/aedifex/package.lux b/stdlib/source/test/aedifex/package.lux
index c1add80d3..aecdcc5af 100644
--- a/stdlib/source/test/aedifex/package.lux
+++ b/stdlib/source/test/aedifex/package.lux
@@ -47,7 +47,7 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Package])
+ (_.for [/.Package])
(do {! random.monad}
[[profile package] ..random]
($_ _.and
diff --git a/stdlib/source/test/aedifex/parser.lux b/stdlib/source/test/aedifex/parser.lux
index 248023e80..7aeff7a18 100644
--- a/stdlib/source/test/aedifex/parser.lux
+++ b/stdlib/source/test/aedifex/parser.lux
@@ -110,9 +110,9 @@
Test
(<| (_.covering /._)
(_.covering //format._)
- (_.with-cover [/.project
- //format.Format //format.profile //format.project]
- ($_ _.and
- ..single-profile
- ..multiple-profiles
- ))))
+ (_.for [/.project
+ //format.Format //format.profile //format.project]
+ ($_ _.and
+ ..single-profile
+ ..multiple-profiles
+ ))))
diff --git a/stdlib/source/test/aedifex/profile.lux b/stdlib/source/test/aedifex/profile.lux
index 7f95c07c2..1743a243a 100644
--- a/stdlib/source/test/aedifex/profile.lux
+++ b/stdlib/source/test/aedifex/profile.lux
@@ -133,12 +133,12 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Distribution /.License /.SCM /.Organization
- /.Email /.Developer /.Contributor /.Info
- /.Source /.Target /.Name /.Profile]
- ($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
- (_.with-cover [/.monoid]
- ($monoid.spec /.equivalence /.monoid ..random))
- ))))
+ (_.for [/.Distribution /.License /.SCM /.Organization
+ /.Email /.Developer /.Contributor /.Info
+ /.Source /.Target /.Name /.Profile]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+ (_.for [/.monoid]
+ ($monoid.spec /.equivalence /.monoid ..random))
+ ))))
diff --git a/stdlib/source/test/aedifex/project.lux b/stdlib/source/test/aedifex/project.lux
index ec6849e4e..4ea00a3c4 100644
--- a/stdlib/source/test/aedifex/project.lux
+++ b/stdlib/source/test/aedifex/project.lux
@@ -39,58 +39,58 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.with-cover [/.Project /.project]
- ($_ _.and
- (_.with-cover [/.equivalence]
- ($equivalence.spec /.equivalence ..random))
- (_.with-cover [/.monoid]
- ($monoid.spec /.equivalence /.monoid ..random))
+ (_.for [/.Project /.project]
+ ($_ _.and
+ (_.for [/.equivalence]
+ ($equivalence.spec /.equivalence ..random))
+ (_.for [/.monoid]
+ ($monoid.spec /.equivalence /.monoid ..random))
- (do random.monad
- [[super-name super-profile] ..profile
- [dummy-name dummy-profile] (random.filter (|>> product.left (text\= super-name) not)
- ..profile)
- [sub-name sub-profile] (random.filter (function (_ [name profile])
- (and (not (text\= super-name name))
- (not (text\= dummy-name name))))
- ..profile)
- fake-name (random.filter (function (_ name)
- (and (not (text\= super-name name))
- (not (text\= dummy-name name))
- (not (text\= sub-name name))))
- (random.ascii/alpha 1))
- #let [project ($_ (\ /.monoid compose)
- (/.project super-name super-profile)
- (/.project dummy-name dummy-profile)
- (/.project sub-name (set@ #//.parents (list super-name) sub-profile)))
- circular ($_ (\ /.monoid compose)
- (/.project super-name (set@ #//.parents (list sub-name) super-profile))
- (/.project dummy-name dummy-profile)
- (/.project sub-name (set@ #//.parents (list super-name) sub-profile)))]]
- ($_ _.and
- (_.cover [/.profile]
- (and (|> (/.profile super-name project)
- (try\map (\ //.equivalence = super-profile))
- (try.default false))
- (|> (/.profile dummy-name project)
- (try\map (\ //.equivalence = dummy-profile))
- (try.default false))
- (|> (/.profile sub-name project)
- (try\map (\ //.equivalence = (\ //.monoid compose sub-profile super-profile)))
- (try.default false))))
- (_.cover [/.unknown-profile]
- (case (/.profile fake-name project)
- (#try.Success _)
- false
+ (do random.monad
+ [[super-name super-profile] ..profile
+ [dummy-name dummy-profile] (random.filter (|>> product.left (text\= super-name) not)
+ ..profile)
+ [sub-name sub-profile] (random.filter (function (_ [name profile])
+ (and (not (text\= super-name name))
+ (not (text\= dummy-name name))))
+ ..profile)
+ fake-name (random.filter (function (_ name)
+ (and (not (text\= super-name name))
+ (not (text\= dummy-name name))
+ (not (text\= sub-name name))))
+ (random.ascii/alpha 1))
+ #let [project ($_ (\ /.monoid compose)
+ (/.project super-name super-profile)
+ (/.project dummy-name dummy-profile)
+ (/.project sub-name (set@ #//.parents (list super-name) sub-profile)))
+ circular ($_ (\ /.monoid compose)
+ (/.project super-name (set@ #//.parents (list sub-name) super-profile))
+ (/.project dummy-name dummy-profile)
+ (/.project sub-name (set@ #//.parents (list super-name) sub-profile)))]]
+ ($_ _.and
+ (_.cover [/.profile]
+ (and (|> (/.profile super-name project)
+ (try\map (\ //.equivalence = super-profile))
+ (try.default false))
+ (|> (/.profile dummy-name project)
+ (try\map (\ //.equivalence = dummy-profile))
+ (try.default false))
+ (|> (/.profile sub-name project)
+ (try\map (\ //.equivalence = (\ //.monoid compose sub-profile super-profile)))
+ (try.default false))))
+ (_.cover [/.unknown-profile]
+ (case (/.profile fake-name project)
+ (#try.Success _)
+ false
- (#try.Failure error)
- (exception.match? /.unknown-profile error)))
- (_.cover [/.circular-dependency]
- (case (/.profile sub-name circular)
- (#try.Success _)
- false
+ (#try.Failure error)
+ (exception.match? /.unknown-profile error)))
+ (_.cover [/.circular-dependency]
+ (case (/.profile sub-name circular)
+ (#try.Success _)
+ false
- (#try.Failure error)
- (exception.match? /.circular-dependency error)))
- ))
- ))))
+ (#try.Failure error)
+ (exception.match? /.circular-dependency error)))
+ ))
+ ))))
diff --git a/stdlib/source/test/aedifex/repository.lux b/stdlib/source/test/aedifex/repository.lux
index 55bd3af19..4da17a059 100644
--- a/stdlib/source/test/aedifex/repository.lux
+++ b/stdlib/source/test/aedifex/repository.lux
@@ -86,8 +86,8 @@
invalid (random.filter (|>> (\ identity-equivalence = valid) not)
..identity)]
($_ _.and
- (_.with-cover [/.mock /.Simulation]
- ($/.spec valid (..artifact "1.2.3-YES")
- invalid (..artifact "4.5.6-NO")
- (/.mock (..simulation valid) ..empty)))
+ (_.for [/.mock /.Simulation]
+ ($/.spec valid (..artifact "1.2.3-YES")
+ invalid (..artifact "4.5.6-NO")
+ (/.mock (..simulation valid) ..empty)))
))))