home
/
code
/
hope.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Add dictionary get with validation.
[hope.git]
/
test
/
hope_dictionary_SUITE.erl
diff --git
a/test/hope_dictionary_SUITE.erl
b/test/hope_dictionary_SUITE.erl
index
4f355ca
..
04e40d3
100644
(file)
--- a/
test/hope_dictionary_SUITE.erl
+++ b/
test/hope_dictionary_SUITE.erl
@@
-63,7
+63,9
@@
t_get(Cfg) ->
{some, V1} = DictModule:get(D, K1),
V1 = DictModule:get(D, K1, V2),
none = DictModule:get(D, K2),
{some, V1} = DictModule:get(D, K1),
V1 = DictModule:get(D, K1, V2),
none = DictModule:get(D, K2),
- V2 = DictModule:get(D, K2, V2).
+ V2 = DictModule:get(D, K2, V2),
+ default = DictModule:get(D, K1, default, fun (X) -> X =:= foo end),
+ V1 = DictModule:get(D, K1, default, fun (X) -> X =:= V1 end).
t_set_new(Cfg) ->
{some, DictModule} = hope_kv_list:get(Cfg, ?DICT_MODULE),
t_set_new(Cfg) ->
{some, DictModule} = hope_kv_list:get(Cfg, ?DICT_MODULE),
This page took
0.019418 seconds
and
4
git commands to generate.