aboutsummaryrefslogtreecommitdiffstats
path: root/lib/compiler/test/match_SUITE.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-04-18 16:36:53 +0200
committerMicael Karlberg <[email protected]>2011-04-18 16:36:53 +0200
commit42ef7086abd717e7a428804fe387b782abab9827 (patch)
treeb4e8bab2dc224ee0d71bd522fbd0bc36a2b69550 /lib/compiler/test/match_SUITE.erl
parent30a9f962d349f322f389ebc056e972f871e689a8 (diff)
parent9022ef27b8628ca680654d542b4d520426480c2d (diff)
downloadotp-42ef7086abd717e7a428804fe387b782abab9827.tar.gz
otp-42ef7086abd717e7a428804fe387b782abab9827.tar.bz2
otp-42ef7086abd717e7a428804fe387b782abab9827.zip
Merge branch 'bmk/snmp/agent/multi_engine_id_for_traps/OTP-9119' into bmk/agent/extra_info_notification/OTP-9183
Conflicts: lib/snmp/doc/src/notes.xml lib/snmp/src/app/snmp.appup.src
Diffstat (limited to 'lib/compiler/test/match_SUITE.erl')
-rw-r--r--lib/compiler/test/match_SUITE.erl20
1 files changed, 17 insertions, 3 deletions
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl
index 04879300d1..9406d7de8f 100644
--- a/lib/compiler/test/match_SUITE.erl
+++ b/lib/compiler/test/match_SUITE.erl
@@ -22,16 +22,16 @@
init_per_group/2,end_per_group/2,
pmatch/1,mixed/1,aliases/1,match_in_call/1,
untuplify/1,shortcut_boolean/1,letify_guard/1,
- selectify/1,underscore/1]).
+ selectify/1,underscore/1,coverage/1]).
-include_lib("test_server/include/test_server.hrl").
suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
- test_lib:recompile(match_SUITE),
+ test_lib:recompile(?MODULE),
[pmatch, mixed, aliases, match_in_call, untuplify,
- shortcut_boolean, letify_guard, selectify, underscore].
+ shortcut_boolean, letify_guard, selectify, underscore, coverage].
groups() ->
[].
@@ -398,4 +398,18 @@ underscore(Config) when is_list(Config) ->
_ = is_list(Config),
ok.
+coverage(Config) when is_list(Config) ->
+ %% Cover beam_dead.
+ ok = coverage_1(x, a),
+ ok = coverage_1(x, b).
+
+coverage_1(B, Tag) ->
+ case Tag of
+ a -> coverage_2(1, a, B);
+ b -> coverage_2(2, b, B)
+ end.
+
+coverage_2(1, a, x) -> ok;
+coverage_2(2, b, x) -> ok.
+
id(I) -> I.