From be51cd8fdbcb7a71bdb451ea5c67ff93da84eb76 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 22 Jul 2017 18:26:19 -0400 Subject: - Eliminated lux/math/simple. If you want simple math, use lux/type/auto with the relevant signatures. --- stdlib/test/test/lux/math/simple.lux | 100 ----------------------------------- stdlib/test/tests.lux | 3 +- 2 files changed, 1 insertion(+), 102 deletions(-) delete mode 100644 stdlib/test/test/lux/math/simple.lux (limited to 'stdlib/test') 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/format - [bool "b/" Eq] - [number "r/" Number] - (coll [list "List/" Fold Functor]) - [product]) - ["R" math/random] - ["&" math/simple]) - lux/test) - -(do-template [ <=> <+> <-> <*> <%> <0>] - [(context: (format " arihtmetic") - [x - y (|> (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 [ ] - [(context: (format " comparisons") - [x - y ] - ($_ seq - (test "<" - (b/= ( y x) (&;< y x))) - (test "<=" - (b/= ( y x) (&;<= y x))) - (test ">" - (b/= ( y x) (&;> y x))) - (test ">=" - (b/= ( 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 [ <=> ] - [(context: (format " min & max") - [x - y ] - ($_ seq - (test "Min." - (<=> ( y x) (&;min y x))) - (test "Max." - (<=> ( y x) (&;max y x))) - ))] - - ["Nat" R;nat n.= n.min n.max] - ["Int" R;int i.= i.min i.max] - ) - -(do-template [ <=> ] - [(context: (format " inc & dec") - [x ] - ($_ seq - (test "Inc." - (<=> ( x) (&;inc x))) - (test "Dec." - (<=> ( x) (&;dec x))) - ))] - - ["Nat" R;nat n.= n.inc n.dec] - ["Int" R;int i.= i.inc i.dec] - ) - -(do-template [ ] - [(context: (format " even & odd") - [x ] - ($_ seq - (test "Even." - (b/= ( x) (&;even? x))) - (test "Odd." - (b/= ( 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] -- cgit v1.2.3