diff options
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r-- | stdlib/source/test/lux/data/sum.lux | 14 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/text/regex.lux | 10 |
2 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/source/test/lux/data/sum.lux b/stdlib/source/test/lux/data/sum.lux index b90206fe7..7434d7509 100644 --- a/stdlib/source/test/lux/data/sum.lux +++ b/stdlib/source/test/lux/data/sum.lux @@ -19,23 +19,23 @@ (let [(^open "list/.") (list.equivalence text.equivalence)] ($_ _.and (_.test "Can inject values into Either." - (and (|> (/.left "Hello") (case> (0 "Hello") #1 _ #0)) - (|> (/.right "World") (case> (1 "World") #1 _ #0)))) + (and (|> (/.left "Hello") (case> (0 #0 "Hello") #1 _ #0)) + (|> (/.right "World") (case> (0 #1 "World") #1 _ #0)))) (_.test "Can discriminate eithers based on their cases." (let [[_lefts _rights] (/.partition (: (List (| Text Text)) - (list (0 "0") (1 "1") (0 "2"))))] + (list (0 #0 "0") (0 #1 "1") (0 #0 "2"))))] (and (list/= _lefts (/.lefts (: (List (| Text Text)) - (list (0 "0") (1 "1") (0 "2"))))) + (list (0 #0 "0") (0 #1 "1") (0 #0 "2"))))) (list/= _rights (/.rights (: (List (| Text Text)) - (list (0 "0") (1 "1") (0 "2")))))))) + (list (0 #0 "0") (0 #1 "1") (0 #0 "2")))))))) (_.test "Can apply a function to an Either value depending on the case." (and (n.= 10 (/.either (function (_ _) 10) (function (_ _) 20) - (: (| Text Text) (0 "")))) + (: (| Text Text) (0 #0 "")))) (n.= 20 (/.either (function (_ _) 10) (function (_ _) 20) - (: (| Text Text) (1 "")))))) + (: (| Text Text) (0 #1 "")))))) )))) diff --git a/stdlib/source/test/lux/data/text/regex.lux b/stdlib/source/test/lux/data/text/regex.lux index 7789cc9bf..49f20a726 100644 --- a/stdlib/source/test/lux/data/text/regex.lux +++ b/stdlib/source/test/lux/data/text/regex.lux @@ -259,15 +259,15 @@ Test ($_ _.and (_.test "Can specify alternative patterns." - (and (should-check ["a" (0 [])] (/.regex "a|b") "a") - (should-check ["b" (1 [])] (/.regex "a|b") "b") + (and (should-check ["a" (0 #0 [])] (/.regex "a|b") "a") + (should-check ["b" (0 #1 [])] (/.regex "a|b") "b") (should-fail (/.regex "a|b") "c"))) (_.test "Can have groups within alternations." - (and (should-check ["abc" (0 ["b" "c"])] (/.regex "a(.)(.)|b(.)(.)") "abc") - (should-check ["bcd" (1 ["c" "d"])] (/.regex "a(.)(.)|b(.)(.)") "bcd") + (and (should-check ["abc" (0 #0 ["b" "c"])] (/.regex "a(.)(.)|b(.)(.)") "abc") + (should-check ["bcd" (0 #1 ["c" "d"])] (/.regex "a(.)(.)|b(.)(.)") "bcd") (should-fail (/.regex "a(.)(.)|b(.)(.)") "cde") - (should-check ["123-456-7890" (0 ["123" "456-7890" "456" "7890"])] + (should-check ["123-456-7890" (0 #0 ["123" "456-7890" "456" "7890"])] (/.regex "(\d{3})-((\d{3})-(\d{4}))|b(.)d") "123-456-7890"))) )) |