aboutsummaryrefslogtreecommitdiffstats
path: root/lib/stdlib/test/dict_SUITE.erl
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-10-22 09:53:52 +0200
committerFredrik Gustafsson <[email protected]>2013-10-22 09:53:52 +0200
commitaa3d0613b1e67f378ee11838f67e7cfbe1bc5928 (patch)
tree10bf9be0748bf57d5ed4d7b78ab1417b834ce10d /lib/stdlib/test/dict_SUITE.erl
parenta6141d40a3596090c41f7e52537eaab2e733510c (diff)
parente6757fb65ef28f6b4b16d626f119bd162c415a81 (diff)
downloadotp-aa3d0613b1e67f378ee11838f67e7cfbe1bc5928.tar.gz
otp-aa3d0613b1e67f378ee11838f67e7cfbe1bc5928.tar.bz2
otp-aa3d0613b1e67f378ee11838f67e7cfbe1bc5928.zip
Merge branch 'mh/dict_orddict_is_empty/OTP-11353'
* mh/dict_orddict_is_empty/OTP-11353: Update primary bootstrap Add dict:is_empty/1 and orddict:is_empty/1
Diffstat (limited to 'lib/stdlib/test/dict_SUITE.erl')
-rw-r--r--lib/stdlib/test/dict_SUITE.erl11
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/stdlib/test/dict_SUITE.erl b/lib/stdlib/test/dict_SUITE.erl
index 0223240479..69814e12ce 100644
--- a/lib/stdlib/test/dict_SUITE.erl
+++ b/lib/stdlib/test/dict_SUITE.erl
@@ -17,7 +17,7 @@
%% %CopyrightEnd%
%%
-%% This module tests the ordsets, sets, and gb_sets modules.
+%% This module tests the orddict, dict, and gb_trees modules.
%%
-module(dict_SUITE).
@@ -68,6 +68,7 @@ create_1(M) ->
D0 = M(empty, []),
[] = M(to_list, D0),
0 = M(size, D0),
+ true = M(is_empty, D0),
D0.
store(Config) when is_list(Config) ->
@@ -81,6 +82,14 @@ store_1(List, M) ->
D1 = foldl(fun({K,V}, Dict) -> M(enter, {K,V,Dict}) end,
M(empty, []), List),
true = M(equal, {D0,D1}),
+ case List of
+ [] ->
+ true = M(is_empty, D0),
+ true = M(is_empty, D1);
+ [_|_] ->
+ false = M(is_empty, D0),
+ false = M(is_empty, D1)
+ end,
D0.
%%%