+
+t_set_new(_Config) ->
+ Key = key,
+ ValExpected = bar,
+ ListInitial = hope_kv_list:empty(),
+ ListResulting = hope_kv_list:set(ListInitial, Key, ValExpected),
+ {some, ValResulting} = hope_kv_list:get(ListResulting, Key),
+ ValResulting = ValExpected.
+
+t_set_existing(_Config) ->
+ Key = key,
+ ValInitial = foo,
+ ValExpected = bar,
+ ListInitial = [{donald, duck}, {Key, ValInitial}],
+ ListResulting = hope_kv_list:set(ListInitial, Key, ValExpected),
+ {some, ValResulting} = hope_kv_list:get(ListResulting, Key),
+ ValResulting = ValExpected.