aboutsummaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-11-30 15:32:05 +0100
committerBjörn Gustavsson <[email protected]>2017-12-04 10:10:16 +0100
commite4b486d24fcc5029b26fe576b9e373fc02b9098a (patch)
tree94425379d026eb3ab369ae60ab88922f55e84c72 /lib
parent924895c37df31913077d16c6baabfc70777f1b7f (diff)
downloadotp-e4b486d24fcc5029b26fe576b9e373fc02b9098a.tar.gz
otp-e4b486d24fcc5029b26fe576b9e373fc02b9098a.tar.bz2
otp-e4b486d24fcc5029b26fe576b9e373fc02b9098a.zip
bs_match_SUITE: Cover more clauses in v3_codegen:bs_rename_ctx/4
Diffstat (limited to 'lib')
-rw-r--r--lib/compiler/test/bs_match_SUITE.erl16
1 files changed, 14 insertions, 2 deletions
diff --git a/lib/compiler/test/bs_match_SUITE.erl b/lib/compiler/test/bs_match_SUITE.erl
index e6fa80e143..39f9b5d063 100644
--- a/lib/compiler/test/bs_match_SUITE.erl
+++ b/lib/compiler/test/bs_match_SUITE.erl
@@ -40,7 +40,7 @@
map_and_binary/1,unsafe_branch_caching/1,
bad_literals/1,good_literals/1,constant_propagation/1,
parse_xml/1,get_payload/1,escape/1,num_slots_different/1,
- check_bitstring_list/1]).
+ check_bitstring_list/1,guard/1]).
-export([coverage_id/1,coverage_external_ignore/2]).
@@ -73,7 +73,7 @@ groups() ->
map_and_binary,unsafe_branch_caching,
bad_literals,good_literals,constant_propagation,parse_xml,
get_payload,escape,num_slots_different,
- check_bitstring_list]}].
+ check_bitstring_list,guard]}].
init_per_suite(Config) ->
@@ -1587,6 +1587,18 @@ check_bitstring_list(<<>>, []) ->
check_bitstring_list(_, _) ->
false.
+guard(_Config) ->
+ Tuple = id({a,b}),
+ ok = guard_1(<<1,2,3>>, {1,2,3}),
+
+ ok.
+
+%% Cover handling of #k_put{} in v3_codegen:bsm_rename_ctx/4.
+
+guard_1(<<A,B,C>>, Tuple) when Tuple =:= {A,B,C} ->
+ ok.
+
+
check(F, R) ->
R = F().