diff options
author | Björn Gustavsson <[email protected]> | 2017-11-30 11:35:31 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2017-11-30 11:35:31 +0100 |
commit | fadc3d671d2edcf15b87719f350451c32c1f4bbb (patch) | |
tree | 89c23bfcb9f66bdd96e9872254d0117246525431 /lib/compiler/test/match_SUITE.erl | |
parent | 4acae2aa077de84a69b52a3a975d2dee7ca756f2 (diff) | |
parent | 63a4f821b067b19e249a0bec31295c568e2a89b5 (diff) | |
download | otp-fadc3d671d2edcf15b87719f350451c32c1f4bbb.tar.gz otp-fadc3d671d2edcf15b87719f350451c32c1f4bbb.tar.bz2 otp-fadc3d671d2edcf15b87719f350451c32c1f4bbb.zip |
Merge branch 'bjorn/compiler/coverage'
* bjorn/compiler/coverage:
v3_codegen: Remove check of operand for bs_context_to_binary
beam_jump: Eliminate a repeated clause
beam_asm: No longer allow iolists as contents in chunk/2
beam_utils_SUITE: Cover more lines in beam_utils
guard_SUITE: Add a test case to cover beam_dead:turn_op/1
Recognize 'nil' as a literal in beam_utils:bif_to_test/3
Cover more code in beam_bsm:btb_opt_1/3
Add test to cover a line in v3_kernel:opt_single_valued/3
Diffstat (limited to 'lib/compiler/test/match_SUITE.erl')
-rw-r--r-- | lib/compiler/test/match_SUITE.erl | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/lib/compiler/test/match_SUITE.erl b/lib/compiler/test/match_SUITE.erl index c31695be24..35d2e8e91a 100644 --- a/lib/compiler/test/match_SUITE.erl +++ b/lib/compiler/test/match_SUITE.erl @@ -617,6 +617,10 @@ grab_bag(_Config) -> {bad,16#555555555555555555555555555555555555555555555555555}], ok = grab_bag_remove_failure(L, unit, 0), + {42,<<43,44>>} = grab_bag_single_valued(<<42,43,44>>), + empty_list = grab_bag_single_valued([]), + empty_tuple = grab_bag_single_valued({}), + ok. grab_bag_remove_failure([], _Unit, _MaxFailure) -> @@ -634,6 +638,12 @@ grab_bag_remove_failure([{stretch,_,Mi}=Stretch | Specs], Unit, _MaxFailure) -> ok end. +%% Cover a line v3_kernel that places binary matching first. +grab_bag_single_valued(<<H,T/bytes>>) -> {H,T}; +grab_bag_single_valued([]) -> empty_list; +grab_bag_single_valued({}) -> empty_tuple. + + %% Regression in 19.0, reported by Alexei Sholik literal_binary(_Config) -> 3 = literal_binary_match(bar, <<"y">>), |