aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r--stdlib/source/test/lux/data/binary.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux8
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux12
-rw-r--r--stdlib/source/test/lux/data/collection/tree.lux10
-rw-r--r--stdlib/source/test/lux/data/collection/tree/finger.lux10
-rw-r--r--stdlib/source/test/lux/data/format/json.lux2
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux6
-rw-r--r--stdlib/source/test/lux/data/name.lux2
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux10
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux4
-rw-r--r--stdlib/source/test/lux/data/text/format.lux4
14 files changed, 54 insertions, 54 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 331e05142..9d843b540 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -93,7 +93,7 @@
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
(_.cover [/.aggregate]
- (n.= (\ list.fold fold n.+ 0 (..as_list sample))
+ (n.= (\ list.mix mix n.+ 0 (..as_list sample))
(/.aggregate n.+ 0 sample)))
(_.cover [/.empty]
@@ -142,7 +142,7 @@
false
(#.Item head tail)
- (n.= (list.fold n.+ 0 tail)
+ (n.= (list.mix n.+ 0 tail)
(/.aggregate n.+ 0 (/.after 1 sample))))))
(_.cover [/.copy]
(and (case (/.copy size 0 sample 0 (/.empty size))
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index 4045c008a..c7fad1619 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -7,7 +7,7 @@
[\\specification
["$." equivalence]
["$." monoid]
- ["$." fold]
+ ["$." mix]
["$." functor (#+ Injection)]]]
[control
["." maybe]]
@@ -43,8 +43,8 @@
($monoid.spec (/.equivalence n.equivalence) /.monoid (random.array size random.nat)))
(_.for [/.functor]
($functor.spec ..injection /.equivalence /.functor))
- (_.for [/.fold]
- ($fold.spec ..injection /.equivalence /.fold))
+ (_.for [/.mix]
+ ($mix.spec ..injection /.equivalence /.mix))
)))
(def: search
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index f635eca05..41139da07 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -9,7 +9,7 @@
["$." equivalence]
["$." hash]
["$." monoid]
- ["$." fold]
+ ["$." mix]
["$." functor]
["$." apply]
["$." monad]]]
@@ -56,8 +56,8 @@
($hash.spec (/.hash n.hash))))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid ..random))
- (_.for [/.fold]
- ($fold.spec /\in /.equivalence /.fold))
+ (_.for [/.mix]
+ ($mix.spec /\in /.equivalence /.mix))
(_.for [/.functor]
($functor.spec /\in /.equivalence /.functor))
(_.for [/.apply]
@@ -355,7 +355,7 @@
choose (: (-> Nat (Maybe Text))
(function (_ value)
(if (n.even? value)
- (#.Some (\ n.decimal encode value))
+ (#.Some (\ n.decimal encoded value))
#.None)))]
(do {! random.monad}
[sample ..random]
@@ -363,7 +363,7 @@
(_.cover [/.one]
(case [(|> sample
(/.only n.even?)
- (/\map (\ n.decimal encode))
+ (/\map (\ n.decimal encoded))
/.head)
(/.one choose sample)]
[(#.Some expected) (#.Some actual)]
@@ -378,7 +378,7 @@
(\ (/.equivalence text.equivalence) =
(|> sample
(/.only n.even?)
- (/\map (\ n.decimal encode)))
+ (/\map (\ n.decimal encoded)))
(/.all choose sample)))
(_.cover [/.example]
(case (/.example n.even? sample)
@@ -422,11 +422,11 @@
(#.Some (++ index))
#.None))
0)))))
- (_.cover [/.aggregates]
+ (_.cover [/.mixes]
(/\= (/\map (function (_ index)
- (\ /.fold fold n.+ 0 (/.first index sample)))
+ (\ /.mix mix n.+ 0 (/.first index sample)))
(/.indices (++ (/.size sample))))
- (/.aggregates n.+ 0 sample)))
+ (/.mixes n.+ 0 sample)))
(do random.monad
[expected random.nat
.let [(^open "/\.") (/.equivalence n.equivalence)]]
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 9be7c183f..1e199d23e 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -19,12 +19,12 @@
(-> Nat (Random (Queue Nat)))
(do {! random.monad}
[inputs (random.list size random.nat)]
- (monad.fold ! (function (_ head tail)
- (do !
- [priority random.nat]
- (in (/.end priority head tail))))
- /.empty
- inputs)))
+ (monad.mix ! (function (_ head tail)
+ (do !
+ [priority random.nat]
+ (in (/.end priority head tail))))
+ /.empty
+ inputs)))
(def: .public test
Test
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 8e8348617..a8ff3a7ab 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -7,7 +7,7 @@
[\\specification
["$." equivalence]
["$." monoid]
- ["$." fold]
+ ["$." mix]
["$." functor (#+ Injection)]
["$." apply]
["$." monad]]]
@@ -17,7 +17,7 @@
[data
["." bit ("#\." equivalence)]
[collection
- ["." list ("#\." fold)]
+ ["." list ("#\." mix)]
["." set]]]
[math
["." random]
@@ -35,8 +35,8 @@
($equivalence.spec (/.equivalence n.equivalence) (random.row size random.nat)))
(_.for [/.monoid]
($monoid.spec (/.equivalence n.equivalence) /.monoid (random.row size random.nat)))
- (_.for [/.fold]
- ($fold.spec /\in /.equivalence /.fold))
+ (_.for [/.mix]
+ ($mix.spec /\in /.equivalence /.mix))
(_.for [/.functor]
($functor.spec /\in /.equivalence /.functor))
(_.for [/.apply]
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 4ca359ddb..0afe973ef 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -13,7 +13,7 @@
["." bit ("#\." equivalence)]
[collection
["." set]
- ["." list ("#\." fold)]]]
+ ["." list ("#\." mix)]]]
[math
["." random (#+ Random)]
[number
@@ -30,11 +30,11 @@
(do {! random.monad}
[elements (random.set hash size element)
element_counts (random.list size ..count)]
- (in (list\fold (function (_ [count element] set)
- (/.has count element set))
- (/.empty hash)
- (list.zipped/2 element_counts
- (set.list elements))))))
+ (in (list\mix (function (_ [count element] set)
+ (/.has count element set))
+ (/.empty hash)
+ (list.zipped/2 element_counts
+ (set.list elements))))))
(def: signature
Test
diff --git a/stdlib/source/test/lux/data/collection/tree.lux b/stdlib/source/test/lux/data/collection/tree.lux
index 986ef566e..be610c25d 100644
--- a/stdlib/source/test/lux/data/collection/tree.lux
+++ b/stdlib/source/test/lux/data/collection/tree.lux
@@ -6,12 +6,12 @@
["." monad (#+ do)]
[\\specification
["$." equivalence]
- ["$." fold]
+ ["$." mix]
["$." functor]]]
[data
["." product]
[collection
- ["." list ("#\." functor fold)]]]
+ ["." list ("#\." functor mix)]]]
[math
["." random (#+ Random)]
[number
@@ -27,7 +27,7 @@
children (random.list num_children (tree gen_value))]
(in [(|> children
(list\map product.left)
- (list\fold n.+ 1))
+ (list\mix n.+ 1))
{#/.value value
#/.children (list\map product.right children)}])))
@@ -40,8 +40,8 @@
(|> (..tree random.nat)
(\ random.monad map product.right)
($equivalence.spec (/.equivalence n.equivalence))))
- (_.for [/.fold]
- ($fold.spec /.leaf /.equivalence /.fold))
+ (_.for [/.mix]
+ ($mix.spec /.leaf /.equivalence /.mix))
(_.for [/.functor]
($functor.spec /.leaf /.equivalence /.functor))
diff --git a/stdlib/source/test/lux/data/collection/tree/finger.lux b/stdlib/source/test/lux/data/collection/tree/finger.lux
index 370a39a53..53631edbf 100644
--- a/stdlib/source/test/lux/data/collection/tree/finger.lux
+++ b/stdlib/source/test/lux/data/collection/tree/finger.lux
@@ -9,7 +9,7 @@
[data
["." text ("#\." equivalence monoid)]
[collection
- ["." list ("#\." fold)]]]
+ ["." list ("#\." mix)]]]
[math
["." random]
[number
@@ -86,10 +86,10 @@
values/H random.nat
values/T (random.list 5 random.nat)]
(_.cover [/.tags /.values]
- (let [tree (list\fold (function (_ [tag value] tree)
- (\ builder branch tree (\ builder leaf tag value)))
- (\ builder leaf tags/H values/H)
- (list.zipped/2 tags/T values/T))]
+ (let [tree (list\mix (function (_ [tag value] tree)
+ (\ builder branch tree (\ builder leaf tag value)))
+ (\ builder leaf tags/H values/H)
+ (list.zipped/2 tags/T values/T))]
(and (\ tags_equivalence = (list& tags/H tags/T) (/.tags tree))
(\ values_equivalence = (list& values/H values/T) (/.values tree))))))
(_.cover [/.one]
diff --git a/stdlib/source/test/lux/data/format/json.lux b/stdlib/source/test/lux/data/format/json.lux
index 33b2622f4..9e5a03843 100644
--- a/stdlib/source/test/lux/data/format/json.lux
+++ b/stdlib/source/test/lux/data/format/json.lux
@@ -84,7 +84,7 @@
(_.cover [/.format]
(|> expected
/.format
- (\ /.codec decode)
+ (\ /.codec decoded)
(try\map (\= expected))
(try.else false))))
(do random.monad
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index 9bed1f5ed..7a84f12fd 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -22,7 +22,7 @@
["#/." block]]]
[collection
["." row]
- ["." list ("#\." fold)]]
+ ["." list ("#\." mix)]]
["." format #_
["#" binary]]]
[time
@@ -165,7 +165,7 @@
.let [content (|> chunk
(list.repeated chunks)
text.together
- (\ utf8.codec encode))]]
+ (\ utf8.codec encoded))]]
(`` ($_ _.and
(~~ (template [<type> <tag>]
[(_.cover [<type>]
@@ -245,7 +245,7 @@
(do {! random.monad}
[path (random.ascii/lower 10)
modes (random.list 4 ..random_mode)
- .let [expected_mode (list\fold /.and /.none modes)]]
+ .let [expected_mode (list\mix /.and /.none modes)]]
(`` ($_ _.and
(_.cover [/.and]
(|> (do try.monad
diff --git a/stdlib/source/test/lux/data/name.lux b/stdlib/source/test/lux/data/name.lux
index 2856d3476..0a882efaf 100644
--- a/stdlib/source/test/lux/data/name.lux
+++ b/stdlib/source/test/lux/data/name.lux
@@ -52,7 +52,7 @@
(let [(^open "/\.") /.codec]
(_.test "Encoding an name without a module component results in text equal to the short of the name."
(if (text.empty? module1)
- (text\= short1 (/\encode name1))
+ (text\= short1 (/\encoded name1))
#1)))))
(_.cover [/.module /.short]
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 432e98257..ca28e316d 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -12,7 +12,7 @@
[data
["." text ("#\." equivalence)]
[collection
- ["." list ("#\." fold)]
+ ["." list ("#\." mix)]
["." set]]]
[macro
["." template]]
@@ -193,10 +193,10 @@
(list.together (list <named>)))
(def: unique_encodings
- (list\fold (function (_ encoding set)
- (set.has (/.name encoding) set))
- (set.empty text.hash)
- ..all_encodings))
+ (list\mix (function (_ encoding set)
+ (set.has (/.name encoding) set))
+ (set.empty text.hash)
+ ..all_encodings))
(def: verdict
(n.= (list.size ..all_encodings)
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index 707a06996..49b125cba 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -138,7 +138,7 @@
(\ ! map (n.% (hex "1000"))))
code (|> (random.unicode 4)
(random.only (function (_ code)
- (case (\ n.hex decode code)
+ (case (\ n.hex decoded code)
(#try.Failure error) true
(#try.Success _) false))))]
(_.cover [/.invalid_unicode_escape]
@@ -149,7 +149,7 @@
(#try.Failure error)
(exception.match? /.invalid_unicode_escape error))]]
- (and (!invalid (\ n.hex encode too_short))
+ (and (!invalid (\ n.hex encoded too_short))
(!invalid code)))))
(_.cover [/.literal]
(with_expansions [<example> (..static_sample)]
diff --git a/stdlib/source/test/lux/data/text/format.lux b/stdlib/source/test/lux/data/text/format.lux
index 24746c45d..cbeedd65a 100644
--- a/stdlib/source/test/lux/data/text/format.lux
+++ b/stdlib/source/test/lux/data/text/format.lux
@@ -76,7 +76,7 @@
[(do random.monad
[sample <random>]
(_.cover [<format>]
- (text\= (\ <codec> encode sample)
+ (text\= (\ <codec> encoded sample)
(<format> sample))))]
[/.bit bit.codec random.bit]
@@ -180,6 +180,6 @@
sample (\ ! map (modular.modular modulus)
random.int)]
(_.cover [/.mod]
- (text\= (\ (modular.codec modulus) encode sample)
+ (text\= (\ (modular.codec modulus) encoded sample)
(/.mod sample))))
))))