aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-11-14 14:59:45 -0400
committerEduardo Julian2017-11-14 14:59:45 -0400
commit686a46f569b818681583e6ce75b37b25642b375b (patch)
treeee3c9d368ad6c89ce1475c34a2dc87e860f33279 /stdlib/test
parent72603f38074a67f9ab1e53df1b5fb5da3836162d (diff)
- Removed "lux text last-index" procedure.
- Removed "lux text trim" procedure. - Modified "lux text clip" procedure. - Some bug fixes.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/data/number/complex.lux16
-rw-r--r--stdlib/test/test/lux/data/text.lux13
2 files changed, 7 insertions, 22 deletions
diff --git a/stdlib/test/test/lux/data/number/complex.lux b/stdlib/test/test/lux/data/number/complex.lux
index 5b7e2e1e7..410fa1cb9 100644
--- a/stdlib/test/test/lux/data/number/complex.lux
+++ b/stdlib/test/test/lux/data/number/complex.lux
@@ -117,8 +117,7 @@
quotient (|> x (&;c.- rem) (&;c./ y))
floored (|> quotient
(update@ #&;real math;floor)
- (update@ #&;imaginary math;floor))
- (^open "&/") &;Codec<Text,Complex>]
+ (update@ #&;imaginary math;floor))]
(within? 0.000000000001
x
(|> quotient (&;c.* y) (&;c.+ rem)))))
@@ -195,16 +194,3 @@
(&;nth-roots degree)
(List/map (&;pow' (|> degree nat-to-int int-to-frac)))
(list;every? (within? margin-of-error sample)))))))
-
-(context: "Codec"
- (<| (times +100)
- (do @
- [sample gen-complex
- #let [(^open "c/") &;Codec<Text,Complex>]]
- (test "Can encode/decode complex numbers."
- (|> sample c/encode c/decode
- (case> (#;Right output)
- (&;c.= sample output)
-
- _
- false))))))
diff --git a/stdlib/test/test/lux/data/text.lux b/stdlib/test/test/lux/data/text.lux
index 92914ba25..10f51708e 100644
--- a/stdlib/test/test/lux/data/text.lux
+++ b/stdlib/test/test/lux/data/text.lux
@@ -1,7 +1,7 @@
(;module:
lux
(lux [io]
- (control ["M" monad #+ do Monad]
+ (control [monad #+ do Monad]
pipe)
(data ["&" text]
text/format
@@ -34,10 +34,10 @@
(&;nth idx)
(case> (^multi (#;Some char)
[(&;from-code char) char]
- [[(&;index-of' char sample)
- (&;last-index-of' char sample)
- (&;index-of char idx sample)
- (&;last-index-of char idx sample)]
+ [[(&;index-of char sample)
+ (&;last-index-of char sample)
+ (&;index-of' char idx sample)
+ (&;last-index-of' char idx sample)]
[(#;Some io) (#;Some lio)
(#;Some io') (#;Some lio')]])
(and (n.<= idx io)
@@ -128,8 +128,7 @@
($_ seq
(test "Can transform texts in certain ways."
(and (&/= "abc" (&;lower-case "ABC"))
- (&/= "ABC" (&;upper-case "abc"))
- (&/= "ABC" (&;trim " \tABC\n\r"))))
+ (&/= "ABC" (&;upper-case "abc"))))
)))
(context: "Structures"