diff options
author | Björn-Egil Dahlberg <[email protected]> | 2015-05-20 21:52:34 +0200 |
---|---|---|
committer | Björn-Egil Dahlberg <[email protected]> | 2015-05-21 09:49:39 +0200 |
commit | aec9df2cde184950340888826d84663aec72b5c7 (patch) | |
tree | 319e6383ed8d783c2b515a5205663fee18316c78 /lib | |
parent | 73cc0c766d0205bec3220ccc1cbe68d35c5759a6 (diff) | |
download | otp-aec9df2cde184950340888826d84663aec72b5c7.tar.gz otp-aec9df2cde184950340888826d84663aec72b5c7.tar.bz2 otp-aec9df2cde184950340888826d84663aec72b5c7.zip |
compiler: Add tests for beam_bsm get_map_elements
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compiler/test/warnings_SUITE.erl | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/lib/compiler/test/warnings_SUITE.erl b/lib/compiler/test/warnings_SUITE.erl index f6ba75577d..5742b7e6cf 100644 --- a/lib/compiler/test/warnings_SUITE.erl +++ b/lib/compiler/test/warnings_SUITE.erl @@ -38,7 +38,8 @@ -export([pattern/1,pattern2/1,pattern3/1,pattern4/1, guard/1,bad_arith/1,bool_cases/1,bad_apply/1, files/1,effect/1,bin_opt_info/1,bin_construction/1, - comprehensions/1,maps/1,redundant_boolean_clauses/1, + comprehensions/1,maps/1,maps_bin_opt_info/1, + redundant_boolean_clauses/1, latin1_fallback/1,underscore/1,no_warnings/1]). % Default timetrap timeout (set in init_per_testcase). @@ -64,6 +65,7 @@ groups() -> [pattern,pattern2,pattern3,pattern4,guard, bad_arith,bool_cases,bad_apply,files,effect, bin_opt_info,bin_construction,comprehensions,maps, + maps_bin_opt_info, redundant_boolean_clauses,latin1_fallback, underscore,no_warnings]}]. @@ -619,6 +621,19 @@ maps(Config) when is_list(Config) -> run(Config, Ts), ok. +maps_bin_opt_info(Config) when is_list(Config) -> + Ts = [{map_bsm, + <<" + t1(<<0:8,7:8,T/binary>>,#{val := I}=M) -> + t1(T, M#{val := I+1}); + t1(<<_:8>>,M) -> + M. + ">>, + [bin_opt_info], + {warnings,[{2,beam_bsm,bin_opt}]}}], + [] = run(Config, Ts), + ok. + redundant_boolean_clauses(Config) when is_list(Config) -> Ts = [{redundant_boolean_clauses, <<" |