X-Git-Url: https://git.xandkar.net/?p=hope.git;a=blobdiff_plain;f=test%2Fhope_dictionary_SUITE.erl;fp=test%2Fhope_dictionary_SUITE.erl;h=cf0bfba6afec5fe9a22249c558eb779acefc5727;hp=04e40d315ef1041688283bdba53b2d8e3f819c64;hb=67535be2404f057f0df3e128c24b484f066996a4;hpb=e0fbc1da088f6d4a87c06c80ad40e2d40339b12a diff --git a/test/hope_dictionary_SUITE.erl b/test/hope_dictionary_SUITE.erl index 04e40d3..cf0bfba 100644 --- a/test/hope_dictionary_SUITE.erl +++ b/test/hope_dictionary_SUITE.erl @@ -16,6 +16,7 @@ , t_pop/1 , t_fold/1 , t_dictionary_specs/1 + , t_has_key/1 ]). @@ -38,6 +39,7 @@ groups() -> , t_pop , t_fold , t_dictionary_specs + , t_has_key ], Properties = [parallel], [{?DICT_MODULE_KV_LIST, Properties, Tests}]. @@ -107,3 +109,13 @@ t_fold(Cfg) -> 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).