diff options
author | John Högberg <[email protected]> | 2018-07-18 14:23:02 +0200 |
---|---|---|
committer | John Högberg <[email protected]> | 2018-07-18 14:23:02 +0200 |
commit | 79cfc7493996dea4a7eed5c84421b45212d80edf (patch) | |
tree | 5942f6bed86c42128fbc10720c7ea8c6aae89f61 /lib/compiler/test | |
parent | 64d7d7ab81e3c2163301a77969c75c6b73804d8b (diff) | |
parent | 42b2a4cbdf9dd7622f9503167556c79732d95d34 (diff) | |
download | otp-79cfc7493996dea4a7eed5c84421b45212d80edf.tar.gz otp-79cfc7493996dea4a7eed5c84421b45212d80edf.tar.bz2 otp-79cfc7493996dea4a7eed5c84421b45212d80edf.zip |
Merge branch 'maint'
* maint:
Abort size calculation when a matched-out variable is used
Diffstat (limited to 'lib/compiler/test')
-rw-r--r-- | lib/compiler/test/bs_bincomp_SUITE.erl | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/lib/compiler/test/bs_bincomp_SUITE.erl b/lib/compiler/test/bs_bincomp_SUITE.erl index 42361ea546..a5d49020a9 100644 --- a/lib/compiler/test/bs_bincomp_SUITE.erl +++ b/lib/compiler/test/bs_bincomp_SUITE.erl @@ -26,7 +26,7 @@ init_per_group/2,end_per_group/2, byte_aligned/1,bit_aligned/1,extended_byte_aligned/1, extended_bit_aligned/1,mixed/1,filters/1,trim_coverage/1, - nomatch/1,sizes/1,general_expressions/1]). + nomatch/1,sizes/1,general_expressions/1,matched_out_size/1]). -include_lib("common_test/include/ct.hrl"). @@ -35,7 +35,7 @@ suite() -> [{ct_hooks,[ts_install_cth]}]. all() -> [byte_aligned, bit_aligned, extended_byte_aligned, extended_bit_aligned, mixed, filters, trim_coverage, - nomatch, sizes, general_expressions]. + nomatch, sizes, general_expressions, matched_out_size]. groups() -> []. @@ -338,6 +338,13 @@ general_expressions(_) -> -undef(BAD). +matched_out_size(Config) when is_list(Config) -> + <<1, 2>> = matched_out_size_1(<<4, 1:4, 4, 2:4>>), + ok. + +matched_out_size_1(Binary) -> + << <<X>> || <<S, X:S>> <= Binary>>. + cs_init() -> erts_debug:set_internal_state(available_internal_state, true), ok. |