diff options
Diffstat (limited to 'stdlib/source/test/lux/data/color.lux')
-rw-r--r-- | stdlib/source/test/lux/data/color.lux | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/stdlib/source/test/lux/data/color.lux b/stdlib/source/test/lux/data/color.lux index 5069ab31f..cf2f1053c 100644 --- a/stdlib/source/test/lux/data/color.lux +++ b/stdlib/source/test/lux/data/color.lux @@ -26,7 +26,7 @@ (def: .public random (Random /.Color) (|> ($_ random.and random.nat random.nat random.nat) - (\ random.monad each /.of_rgb))) + (# random.monad each /.of_rgb))) (def: scale (-> Nat Frac) @@ -73,7 +73,7 @@ ($_ _.and (_.cover [/.RGB /.rgb /.of_rgb] (|> expected /.rgb /.of_rgb - (\ /.equivalence = expected))) + (# /.equivalence = expected))) (_.cover [/.HSL /.hsl /.of_hsl] (|> expected /.hsl /.of_hsl (distance/3 expected) @@ -131,15 +131,15 @@ Test (_.for [/.Spread /.Palette] (do [! random.monad] - [eH (\ ! each (|>> f.abs (f.% +0.9) (f.+ +0.05)) + [eH (# ! each (|>> f.abs (f.% +0.9) (f.+ +0.05)) random.safe_frac) .let [eS +0.5] - variations (\ ! each (|>> (n.% 3) (n.+ 2)) random.nat) + variations (# ! each (|>> (n.% 3) (n.+ 2)) random.nat) .let [max_spread (f./ (|> variations ++ .int int.frac) +1.0) min_spread (f./ +2.0 max_spread) spread_space (f.- min_spread max_spread)] - spread (\ ! each (|>> f.abs (f.% spread_space) (f.+ min_spread)) + spread (# ! each (|>> f.abs (f.% spread_space) (f.+ min_spread)) random.safe_frac)] (`` ($_ _.and (~~ (template [<brightness> <palette>] @@ -148,7 +148,7 @@ expected (/.of_hsb [eH eS eB]) palette (<palette> spread variations expected)] (and (n.= variations (list.size palette)) - (not (list.any? (\ /.equivalence = expected) palette)))))] + (not (list.any? (# /.equivalence = expected) palette)))))] [+1.0 /.analogous] [+0.5 /.monochromatic] )) @@ -156,9 +156,9 @@ [(_.cover [<palette>] (let [expected (/.of_hsb [eH eS +0.5]) [c0 c1 c2] (<palette> expected)] - (and (\ /.equivalence = expected c0) - (not (\ /.equivalence = expected c1)) - (not (\ /.equivalence = expected c2)))))] + (and (# /.equivalence = expected c0) + (not (# /.equivalence = expected c1)) + (not (# /.equivalence = expected c2)))))] [/.triad] [/.clash] @@ -167,10 +167,10 @@ [(_.cover [<palette>] (let [expected (/.of_hsb [eH eS +0.5]) [c0 c1 c2 c3] (<palette> expected)] - (and (\ /.equivalence = expected c0) - (not (\ /.equivalence = expected c1)) - (not (\ /.equivalence = expected c2)) - (not (\ /.equivalence = expected c3)))))] + (and (# /.equivalence = expected c0) + (not (# /.equivalence = expected c1)) + (not (# /.equivalence = expected c2)) + (not (# /.equivalence = expected c3)))))] [/.square] [/.tetradic])) @@ -195,12 +195,12 @@ (..encoding expected) (_.cover [/.complement] (let [~expected (/.complement expected) - (^open "/\[0]") /.equivalence] - (and (not (/\= expected ~expected)) - (/\= expected (/.complement ~expected))))) + (^open "/#[0]") /.equivalence] + (and (not (/#= expected ~expected)) + (/#= expected (/.complement ~expected))))) (_.cover [/.black /.white] - (and (\ /.equivalence = /.white (/.complement /.black)) - (\ /.equivalence = /.black (/.complement /.white)))) + (and (# /.equivalence = /.white (/.complement /.black)) + (# /.equivalence = /.black (/.complement /.white)))) ..transformation ..palette (_.for [/.Alpha /.Pigment] |