diff options
Diffstat (limited to 'stdlib/source/test/lux/data/collection/set/multi.lux')
-rw-r--r-- | stdlib/source/test/lux/data/collection/set/multi.lux | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index 2b614a1a4..b281e85bd 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -10,10 +10,10 @@ ["$[0]" equivalence] ["$[0]" hash]]] [data - ["[0]" bit ("[1]\[0]" equivalence)] + ["[0]" bit ("[1]#[0]" equivalence)] [collection ["[0]" set] - ["[0]" list ("[1]\[0]" mix)]]] + ["[0]" list ("[1]#[0]" mix)]]] [math ["[0]" random {"+" [Random]}] [number @@ -23,14 +23,14 @@ (def: count (Random Nat) - (\ random.monad each (|>> (n.% 10) ++) random.nat)) + (# random.monad each (|>> (n.% 10) ++) random.nat)) (def: .public (random size hash count element) (All (_ a) (-> Nat (Hash a) (Random Nat) (Random a) (Random (/.Set a)))) (do [! random.monad] [elements (random.set hash size element) element_counts (random.list size ..count)] - (in (list\mix (function (_ [count element] set) + (in (list#mix (function (_ [count element] set) (/.has count element set)) (/.empty hash) (list.zipped/2 element_counts @@ -39,13 +39,13 @@ (def: signature Test (do [! random.monad] - [diversity (\ ! each (n.% 10) random.nat)] + [diversity (# ! each (n.% 10) random.nat)] ($_ _.and (_.for [/.equivalence] ($equivalence.spec /.equivalence (..random diversity n.hash ..count random.nat))) (_.for [/.hash] (|> random.nat - (\ random.monad each (function (_ single) + (# random.monad each (function (_ single) (/.has 1 single (/.empty n.hash)))) ($hash.spec /.hash))) ))) @@ -53,7 +53,7 @@ (def: composition Test (do [! random.monad] - [diversity (\ ! each (n.% 10) random.nat) + [diversity (# ! each (n.% 10) random.nat) sample (..random diversity n.hash ..count random.nat) another (..random diversity n.hash ..count random.nat)] (`` ($_ _.and @@ -113,24 +113,24 @@ (<| (_.covering /._) (_.for [/.Set]) (do [! random.monad] - [diversity (\ ! each (n.% 10) random.nat) + [diversity (# ! each (n.% 10) random.nat) sample (..random diversity n.hash ..count random.nat) non_member (random.only (predicate.complement (set.member? (/.support sample))) random.nat) addition_count ..count - partial_removal_count (\ ! each (n.% addition_count) random.nat) + partial_removal_count (# ! each (n.% addition_count) random.nat) another (..random diversity n.hash ..count random.nat)] ($_ _.and (_.cover [/.list /.of_list] (|> sample /.list (/.of_list n.hash) - (\ /.equivalence = sample))) + (# /.equivalence = sample))) (_.cover [/.size] (n.= (list.size (/.list sample)) (/.size sample))) (_.cover [/.empty?] - (bit\= (/.empty? sample) + (bit#= (/.empty? sample) (n.= 0 (/.size sample)))) (_.cover [/.empty] (/.empty? (/.empty n.hash))) @@ -159,7 +159,7 @@ (let [null_scenario! (|> sample (/.has 0 non_member) - (\ /.equivalence = sample)) + (# /.equivalence = sample)) normal_scenario! (let [sample+ (/.has addition_count non_member sample)] @@ -170,7 +170,7 @@ normal_scenario!))) (_.cover [/.lacks] (let [null_scenario! - (\ /.equivalence = + (# /.equivalence = (|> sample (/.has addition_count non_member)) (|> sample @@ -190,7 +190,7 @@ (|> sample (/.has addition_count non_member) (/.lacks addition_count non_member) - (\ /.equivalence = sample))] + (# /.equivalence = sample))] (and null_scenario! partial_scenario! total_scenario!))) @@ -202,12 +202,12 @@ (let [unary (|> sample /.support /.of_set)] (and (/.sub? sample unary) (or (not (/.sub? unary sample)) - (\ /.equivalence = sample unary))))) + (# /.equivalence = sample unary))))) (_.cover [/.super?] (let [unary (|> sample /.support /.of_set)] (and (/.super? unary sample) (or (not (/.super? sample unary)) - (\ /.equivalence = sample unary))))) + (# /.equivalence = sample unary))))) (_.cover [/.difference] (let [|sample| (/.support sample) |another| (/.support another) |