From 37c6e98b7b4b018972e0e6bdc557b266277fe353 Mon Sep 17 00:00:00 2001 From: Siraaj Khandkar Date: Tue, 12 Aug 2014 15:03:23 -0400 Subject: [PATCH] Add some TODO notes. --- src/hope_dictionary.erl | 1 + src/hope_kv_list.erl | 2 ++ test/hope_kv_list_SUITE.erl | 3 +++ 3 files changed, 6 insertions(+) diff --git a/src/hope_dictionary.erl b/src/hope_dictionary.erl index 2e3a59d..5494f39 100644 --- a/src/hope_dictionary.erl +++ b/src/hope_dictionary.erl @@ -33,6 +33,7 @@ -callback iter(t(K, V), fun((K, V) -> ok)) -> ok. +%% TODO: Decide if validation is to be done. If yes - wrap in hope_result:t/1 -callback of_kv_list([{K, V}]) -> t(K, V). diff --git a/src/hope_kv_list.erl b/src/hope_kv_list.erl index 0b80a4a..12dbcd2 100644 --- a/src/hope_kv_list.erl +++ b/src/hope_kv_list.erl @@ -48,6 +48,7 @@ set(T, K, V) -> update(T, K, F) -> V1Opt = get(T, K), V2 = F(V1Opt), + % TODO: Eliminate the 2nd lookup. set(T, K, V2). iter(T, Map1) -> @@ -70,6 +71,7 @@ to_kv_list(T) -> T. of_kv_list(List) -> + % TODO: Decide if validation is to be done here. Do so if yes. List. diff --git a/test/hope_kv_list_SUITE.erl b/test/hope_kv_list_SUITE.erl index 98c5489..d99e669 100644 --- a/test/hope_kv_list_SUITE.erl +++ b/test/hope_kv_list_SUITE.erl @@ -20,6 +20,9 @@ %% Common Test callbacks %% ============================================================================ +%% TODO: Make tests generic for any dictionary. +%% TODO: Each group shold test a type of dictionary against the generic cases. + all() -> [{group, ?GROUP_KV_LIST}]. -- 2.20.1