aboutsummaryrefslogtreecommitdiff
path: root/stdlib/test
diff options
context:
space:
mode:
authorEduardo Julian2017-07-22 18:26:19 -0400
committerEduardo Julian2017-07-22 18:26:19 -0400
commitbe51cd8fdbcb7a71bdb451ea5c67ff93da84eb76 (patch)
tree533655cc90463efa55558ce58b97e8ab1a828a02 /stdlib/test
parent1550dcf419662e19eb4c1dd21ce316060d03e52b (diff)
- Eliminated lux/math/simple. If you want simple math, use lux/type/auto with the relevant signatures.
Diffstat (limited to '')
-rw-r--r--stdlib/test/test/lux/math/simple.lux100
-rw-r--r--stdlib/test/tests.lux3
2 files changed, 1 insertions, 102 deletions
diff --git a/stdlib/test/test/lux/math/simple.lux b/stdlib/test/test/lux/math/simple.lux
deleted file mode 100644
index 1b35c4069..000000000
--- a/stdlib/test/test/lux/math/simple.lux
+++ /dev/null
@@ -1,100 +0,0 @@
-(;module:
- lux
- (lux [io]
- (control monad)
- (data [text "Text/" Monoid<Text>]
- text/format
- [bool "b/" Eq<Bool>]
- [number "r/" Number<Real>]
- (coll [list "List/" Fold<List> Functor<List>])
- [product])
- ["R" math/random]
- ["&" math/simple])
- lux/test)
-
-(do-template [<category> <generator> <=> <+> <-> <*> </> <%> <0>]
- [(context: (format <category> " arihtmetic")
- [x <generator>
- y (|> <generator> (R;filter (. not (<=> <0>))))]
- ($_ seq
- (test "Can add."
- (<=> (<+> y x) (&;+ y x)))
- (test "Can subtract."
- (<=> (<-> y x) (&;- y x)))
- (test "Can multiply."
- (<=> (<*> y x) (&;* y x)))
- (test "Can divide."
- (<=> (</> y x) (&;/ y x)))
- (test "Can get remainder."
- (<=> (<%> y x) (&;% y x)))
- ))]
-
- ["Nat" R;nat n.= n.+ n.- n.* n./ n.% +0]
- ["Int" R;int i.= i.+ i.- i.* i./ i.% 0]
- ["Real" R;real r.= r.+ r.- r.* r./ r.% 0.0]
- ["Deg" R;deg d.= d.+ d.- d.* d./ d.% .0]
- )
-
-(do-template [<category> <generator> <lt> <lte> <gt> <gte>]
- [(context: (format <category> " comparisons")
- [x <generator>
- y <generator>]
- ($_ seq
- (test "<"
- (b/= (<lt> y x) (&;< y x)))
- (test "<="
- (b/= (<lte> y x) (&;<= y x)))
- (test ">"
- (b/= (<gt> y x) (&;> y x)))
- (test ">="
- (b/= (<gte> y x) (&;>= y x)))
- ))]
-
- ["Nat" R;nat n.< n.<= n.> n.>=]
- ["Int" R;int i.< i.<= i.> i.>=]
- ["Real" R;real r.< r.<= r.> r.>=]
- ["Deg" R;deg d.< d.<= d.> d.>=]
- )
-
-(do-template [<category> <generator> <=> <min> <max>]
- [(context: (format <category> " min & max")
- [x <generator>
- y <generator>]
- ($_ seq
- (test "Min."
- (<=> (<min> y x) (&;min y x)))
- (test "Max."
- (<=> (<max> y x) (&;max y x)))
- ))]
-
- ["Nat" R;nat n.= n.min n.max]
- ["Int" R;int i.= i.min i.max]
- )
-
-(do-template [<category> <generator> <=> <inc> <dec>]
- [(context: (format <category> " inc & dec")
- [x <generator>]
- ($_ seq
- (test "Inc."
- (<=> (<inc> x) (&;inc x)))
- (test "Dec."
- (<=> (<dec> x) (&;dec x)))
- ))]
-
- ["Nat" R;nat n.= n.inc n.dec]
- ["Int" R;int i.= i.inc i.dec]
- )
-
-(do-template [<category> <generator> <even?> <odd?>]
- [(context: (format <category> " even & odd")
- [x <generator>]
- ($_ seq
- (test "Even."
- (b/= (<even?> x) (&;even? x)))
- (test "Odd."
- (b/= (<odd?> x) (&;odd? x)))
- ))]
-
- ["Nat" R;nat n.even? n.odd?]
- ["Int" R;int i.even? i.odd?]
- )
diff --git a/stdlib/test/tests.lux b/stdlib/test/tests.lux
index be26d43fb..34c5c9be2 100644
--- a/stdlib/test/tests.lux
+++ b/stdlib/test/tests.lux
@@ -55,8 +55,7 @@
["_;" lexer]
["_;" regex]))
["_;" math]
- (math ["_;" simple]
- (logic ["_;" continuous]
+ (math (logic ["_;" continuous]
["_;" fuzzy]))
(macro ["_;" code]
["_;" syntax]