diff options
author | Björn Gustavsson <[email protected]> | 2019-02-13 12:23:05 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2019-02-15 10:37:40 +0100 |
commit | ddc22b67a7ecc8946f28082cf939fb1afe99dd0d (patch) | |
tree | 26fc34ef0319ca56bfa5a5c57948d54fa4f6a6fa | |
parent | 55ab54153c1f6de078a6b24e8771cdc171cae82e (diff) | |
download | otp-ddc22b67a7ecc8946f28082cf939fb1afe99dd0d.tar.gz otp-ddc22b67a7ecc8946f28082cf939fb1afe99dd0d.tar.bz2 otp-ddc22b67a7ecc8946f28082cf939fb1afe99dd0d.zip |
Cover exception throwing code in beam_ssa_opt
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index e999c8ffae..0f9b2dd21f 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -185,7 +185,6 @@ silly_coverage(Config) when is_list(Config) -> %% beam_ssa_recv %% beam_ssa_share %% beam_ssa_pre_codegen - %% beam_ssa_opt %% beam_ssa_codegen BadSSA = {b_module,#{},a,b,c, [{b_function,#{func_info=>{mod,foo,0}},args,bad_blocks,0}]}, @@ -193,9 +192,15 @@ silly_coverage(Config) when is_list(Config) -> expect_error(fun() -> beam_ssa_recv:module(BadSSA, []) end), expect_error(fun() -> beam_ssa_share:module(BadSSA, []) end), expect_error(fun() -> beam_ssa_pre_codegen:module(BadSSA, []) end), - expect_error(fun() -> beam_ssa_opt:module(BadSSA, []) end), expect_error(fun() -> beam_ssa_codegen:module(BadSSA, []) end), + %% beam_ssa_opt + BadSSABlocks = #{0 => {b_blk,#{},[bad_code],{b_ret,#{},arg}}}, + BadSSAOpt = {b_module,#{},a,[],c, + [{b_function,#{func_info=>{mod,foo,0}},[], + BadSSABlocks,0}]}, + expect_error(fun() -> beam_ssa_opt:module(BadSSAOpt, []) end), + %% beam_ssa_lint, beam_ssa_pp {error,[{_,Errors}]} = beam_ssa_lint:module(bad_ssa_lint_input(), []), _ = [io:put_chars(Mod:format_error(Reason)) || |