diff options
Diffstat (limited to 'stdlib/source/test/lux/data/collection/set')
-rw-r--r-- | stdlib/source/test/lux/data/collection/set/multi.lux | 26 | ||||
-rw-r--r-- | stdlib/source/test/lux/data/collection/set/ordered.lux | 12 |
2 files changed, 19 insertions, 19 deletions
diff --git a/stdlib/source/test/lux/data/collection/set/multi.lux b/stdlib/source/test/lux/data/collection/set/multi.lux index 888ea2623..09c7c2cd5 100644 --- a/stdlib/source/test/lux/data/collection/set/multi.lux +++ b/stdlib/source/test/lux/data/collection/set/multi.lux @@ -31,7 +31,7 @@ [elements (random.set hash size element) element_counts (random.list size ..count)] (in (list\fold (function (_ [count element] set) - (/.add count element set)) + (/.has count element set)) (/.empty hash) (list.zipped/2 element_counts (set.list elements)))))) @@ -46,7 +46,7 @@ (_.for [/.hash] (|> random.nat (\ random.monad map (function (_ single) - (/.add 1 single (/.empty n.hash)))) + (/.has 1 single (/.empty n.hash)))) ($hash.spec /.hash))) ))) @@ -155,32 +155,32 @@ (/.list sample))] (and non_members_have_0_multiplicity! every_member_has_positive_multiplicity!))) - (_.cover [/.add] + (_.cover [/.has] (let [null_scenario! (|> sample - (/.add 0 non_member) + (/.has 0 non_member) (\ /.equivalence = sample)) normal_scenario! - (let [sample+ (/.add addition_count non_member sample)] + (let [sample+ (/.has addition_count non_member sample)] (and (not (/.member? sample non_member)) (/.member? sample+ non_member) (n.= addition_count (/.multiplicity sample+ non_member))))] (and null_scenario! normal_scenario!))) - (_.cover [/.remove] + (_.cover [/.lacks] (let [null_scenario! (\ /.equivalence = (|> sample - (/.add addition_count non_member)) + (/.has addition_count non_member)) (|> sample - (/.add addition_count non_member) - (/.remove 0 non_member))) + (/.has addition_count non_member) + (/.lacks 0 non_member))) partial_scenario! (let [sample* (|> sample - (/.add addition_count non_member) - (/.remove partial_removal_count non_member))] + (/.has addition_count non_member) + (/.lacks partial_removal_count non_member))] (and (/.member? sample* non_member) (n.= (n.- partial_removal_count addition_count) @@ -188,8 +188,8 @@ total_scenario! (|> sample - (/.add addition_count non_member) - (/.remove addition_count non_member) + (/.has addition_count non_member) + (/.lacks addition_count non_member) (\ /.equivalence = sample))] (and null_scenario! partial_scenario! diff --git a/stdlib/source/test/lux/data/collection/set/ordered.lux b/stdlib/source/test/lux/data/collection/set/ordered.lux index d5ff02472..725c4b3c0 100644 --- a/stdlib/source/test/lux/data/collection/set/ordered.lux +++ b/stdlib/source/test/lux/data/collection/set/ordered.lux @@ -34,7 +34,7 @@ [partial (random (dec size) &order gen_value) value (random.only (|>> (/.member? partial) not) gen_value)] - (in (/.add value partial))))) + (in (/.has value partial))))) (def: .public test Test @@ -91,16 +91,16 @@ (not (/.member? setL non_memberL))] (and members_are_identified! non_members_are_not_identified!))) - (_.cover [/.add] - (let [setL+ (/.add non_memberL setL)] + (_.cover [/.has] + (let [setL+ (/.has non_memberL setL)] (and (not (/.member? setL non_memberL)) (/.member? setL+ non_memberL) (n.= (inc (/.size setL)) (/.size setL+))))) - (_.cover [/.remove] + (_.cover [/.lacks] (|> setL - (/.add non_memberL) - (/.remove non_memberL) + (/.has non_memberL) + (/.lacks non_memberL) (\ /.equivalence = setL))) (_.cover [/.sub?] (let [self! |