diff options
author | Björn Gustavsson <[email protected]> | 2011-04-14 16:44:29 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2011-04-14 16:44:29 +0200 |
commit | 27fc85fe624441a9c5754288aeac510c20a80695 (patch) | |
tree | 92425ccfad933bc0d894023c2b86f4b65402d689 /lib/compiler/test/match_SUITE.erl | |
parent | c9e14ed976cf7b1ed89eeb3e75a258c37981feb4 (diff) | |
parent | a86d00316ef882310fa222e0a2ac76dd8c1ab275 (diff) | |
download | otp-27fc85fe624441a9c5754288aeac510c20a80695.tar.gz otp-27fc85fe624441a9c5754288aeac510c20a80695.tar.bz2 otp-27fc85fe624441a9c5754288aeac510c20a80695.zip |
Merge branch 'bjorn/compiler/coverage' into dev
* bjorn/compiler/coverage:
bs_match_SUITE: Improve coverage of beam_bsm
beam_bsm: Eliminate uncovered line in warning generation
match_SUITE: Cover a clause in beam_dead:forward/4
beam_dead: Remove uncovered special case handling of empty blocks
beam_dead: Remove uncovered clauses in binary matching optimization
beam_dead: Remove uncoverable case clause in update_value_dict/3
beam_dead: Remove code that cannot be covered in forward/4
record_SUITE: Cover optimization of is_record/3 in beam_type
compiler tests: Reinstate ?MODULE macro in calls to test_lib:recompile/1
Diffstat (limited to 'lib/compiler/test/match_SUITE.erl')
-rw-r--r-- | lib/compiler/test/match_SUITE.erl | 20 |
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. |