aboutsummaryrefslogtreecommitdiffstats
path: root/erts
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2015-04-09 13:58:32 +0200
committerBjörn-Egil Dahlberg <[email protected]>2015-04-09 14:49:45 +0200
commit8091cba6c33b89a8f266ee2bd1b8f2621fd79d54 (patch)
tree269ceed0060bd74171fdaeacdc633987b38932ac /erts
parent8da670fa275d77119e32bf642edb342b5dd64dc9 (diff)
downloadotp-8091cba6c33b89a8f266ee2bd1b8f2621fd79d54.tar.gz
otp-8091cba6c33b89a8f266ee2bd1b8f2621fd79d54.tar.bz2
otp-8091cba6c33b89a8f266ee2bd1b8f2621fd79d54.zip
erts: Cover maps:values/1 for large maps
Diffstat (limited to 'erts')
-rw-r--r--erts/emulator/test/map_SUITE.erl8
1 files changed, 8 insertions, 0 deletions
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl
index fbe6ea2a38..01c7c8f4bd 100644
--- a/erts/emulator/test/map_SUITE.erl
+++ b/erts/emulator/test/map_SUITE.erl
@@ -2026,6 +2026,14 @@ t_bif_map_values(Config) when is_list(Config) ->
true = is_members([number,3,"hello2",<<"value2">>],maps:values(M2)),
true = is_members([number,3,"hello",<<"value">>],maps:values(M1)),
+ Vs = lists:seq(1000,20000),
+ M3 = maps:from_list([{K,K}||K<-Vs]),
+ M4 = maps:merge(M1,M3),
+ M5 = maps:merge(M2,M3),
+ true = is_members(Vs,maps:values(M3)),
+ true = is_members([number,3,"hello",<<"value">>]++Vs,maps:values(M4)),
+ true = is_members([number,3,"hello2",<<"value2">>]++Vs,maps:values(M5)),
+
%% error case
{'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(1 bsl 65 + 3)),
{'EXIT',{badarg,[{maps,values,_,_}|_]}} = (catch maps:values(atom)),