diff options
author | Eduardo Julian | 2017-01-25 07:02:33 -0400 |
---|---|---|
committer | Eduardo Julian | 2017-01-25 07:02:33 -0400 |
commit | f8c2389db4a9b3239b00b9d209237d5116e12e3c (patch) | |
tree | 7144c34363b804b91f3591f726cf2f4d944873c1 /stdlib/test/test/lux.lux | |
parent | 5b7b661ff721327d33b7078f4d07f6fe93307ee0 (diff) |
- Renamed lux/data/struct/tree to lux/data/struct/tree/rose.
- Moved lux/data/struct/zipper to lux/data/struct/tree/zipper.
- Moved lux/regex to lux/lexer/regex.
- Changed the suffix of annotation tags, from M to A.
- Renamed Frac(tional) numbers to Deg(rees).
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux.lux | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index 6c1ea6f4b..cd394ac76 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -75,7 +75,7 @@ ["Int" R;int i.= i.< i.> i.<= i.>= i.min i.max] ["Nat" R;nat n.= n.< n.> n.<= n.>= n.min n.max] ["Real" R;real r.= r.< r.> r.<= r.>= r.min r.max] - ["Frac" R;frac f.= f.< f.> f.<= f.>= f.min f.max] + ["Deg" R;deg d.= d.< d.> d.<= d.>= d.min d.max] ) (do-template [category rand-gen = + - * / <%> > <0> <1> <factor> %x <cap> <prep>] @@ -97,10 +97,10 @@ (test: (format "[" category "] " "Multiplicative identity") [x rand-gen] (assert "" - ## Skip this test for Frac - ## because Frac division loses the last + ## Skip this test for Deg + ## because Deg division loses the last ## 32 bits of precision. - (or (T/= "Frac" category) + (or (T/= "Deg" category) (and (|> x (* <1>) (= x)) (|> x (/ <1>) (= x)))))) @@ -112,10 +112,10 @@ #let [r (<%> y x) x' (- r x)]] (assert "" - ## Skip this test for Frac - ## because Frac division loses the last + ## Skip this test for Deg + ## because Deg division loses the last ## 32 bits of precision. - (or (T/= "Frac" category) + (or (T/= "Deg" category) (or (> x' y) (|> x' (/ y) (* y) (= x')))) ))] @@ -123,7 +123,7 @@ ["Nat" R;nat n.= n.+ n.- n.* n./ n.% n.> +0 +1 +1000000 %n (n.% +1000) id] ["Int" R;int i.= i.+ i.- i.* i./ i.% i.> 0 1 1000000 %i (i.% 1000) id] ["Real" R;real r.= r.+ r.- r.* r./ r.% r.> 0.0 1.0 1000000.0 %r id math;floor] - ["Frac" R;frac f.= f.+ f.- f.* f./ f.% f.> .0 (_lux_proc ["frac" "max-value"] []) (_lux_proc ["frac" "max-value"] []) %f id id] + ["Deg" R;deg d.= d.+ d.- d.* d./ d.% d.> .0 (_lux_proc ["deg" "max-value"] []) (_lux_proc ["deg" "max-value"] []) %f id id] ) (do-template [category rand-gen -> <- = <cap> %a %z] @@ -137,7 +137,7 @@ ["Nat->Int" R;nat nat-to-int int-to-nat n.= (n.% +1000000) %n %i] ["Int->Real" R;int int-to-real real-to-int i.= (i.% 1000000) %i %r] ["Real->Int" R;real real-to-int int-to-real r.= math;floor %r %i] - ## [R;real real-to-frac frac-to-real r.= (r.% 1.0) %r %f] + ## [R;real real-to-deg deg-to-real r.= (r.% 1.0) %r %f] ) (test: "Simple macros and constructs" |