diff options
author | Björn Gustavsson <[email protected]> | 2016-06-02 18:08:04 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-06-03 09:43:08 +0200 |
commit | 819d11e4a8f67cbe5c6fa60580e47a5b884040d7 (patch) | |
tree | 14f2b1a70142cb03995729799722c322ad6a4b1c /lib | |
parent | a04289a5f30f39b62c7d245f272f486cfd70e6a8 (diff) | |
download | otp-819d11e4a8f67cbe5c6fa60580e47a5b884040d7.tar.gz otp-819d11e4a8f67cbe5c6fa60580e47a5b884040d7.tar.bz2 otp-819d11e4a8f67cbe5c6fa60580e47a5b884040d7.zip |
misc_SUITE: Cover the remaining lines in beam_peep
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/test/misc_SUITE.erl | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/compiler/test/misc_SUITE.erl b/lib/compiler/test/misc_SUITE.erl index f05fe6c943..f543f0d4de 100644 --- a/lib/compiler/test/misc_SUITE.erl +++ b/lib/compiler/test/misc_SUITE.erl @@ -256,12 +256,15 @@ silly_coverage(Config) when is_list(Config) -> {jump,{f,42}}]}],99}, expect_error(fun() -> beam_clean:module(CleanInput, []) end), - %% beam_peep + %% beam_peep. This is tricky. Use a select instruction with + %% an odd number of elements in the list to crash + %% prune_redundant_values/2 but not beam_clean:clean_labels/1. PeepInput = {?MODULE,[{foo,0}],[], [{function,foo,0,2, [{label,1}, {func_info,{atom,?MODULE},{atom,foo},0}, - {label,2}|non_proper_list]}],99}, + {label,2},{select,op,r,{f,2},[{f,2}]}]}], + 2}, expect_error(fun() -> beam_peep:module(PeepInput, []) end), %% beam_bsm. This is tricky. Our function must be sane enough to not crash |