aboutsummaryrefslogtreecommitdiffstats
path: root/erts/emulator/test
diff options
context:
space:
mode:
authorBjörn-Egil Dahlberg <egil@erlang.org>2014-04-30 16:02:02 +0200
committerBjörn-Egil Dahlberg <egil@erlang.org>2014-04-30 16:02:02 +0200
commit7059845da597df041dc74f5d2f5efdc534a4af5a (patch)
treef6523052af6dadc8d14877191a122822defdc811 /erts/emulator/test
parentec4111dbef676eba1f9ea8f3d7089e064c14684f (diff)
downloadotp-7059845da597df041dc74f5d2f5efdc534a4af5a.tar.gz
otp-7059845da597df041dc74f5d2f5efdc534a4af5a.tar.bz2
otp-7059845da597df041dc74f5d2f5efdc534a4af5a.zip
erts: Add testcase for erts_debug:size/1 Map terms
Diffstat (limited to 'erts/emulator/test')
-rw-r--r--erts/emulator/test/erts_debug_SUITE.erl6
1 files changed, 6 insertions, 0 deletions
diff --git a/erts/emulator/test/erts_debug_SUITE.erl b/erts/emulator/test/erts_debug_SUITE.erl
index 87778dd0c2..e5c904cfb9 100644
--- a/erts/emulator/test/erts_debug_SUITE.erl
+++ b/erts/emulator/test/erts_debug_SUITE.erl
@@ -67,6 +67,9 @@ test_size(Config) when is_list(Config) ->
2 = do_test_size({[]}),
3 = do_test_size({a,b}),
7 = do_test_size({a,[b,c]}),
+ 8 = do_test_size(#{b => 2,c => 3}),
+ 4 = do_test_size(#{}),
+ 32 = do_test_size(#{b => 2,c => 3,txt => "hello world"}),
%% Test internal consistency of sizes, but without testing
%% exact sizes.
@@ -97,6 +100,9 @@ test_size(Config) when is_list(Config) ->
do_test_size({SimplestFun,SimplestFun},
2*FunSz0+do_test_size({a,b}),
FunSz0+do_test_size({a,b})),
+
+ M = id(#{ "atom" => first, i => 0}),
+ do_test_size([M,M#{ "atom" := other },M#{i := 42}],54,32),
ok.
do_test_size(Term) ->