aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <[email protected]>2014-01-27 16:04:49 +0100
committerBjörn-Egil Dahlberg <[email protected]>2014-01-29 11:08:50 +0100
commita7ff048b6b5d8649d1709a90f7514fccbb5e9235 (patch)
tree08891c341174f619ec07311334f92e88f37d1d7c /erts/emulator
parent335e6bf3e4987e5f549136c1f692c628b1dfc360 (diff)
downloadotp-a7ff048b6b5d8649d1709a90f7514fccbb5e9235.tar.gz
otp-a7ff048b6b5d8649d1709a90f7514fccbb5e9235.tar.bz2
otp-a7ff048b6b5d8649d1709a90f7514fccbb5e9235.zip
erts: Update maps_fold test to respect maps:fold/3
Diffstat (limited to 'erts/emulator')
-rw-r--r--erts/emulator/test/map_SUITE.erl11
1 files changed, 2 insertions, 9 deletions
diff --git a/erts/emulator/test/map_SUITE.erl b/erts/emulator/test/map_SUITE.erl
index 75381de556..faaafb33bc 100644
--- a/erts/emulator/test/map_SUITE.erl
+++ b/erts/emulator/test/map_SUITE.erl
@@ -816,18 +816,11 @@ t_bif_map_from_list(Config) when is_list(Config) ->
%% Maps module, not BIFs
t_maps_fold(_Config) ->
-
Vs = lists:seq(1,100),
- Rs = lists:reverse(Vs),
M = maps:from_list([{{k,I},{v,I}}||I<-Vs]),
- %% foldl
- 5050 = maps:foldl(fun({k,_},{v,V},A) -> V + A end, 0, M),
- Rs = maps:foldl(fun({k,_},{v,V},A) -> [V|A] end, [], M),
-
- %% foldr
- 5050 = maps:foldr(fun({k,_},{v,V},A) -> V + A end, 0, M),
- Vs = maps:foldr(fun({k,_},{v,V},A) -> [V|A] end, [], M),
+ %% fold
+ 5050 = maps:fold(fun({k,_},{v,V},A) -> V + A end, 0, M),
ok.