aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/data/sum.lux
diff options
context:
space:
mode:
Diffstat (limited to 'stdlib/source/test/lux/data/sum.lux')
-rw-r--r--stdlib/source/test/lux/data/sum.lux30
1 files changed, 15 insertions, 15 deletions
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 353c6f6c2..761bda10c 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -11,7 +11,7 @@
[data
["[0]" text]
[collection
- ["[0]" list ("[1]\[0]" functor)]]]
+ ["[0]" list ("[1]#[0]" functor)]]]
[math
["[0]" random]
[number
@@ -36,10 +36,10 @@
right random.nat]
(_.cover [/.hash]
(let [hash (/.hash i.hash n.hash)]
- (and (n.= (\ i.hash hash left)
- (\ hash hash {.#Left left}))
- (n.= (\ n.hash hash right)
- (\ hash hash {.#Right right}))))))
+ (and (n.= (# i.hash hash left)
+ (# hash hash {.#Left left}))
+ (n.= (# n.hash hash right)
+ (# hash hash {.#Right right}))))))
(_.cover [/.left]
(|> (/.left expected)
@@ -70,39 +70,39 @@
(/.then (n.+ shift) (n.- shift))
(case> {0 #1 actual} (n.= (n.- shift expected) actual) _ false))))
(do !
- [size (\ ! each (n.% 5) random.nat)
+ [size (# ! each (n.% 5) random.nat)
expected (random.list size random.nat)]
($_ _.and
(_.cover [/.lefts]
(let [actual (: (List (Or Nat Nat))
- (list\each /.left expected))]
- (and (\ (list.equivalence n.equivalence) =
+ (list#each /.left expected))]
+ (and (# (list.equivalence n.equivalence) =
expected
(/.lefts actual))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list)
(/.rights actual)))))
(_.cover [/.rights]
(let [actual (: (List (Or Nat Nat))
- (list\each /.right expected))]
- (and (\ (list.equivalence n.equivalence) =
+ (list#each /.right expected))]
+ (and (# (list.equivalence n.equivalence) =
expected
(/.rights actual))
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list)
(/.lefts actual)))))
(_.cover [/.partition]
(let [[lefts rights] (|> expected
- (list\each (function (_ value)
+ (list#each (function (_ value)
(if (n.even? value)
(/.left value)
(/.right value))))
(: (List (Or Nat Nat)))
/.partition)]
- (and (\ (list.equivalence n.equivalence) =
+ (and (# (list.equivalence n.equivalence) =
(list.only n.even? expected)
lefts)
- (\ (list.equivalence n.equivalence) =
+ (# (list.equivalence n.equivalence) =
(list.only (|>> n.even? not) expected)
rights))))
))