diff options
author | Björn Gustavsson <[email protected]> | 2016-05-31 12:44:13 +0200 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2016-05-31 12:44:13 +0200 |
commit | 52f65fe8a1d4ccb31d2c38d1923ccb73a9059a92 (patch) | |
tree | 35903a83c15ea8ca9bb4b7b1fa75e6fc0ebdfc3f /lib/compiler/test/beam_except_SUITE.erl | |
parent | 0e40609c64538a58466de8cddf2a7f0aebaf65ef (diff) | |
parent | b1b27719d713c0e62d3242bbf1da0600ea0a651f (diff) | |
download | otp-52f65fe8a1d4ccb31d2c38d1923ccb73a9059a92.tar.gz otp-52f65fe8a1d4ccb31d2c38d1923ccb73a9059a92.tar.bz2 otp-52f65fe8a1d4ccb31d2c38d1923ccb73a9059a92.zip |
Merge branch 'bjorn/compiler/misc'
* bjorn/compiler/misc:
Eliminate unsafe use of Y registers
beam_validator: Add is_bitstring/1 as a safe BIF
beam_validator: Remove uncovered line
Teach beam_utils:is_pure_test/1 to handle is_bitstr and is_function2
beam_utils: Simplify handling of 'return' to eliminate uncovered line
beam_jump: Clean up handling of labels before func_info
beam_expect: Correctly handle blocks with multiple allocs
v3_codegen: Don't confuse beam_validator
v3_codegen: Correct code generation for an error/1 call in a guard
beam_receive: Don't crash when encountering nonsensical code
Diffstat (limited to 'lib/compiler/test/beam_except_SUITE.erl')
-rw-r--r-- | lib/compiler/test/beam_except_SUITE.erl | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/lib/compiler/test/beam_except_SUITE.erl b/lib/compiler/test/beam_except_SUITE.erl index 8746e62fb9..47367d6eab 100644 --- a/lib/compiler/test/beam_except_SUITE.erl +++ b/lib/compiler/test/beam_except_SUITE.erl @@ -21,15 +21,18 @@ -export([all/0, suite/0,groups/0,init_per_suite/1, end_per_suite/1, init_per_group/2,end_per_group/2, - coverage/1]). + multiple_allocs/1,coverage/1]). suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> - [coverage]. + test_lib:recompile(?MODULE), + [{group,p}]. groups() -> - []. + [{p,[parallel], + [multiple_allocs, + coverage]}]. init_per_suite(Config) -> Config. @@ -43,6 +46,23 @@ init_per_group(_GroupName, Config) -> end_per_group(_GroupName, Config) -> Config. +multiple_allocs(_Config) -> + {'EXIT',{{badmatch,#{true:=[p]}},_}} = + (catch could(pda, 0.0, {false,true}, {p})), + {'EXIT',{function_clause,_}} = (catch place(lee)), + {'EXIT',{{badmatch,wanted},_}} = (catch conditions()), + + ok. + +could(Coupons = pda, Favorite = _pleasure = 0.0, {_, true}, {Presents}) -> + (0 = true) = #{true => [Presents]}. + +place(lee) -> + (pregnancy = presentations) = [hours | [purchase || _ <- 0]] + wine. + +conditions() -> + (talking = going) = storage + [large = wanted]. + coverage(_) -> File = {file,"fake.erl"}, ok = fc(a), |