X-Git-Url: https://git.xandkar.net/?p=hope.git;a=blobdiff_plain;f=test%2Fhope_kv_list_SUITE.erl;h=8abb888a8542b1ae4e330312a36a3d60c347920f;hp=e0f0747e2c7772862323939020e906da53269cad;hb=70cf8e86a06d8721fcc8b658bb2be1f7b401326f;hpb=126c888082556366e73dfa5fb5fe3eedf2818dfc diff --git a/test/hope_kv_list_SUITE.erl b/test/hope_kv_list_SUITE.erl index e0f0747..8abb888 100644 --- a/test/hope_kv_list_SUITE.erl +++ b/test/hope_kv_list_SUITE.erl @@ -10,6 +10,7 @@ -export( [ t_set_new/1 , t_set_existing/1 + , t_pop/1 ]). @@ -30,6 +31,7 @@ groups() -> Tests = [ t_set_new , t_set_existing + , t_pop ], Properties = [], [{?GROUP_KV_LIST, Properties, Tests}]. @@ -55,3 +57,9 @@ t_set_existing(_Config) -> ListResulting = hope_kv_list:set(ListInitial, Key, ValExpected), {some, ValResulting} = hope_kv_list:get(ListResulting, Key), ValResulting = ValExpected. + +t_pop(_Config) -> + KVList = [{a, 1}, {b, 2}, {c, 3}], + Dict1 = hope_kv_list:of_kv_list(KVList), + {{some, 1}, Dict2} = hope_kv_list:pop(Dict1, a), + {none , _Dict3} = hope_kv_list:pop(Dict2, a).