aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-11-28 20:09:42 -0400
committerEduardo Julian2017-11-28 20:09:42 -0400
commit1ef969c8ce0f1a83ffa8d26d779806190ac3eced (patch)
treedebedcd02aa199bad9acf161525fe51ac74334fa /stdlib/test
parent54030fb3b9cf985863a4d972573e59c9098c3076 (diff)
- Re-named the "." function to "compose" and moved it to lux/function.
Diffstat (limited to 'stdlib/test')
-rw-r--r--stdlib/test/test/lux/data/coll/queue.lux2
-rw-r--r--stdlib/test/test/lux/data/coll/sequence.lux8
-rw-r--r--stdlib/test/test/lux/data/coll/set.lux2
-rw-r--r--stdlib/test/test/lux/data/ident.lux16
-rw-r--r--stdlib/test/test/lux/data/number/ratio.lux9
-rw-r--r--stdlib/test/test/lux/data/text.lux2
-rw-r--r--stdlib/test/test/lux/lang/type/check.lux2
7 files changed, 17 insertions, 24 deletions
diff --git a/stdlib/test/test/lux/data/coll/queue.lux b/stdlib/test/test/lux/data/coll/queue.lux
index 1a6f884cf..4e9d00093 100644
--- a/stdlib/test/test/lux/data/coll/queue.lux
+++ b/stdlib/test/test/lux/data/coll/queue.lux
@@ -13,7 +13,7 @@
[size (:: @ map (n/% +100) r;nat)
sample (r;queue size r;nat)
non-member (|> r;nat
- (r;filter (. not (&;member? number;Eq<Nat> sample))))]
+ (r;filter (|>> (&;member? number;Eq<Nat> sample) not)))]
($_ seq
(test "I can query the size of a queue (and empty queues have size 0)."
(if (n/= +0 size)
diff --git a/stdlib/test/test/lux/data/coll/sequence.lux b/stdlib/test/test/lux/data/coll/sequence.lux
index 222feeacc..28660cc6f 100644
--- a/stdlib/test/test/lux/data/coll/sequence.lux
+++ b/stdlib/test/test/lux/data/coll/sequence.lux
@@ -3,9 +3,7 @@
(lux [io]
(control [monad #+ do Monad])
(data (coll ["&" sequence]
- [list "List/" Fold<List> Functor<List>])
- [text "Text/" Monoid<Text>]
- text/format
+ [list "list/" Fold<List>])
[number]
[maybe])
["r" math/random])
@@ -18,7 +16,7 @@
idx (|> r;nat (:: @ map (n/% size)))
sample (r;sequence size r;nat)
other-sample (r;sequence size r;nat)
- non-member (|> r;nat (r;filter (. not (&;member? number;Eq<Nat> sample))))
+ non-member (|> r;nat (r;filter (|>> (&;member? number;Eq<Nat> sample) not)))
#let [(^open "&/") (&;Eq<Sequence> number;Eq<Nat>)
(^open "&/") &;Monad<Sequence>
(^open "&/") &;Fold<Sequence>
@@ -55,7 +53,7 @@
(&;member? number;Eq<Nat> (&;add non-member sample) non-member)))
(test "Can fold over elements of sequence."
- (n/= (List/fold n/+ +0 (&;to-list sample))
+ (n/= (list/fold n/+ +0 (&;to-list sample))
(&/fold n/+ +0 sample)))
(test "Functor goes over every element."
diff --git a/stdlib/test/test/lux/data/coll/set.lux b/stdlib/test/test/lux/data/coll/set.lux
index 48b0905fa..e4a0b2ad1 100644
--- a/stdlib/test/test/lux/data/coll/set.lux
+++ b/stdlib/test/test/lux/data/coll/set.lux
@@ -21,7 +21,7 @@
setL (r;set number;Hash<Nat> sizeL gen-nat)
setR (r;set number;Hash<Nat> sizeR gen-nat)
non-member (|> gen-nat
- (r;filter (. not (&;member? setL))))
+ (r;filter (|>> (&;member? setL) not)))
#let [(^open "&/") &;Eq<Set>]]
($_ seq
(test "I can query the size of a set."
diff --git a/stdlib/test/test/lux/data/ident.lux b/stdlib/test/test/lux/data/ident.lux
index a096892ca..1f0554832 100644
--- a/stdlib/test/test/lux/data/ident.lux
+++ b/stdlib/test/test/lux/data/ident.lux
@@ -1,17 +1,17 @@
(;module:
lux
(lux [io]
- (control ["M" monad #+ do Monad]
+ (control [monad #+ do Monad]
pipe)
(data ["&" ident]
- [text "Text/" Eq<Text>]
+ [text "text/" Eq<Text>]
text/format)
["r" math/random])
lux/test)
(def: (gen-part size)
(-> Nat (r;Random Text))
- (|> (r;text size) (r;filter (. not (text;contains? ";")))))
+ (|> (r;text size) (r;filter (|>> (text;contains? ";") not))))
(context: "Idents"
(<| (times +100)
@@ -38,10 +38,10 @@
(test "Can compare idents for equality."
(and (&/= ident1 ident1)
(if (&/= ident1 ident2)
- (and (Text/= module1 module2)
- (Text/= name1 name2))
- (or (not (Text/= module1 module2))
- (not (Text/= name1 name2))))))
+ (and (text/= module1 module2)
+ (text/= name1 name2))
+ (or (not (text/= module1 module2))
+ (not (text/= name1 name2))))))
(test "Can encode idents as text."
(|> ident1
@@ -51,7 +51,7 @@
(test "Encoding an ident without a module component results in text equal to the name of the ident."
(if (text;empty? module1)
- (Text/= name1 (&/encode ident1))
+ (text/= name1 (&/encode ident1))
true))
))))
diff --git a/stdlib/test/test/lux/data/number/ratio.lux b/stdlib/test/test/lux/data/number/ratio.lux
index cd6657f8a..c6fb2ac68 100644
--- a/stdlib/test/test/lux/data/number/ratio.lux
+++ b/stdlib/test/test/lux/data/number/ratio.lux
@@ -3,12 +3,7 @@
(lux [io]
(control [monad #+ do Monad]
pipe)
- (data [text "Text/" Monoid<Text>]
- text/format
- [bool "b/" Eq<Bool>]
- ["&" number/ratio "&/" Number<Ratio>]
- (coll [list "List/" Fold<List> Functor<List>])
- [product])
+ (data ["&" number/ratio "&/" Number<Ratio>])
["r" math/random])
lux/test)
@@ -22,7 +17,7 @@
[numerator gen-part
denominator (|> gen-part
(r;filter (|>> (n/= +0) not))
- (r;filter (. not (n/= numerator))))]
+ (r;filter (|>> (n/= numerator) not)))]
(wrap (&;ratio numerator denominator))))
(context: "Normalization"
diff --git a/stdlib/test/test/lux/data/text.lux b/stdlib/test/test/lux/data/text.lux
index 2091bf8ba..ea6c1185b 100644
--- a/stdlib/test/test/lux/data/text.lux
+++ b/stdlib/test/test/lux/data/text.lux
@@ -108,7 +108,7 @@
sep1 (r;text' normal-char-gen +1)
sep2 (r;text' normal-char-gen +1)
#let [part-gen (|> (r;text' normal-char-gen sizeP)
- (r;filter (. not (&;contains? sep1))))]
+ (r;filter (|>> (&;contains? sep1) not)))]
parts (r;list sizeL part-gen)
#let [sample1 (&;concat (list;interpose sep1 parts))
sample2 (&;concat (list;interpose sep2 parts))
diff --git a/stdlib/test/test/lux/lang/type/check.lux b/stdlib/test/test/lux/lang/type/check.lux
index c0cd5ac1e..188c73823 100644
--- a/stdlib/test/test/lux/lang/type/check.lux
+++ b/stdlib/test/test/lux/lang/type/check.lux
@@ -139,7 +139,7 @@
(<| (times +100)
(do @
[nameL gen-name
- nameR (|> gen-name (r;filter (. not (text/= nameL))))
+ nameR (|> gen-name (r;filter (|>> (text/= nameL) not)))
paramL gen-type
paramR (|> gen-type (r;filter (|>> (@;checks? paramL) not)))]
($_ seq