, t_pop/1
, t_fold/1
, t_dictionary_specs/1
+ , t_has_key/1
]).
, t_get
, t_pop
, t_fold
- , t_dictionary_specs
+
+ % TODO: Find-out why t_dictionary_specs failes with latest proper HEAD:
+ %
+ % Testing hope_kv_list:to_kv_list/1
+ % Error: The typeserver encountered an error: {unbound_var,'K'}.
+ % *** CT Error Notification 2015-09-26 13:46:38.684 ***
+ % hope_dictionary_SUITE:t_dictionary_specs failed on line 111
+ % Reason: {badmatch,[{hope_kv_list,of_kv_list,1}]}
+ %
+ %, t_dictionary_specs
+
+ , t_has_key
],
Properties = [parallel],
[{?DICT_MODULE_KV_LIST, Properties, Tests}].
t_dictionary_specs(Cfg) ->
{some, DictModule} = hope_kv_list:get(Cfg, ?DICT_MODULE),
[] = proper:check_specs(DictModule).
+
+t_has_key(Cfg) ->
+ {some, DictModule} = hope_kv_list:get(Cfg, ?DICT_MODULE),
+ D = DictModule:of_kv_list([{a, 1}, {b, 2}, {c, 3}]),
+ true = DictModule:has_key(D, a),
+ true = DictModule:has_key(D, b),
+ true = DictModule:has_key(D, c),
+ false = DictModule:has_key(D, d),
+ false = DictModule:has_key(D, e),
+ false = DictModule:has_key(D, f).