aboutsummaryrefslogtreecommitdiff
path: root/stdlib/source/test/lux/control/pipe.lux
diff options
context:
space:
mode:
authorEduardo Julian2020-04-20 01:22:45 -0400
committerEduardo Julian2020-04-20 01:22:45 -0400
commit4428345ab84ed065193b8186e86474f496975569 (patch)
tree98affd9dfa6d08fc0656380a07a33252409768ef /stdlib/source/test/lux/control/pipe.lux
parent6d26d72e557eef73959846876dff7f14d8185d68 (diff)
Got JVM anonymous classes to compile again.
Diffstat (limited to 'stdlib/source/test/lux/control/pipe.lux')
-rw-r--r--stdlib/source/test/lux/control/pipe.lux84
1 files changed, 42 insertions, 42 deletions
diff --git a/stdlib/source/test/lux/control/pipe.lux b/stdlib/source/test/lux/control/pipe.lux
index 0aecde080..d705e23ca 100644
--- a/stdlib/source/test/lux/control/pipe.lux
+++ b/stdlib/source/test/lux/control/pipe.lux
@@ -13,7 +13,7 @@
[math
["r" random]]]
{1
- ["." / #*]})
+ ["." /]})
(def: #export test
Test
@@ -23,65 +23,65 @@
($_ _.and
(do @
[another r.nat]
- (_.test "Can dismiss previous pipeline results and begin a new one."
+ (_.test (%.name (name-of /.new>))
(n.= (inc another)
(|> sample
(n.* 3)
(n.+ 4)
- (new> another [inc])))))
- (_.test "Let-binding"
+ (/.new> another [inc])))))
+ (_.test (%.name (name-of /.let>))
(n.= (n.+ sample sample)
(|> sample
- (let> x [(n.+ x x)]))))
- (_.test "'Conditional' branching."
+ (/.let> x [(n.+ x x)]))))
+ (_.test (%.name (name-of /.cond>))
(text@= (cond (n.= 0 sample) "zero"
(n.even? sample) "even"
"odd")
(|> sample
- (cond> [(n.= 0)] [(new> "zero" [])]
- [n.even?] [(new> "even" [])]
- [(new> "odd" [])]))))
- (_.test "'If' branching."
+ (/.cond> [(n.= 0)] [(/.new> "zero" [])]
+ [n.even?] [(/.new> "even" [])]
+ [(/.new> "odd" [])]))))
+ (_.test (%.name (name-of /.if>))
(text@= (if (n.even? sample)
"even"
"odd")
(|> sample
- (if> [n.even?]
- [(new> "even" [])]
- [(new> "odd" [])]))))
- (_.test "'When' branching."
+ (/.if> [n.even?]
+ [(/.new> "even" [])]
+ [(/.new> "odd" [])]))))
+ (_.test (%.name (name-of /.when>))
(n.= (if (n.even? sample)
(n.* 2 sample)
sample)
(|> sample
- (when> [n.even?]
- [(n.* 2)]))))
- (_.test "Can loop."
+ (/.when> [n.even?]
+ [(n.* 2)]))))
+ (_.test (%.name (name-of /.loop>))
(n.= (n.* 10 sample)
(|> sample
- (loop> [(n.= (n.* 10 sample)) not]
- [(n.+ sample)]))))
- (_.test "Monads."
+ (/.loop> [(n.= (n.* 10 sample)) not]
+ [(n.+ sample)]))))
+ (_.test (%.name (name-of /.do>))
(n.= (inc (n.+ 4 (n.* 3 sample)))
(|> sample
- (do> identity.monad
- [(n.* 3)]
- [(n.+ 4)]
- [inc]))))
- (_.test "Execution."
+ (/.do> identity.monad
+ [(n.* 3)]
+ [(n.+ 4)]
+ [inc]))))
+ (_.test (%.name (name-of /.exec>))
(n.= (n.* 10 sample)
(|> sample
- (exec> [%.nat (format "sample = ") log!])
+ (/.exec> [%.nat (format "sample = ") log!])
(n.* 10))))
- (_.test "Tuple."
+ (_.test (%.name (name-of /.tuple>))
(let [[left middle right] (|> sample
- (tuple> [inc]
- [dec]
- [%.nat]))]
+ (/.tuple> [inc]
+ [dec]
+ [%.nat]))]
(and (n.= (inc sample) left)
(n.= (dec sample) middle)
(text@= (%.nat sample) right))))
- (_.test "Pattern-matching."
+ (_.test (%.name (name-of /.case>))
(text@= (case (n.% 10 sample)
0 "zero"
1 "one"
@@ -96,15 +96,15 @@
_ "???")
(|> sample
(n.% 10)
- (case> 0 "zero"
- 1 "one"
- 2 "two"
- 3 "three"
- 4 "four"
- 5 "five"
- 6 "six"
- 7 "seven"
- 8 "eight"
- 9 "nine"
- _ "???"))))
+ (/.case> 0 "zero"
+ 1 "one"
+ 2 "two"
+ 3 "three"
+ 4 "four"
+ 5 "five"
+ 6 "six"
+ 7 "seven"
+ 8 "eight"
+ 9 "nine"
+ _ "???"))))
))))