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.lux20
-rw-r--r--stdlib/source/test/lux/data/collection/array.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/bits.lux6
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary.lux18
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/ordered.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/dictionary/plist.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/list.lux22
-rw-r--r--stdlib/source/test/lux/data/collection/queue.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/queue/priority.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/row.lux28
-rw-r--r--stdlib/source/test/lux/data/collection/sequence.lux54
-rw-r--r--stdlib/source/test/lux/data/collection/set.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/multi.lux2
-rw-r--r--stdlib/source/test/lux/data/collection/set/ordered.lux4
-rw-r--r--stdlib/source/test/lux/data/collection/tree/zipper.lux4
-rw-r--r--stdlib/source/test/lux/data/color.lux6
-rw-r--r--stdlib/source/test/lux/data/color/named.lux14
-rw-r--r--stdlib/source/test/lux/data/format/tar.lux22
-rw-r--r--stdlib/source/test/lux/data/product.lux8
-rw-r--r--stdlib/source/test/lux/data/sum.lux6
-rw-r--r--stdlib/source/test/lux/data/text.lux24
-rw-r--r--stdlib/source/test/lux/data/text/buffer.lux12
-rw-r--r--stdlib/source/test/lux/data/text/encoding.lux2
-rw-r--r--stdlib/source/test/lux/data/text/escape.lux6
-rw-r--r--stdlib/source/test/lux/data/text/unicode/block.lux10
-rw-r--r--stdlib/source/test/lux/data/text/unicode/set.lux4
26 files changed, 147 insertions, 147 deletions
diff --git a/stdlib/source/test/lux/data/binary.lux b/stdlib/source/test/lux/data/binary.lux
index 372aed7de..331e05142 100644
--- a/stdlib/source/test/lux/data/binary.lux
+++ b/stdlib/source/test/lux/data/binary.lux
@@ -39,7 +39,7 @@
(do random.monad
[byte random.nat]
(exec (try.trusted (/.write/8! idx byte output))
- (recur (inc idx))))
+ (recur (++ idx))))
(\ random.monad in output)))))
(def: (throws? exception try)
@@ -56,8 +56,8 @@
(let [bytes (i64.left_shifted power 1)
binary (/.empty bytes)
cap (case bytes
- 8 (dec 0)
- _ (|> 1 (i64.left_shifted (n.* 8 bytes)) dec))
+ 8 (-- 0)
+ _ (|> 1 (i64.left_shifted (n.* 8 bytes)) --))
capped_value (i64.and cap value)]
(and (..succeed
(do try.monad
@@ -71,9 +71,9 @@
(def: as_list
(-> /.Binary (List Nat))
- (/.fold (function (_ head tail)
- (#.Item head tail))
- (list)))
+ (/.aggregate (function (_ head tail)
+ (#.Item head tail))
+ (list)))
(def: .public test
Test
@@ -92,9 +92,9 @@
($equivalence.spec /.equivalence (..random size)))
(_.for [/.monoid]
($monoid.spec /.equivalence /.monoid (..random size)))
- (_.cover [/.fold]
+ (_.cover [/.aggregate]
(n.= (\ list.fold fold n.+ 0 (..as_list sample))
- (/.fold n.+ 0 sample)))
+ (/.aggregate n.+ 0 sample)))
(_.cover [/.empty]
(\ /.equivalence =
@@ -117,7 +117,7 @@
idxs (: (List Nat)
(case length
0 (list)
- _ (enum.range n.enum 0 (dec length))))
+ _ (enum.range n.enum 0 (-- length))))
reader (function (_ binary idx)
(/.read/8! idx binary))]
(and (n.= length (/.size random_slice))
@@ -143,7 +143,7 @@
(#.Item head tail)
(n.= (list.fold n.+ 0 tail)
- (/.fold n.+ 0 (/.after 1 sample))))))
+ (/.aggregate n.+ 0 (/.after 1 sample))))))
(_.cover [/.copy]
(and (case (/.copy size 0 sample 0 (/.empty size))
(#try.Success output)
diff --git a/stdlib/source/test/lux/data/collection/array.lux b/stdlib/source/test/lux/data/collection/array.lux
index c1e1471f8..4045c008a 100644
--- a/stdlib/source/test/lux/data/collection/array.lux
+++ b/stdlib/source/test/lux/data/collection/array.lux
@@ -169,14 +169,14 @@
_
false)))
(do !
- [occupancy (\ ! map (n.% (inc size)) random.nat)]
+ [occupancy (\ ! map (n.% (++ size)) random.nat)]
(_.cover [/.occupancy /.vacancy]
(let [the_array (loop [output (: (Array Nat)
(/.empty size))
idx 0]
(if (n.< occupancy idx)
(recur (/.write! idx expected output)
- (inc idx))
+ (++ idx))
output))]
(and (n.= occupancy (/.occupancy the_array))
(n.= size (n.+ (/.occupancy the_array)
@@ -189,7 +189,7 @@
(|> the_array /.list /.of_list
(\ (/.equivalence n.equivalence) = the_array)))))
(do !
- [amount (\ ! map (n.% (inc size)) random.nat)]
+ [amount (\ ! map (n.% (++ size)) random.nat)]
(_.cover [/.copy!]
(let [copy (: (Array Nat)
(/.empty size))]
diff --git a/stdlib/source/test/lux/data/collection/bits.lux b/stdlib/source/test/lux/data/collection/bits.lux
index 6710ef7c6..c0e54e3bb 100644
--- a/stdlib/source/test/lux/data/collection/bits.lux
+++ b/stdlib/source/test/lux/data/collection/bits.lux
@@ -17,7 +17,7 @@
(def: (size min max)
(-> Nat Nat (Random Nat))
(|> random.nat
- (\ random.monad map (|>> (n.% (inc max)) (n.max min)))))
+ (\ random.monad map (|>> (n.% (++ max)) (n.max min)))))
(def: .public random
(Random Bits)
@@ -47,7 +47,7 @@
(/.empty? /.empty))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 1,000) inc) random.nat)
+ [size (\ ! map (|>> (n.% 1,000) ++) random.nat)
idx (\ ! map (n.% size) random.nat)
sample ..random]
($_ _.and
@@ -73,7 +73,7 @@
/.empty))
(/.intersects? (/.one idx /.empty)
(/.one idx /.empty))
- (not (/.intersects? (/.one (inc idx) /.empty)
+ (not (/.intersects? (/.one (++ idx) /.empty)
(/.one idx /.empty)))
(not (/.intersects? sample (/.not sample)))))
(_.cover [/.not]
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux
index 080e09001..446c4e354 100644
--- a/stdlib/source/test/lux/data/collection/dictionary.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary.lux
@@ -112,7 +112,7 @@
(let [merging_with_oneself (let [(^open ".") (/.equivalence n.equivalence)]
(= dict (/.merged dict dict)))
overwritting_keys (let [dict' (|> dict /.entries
- (list\map (function (_ [k v]) [k (inc v)]))
+ (list\map (function (_ [k v]) [k (++ v)]))
(/.of_list n.hash))
(^open ".") (/.equivalence n.equivalence)]
(= dict' (/.merged dict' dict)))]
@@ -155,7 +155,7 @@
_ true)))
(_.cover [/.has]
- (and (n.= (inc (/.size dict))
+ (and (n.= (++ (/.size dict))
(/.size (/.has non_key test_val dict)))
(case (/.value non_key (/.has non_key test_val dict))
(#.Some v) (n.= test_val v)
@@ -193,24 +193,24 @@
true
(#.Some known_key)
- (n.= (dec (/.size dict))
+ (n.= (-- (/.size dict))
(/.size (/.lacks known_key dict))))))
(_.cover [/.revised]
(let [base (/.has non_key test_val dict)
- updt (/.revised non_key inc base)]
+ updt (/.revised non_key ++ base)]
(case [(/.value non_key base) (/.value non_key updt)]
[(#.Some x) (#.Some y)]
- (n.= (inc x) y)
+ (n.= (++ x) y)
_
false)))
(_.cover [/.revised']
(let [can_upsert_new_key!
- (case (/.value non_key (/.revised' non_key test_val inc dict))
+ (case (/.value non_key (/.revised' non_key test_val ++ dict))
(#.Some inserted)
- (n.= (inc test_val) inserted)
+ (n.= (++ test_val) inserted)
#.None
false)
@@ -221,9 +221,9 @@
true
(#.Some [known_key known_value])
- (case (/.value known_key (/.revised' known_key test_val inc dict))
+ (case (/.value known_key (/.revised' known_key test_val ++ dict))
(#.Some updated)
- (n.= (inc known_value) updated)
+ (n.= (++ known_value) updated)
#.None
false))]
diff --git a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
index 838d2cf5d..7f6178f8e 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/ordered.lux
@@ -32,7 +32,7 @@
_
(do random.monad
- [partial (dictionary order gen_key gen_value (dec size))
+ [partial (dictionary order gen_key gen_value (-- size))
key (random.only (|>> (/.key? partial) not)
gen_key)
value gen_value]
@@ -111,7 +111,7 @@
(and (not (/.key? sample extra_key))
(let [sample+ (/.has extra_key extra_value sample)]
(and (/.key? sample+ extra_key)
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+))))))
(_.cover [/.value]
(let [sample+ (/.has extra_key extra_value sample)]
diff --git a/stdlib/source/test/lux/data/collection/dictionary/plist.lux b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
index c76892185..2172fbd44 100644
--- a/stdlib/source/test/lux/data/collection/dictionary/plist.lux
+++ b/stdlib/source/test/lux/data/collection/dictionary/plist.lux
@@ -69,7 +69,7 @@
(let [sample+ (/.has extra_key extra_value sample)]
(and (not (/.contains? extra_key sample))
(/.contains? extra_key sample+)
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+)))))
(_.cover [/.value]
(|> sample
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux
index 8ba430845..f635eca05 100644
--- a/stdlib/source/test/lux/data/collection/list.lux
+++ b/stdlib/source/test/lux/data/collection/list.lux
@@ -146,7 +146,7 @@
(/.sorted n.< indices))
expected_numbers!
- (/.every? (n.= (dec size))
+ (/.every? (n.= (-- size))
(/.zipped_with/2 n.+
indices
(/.sorted n.> indices)))]
@@ -185,7 +185,7 @@
..random)
.let [size (/.size sample)]
idx (\ ! map (n.% size) random.nat)
- sub_size (\ ! map (|>> (n.% size) inc) random.nat)]
+ sub_size (\ ! map (|>> (n.% size) ++) random.nat)]
($_ _.and
(_.cover [/.only]
(let [positives (/.only n.even? sample)
@@ -222,7 +222,7 @@
(let [subs (/.sub sub_size sample)]
(and (/.every? (|>> /.size (n.<= sub_size)) subs)
(/\= sample
- (/.joined subs)))))
+ (/.together subs)))))
))))
(def: member
@@ -341,11 +341,11 @@
((/.zipped_with 2) +/2 sample/0 sample/1))
(/\= (/.zipped_with/3 +/3 sample/0 sample/1 sample/2)
((/.zipped_with 3) +/3 sample/0 sample/1 sample/2))))
- (_.cover [/.joined]
+ (_.cover [/.together]
(and (/\= (/\compose sample/0 sample/1)
- (/.joined (list sample/0 sample/1)))
+ (/.together (list sample/0 sample/1)))
(/\= ($_ /\compose sample/0 sample/1 sample/2)
- (/.joined (list sample/0 sample/1 sample/2)))))
+ (/.together (list sample/0 sample/1 sample/2)))))
))))
(def: search
@@ -410,7 +410,7 @@
(_.cover [/.interposed]
(or (/.empty? sample)
(let [sample+ (/.interposed separator sample)]
- (and (n.= (|> (/.size sample) (n.* 2) dec)
+ (and (n.= (|> (/.size sample) (n.* 2) --)
(/.size sample+))
(|> sample+ /.pairs (/.every? (|>> product.right (n.= separator))))))))
(_.cover [/.iterations]
@@ -419,14 +419,14 @@
(/\= (/.indices size)
(/.iterations (function (_ index)
(if (n.< size index)
- (#.Some (inc index))
+ (#.Some (++ index))
#.None))
0)))))
- (_.cover [/.folds]
+ (_.cover [/.aggregates]
(/\= (/\map (function (_ index)
(\ /.fold fold n.+ 0 (/.first index sample)))
- (/.indices (inc (/.size sample))))
- (/.folds n.+ 0 sample)))
+ (/.indices (++ (/.size sample))))
+ (/.aggregates n.+ 0 sample)))
(do random.monad
[expected random.nat
.let [(^open "/\.") (/.equivalence n.equivalence)]]
diff --git a/stdlib/source/test/lux/data/collection/queue.lux b/stdlib/source/test/lux/data/collection/queue.lux
index 5fcec5102..cdb7198b5 100644
--- a/stdlib/source/test/lux/data/collection/queue.lux
+++ b/stdlib/source/test/lux/data/collection/queue.lux
@@ -81,7 +81,7 @@
(let [pushed (/.end non_member sample)
size_increases!
- (n.= (inc (/.size sample)) (/.size pushed))
+ (n.= (++ (/.size sample)) (/.size pushed))
new_member_is_identified!
(/.member? n.equivalence pushed non_member)
@@ -99,7 +99,7 @@
(let [popped (/.next sample)
size_decreases!
- (n.= (dec (/.size sample))
+ (n.= (-- (/.size sample))
(/.size popped))
popped_member_is_not_identified!
diff --git a/stdlib/source/test/lux/data/collection/queue/priority.lux b/stdlib/source/test/lux/data/collection/queue/priority.lux
index 4faaaf488..9be7c183f 100644
--- a/stdlib/source/test/lux/data/collection/queue/priority.lux
+++ b/stdlib/source/test/lux/data/collection/queue/priority.lux
@@ -64,14 +64,14 @@
(_.cover [/.end]
(let [sample+ (/.end non_member_priority non_member sample)]
(and (not (/.member? n.equivalence sample non_member))
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size sample+))
(/.member? n.equivalence sample+ non_member))))
(_.cover [/.next]
(let [sample- (/.next sample)]
(or (and (/.empty? sample)
(/.empty? sample-))
- (n.= (dec (/.size sample))
+ (n.= (-- (/.size sample))
(/.size sample-)))))
(_.for [/.Priority]
($_ _.and
diff --git a/stdlib/source/test/lux/data/collection/row.lux b/stdlib/source/test/lux/data/collection/row.lux
index 2515f284f..8e8348617 100644
--- a/stdlib/source/test/lux/data/collection/row.lux
+++ b/stdlib/source/test/lux/data/collection/row.lux
@@ -81,7 +81,7 @@
(def: index_based
Test
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 100) ++) random.nat)]
($_ _.and
(do !
[good_index (|> random.nat (\ ! map (n.% size)))
@@ -108,9 +108,9 @@
(<| (try.else false)
(do try.monad
[sample (/.has good_index non_member sample)
- sample (/.revised good_index inc sample)
+ sample (/.revised good_index ++ sample)
actual (/.item good_index sample)]
- (in (n.= (inc non_member) actual)))))
+ (in (n.= (++ non_member) actual)))))
(_.cover [/.within_bounds?]
(and (/.within_bounds? sample good_index)
(not (/.within_bounds? sample bad_index))))
@@ -125,7 +125,7 @@
(exception.match? /.index_out_of_bounds error))))]
(and (fails! (/.item bad_index sample))
(fails! (/.has bad_index non_member sample))
- (fails! (/.revised bad_index inc sample)))))
+ (fails! (/.revised bad_index ++ sample)))))
))
)))
@@ -134,7 +134,7 @@
(<| (_.covering /._)
(_.for [/.Row])
(do {! random.monad}
- [size (\ ! map (|>> (n.% 100) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 100) ++) random.nat)]
($_ _.and
..signatures
..whole
@@ -158,28 +158,28 @@
(and (list.every? (/.member? n.equivalence sample)
(/.list sample))
(not (/.member? n.equivalence sample non_member))))
- (_.cover [/.add]
- (let [added (/.add non_member sample)
+ (_.cover [/.suffix]
+ (let [added (/.suffix non_member sample)
size_increases!
- (n.= (inc (/.size sample))
+ (n.= (++ (/.size sample))
(/.size added))
is_a_member!
(/.member? n.equivalence added non_member)]
(and size_increases!
is_a_member!)))
- (_.cover [/.pop]
+ (_.cover [/.prefix]
(if (/.empty? sample)
- (/.empty? (/.pop sample))
+ (/.empty? (/.prefix sample))
(let [expected_size!
- (n.= (dec (/.size sample))
- (/.size (/.pop sample)))
+ (n.= (-- (/.size sample))
+ (/.size (/.prefix sample)))
symmetry!
(|> sample
- (/.add non_member)
- /.pop
+ (/.suffix non_member)
+ /.prefix
(/\= sample))]
(and expected_size!
symmetry!))))
diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux
index ebac1772b..fc67cf27d 100644
--- a/stdlib/source/test/lux/data/collection/sequence.lux
+++ b/stdlib/source/test/lux/data/collection/sequence.lux
@@ -46,7 +46,7 @@
(do {! random.monad}
[repeated random.nat
index (\ ! map (n.% 100) random.nat)
- size (\ ! map (|>> (n.% 10) inc) random.nat)
+ size (\ ! map (|>> (n.% 10) ++) random.nat)
offset (\ ! map (n.% 100) random.nat)
cycle_start random.nat
cycle_next (random.list size random.nat)]
@@ -58,65 +58,65 @@
(_.cover [/.item]
(n.= (n.+ offset index)
- (/.item index (..iterations inc offset))))
+ (/.item index (..iterations ++ offset))))
(_.cover [/.repeated]
(n.= repeated
(/.item index (/.repeated repeated))))
(_.cover [/.first]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
- (/.first size (..iterations inc offset))))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (/.first size (..iterations ++ offset))))
(_.cover [/.after]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
- (/.first size (/.after offset (..iterations inc 0)))))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
+ (/.first size (/.after offset (..iterations ++ 0)))))
(_.cover [/.split_at]
- (let [[drops takes] (/.split_at size (..iterations inc 0))]
- (and (list\= (enum.range n.enum 0 (dec size))
+ (let [[drops takes] (/.split_at size (..iterations ++ 0))]
+ (and (list\= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (dec (n.* 2 size)))
+ (list\= (enum.range n.enum size (-- (n.* 2 size)))
(/.first size takes)))))
(_.cover [/.while]
- (list\= (enum.range n.enum 0 (dec size))
- (/.while (n.< size) (..iterations inc 0))))
+ (list\= (enum.range n.enum 0 (-- size))
+ (/.while (n.< size) (..iterations ++ 0))))
(_.cover [/.until]
- (list\= (enum.range n.enum offset (dec (n.+ size offset)))
+ (list\= (enum.range n.enum offset (-- (n.+ size offset)))
(/.while (n.< (n.+ size offset))
- (/.until (n.< offset) (..iterations inc 0)))))
+ (/.until (n.< offset) (..iterations ++ 0)))))
(_.cover [/.split_when]
- (let [[drops takes] (/.split_when (n.= size) (..iterations inc 0))]
- (and (list\= (enum.range n.enum 0 (dec size))
+ (let [[drops takes] (/.split_when (n.= size) (..iterations ++ 0))]
+ (and (list\= (enum.range n.enum 0 (-- size))
drops)
- (list\= (enum.range n.enum size (dec (n.* 2 size)))
+ (list\= (enum.range n.enum size (-- (n.* 2 size)))
(/.while (n.< (n.* 2 size)) takes)))))
(_.cover [/.head]
(n.= offset
- (/.head (..iterations inc offset))))
+ (/.head (..iterations ++ offset))))
(_.cover [/.tail]
- (list\= (enum.range n.enum (inc offset) (n.+ size offset))
- (/.first size (/.tail (..iterations inc offset)))))
+ (list\= (enum.range n.enum (++ offset) (n.+ size offset))
+ (/.first size (/.tail (..iterations ++ offset)))))
(_.cover [/.only]
- (list\= (list\map (n.* 2) (enum.range n.enum 0 (dec size)))
- (/.first size (/.only n.even? (..iterations inc 0)))))
+ (list\= (list\map (n.* 2) (enum.range n.enum 0 (-- size)))
+ (/.first size (/.only n.even? (..iterations ++ 0)))))
(_.cover [/.partition]
- (let [[evens odds] (/.partition n.even? (..iterations inc 0))]
+ (let [[evens odds] (/.partition n.even? (..iterations ++ 0))]
(and (n.= (n.* 2 offset)
(/.item offset evens))
- (n.= (inc (n.* 2 offset))
+ (n.= (++ (n.* 2 offset))
(/.item offset odds)))))
(_.cover [/.iterations]
(let [(^open "/\.") /.functor
(^open "list\.") (list.equivalence text.equivalence)]
(list\= (/.first size
- (/\map %.nat (..iterations inc offset)))
+ (/\map %.nat (..iterations ++ offset)))
(/.first size
- (/.iterations (function (_ n) [(inc n) (%.nat n)])
+ (/.iterations (function (_ n) [(++ n) (%.nat n)])
offset)))))
(_.cover [/.cycle]
(let [cycle (list& cycle_start cycle_next)]
- (list\= (list.joined (list.repeated size cycle))
+ (list\= (list.together (list.repeated size cycle))
(/.first (n.* size (list.size cycle))
(/.cycle [cycle_start cycle_next])))))
(_.cover [/.^sequence&]
- (let [(/.^sequence& first second third next) (..iterations inc offset)]
+ (let [(/.^sequence& first second third next) (..iterations ++ offset)]
(and (n.= offset first)
(n.= (n.+ 1 offset) second)
(n.= (n.+ 2 offset) third))))
diff --git a/stdlib/source/test/lux/data/collection/set.lux b/stdlib/source/test/lux/data/collection/set.lux
index e6dbd5c3d..66ecd0ca3 100644
--- a/stdlib/source/test/lux/data/collection/set.lux
+++ b/stdlib/source/test/lux/data/collection/set.lux
@@ -80,7 +80,7 @@
(/.member? (/.has non_memberL setL) non_memberL)
size_increase!
- (n.= (inc (/.size setL))
+ (n.= (++ (/.size setL))
(/.size (/.has non_memberL setL)))]
(and before_addition!
after_addition!)))
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux
index 09c7c2cd5..4ca359ddb 100644
--- a/stdlib/source/test/lux/data/collection/set/multi.lux
+++ b/stdlib/source/test/lux/data/collection/set/multi.lux
@@ -23,7 +23,7 @@
(def: count
(Random Nat)
- (\ random.monad map (|>> (n.% 10) inc) random.nat))
+ (\ random.monad map (|>> (n.% 10) ++) random.nat))
(def: .public (random size hash count element)
(All [a] (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a))))
diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux
index 725c4b3c0..b753ac1af 100644
--- a/stdlib/source/test/lux/data/collection/set/ordered.lux
+++ b/stdlib/source/test/lux/data/collection/set/ordered.lux
@@ -31,7 +31,7 @@
_
(do random.monad
- [partial (random (dec size) &order gen_value)
+ [partial (random (-- size) &order gen_value)
value (random.only (|>> (/.member? partial) not)
gen_value)]
(in (/.has value partial)))))
@@ -95,7 +95,7 @@
(let [setL+ (/.has non_memberL setL)]
(and (not (/.member? setL non_memberL))
(/.member? setL+ non_memberL)
- (n.= (inc (/.size setL))
+ (n.= (++ (/.size setL))
(/.size setL+)))))
(_.cover [/.lacks]
(|> setL
diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux
index a4e73fb03..2b20582e9 100644
--- a/stdlib/source/test/lux/data/collection/tree/zipper.lux
+++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux
@@ -188,9 +188,9 @@
(n.= expected)))
(_.cover [/.update]
(|> (/.zipper (tree.leaf expected))
- (/.update inc)
+ (/.update ++)
/.value
- (n.= (inc expected))))
+ (n.= (++ expected))))
..move
(_.cover [/.end?]
(or (/.end? (/.zipper sample))
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux
index a4fc0911e..67158dc10 100644
--- a/stdlib/source/test/lux/data/color.lux
+++ b/stdlib/source/test/lux/data/color.lux
@@ -135,7 +135,7 @@
random.safe_frac)
.let [eS +0.5]
variations (\ ! map (|>> (n.% 3) (n.+ 2)) random.nat)
- .let [max_spread (f./ (|> variations inc .int int.frac)
+ .let [max_spread (f./ (|> variations ++ .int int.frac)
+1.0)
min_spread (f./ +2.0 max_spread)
spread_space (f.- min_spread max_spread)]
@@ -206,8 +206,8 @@
(_.for [/.Alpha /.Pigment]
($_ _.and
(_.cover [/.transparent /.opaque]
- (and (r.= /.opaque (dec /.transparent))
- (r.= /.transparent (inc /.opaque))))
+ (and (r.= /.opaque (-- /.transparent))
+ (r.= /.transparent (++ /.opaque))))
(_.cover [/.translucent]
(r.= /.transparent (r.+ /.translucent /.translucent)))
))
diff --git a/stdlib/source/test/lux/data/color/named.lux b/stdlib/source/test/lux/data/color/named.lux
index aaf1fcab8..4e400e99c 100644
--- a/stdlib/source/test/lux/data/color/named.lux
+++ b/stdlib/source/test/lux/data/color/named.lux
@@ -201,13 +201,13 @@
/.yellow_green]]
)]
(def: all_colors
- (list.joined (`` (list (~~ (template [<definition> <by_letter>]
- [((: (-> Any (List //.Color))
- (function (_ _)
- (`` (list (~~ (template.spliced <by_letter>))))))
- 123)]
-
- <colors>))))))
+ (list.together (`` (list (~~ (template [<definition> <by_letter>]
+ [((: (-> Any (List //.Color))
+ (function (_ _)
+ (`` (list (~~ (template.spliced <by_letter>))))))
+ 123)]
+
+ <colors>))))))
(def: unique_colors
(set.of_list //.hash ..all_colors))
diff --git a/stdlib/source/test/lux/data/format/tar.lux b/stdlib/source/test/lux/data/format/tar.lux
index fe0083c95..9bed1f5ed 100644
--- a/stdlib/source/test/lux/data/format/tar.lux
+++ b/stdlib/source/test/lux/data/format/tar.lux
@@ -41,7 +41,7 @@
(_.for [/.Path]
(do {! random.monad}
[expected (random.ascii/lower /.path_size)
- invalid (random.ascii/lower (inc /.path_size))
+ invalid (random.ascii/lower (++ /.path_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.path_size)]
(`` ($_ _.and
@@ -76,7 +76,7 @@
(_.for [/.Name]
(do {! random.monad}
[expected (random.ascii/lower /.name_size)
- invalid (random.ascii/lower (inc /.name_size))
+ invalid (random.ascii/lower (++ /.name_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.name_size)]
(`` ($_ _.and
@@ -157,14 +157,14 @@
(def: entry
Test
(do {! random.monad}
- [expected_path (random.ascii/lower (dec /.path_size))
+ [expected_path (random.ascii/lower (-- /.path_size))
expected_moment (\ ! map (|>> (n.% 1,0,00,00,00,00,000) .int instant.of_millis)
random.nat)
chunk (random.ascii/lower chunk_size)
chunks (\ ! map (n.% 100) random.nat)
.let [content (|> chunk
(list.repeated chunks)
- text.joined
+ text.together
(\ utf8.codec encode))]]
(`` ($_ _.and
(~~ (template [<type> <tag>]
@@ -317,7 +317,7 @@
(do {! random.monad}
[path (random.ascii/lower /.path_size)
expected (random.ascii/lower /.name_size)
- invalid (random.ascii/lower (inc /.name_size))
+ invalid (random.ascii/lower (++ /.name_size))
not_ascii (random.text (random.char (unicode.set [unicode/block.katakana (list)]))
/.name_size)]
(_.for [/.Ownership /.Owner /.ID]
@@ -354,9 +354,9 @@
(in (case (row.list tar)
(^ (list (#/.Normal [_ _ _ actual_ownership _])))
(and (text\= (/.from_name expected)
- (/.from_name (get@ [#/.user #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.user #/.name] actual_ownership)))
(text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.group #/.name] actual_ownership))))
+ (/.from_name (value@ [#/.group #/.name] actual_ownership))))
_
false)))
@@ -378,13 +378,13 @@
(in (case (row.list tar)
(^ (list (#/.Normal [_ _ _ actual_ownership _])))
(and (text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.user #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.user #/.name] actual_ownership)))
(n.= (/.from_small /.no_id)
- (/.from_small (get@ [#/.user #/.id] actual_ownership)))
+ (/.from_small (value@ [#/.user #/.id] actual_ownership)))
(text\= (/.from_name /.anonymous)
- (/.from_name (get@ [#/.group #/.name] actual_ownership)))
+ (/.from_name (value@ [#/.group #/.name] actual_ownership)))
(n.= (/.from_small /.no_id)
- (/.from_small (get@ [#/.group #/.id] actual_ownership))))
+ (/.from_small (value@ [#/.group #/.id] actual_ownership))))
_
false)))
diff --git a/stdlib/source/test/lux/data/product.lux b/stdlib/source/test/lux/data/product.lux
index 9d9b9e248..b779678af 100644
--- a/stdlib/source/test/lux/data/product.lux
+++ b/stdlib/source/test/lux/data/product.lux
@@ -40,8 +40,8 @@
(n.= expected (/.left [expected dummy])))
(<| (_.cover [/.right])
(n.= expected (/.right [dummy expected])))
- (<| (_.cover [/.fork])
- (let [[left right] ((/.fork (n.+ shift) (n.- shift)) expected)]
+ (<| (_.cover [/.forked])
+ (let [[left right] ((/.forked (n.+ shift) (n.- shift)) expected)]
(and (n.= (n.+ shift expected)
left)
(n.= (n.- shift expected)
@@ -62,8 +62,8 @@
(<| (_.cover [/.curried])
(n.= (n.+ left right)
((/.curried (/.uncurried n.+)) left right)))
- (<| (_.cover [/.apply])
- (let [[left' right'] (/.apply (n.+ shift) (n.- shift) [left right])]
+ (<| (_.cover [/.then])
+ (let [[left' right'] (/.then (n.+ shift) (n.- shift) [left right])]
(and (n.= (n.+ shift left) left')
(n.= (n.- shift right) right'))))))
))))
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index ddb924273..61b9c43a1 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -60,14 +60,14 @@
(: (Or Nat Nat))
(/.either (n.+ shift) (n.- shift))
(n.= (n.- shift expected)))))
- (_.cover [/.apply]
+ (_.cover [/.then]
(and (|> (/.left expected)
(: (Or Nat Nat))
- (/.apply (n.+ shift) (n.- shift))
+ (/.then (n.+ shift) (n.- shift))
(case> (0 #0 actual) (n.= (n.+ shift expected) actual) _ false))
(|> (/.right expected)
(: (Or Nat Nat))
- (/.apply (n.+ shift) (n.- shift))
+ (/.then (n.+ shift) (n.- shift))
(case> (0 #1 actual) (n.= (n.- shift expected) actual) _ false))))
(do !
[size (\ ! map (n.% 5) random.nat)
diff --git a/stdlib/source/test/lux/data/text.lux b/stdlib/source/test/lux/data/text.lux
index aa012a5ae..51849d1af 100644
--- a/stdlib/source/test/lux/data/text.lux
+++ b/stdlib/source/test/lux/data/text.lux
@@ -57,7 +57,7 @@
left (random.unicode 1)
right (random.unicode 1)
.let [full (\ /.monoid compose inner outer)
- fake_index (dec 0)]]
+ fake_index (-- 0)]]
(`` ($_ _.and
(~~ (template [<affix> <predicate>]
[(_.cover [<affix> <predicate>]
@@ -83,7 +83,7 @@
[inner (random.unicode 1)
outer (random.only (|>> (\ /.equivalence = inner) not)
(random.unicode 1))
- .let [fake_index (dec 0)]]
+ .let [fake_index (-- 0)]]
($_ _.and
(_.cover [/.contains?]
(let [full (\ /.monoid compose inner outer)]
@@ -146,9 +146,9 @@
(\ /.equivalence = /.new_line /.line_feed))
)))
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) inc) random.nat)
+ [size (\ ! map (|>> (n.% 10) ++) random.nat)
characters (random.set /.hash size (random.ascii/alpha 1))
- .let [sample (|> characters set.list /.joined)]
+ .let [sample (|> characters set.list /.together)]
expected (\ ! map (n.% size) random.nat)]
(_.cover [/.char]
(case (/.char expected sample)
@@ -182,7 +182,7 @@
characters (random.set /.hash size (random.ascii/alpha 1))
separator (random.only (|>> (set.member? characters) not)
(random.ascii/alpha 1))
- .let [with_no_separator (|> characters set.list /.joined)]
+ .let [with_no_separator (|> characters set.list /.together)]
static (random.ascii/alpha 1)
.let [dynamic (random.only (|>> (\ /.equivalence = static) not)
(random.ascii/alpha 1))]
@@ -192,9 +192,9 @@
lower (random.ascii/lower 1)
upper (random.ascii/upper 1)]
($_ _.and
- (_.cover [/.joined]
+ (_.cover [/.together]
(n.= (set.size characters)
- (/.size (/.joined (set.list characters)))))
+ (/.size (/.together (set.list characters)))))
(_.cover [/.interposed /.all_split_by]
(and (|> (set.list characters)
(/.interposed separator)
@@ -202,7 +202,7 @@
(set.of_list /.hash)
(\ set.equivalence = characters))
(\ /.equivalence =
- (/.joined (set.list characters))
+ (/.together (set.list characters))
(/.interposed "" (set.list characters)))))
(_.cover [/.replaced/1]
(\ /.equivalence =
@@ -285,7 +285,7 @@
sampleL (random.unicode sizeL)
sampleR (random.unicode sizeR)
middle (random.unicode 1)
- .let [sample (/.joined (list sampleL sampleR))
+ .let [sample (/.together (list sampleL sampleR))
(^open "/\.") /.equivalence]]
($_ _.and
(_.cover [/.split_at]
@@ -293,7 +293,7 @@
(case> (#.Right [_l _r])
(and (/\= sampleL _l)
(/\= sampleR _r)
- (/\= sample (/.joined (list _l _r))))
+ (/\= sample (/.together (list _l _r))))
_
#0)))
@@ -323,8 +323,8 @@
.let [part_gen (|> (random.text normal_char_gen sizeP)
(random.only (|>> (/.contains? sep1) not)))]
parts (random.list sizeL part_gen)
- .let [sample1 (/.joined (list.interposed sep1 parts))
- sample2 (/.joined (list.interposed sep2 parts))
+ .let [sample1 (/.together (list.interposed sep1 parts))
+ sample2 (/.together (list.interposed sep2 parts))
(^open "/\.") /.equivalence]]
(_.cover [/.replaced]
(/\= sample2
diff --git a/stdlib/source/test/lux/data/text/buffer.lux b/stdlib/source/test/lux/data/text/buffer.lux
index 393a20779..7d502d2fb 100644
--- a/stdlib/source/test/lux/data/text/buffer.lux
+++ b/stdlib/source/test/lux/data/text/buffer.lux
@@ -17,7 +17,7 @@
(def: part
(Random Text)
(do {! random.monad}
- [size (\ ! map (|>> (n.% 10) inc) random.nat)]
+ [size (\ ! map (|>> (n.% 10) ++) random.nat)]
(random.ascii/alpha size)))
(def: .public test
@@ -31,14 +31,14 @@
($_ _.and
(_.cover [/.empty]
(n.= 0(/.size /.empty)))
- (_.cover [/.size /.append]
+ (_.cover [/.size /.then]
(n.= (text.size left)
- (/.size (/.append left /.empty))))
+ (/.size (/.then left /.empty))))
(_.cover [/.text]
(text\= (format left mid right)
(|> /.empty
- (/.append left)
- (/.append mid)
- (/.append right)
+ (/.then left)
+ (/.then mid)
+ (/.then right)
/.text)))
))))
diff --git a/stdlib/source/test/lux/data/text/encoding.lux b/stdlib/source/test/lux/data/text/encoding.lux
index 46dba6ded..432e98257 100644
--- a/stdlib/source/test/lux/data/text/encoding.lux
+++ b/stdlib/source/test/lux/data/text/encoding.lux
@@ -190,7 +190,7 @@
<encodings>)]
(def: all_encodings
- (list.joined (list <named>)))
+ (list.together (list <named>)))
(def: unique_encodings
(list\fold (function (_ encoding set)
diff --git a/stdlib/source/test/lux/data/text/escape.lux b/stdlib/source/test/lux/data/text/escape.lux
index dcb562a3e..707a06996 100644
--- a/stdlib/source/test/lux/data/text/escape.lux
+++ b/stdlib/source/test/lux/data/text/escape.lux
@@ -44,15 +44,15 @@
(def: over_range
(Random Char)
- (..range (hex "FFFF") (inc (debug.private /.ascii_top))))
+ (..range (hex "FFFF") (++ (debug.private /.ascii_top))))
(def: in_range
(Random Char)
- (..range (inc (debug.private /.ascii_top)) (debug.private /.ascii_bottom)))
+ (..range (++ (debug.private /.ascii_top)) (debug.private /.ascii_bottom)))
(def: ascii_range
(Random Char)
- (..range (inc (debug.private /.ascii_top)) 0))
+ (..range (++ (debug.private /.ascii_top)) 0))
(def: valid_sigils
(Set Char)
diff --git a/stdlib/source/test/lux/data/text/unicode/block.lux b/stdlib/source/test/lux/data/text/unicode/block.lux
index db419c3dc..926a56446 100644
--- a/stdlib/source/test/lux/data/text/unicode/block.lux
+++ b/stdlib/source/test/lux/data/text/unicode/block.lux
@@ -157,7 +157,7 @@
[(def: <definition>
Test
(`` (_.cover [(~~ (template.spliced <part>))]
- (let [all (list.joined (list <named>))
+ (let [all (list.together (list <named>))
unique (set.of_list /.hash all)]
(n.= (list.size all)
(set.size unique))))))]
@@ -173,7 +173,7 @@
[.let [top_start (hex "AC00")
top_end (hex "D7AF")
end_range (n.- top_start top_end)]
- start (\ ! map (|>> (n.% top_start) inc) random.nat)
+ start (\ ! map (|>> (n.% top_start) ++) random.nat)
end (\ ! map (|>> (n.% end_range) (n.+ top_start)) random.nat)
.let [additional (n.- start end)
sample (/.block start additional)
@@ -199,12 +199,12 @@
(n.= end
(/.end sample)))
(_.cover [/.size]
- (n.= (inc additional)
+ (n.= (++ additional)
(/.size sample)))
(_.cover [/.within?]
(and (/.within? sample inside)
- (not (/.within? sample (dec (/.start sample))))
- (not (/.within? sample (inc (/.end sample))))))
+ (not (/.within? sample (-- (/.start sample))))
+ (not (/.within? sample (++ (/.end sample))))))
(~~ (template [<definition> <part>]
[<definition>]
diff --git a/stdlib/source/test/lux/data/text/unicode/set.lux b/stdlib/source/test/lux/data/text/unicode/set.lux
index 84ebef798..b0be9c914 100644
--- a/stdlib/source/test/lux/data/text/unicode/set.lux
+++ b/stdlib/source/test/lux/data/text/unicode/set.lux
@@ -80,8 +80,8 @@
end (/.end <set>)]]
(_.cover [<set>]
(and (/.member? <set> char)
- (not (/.member? <set> (dec start)))
- (not (/.member? <set> (inc end))))))]
+ (not (/.member? <set> (-- start)))
+ (not (/.member? <set> (++ end))))))]
[/.ascii]
[/.ascii/alpha]