diff options
author | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
---|---|---|
committer | Eduardo Julian | 2018-07-04 22:38:56 -0400 |
commit | 376ed521cd92c2c53f2e9cc3cb16b85b67e2fdea (patch) | |
tree | 338f244cf5e7b53dc43724c826285689481808b5 /stdlib/test/test/lux.lux | |
parent | 4bc58162f3d381abf33c936eafc976a2f422258c (diff) |
- Re-named "degree" to "revolution".
Diffstat (limited to '')
-rw-r--r-- | stdlib/test/test/lux.lux | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/stdlib/test/test/lux.lux b/stdlib/test/test/lux.lux index 6061f4829..fc649eec3 100644 --- a/stdlib/test/test/lux.lux +++ b/stdlib/test/test/lux.lux @@ -83,7 +83,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] ["Frac" r.frac f/= f/< f/> f/<= f/>= f/min f/max] - ["Deg" r.deg d/= d/< d/> d/<= d/>= d/min d/max] + ["Rev" r.rev r/= r/< r/> r/<= r/>= r/min r/max] ) (do-template [category rand-gen = + - * / <%> > <0> <1> <factor> <cap> <prep>] @@ -111,10 +111,10 @@ (do @ [x rand-gen] (test "" - ## Skip this test for Deg - ## because Deg division loses the last + ## Skip this test for Rev + ## because Rev division loses the last ## 32 bits of precision. - (or (text/= "Deg" category) + (or (text/= "Rev" category) (and (|> x (* <1>) (= x)) (|> x (/ <1>) (= x)))))))) @@ -128,10 +128,10 @@ #let [r (<%> y x) x' (- r x)]] (test "" - ## Skip this test for Deg - ## because Deg division loses the last + ## Skip this test for Rev + ## because Rev division loses the last ## 32 bits of precision. - (or (text/= "Deg" category) + (or (text/= "Rev" category) (or (> x' y) (|> x' (/ y) (* y) (= x')))) ))))] @@ -139,12 +139,12 @@ ["Nat" r.nat n/= n/+ n/- n/* n// n/% n/> +0 +1 +1_000_000 (n/% +1_000) id] ["Int" r.int i/= i/+ i/- i/* i// i/% i/> 0 1 1_000_000 (i/% 1_000) id] ["Frac" r.frac f/= f/+ f/- f/* f// f/% f/> 0.0 1.0 1_000_000.0 id math.floor] - ["Deg" r.deg d/= d/+ d/- d/* d// d/% d/> .0 (.deg -1) (.deg -1) id id] + ["Rev" r.rev r/= r/+ r/- r/* r// r/% r/> .0 (.rev -1) (.rev -1) id id] ) -(def: frac-deg - (r.Random Deg) - (|> r.deg +(def: frac-rev + (r.Random Rev) + (|> r.rev (:: r.Functor<Random> map (|>> (bit.left-shift +11) (bit.right-shift +11))))) (do-template [category rand-gen -> <- = <cap>] @@ -160,7 +160,7 @@ ["Nat->Int" r.nat .int .nat n/= (n/% +1_000_000)] ["Int->Frac" r.int int-to-frac frac-to-int i/= (i/% 1_000_000)] ["Frac->Int" r.frac frac-to-int int-to-frac f/= math.floor] - ["Deg->Frac" frac-deg deg-to-frac frac-to-deg d/= id] + ["Rev->Frac" frac-rev rev-to-frac frac-to-rev r/= id] ) (context: "Simple macros and constructs" |