diff options
Diffstat (limited to '')
-rw-r--r-- | stdlib/source/test/lux/data/collection/dictionary.lux | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/stdlib/source/test/lux/data/collection/dictionary.lux b/stdlib/source/test/lux/data/collection/dictionary.lux index ad8a63d28..8667b7054 100644 --- a/stdlib/source/test/lux/data/collection/dictionary.lux +++ b/stdlib/source/test/lux/data/collection/dictionary.lux @@ -154,10 +154,10 @@ (#.Some _) false _ true))) - (_.cover [/.put] + (_.cover [/.has] (and (n.= (inc (/.size dict)) - (/.size (/.put non_key test_val dict))) - (case (/.get non_key (/.put non_key test_val dict)) + (/.size (/.has non_key test_val dict))) + (case (/.get non_key (/.has non_key test_val dict)) (#.Some v) (n.= test_val v) _ true))) @@ -184,21 +184,21 @@ (and can_put_new_keys! cannot_put_old_keys!))) - (_.cover [/.remove] - (and (let [base (/.put non_key test_val dict)] + (_.cover [/.lacks] + (and (let [base (/.has non_key test_val dict)] (and (/.key? base non_key) - (not (/.key? (/.remove non_key base) non_key)))) + (not (/.key? (/.lacks non_key base) non_key)))) (case (list.head (/.keys dict)) #.None true (#.Some known_key) (n.= (dec (/.size dict)) - (/.size (/.remove known_key dict)))))) + (/.size (/.lacks known_key dict)))))) - (_.cover [/.update] - (let [base (/.put non_key test_val dict) - updt (/.update non_key inc base)] + (_.cover [/.revised] + (let [base (/.has non_key test_val dict) + updt (/.revised non_key inc base)] (case [(/.get non_key base) (/.get non_key updt)] [(#.Some x) (#.Some y)] (n.= (inc x) y) @@ -232,7 +232,7 @@ (_.cover [/.sub] (|> dict - (/.put non_key test_val) + (/.has non_key test_val) (/.sub (list non_key)) /.size (n.= 1))) |