diff options
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r-- | stdlib/source/test/lux/data/color.lux | 4 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/complex.lux | 13 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/frac.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/int.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/nat.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/ratio.lux | 2 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/number/rev.lux | 1 |
7 files changed, 8 insertions, 18 deletions
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux index 86abba0a3..ee3bdffb1 100644 --- a/stdlib/source/test/lux/data/color.lux +++ b/stdlib/source/test/lux/data/color.lux @@ -9,7 +9,7 @@ [data ["%" text/format (#+ format)] [number - ["." frac ("#@." number)]]] + ["." frac]]] ["." math ["r" random (#+ Random)]]] {1 @@ -100,6 +100,6 @@ (saturation gray'ed)) (|> (luminance gray'ed) (f/- (luminance mediocre)) - frac@abs + frac.abs (f/<= error-margin))))) )))) diff --git a/stdlib/source/test/lux/data/number/complex.lux b/stdlib/source/test/lux/data/number/complex.lux index 6d7689582..52e43a77e 100644 --- a/stdlib/source/test/lux/data/number/complex.lux +++ b/stdlib/source/test/lux/data/number/complex.lux @@ -8,11 +8,10 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." codec]]}] [data [number - ["." frac ("#@." number)]] + ["." frac]] [collection ["." list ("#@." functor)]]] ["." math @@ -24,9 +23,9 @@ (def: (within? margin standard value) (-> Frac Complex Complex Bit) - (let [real-dist (frac@abs (f/- (get@ #/.real standard) + (let [real-dist (frac.abs (f/- (get@ #/.real standard) (get@ #/.real value))) - imgn-dist (frac@abs (f/- (get@ #/.imaginary standard) + imgn-dist (frac.abs (f/- (get@ #/.imaginary standard) (get@ #/.imaginary value)))] (and (f/< margin real-dist) (f/< margin imgn-dist)))) @@ -70,8 +69,8 @@ (_.test "Absolute value of complex >= absolute value of any of the parts." (let [r+i (/.complex real imaginary) abs (get@ #/.real (/.abs r+i))] - (and (f/>= (frac@abs real) abs) - (f/>= (frac@abs imaginary) abs)))) + (and (f/>= (frac.abs real) abs) + (f/>= (frac.abs imaginary) abs)))) (_.test "The absolute value of a complex number involving a NaN on either dimension, results in a NaN value." (and (frac.not-a-number? (get@ #/.real (/.abs (/.complex frac.not-a-number imaginary)))) (frac.not-a-number? (get@ #/.real (/.abs (/.complex real frac.not-a-number)))))) @@ -130,7 +129,7 @@ (let [cx (/.conjugate x)] (and (f/= (get@ #/.real x) (get@ #/.real cx)) - (f/= (frac@negate (get@ #/.imaginary x)) + (f/= (frac.negate (get@ #/.imaginary x)) (get@ #/.imaginary cx))))) (_.test "The reciprocal functions is its own inverse." (|> x /.reciprocal /.reciprocal (within? margin-of-error x))) diff --git a/stdlib/source/test/lux/data/number/frac.lux b/stdlib/source/test/lux/data/number/frac.lux index 9edc0f921..736f82457 100644 --- a/stdlib/source/test/lux/data/number/frac.lux +++ b/stdlib/source/test/lux/data/number/frac.lux @@ -8,7 +8,6 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." monoid] ["$." codec]]}] [math @@ -24,7 +23,6 @@ (`` ($_ _.and ($equivalence.spec /.equivalence gen-frac) ($order.spec /.order gen-frac) - ($number.spec /.order /.number gen-frac) (~~ (template [<monoid>] [(<| (_.context (%.name (name-of <monoid>))) ($monoid.spec /.equivalence <monoid> gen-frac))] diff --git a/stdlib/source/test/lux/data/number/int.lux b/stdlib/source/test/lux/data/number/int.lux index 4fa93051b..7d11f0a03 100644 --- a/stdlib/source/test/lux/data/number/int.lux +++ b/stdlib/source/test/lux/data/number/int.lux @@ -8,7 +8,6 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." enum] ["$." interval] ["$." monoid] @@ -25,7 +24,6 @@ (`` ($_ _.and ($equivalence.spec /.equivalence r.int) ($order.spec /.order r.int) - ($number.spec /.order /.number (:: r.monad map (i/% +1,000,000) r.int)) ($enum.spec /.enum r.int) ($interval.spec /.interval r.int) (~~ (template [<monoid>] diff --git a/stdlib/source/test/lux/data/number/nat.lux b/stdlib/source/test/lux/data/number/nat.lux index dda227223..9a7f5907c 100644 --- a/stdlib/source/test/lux/data/number/nat.lux +++ b/stdlib/source/test/lux/data/number/nat.lux @@ -8,7 +8,6 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." enum] ["$." interval] ["$." monoid] @@ -25,7 +24,6 @@ (`` ($_ _.and ($equivalence.spec /.equivalence r.nat) ($order.spec /.order r.nat) - ($number.spec /.order /.number (:: r.monad map (n/% 1,000,000) r.nat)) ($enum.spec /.enum r.nat) ($interval.spec /.interval r.nat) (~~ (template [<monoid>] diff --git a/stdlib/source/test/lux/data/number/ratio.lux b/stdlib/source/test/lux/data/number/ratio.lux index 160a4fa53..f2162681d 100644 --- a/stdlib/source/test/lux/data/number/ratio.lux +++ b/stdlib/source/test/lux/data/number/ratio.lux @@ -8,7 +8,6 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." monoid] ["$." codec]]}] [math @@ -33,7 +32,6 @@ (`` ($_ _.and ($equivalence.spec /.equivalence ..ratio) ($order.spec /.order ..ratio) - ($number.spec /.order /.number ..ratio) (~~ (template [<monoid>] [(<| (_.context (%.name (name-of <monoid>))) ($monoid.spec /.equivalence <monoid> ..ratio))] diff --git a/stdlib/source/test/lux/data/number/rev.lux b/stdlib/source/test/lux/data/number/rev.lux index 37df07567..1a0bc4571 100644 --- a/stdlib/source/test/lux/data/number/rev.lux +++ b/stdlib/source/test/lux/data/number/rev.lux @@ -8,7 +8,6 @@ [/ ["$." equivalence] ["$." order] - ["$." number] ["$." enum] ["$." interval] ["$." monoid] |