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.lux20
1 files changed, 10 insertions, 10 deletions
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux
index 05a2746f7..73765d85f 100644
--- a/stdlib/source/test/lux/data/sum.lux
+++ b/stdlib/source/test/lux/data/sum.lux
@@ -23,7 +23,7 @@
(def: #export test
Test
(<| (_.covering /._)
- (_.for [.|])
+ (_.for [.Variant .Or])
(do {! random.monad}
[expected random.nat
shift random.nat]
@@ -43,30 +43,30 @@
(_.cover [/.left]
(|> (/.left expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(case> (0 #0 actual) (n.= expected actual)
_ false)))
(_.cover [/.right]
(|> (/.right expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(case> (0 #1 actual) (n.= expected actual)
_ false)))
(_.cover [/.either]
(and (|> (/.left expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(/.either (n.+ shift) (n.- shift))
(n.= (n.+ shift expected)))
(|> (/.right expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(/.either (n.+ shift) (n.- shift))
(n.= (n.- shift expected)))))
(_.cover [/.apply]
(and (|> (/.left expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(/.apply (n.+ shift) (n.- shift))
(case> (0 #0 actual) (n.= (n.+ shift expected) actual) _ false))
(|> (/.right expected)
- (: (| Nat Nat))
+ (: (Or Nat Nat))
(/.apply (n.+ shift) (n.- shift))
(case> (0 #1 actual) (n.= (n.- shift expected) actual) _ false))))
(do !
@@ -74,7 +74,7 @@
expected (random.list size random.nat)]
($_ _.and
(_.cover [/.lefts]
- (let [actual (: (List (| Nat Nat))
+ (let [actual (: (List (Or Nat Nat))
(list\map /.left expected))]
(and (\ (list.equivalence n.equivalence) =
expected
@@ -83,7 +83,7 @@
(list)
(/.rights actual)))))
(_.cover [/.rights]
- (let [actual (: (List (| Nat Nat))
+ (let [actual (: (List (Or Nat Nat))
(list\map /.right expected))]
(and (\ (list.equivalence n.equivalence) =
expected
@@ -97,7 +97,7 @@
(if (n.even? value)
(/.left value)
(/.right value))))
- (: (List (| Nat Nat)))
+ (: (List (Or Nat Nat)))
/.partition)]
(and (\ (list.equivalence n.equivalence) =
(list.only n.even? expected)