aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/map_SUITE.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2018-11-29 12:41:28 +0100
committerBjörn Gustavsson <[email protected]>2018-11-30 13:19:01 +0100
commit36df00d48692c6f2e6d8c2ffd4eb03e4b66f56a9 (patch)
tree352b14431ed7a325d72027882aafc1039c1982c8 /lib/compiler/test/map_SUITE.erl
parentd409ab76416108936610e043fa14a0a0f0d314af (diff)
downloadotp-36df00d48692c6f2e6d8c2ffd4eb03e4b66f56a9.tar.gz
otp-36df00d48692c6f2e6d8c2ffd4eb03e4b66f56a9.tar.bz2
otp-36df00d48692c6f2e6d8c2ffd4eb03e4b66f56a9.zip
Cover code in beam_trim
Diffstat (limited to 'lib/compiler/test/map_SUITE.erl')
-rw-r--r--lib/compiler/test/map_SUITE.erl14
1 files changed, 12 insertions, 2 deletions
diff --git a/lib/compiler/test/map_SUITE.erl b/lib/compiler/test/map_SUITE.erl
index 3d7a4e445a..440b632381 100644
--- a/lib/compiler/test/map_SUITE.erl
+++ b/lib/compiler/test/map_SUITE.erl
@@ -73,7 +73,7 @@
t_reused_key_variable/1,
%% new in OTP 22
- t_mixed_clause/1
+ t_mixed_clause/1,cover_beam_trim/1
]).
suite() -> [].
@@ -130,7 +130,7 @@ all() ->
t_reused_key_variable,
%% new in OTP 22
- t_mixed_clause
+ t_mixed_clause,cover_beam_trim
].
groups() -> [].
@@ -2182,6 +2182,16 @@ t_mixed_clause(_Config) ->
end,
ok.
+cover_beam_trim(_Config) ->
+ val = do_cover_beam_trim(id, max, max, id, #{id=>val}),
+ ok.
+
+do_cover_beam_trim(Id, OldMax, Max, Id, M) ->
+ OldMax = id(Max),
+ #{Id:=Val} = id(M),
+ Val.
+
+
%% aux
rand_terms(0) -> [];