diff options
Diffstat (limited to 'stdlib/source/test/lux/data')
-rw-r--r-- | stdlib/source/test/lux/data/collection/list.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/sequence.lux | 8 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/stream.lux | 6 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/tree/zipper.lux | 7 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/color/cmyk.lux | 15 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/color/hsb.lux | 15 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/color/hsl.lux | 15 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/identity.lux | 12 |
8 files changed, 45 insertions, 41 deletions
diff --git a/stdlib/source/test/lux/data/collection/list.lux b/stdlib/source/test/lux/data/collection/list.lux index cbcc11c3d..b73b76016 100644 --- a/stdlib/source/test/lux/data/collection/list.lux +++ b/stdlib/source/test/lux/data/collection/list.lux @@ -2,8 +2,9 @@ [library [lux (.except) [abstract - [monad (.only do)] ["[0]" enum] + ["[0]" monad (.only do) + ["[1]T" \\test]] ["[0]" functor ["[1]T" \\test]] ["[0]" apply @@ -13,8 +14,7 @@ [\\specification ["$[0]" equivalence] ["$[0]" hash] - ["$[0]" mix] - ["$[0]" monad]]] + ["$[0]" mix]]] [control ["[0]" pipe] ["[0]" io] @@ -67,7 +67,7 @@ (_.for [/.apply] (applyT.spec /#in /.equivalence /.apply)) (_.for [/.monad] - ($monad.spec /#in /.equivalence /.monad)) + (monadT.spec /#in /.equivalence /.monad)) (do [! random.monad] [parameter random.nat diff --git a/stdlib/source/test/lux/data/collection/sequence.lux b/stdlib/source/test/lux/data/collection/sequence.lux index b2033b46f..ee463e2f7 100644 --- a/stdlib/source/test/lux/data/collection/sequence.lux +++ b/stdlib/source/test/lux/data/collection/sequence.lux @@ -2,7 +2,8 @@ [library [lux (.except) [abstract - [monad (.only do)] + ["[0]" monad (.only do) + ["[1]T" \\test]] ["[0]" functor ["[1]T" \\test (.only Injection)]] ["[0]" apply @@ -11,8 +12,7 @@ ["[1]T" \\test]] [\\specification ["$[0]" equivalence] - ["$[0]" mix] - ["$[0]" monad]]] + ["$[0]" mix]]] [control ["[0]" try (.only Try)] ["[0]" exception]] @@ -47,7 +47,7 @@ (_.for [/.apply] (applyT.spec /#in /.equivalence /.apply)) (_.for [/.monad] - ($monad.spec /#in /.equivalence /.monad)) + (monadT.spec /#in /.equivalence /.monad)) ))) (def whole diff --git a/stdlib/source/test/lux/data/collection/stream.lux b/stdlib/source/test/lux/data/collection/stream.lux index 75c03aa36..902ce58b8 100644 --- a/stdlib/source/test/lux/data/collection/stream.lux +++ b/stdlib/source/test/lux/data/collection/stream.lux @@ -7,8 +7,8 @@ ["[0]" enum] ["[0]" functor ["[1]T" \\test (.only Injection Comparison)]] - [\\specification - ["$[0]" comonad]]] + ["[0]" comonad + ["[1]T" \\test]]] [data ["[0]" text (.only) ["%" \\format (.only format)]] @@ -56,7 +56,7 @@ (_.for [/.functor] (functorT.spec /.repeated ..equivalence /.functor)) (_.for [/.comonad] - ($comonad.spec /.repeated ..equivalence /.comonad)) + (comonadT.spec /.repeated ..equivalence /.comonad)) (_.coverage [/.item] (n.= (n.+ offset index) diff --git a/stdlib/source/test/lux/data/collection/tree/zipper.lux b/stdlib/source/test/lux/data/collection/tree/zipper.lux index 577862dc9..77d9209d8 100644 --- a/stdlib/source/test/lux/data/collection/tree/zipper.lux +++ b/stdlib/source/test/lux/data/collection/tree/zipper.lux @@ -5,9 +5,10 @@ [monad (.only do)] ["[0]" functor ["[1]T" \\test (.only Injection Comparison)]] + ["[0]" comonad + ["[1]T" \\test]] [\\specification - ["$[0]" equivalence] - ["$[0]" comonad]]] + ["$[0]" equivalence]]] [control ["[0]" pipe] ["[0]" maybe (.use "[1]#[0]" functor)]] @@ -170,7 +171,7 @@ (_.for [/.functor] (functorT.spec (|>> tree.leaf /.zipper) /.equivalence /.functor)) (_.for [/.comonad] - ($comonad.spec (|>> tree.leaf /.zipper) /.equivalence /.comonad)) + (comonadT.spec (|>> tree.leaf /.zipper) /.equivalence /.comonad)) (_.coverage [/.zipper /.tree] (|> sample /.zipper /.tree (tree#= sample))) diff --git a/stdlib/source/test/lux/data/color/cmyk.lux b/stdlib/source/test/lux/data/color/cmyk.lux index 8c852cd4c..2eda4d6a8 100644 --- a/stdlib/source/test/lux/data/color/cmyk.lux +++ b/stdlib/source/test/lux/data/color/cmyk.lux @@ -45,14 +45,15 @@ expected_rgb rgbT.random expected_cmyk ..random - possible_value random.frac]) + possible_value random.frac + .let [delta +0.000000001]]) (all _.and (_.for [/.Value] (all _.and (_.coverage [/.value?] (and (/.value? expected_value) - (not (/.value? (f.+ f.smallest /.most))) - (not (/.value? (f.- f.smallest /.least))))) + (not (/.value? (f.+ delta /.most))) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.value] (if (/.value? possible_value) (|> possible_value @@ -64,14 +65,14 @@ (and (f.< /.most /.least) (/.value? /.least) - (/.value? (f.+ f.smallest /.least)) - (not (/.value? (f.- f.smallest /.least))))) + (/.value? (f.+ delta /.least)) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.most] (and (f.> /.least /.most) (/.value? /.most) - (/.value? (f.- f.smallest /.most)) - (not (/.value? (f.+ f.smallest /.most))))) + (/.value? (f.- delta /.most)) + (not (/.value? (f.+ delta /.most))))) )) (_.for [/.CMYK /.#cyan /.#magenta /.#yellow /.#key] diff --git a/stdlib/source/test/lux/data/color/hsb.lux b/stdlib/source/test/lux/data/color/hsb.lux index 2cb41fe7c..ee8d5f18a 100644 --- a/stdlib/source/test/lux/data/color/hsb.lux +++ b/stdlib/source/test/lux/data/color/hsb.lux @@ -38,14 +38,15 @@ expected_rgb rgbT.random expected_hsb ..random - possible_value random.frac]) + possible_value random.frac + .let [delta +0.000000001]]) (all _.and (_.for [/.Value] (all _.and (_.coverage [/.value?] (and (/.value? expected_value) - (not (/.value? (f.+ f.smallest /.most))) - (not (/.value? (f.- f.smallest /.least))))) + (not (/.value? (f.+ delta /.most))) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.value] (if (/.value? possible_value) (|> possible_value @@ -57,14 +58,14 @@ (and (f.< /.most /.least) (/.value? /.least) - (/.value? (f.+ f.smallest /.least)) - (not (/.value? (f.- f.smallest /.least))))) + (/.value? (f.+ delta /.least)) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.most] (and (f.> /.least /.most) (/.value? /.most) - (/.value? (f.- f.smallest /.most)) - (not (/.value? (f.+ f.smallest /.most))))) + (/.value? (f.- delta /.most)) + (not (/.value? (f.+ delta /.most))))) )) (_.for [/.HSB] (all _.and diff --git a/stdlib/source/test/lux/data/color/hsl.lux b/stdlib/source/test/lux/data/color/hsl.lux index 8563aa77b..bbfd8f8da 100644 --- a/stdlib/source/test/lux/data/color/hsl.lux +++ b/stdlib/source/test/lux/data/color/hsl.lux @@ -49,14 +49,15 @@ ((function (_ it) (and (f.>= +0.25 it) (f.<= +0.75 it))))))) - ratio (|> random.safe_frac (random.only (f.>= +0.5)))]) + ratio (|> random.safe_frac (random.only (f.>= +0.5))) + .let [delta +0.000000001]]) (all _.and (_.for [/.Value] (all _.and (_.coverage [/.value?] (and (/.value? expected_value) - (not (/.value? (f.+ f.smallest /.most))) - (not (/.value? (f.- f.smallest /.least))))) + (not (/.value? (f.+ delta /.most))) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.value] (if (/.value? possible_value) (|> possible_value @@ -68,14 +69,14 @@ (and (f.< /.most /.least) (/.value? /.least) - (/.value? (f.+ f.smallest /.least)) - (not (/.value? (f.- f.smallest /.least))))) + (/.value? (f.+ delta /.least)) + (not (/.value? (f.- delta /.least))))) (_.coverage [/.most] (and (f.> /.least /.most) (/.value? /.most) - (/.value? (f.- f.smallest /.most)) - (not (/.value? (f.+ f.smallest /.most))))) + (/.value? (f.- delta /.most)) + (not (/.value? (f.+ delta /.most))))) )) (_.for [/.HSL /.#hue /.#saturation /.#luminance] diff --git a/stdlib/source/test/lux/data/identity.lux b/stdlib/source/test/lux/data/identity.lux index f18f69c41..5513d67d2 100644 --- a/stdlib/source/test/lux/data/identity.lux +++ b/stdlib/source/test/lux/data/identity.lux @@ -2,14 +2,14 @@ [library [lux (.except) [abstract - [monad (.only do)] + ["[0]" monad (.only do) + ["[1]T" \\test]] ["[0]" functor ["[1]T" \\test (.only Injection Comparison)]] ["[0]" apply ["[1]T" \\test]] - [\\specification - ["$[0]" monad] - ["$[0]" comonad]]] + ["[0]" comonad + ["[1]T" \\test]]] [test ["_" property (.only Test)]]]] [\\library @@ -34,7 +34,7 @@ (_.for [/.apply] (applyT.spec ..injection ..comparison /.apply)) (_.for [/.monad] - ($monad.spec ..injection ..comparison /.monad)) + (monadT.spec ..injection ..comparison /.monad)) (_.for [/.comonad] - ($comonad.spec ..injection ..comparison /.comonad)) + (comonadT.spec ..injection ..comparison /.comonad)) ))) |